Resource icon

Nickname from the party

Pokémon Essentials Version
Non-applicable



Nice and easy to pop in:

In PScreen_Party, right below line 1128, paste this:
commands[cmdRename = commands.length] = _INTL("Rename")

The section should look like this:
commands[cmdSwitch = commands.length] = _INTL("Switch") if @party.length>1
if !pkmn.egg?
if pkmn.mail
commands[cmdMail = commands.length] = _INTL("Mail")
else
commands[cmdItem = commands.length] = _INTL("Item")
end
commands[cmdRename = commands.length] = _INTL("Rename")
end


At what should now be line 1213, paste this script below it:
elsif cmdRename>=0 && command==cmdRename
species=PBSpecies.getName(pkmn.species)
$game_variables[5]=Kernel.pbMessageFreeText("#{species}'s nickname?",_INTL(" "),false,15)
if pbGet(5)==""
pkmn.name=PBSpecies.getName(pkmn.species)
pbSet(5,pkmn.name)
end
pkmn.name=pbGet(5)
pbDisplay(_INTL("{1} was renamed to {2}.",species,pkmn.name))

Note that the 15 in bold is the character limit for the name- you may want to adjust that to your tastes, but remember to keep it something that would be legible in gameplay.

If you'd like to use the cursor naming instead of the keyboard, use this code instead:
elsif cmdRename>=0 && command==cmdRename
species=PBSpecies.getName(pkmn.species)
pbTextEntry("#{species}'s nickname?",0,15,5)
if pbGet(5)=="" ||
pkmn.name=PBSpecies.getName(pkmn.species)
pbSet(5,pkmn.name)
end
pkmn.name=pbGet(5)
pbDisplay(_INTL("{1} was renamed to {2}.",species,pkmn.name))


It should be below
when 1 # Take
if pbTakeItemFromPokemon(pkmn,self)
pbRefreshSingle(pkmnid)
end
end


And that's it!
Credits
Credits to TechSkylander1518, please!
Likes: Simeo
Author
TechSkylander1518
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from TechSkylander1518

Top