The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Sashikinaroji on January 12, 2013, 04:16:45 AM

Title: [Pokemon Essentials] Call Species
Post by: Sashikinaroji on January 12, 2013, 04:16:45 AM
... Hrm. Been a while since I've been here...

Well, I'm using Version 11 of Poccil's Pokemon Essentials kit, found here (http://http:http://pokemonessentials.wikia.com/wiki/Downloads).

And I'm trying to figure out how to call the Pokemon's species, rather than name (that is, having the pokemon called a charmander, rather than "ZIPPO"), but I am having a rough time...

I simply want the NPCs to be able to comment on the first Pokemon in your party by species, but the closest I have come is this:

$game_variables[2]=
$Trainer.pokemonParty[0].species


which, while technically working, doesn't return a name. Instead, it returns that Pokemon's number in the Pokedex, and I have no clue on how to get that to transfer over to Pokemon name...

EDIT: yeah, I accidently switched where I put the word here and the address... been a while since I've been on a forum... haha
Title: Re: [Pokemon Essentials] Call Species
Post by: TDS on January 14, 2013, 12:07:50 AM
The link you provide only works if you copy/paste it, otherwise it leads to a "http://here/" url.

I don't have XP so I won't be of much help, but if this system has a menu that displays the names of the Pokemon in your party then you could check how it's displayed there to see how it gets the name from the "$Trainer.pokemonParty" array.

Or you could try:


$Trainer.pokemonParty[0].name


Another thing you could try is to print all the methods and try what looks useful, like:


print $Trainer.pokemonParty[0].methods.sort


Let me know if any of that works, if it doesn't I'll see if I can somehow extract the scripts to read them.

Have a nice day.
Title: Re: [Pokemon Essentials] Call Species
Post by: Sashikinaroji on January 15, 2013, 12:46:42 AM
after a re-invigored search, I have found this snippet of coding in the pokedex script...

        # Pushing national species, name, height, weight, index number
        dexlist.push([nationalSpecies,
           PBSpecies.getName(nationalSpecies),height,weight,i])


of course, I now have a method of displaying the species, however, when I input the method of finding the species in, i get the following error.
[spoiler]

---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 5, map 6 (Apartment):

Exception: ArgumentError

Message: (eval):3:in `getName'wrong number of arguments(0 for 1)

***Full script:

$game_variables[1]=
$Trainer.pokemonParty[0].species
$game_variables[2]=PBSpecies.getName
(pbGet(1))


[/spoiler]

which tells me that pbGet(1) will give me the Kanto Pokedex number of my pokemon, but will not convert it into a physical number in the same way I couldn't get a different dialogue to pick an actor name based on a variable (btw, if you can tell me how to swing that too... that'd be great, seeing how it is too small an issue to make a thread for)... So what happens, then, is they try to call the species with the phrase pbget(1) which crashes the game... Any ideas how to circumvent?

I have tried to give another variable the value printed by pbGet(1), using $global_variable[1]=pbGet(1), but it doesn't give the result, only the actual phrase...

PS. Unfortunately, those other two options didn't work