PDA

View Full Version : [Essentials tutorial] Add More Than 4 Characters in Pokemon Essentials


KitsuneKouta
December 6th, 2010, 04:37 PM
By default, Essentials only allows you to create 4 selectable characters (labeled A-D, and numbered 0-3). This tutorial will allow you to increase this number to include as many as you want. As a disclaimer, I cannot guarantee consistent results. I have used this method twice, with someone else using it once, and each time the results were different. In an unedited kit, the results were perfect, but in existing projects it's sort of hit and miss, so beware.

First, in PokemonEditor, find

GLOBALMETADATA=[

(it should be on line 2743) and right below it you should see entries for players A - D that look like this:

["PlayerA",PlayerProperty,
_INTL("Specifies player A.")],

Add identical entries starting right below the entry for "PlayerD," but change the letters (it should go up to F if you want 6 characters, Z if you want 26, etc. You could arbitrarily name more if you wanted such as PlayerAA, or AZ, etc., but you probably won't need that many).

In PokemonUtilities there are 3 small edits to make. Look for these lines (around line 1493):

return false if id<0||id>=4
return "" if id<0||id>=4
return 0 if id<0||id>=4

They're not right together, but pretty close. Change the 4s to the number of characters you want (i.e. change the 4s to 6s for 6 characters, 4 to 26 for 26 characters, etc.).Next, in PokemonMap, starting on line 275, there will be some metadata items that look like this:
MetadataHome=1
MetadataPlayerA=2
MetadataPlayerB=3
MetadataPlayerC=4
MetadataPlayerD=5
MetadataStorageCreator=6
MetadataWildBattleBGM=7
MetadataTrainerBattleBGM=8
MetadataWildVictoryME=9
MetadataTrainerVictoryME=10
MetadataTextSkin=11
MetadataSurfBGM=12
MetadataBicycleBGM=13
Add more entries for the number of characters you want, such as "MetadataPlayerE" or "MetadataPlayerF." Here's an example of how it'd look if you have 6 characters:
MetadataHome=1
MetadataPlayerA=2
MetadataPlayerB=3
MetadataPlayerC=4
MetadataPlayerD=5
MetadataPlayerE=6
MetadataPlayerF=7
MetadataStorageCreator=8
MetadataWildBattleBGM=9
MetadataTrainerBattleBGM=10
MetadataWildVictoryME=11
MetadataTrainerVictoryME=12
MetadataTextSkin=13
MetadataSurfBGM=14
MetadataBicycleBGM=15
Then a little below it find this:
GlobalTypes={
"Home"=>[1,"uuuu"],
"PlayerA"=>[2,"essssss",:PBTrainers],
"PlayerB"=>[3,"essssss",:PBTrainers],
"PlayerC"=>[4,"essssss",:PBTrainers],
"PlayerD"=>[5,"essssss",:PBTrainers],
"StorageCreator"=>[6,"s"],
"WildBattleBGM"=>[7,"s"],
"TrainerBattleBGM"=>[8,"s"],
"WildVictoryME"=>[9,"s"],
"TrainerVictoryME"=>[10,"s"],
"TextSkin"=>[11,"s"],
"SurfBGM"=>[12,"s"],
"BicycleBGM"=>[13,"s"]
}
Then, once again, add more entries according the desired number of characters. An example:
GlobalTypes={
"Home"=>[1,"uuuu"],
"PlayerA"=>[2,"essssss",:PBTrainers],
"PlayerB"=>[3,"essssss",:PBTrainers],
"PlayerC"=>[4,"essssss",:PBTrainers],
"PlayerD"=>[5,"essssss",:PBTrainers],
"PlayerE"=>[6,"essssss",:PBTrainers],
"PlayerF"=>[7,"essssss",:PBTrainers],
"StorageCreator"=>[8,"s"],
"WildBattleBGM"=>[9,"s"],
"TrainerBattleBGM"=>[10,"s"],
"WildVictoryME"=>[11,"s"],
"TrainerVictoryME"=>[12,"s"],
"TextSkin"=>[13,"s"],
"SurfBGM"=>[14,"s"],
"BicycleBGM"=>[15,"s"]
}
Make absolutely sure that you renumber the entries when you add in new ones. (i.e. "BicycleBGM" starts at 13, but in the examples ends up at 15)

It is important to note that only the in-game editor will be able to edit the newly added characters (This is where the results of using these steps varies somewhat. Sometimes they show up, other times they don't. Either way, the new entries are still usable). The external editor that it packaged with Essentials will not work for this, as the new entries won't show up and the old ones will appear to be incorrect, since the values will look like they're in the wrong place. This doesn't effect whether or not it actually works. Also, the external editor's other functions should still be perfectly usable. Just don't use it to edit global metadata entries.

It is recommended to create the new characters in the metadata.txt file, in the event that they don't show up in the in-game editor anyways. To do so, simply copy/paste existing entries and change the values. Example:
Copy the entry
PlayerD=PkMnTRAINER_Female,Crystal,onbike,,Crystal,Crystal,Crystal
and add these directly below it in the txt file with necessary modifications:
PlayerE=PkMnTRAINER_Male,Green,onbike,,Green,Green,Green
PlayerF=PkMnTRAINER_Female,Blue,onbike,,Blue,Blue,Blue

To change the player to one of these new characters, do it just the same as usual with the pbChangePlayer(x) command, using numbers the correspond to characters you added (it starts with 0, so take the alphabetical letters corresponding number and subtract 1, so A is 0, M is 12, and Z is 25).

If you have any problems, let me know, unless it's just the entries not showing up in the in-game editor. There nothing I can do about that, except recommend that you retry the steps, but the new characters should work regardless.

zingzags
December 9th, 2010, 05:44 PM
Dude, can I kiss you?, I was looking for this...
I was having problems before because I was getting a fixum error....

chriskid198
December 9th, 2010, 06:00 PM
What are the selectable players?

KitsuneKouta
December 9th, 2010, 07:32 PM
What are the selectable players?
Is this what you're talking about?
To change the player to one of these new characters, do it just the same as usual with the pbChangePlayer(x) command, using numbers the correspond to characters you added (it starts with 0, so take the alphabetical letters corresponding number and subtract 1, so A is 0, M is 12, and Z is 25).

@zingzags: I don't know about the kiss but...I'm glad you liked the tutorial.

Pia Carrot
December 10th, 2010, 01:04 PM
wow, great tutorial KitsuneKouta-sempai. Now I can finally add the outfits to my game ^.^

IceGod64
December 11th, 2010, 09:29 AM
This tutorial might be handy, even though I'm only using two characters. I guess alternate sprites aren't a bad idea.

Mainly though, I wanted to comment on the external editor; I myself added map specific MetaData to allow running in a map without having to set Outdoor to true (For running in buildings, for example), and now I CAN edit this using the in-game editor. Not the external editor though, as you said, the external editor doesn't handle that very well.

KitsuneKouta
December 11th, 2010, 09:55 AM
This tutorial might be handy, even though I'm only using two characters. I guess alternate sprites aren't a bad idea.

Mainly though, I wanted to comment on the external editor; I myself added map specific MetaData to allow running in a map without having to set Outdoor to true (For running in buildings, for example), and now I CAN edit this using the in-game editor. Not the external editor though, as you said, the external editor doesn't handle that very well.Logically, that's what should happen. However, Essentials isn't always logical, with the random errors and bugs. And as I mentioned, I had mixed success (which I still can't figure out why), but it works, so that's the main thing. On a side note, it'd be nice if I could figure out how to edit the external editor, that way it could be upgraded with new changes. But I've heard it's somewhat buggy too, so that might just be an extra headache.

IceGod64
December 12th, 2010, 08:11 PM
On a side note, it'd be nice if I could figure out how to edit the external editor, that way it could be upgraded with new changes. But I've heard it's somewhat buggy too, so that might just be an extra headache.
It theoretically wouldn't be that much harder, as it's a normal set of RPGMakerXP scriptes that make it work. I just renamed "EditorScripts.rxdata" after backing up my original scripts and I'm able to edit it(Surprisingly).

KitsuneKouta
December 12th, 2010, 09:25 PM
It theoretically wouldn't be that much harder, as it's a normal set of RPGMakerXP scriptes that make it work. I just renamed "EditorScripts.rxdata" after backing up my original scripts and I'm able to edit it(Surprisingly).So how do you edit it (or what do you open it with)?

IceGod64
December 13th, 2010, 09:06 AM
So how do you edit it (or what do you open it with)?
Check your Project/Data folder
Rename the "scripts.rxdata" file in your current project to something easy to find, such as "scripts2.rxdata".
Rename "EditorScripts.rxdata" to just "scripts.rxdata".
In the main folder for your project, just open up "game.rxproj" on RPGmakerXP as you usually would, and your game will have the editors scripts. You can even compile the EXE to test and it works fine.
Once you got everything you wanted done, just rename the two files I told you to rename back to their original names.

KitsuneKouta
December 13th, 2010, 02:19 PM
Check your Project/Data folder
Rename the "scripts.rxdata" file in your current project to something easy to find, such as "scripts2.rxdata".
Rename "EditorScripts.rxdata" to just "scripts.rxdata".
In the main folder for your project, just open up "game.rxproj" on RPGmakerXP as you usually would, and your game will have the editors scripts. You can even compile the EXE to test and it works fine.
Once you got everything you wanted done, just rename the two files I told you to rename back to their original names.Huh, that was surprisingly simple. Thanks for the tip.

IceGod64
December 13th, 2010, 03:12 PM
Huh, that was surprisingly simple. Thanks for the tip.
Oh, it was what you said about editing the EXE in the first place that made me even experiment. I had no idea it was that easy. I was pretty sure it would require hex editing to do.

Anyway, editing the editor to reflect your changes shouldn't be hard at all now. Good luck with that.

KitsuneKouta
December 13th, 2010, 05:13 PM
Oh, it was what you said about editing the EXE in the first place that made me even experiment. I had no idea it was that easy. I was pretty sure it would require hex editing to do.

Anyway, editing the editor to reflect your changes shouldn't be hard at all now. Good luck with that.That's what I thought at first too. But if you think about it, the exe doesn't actually contain the data, it's in the .rxdata file. Same as with any RMXP project, the game.exe doesn't actually hold the data, it just reads what's in the data files and finds graphics and audio from sub folders. It was pretty clever on Poccil's part.

IceGod64
December 17th, 2010, 09:13 AM
Dude, can I kiss you?, I was looking for this...
I was having problems before because I was getting a fixum error....

@zingzags: I don't know about the kiss but...I'm glad you liked the tutorial.
http://images1.wikia.nocookie.net/__cb20081028021861/uncyclopedia/images/4/43/ZeldaKidding.JPG
He's got to be kidding!

Sorry about the very delayed response, and the rather needless post, but I felt this was necessary for those of you that get the joke.

That's what I thought at first too. But if you think about it, the exe doesn't actually contain the data, it's in the .rxdata file. Same as with any RMXP project, the game.exe doesn't actually hold the data, it just reads what's in the data files and finds graphics and audio from sub folders. It was pretty clever on Poccil's part. Actually, I just thought of another fix for why this trick might not work in edited projects. It's possible that one fix may be starting a new save file. That's fixed certain types of bugs in my own project before.

KitsuneKouta
December 17th, 2010, 10:52 AM
He's got to be kidding!

Sorry about the very delayed response, and the rather needless post, but I felt this was necessary for those of you that get the joke.

Actually, I just thought of another fix for why this trick might not work in edited projects. It's possible that one fix may be starting a new save file. That's fixed certain types of bugs in my own project before.Lol. That's part of why I'm so averted to playing the older zeldas.

Anyways, I suppose what you mentioned might be possible, but I don't know if it's really a bug. It's almost like Essentials looks for places to throw wrenches into, hoping to make your game developing experience a little harder. Also, it should work in edited kits, but other edits to the editor scripts may interfere. Or maybe Essentials isn't in the mood to cooperate on that day. Who knows. Really though, it's probably because of the compiler. Compiling the game should fix it, but then again it may not be designed to be flexible enough for various mods.