The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old December 16th, 2012 (12:37 PM).
Arma's Avatar
Arma
Actually not mad at all
Community Supporter
 
Join Date: Dec 2009
Location: The Hague
Age: 21
Gender: Male
Nature: Jolly
Currently, the maximum amount of items a trainer can carry is 4, adding another one in the pbs file creates an error. Why is this limit set on 4, and is there a simple way of increasing this amount?

I was wondering which script(s) which script I should be looking at, as there are more things I'd like to edit (NPC trainers also having Pokemon with nicknames, their Pokemon not starting out with full HP, etc.)

Note, I have some programming experience in C#, but I don't know much about ruby. So, I'm not completely clueless, but some pointers on were to start would help. (the lack of comments in essentials isn't really helping me out XD)
__________________
Reply With Quote
  #2    
Old December 16th, 2012 (01:33 PM). Edited December 16th, 2012 by Maruno.
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
It's an arbitrary limit, based on the probability that 4 items is a large amount for one trainer (I heard somewhere that no trainer in the official games has more than 2 items). It used to be an important limit due to an old way trainer data was saved, but nowadays it serves no purpose. I've removed it in v11.

In the script section Compiler, go to line 1400 (a raise which complains about too many items), and delete it. That's all. Now trainers can have a hundred items each.

Trainer Pokémon can already be given nicknames. As for modifying their starting HP/PP/whatever, you may want to do that for each trainer in turn in the def pbLoadTrainer (assuming you don't want to do that for every trainer, which would be tedious and, frankly, a bit OCD).
__________________
Reply With Quote
  #3    
Old December 16th, 2012 (02:02 PM). Edited December 16th, 2012 by Arma.
Arma's Avatar
Arma
Actually not mad at all
Community Supporter
 
Join Date: Dec 2009
Location: The Hague
Age: 21
Gender: Male
Nature: Jolly
Thank you! I should've looked at the tutorial for the nicknames, instead of the old notes.html file XD.

EDIT:
This error keeps popping up:
Spoiler:

Exception: RuntimeError
Message: Script error within event 4, map 2 (Lappet Town):
Exception: ArgumentError
Message: Section108:55:in `>'comparison of String with 0 failed
***Full script:
pbTrainerBattle(PBTrainers::FISHERMAN,"Andrew",_I("\bWashed out!"),false,0)
Interpreter:243:in `pbExecuteScript'
PokemonTrainers:55:in `pbLoadTrainer'
PokemonTrainers:21:in `each'
PokemonTrainers:21:in `pbLoadTrainer'
PokemonTrainersin `each'
PokemonTrainersin `pbLoadTrainer'
PokemonTrainers:322:in `pbTrainerBattle'
(eval)in `pbExecuteScript'
Interpreter:788:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:276:in `pbExecuteScript'
Interpreter:788:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'

I placed this if below the one checking for shadow Pokemon (line 54):
Code:
      if poke[16] > 0 && poke[16] < 100 #### percentage of pokemon's max health
        Pokebattle_Pokemon(poke[1]).hp = Pokebattle_Pokemon(poke[1]).maxHP * poke[16] / 100
      end
      poke.calcStats
__________________
Reply With Quote
  #4    
Old December 16th, 2012 (04:52 PM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
When you added code to pbCompileTrainers to allow for a 16th value, did you add a line saying poke[16]=poke[16].to_i? You need to turn it into an integer.

Also, the code you mentioned is wrong. Use this:

Code:
if poke[16] > 0 && poke[16] <= 100
  pokemon.hp = (pokemon.totalhp * poke[16] / 100).floor
end
At least you put it in the right place.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:14 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.