• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
In the notes.html under trainers it says:

VanishIfSwitch: If the RPG Maker XP switch with this number is ON, the event will not be shown.

So if a certain switch is on, the event wouldn't be shown. In my game, the graphic is still there. If i try to remove the graphic on the third event page, the graphics on all the pages of that event disappear.

Is this supposed to happen?
And also, when I battle a trainer their Pokemon would be different genders. If I battle them again, the genders are all mixed up again. How can I fix this?
I haven't dealt with the VanishIfSwitch, but I do know that if you remove the graphic on the third event page it should in no way affect the others. For the second part, there's currently no fix that I know of, but something could probably be scripted. You would probably have to look at how the trainers.txt is compiled, and make it handle gender (for each pokemon, in a similar way to shiny or shadow). You would then have to make an edit to PokemonTrainer where it would check the particular line in the trainers.dat file to determine the appropriate gender. Alternatively, you could probably look and see if genders are handled in any way already, and if so, make a check for the trainer's gender, and make the pokemon's gender match. Unless you know how to script, none of this will help you much though.
 
189
Posts
14
Years
  • Seen Nov 23, 2023
I was wondering what the correct set up for a trainer that would engage you automatically after a speech (e.g. Rival at Indigo Plateau in HGSS) would be, in terms of the script conditions and stuff. I noticed on the sample trainers that there is a condition referring to distance or something and the sample gym leader has conditions referring to the badges, neither of which i want.

Also, in the editor, how do I remove a pokemon from a trainer (short of deleting it in notepad)? I accidentally added a pokemon to the wrong trainer and there seems to not be a remove pokemon optioin. I don't want to mess up the .txt file so any help is appreciated.

Thirdly, to repeat my last post, what is the code for the keyboard text entry (like in pokemon raptor) and how/where do i implement it?

Lastly, can anyone direct me to some scripting tutorials relevant to the pokemon essentials stuff, i.e. trainers, menus, pokedex, etc. (on the topic of the pokedex, is there a filetype/method to make a footprint appear?)
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
I was wondering what the correct set up for a trainer that would engage you automatically after a speech (e.g. Rival at Indigo Plateau in HGSS) would be, in terms of the script conditions and stuff. I noticed on the sample trainers that there is a condition referring to distance or something and the sample gym leader has conditions referring to the badges, neither of which i want.

Also, in the editor, how do I remove a pokemon from a trainer (short of deleting it in notepad)? I accidentally added a pokemon to the wrong trainer and there seems to not be a remove pokemon optioin. I don't want to mess up the .txt file so any help is appreciated.

Thirdly, to repeat my last post, what is the code for the keyboard text entry (like in pokemon raptor) and how/where do i implement it?

Lastly, can anyone direct me to some scripting tutorials relevant to the pokemon essentials stuff, i.e. trainers, menus, pokedex, etc. (on the topic of the pokedex, is there a filetype/method to make a footprint appear?)
Have a look at a regular trainer. It contains, amongst other things, "Kernel.pbNoticePlayer". This script does the "walk towards the player if they're within range" thing. Get rid of that, and change the event type to Action Button rather than Event Touch. Then just put a few messages before the battle scripts, and you're set.

I'm not answering this directly because I don't use the editor, so I don't know. There's nothing hard about the PBS files, though. Just remove the pokémon's line from that particular trainer, and change the number that says how many pokémon that trainer has.

In PokemonEntry, find the def "pbEnterText" (near the bottom). This contains the line "sscene=PokemonEntryScene2.new". Remove that "2". Simple.

The best way to get used to Essentials scripts is to look at them and play with them. Just experiment. (The same way you display any picture. I've done it with three lines. Hint: it involves "BitmapCache.load_bitmap", "bitmap.blt" and "dispose" - go find somewhere else that uses those terms, and copy/paste.)
 

Raikt

Fiction writer.
72
Posts
14
Years
  • Age 34
  • Seen Jul 19, 2010
Ok; so, coming in to say my bad. I just noticed that you can "simulate" more than three layers by stacking and leaving the base layer the same. I was able to achieve my "6 layer" volcano scape I was hoping for. Thanks for the help so far on everything, guys.~
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
I was wondering what the correct set up for a trainer that would engage you automatically after a speech (e.g. Rival at Indigo Plateau in HGSS) would be, in terms of the script conditions and stuff. I noticed on the sample trainers that there is a condition referring to distance or something and the sample gym leader has conditions referring to the badges, neither of which i want.

Also, in the editor, how do I remove a pokemon from a trainer (short of deleting it in notepad)? I accidentally added a pokemon to the wrong trainer and there seems to not be a remove pokemon optioin. I don't want to mess up the .txt file so any help is appreciated.

Thirdly, to repeat my last post, what is the code for the keyboard text entry (like in pokemon raptor) and how/where do i implement it?

Lastly, can anyone direct me to some scripting tutorials relevant to the pokemon essentials stuff, i.e. trainers, menus, pokedex, etc. (on the topic of the pokedex, is there a filetype/method to make a footprint appear?)
On the first one I'm assuming you want something like the character walks up to them automatically followed by said speech. You would need an autorun at the entrance to force your character to walk up to them, and after the Wait For Move's Completion make a switch that turns on. Set the trainer event's condition to that switch and make it autorun as well, turning off the switch after battle. To remove entries for pretty much anything in the editor, go to the part you want to remove and press z, and it should give a confirmation message before deleting it. I don't have the keyboard text entry, so maybe you can ask whoever developed the game. For scripting tutorials, it doesn't necessarily have to be pokemon relevant since it's all RGSS anyways. It always help to actually look at the scripts in the starter kit if you want to start learning though (after 2 months you'll probably start to feel comfortable with it, but you'll want to learn the meanings of general terms first, like methods, classes, etc). For footprints, it shouldn't be too hard, but you'll need the graphic for every pokemon's footprint. Then there would need be some kind of check to determine the species and what the appropriate footprint would be (layed out similar to how the pokemon's picture is displayed).
 

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
Ok; so, coming in to say my bad. I just noticed that you can "simulate" more than three layers by stacking and leaving the base layer the same. I was able to achieve my "6 layer" volcano scape I was hoping for. Thanks for the help so far on everything, guys.~

If you're crazy good at RGSS, I'm fairly certain that you can script more than 3 layers.
 
2,048
Posts
16
Years
  • Age 31
  • Seen Sep 7, 2023
I think he meant having more layers of cliffs, which can be done with just one layer.

Adding more layers through RGSS isn't difficult; however, you won't be able to edit them easily, as RMXP itself only has 3 layers in its map editor :P
 
189
Posts
14
Years
  • Seen Nov 23, 2023
Have a look at a regular trainer. It contains, amongst other things, "Kernel.pbNoticePlayer". This script does the "walk towards the player if they're within range" thing. Get rid of that, and change the event type to Action Button rather than Event Touch. Then just put a few messages before the battle scripts, and you're set.

I'm not answering this directly because I don't use the editor, so I don't know. There's nothing hard about the PBS files, though. Just remove the pokémon's line from that particular trainer, and change the number that says how many pokémon that trainer has.

In PokemonEntry, find the def "pbEnterText" (near the bottom). This contains the line "sscene=PokemonEntryScene2.new". Remove that "2". Simple.

The best way to get used to Essentials scripts is to look at them and play with them. Just experiment. (The same way you display any picture. I've done it with three lines. Hint: it involves "BitmapCache.load_bitmap", "bitmap.blt" and "dispose" - go find somewhere else that uses those terms, and copy/paste.)

thanks a bunch maruno. all of it worked, although it took a bit of effort to make the footprint work (in fact, just to make it!). I never knew it would be that easy to change to text entry - i feel like such a n00b (though really i am).
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
thanks a bunch maruno. all of it worked, although it took a bit of effort to make the footprint work (in fact, just to make it!). I never knew it would be that easy to change to text entry - i feel like such a n00b (though really i am).
I was surprised by the entry thing too, when I discovered it months ago. It's nothing to feel noobish about, though - it's not as though it's mentioned anywhere.
 

Kaylee Krysteenah Fynch

is rarely here
302
Posts
16
Years
Wish I knew more about what to do with all those buttons in the PokémonEntry. For one thing, F5 is a really inconvenient button to push, so why did he make THAT the select button?!? >.<

Basically, I want to make it so that one button opens the menu (like start would), one button acts as select (and not have it be F5), one button acts as b (cancels choices, and makes you run on the overworld), and one button acts as a (confirming choices, talking to people, and checking objects).

Now, I don't know if I can do that (especially since I'm pretty sure there are references to the buttons everywhere, so I'll miss one somewhere and crash my game or something >.<). So if anyone has any tips on what I should look for, that'd be great.

Also, a person could program any button to any key if they knew the code for that key, right? If so, do you think someone could point me in the direction of those codes? If it doesn't work that way, then it would be great if someone could let me know that, instead. ;)
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Wish I knew more about what to do with all those buttons in the PokémonEntry. For one thing, F5 is a really inconvenient button to push, so why did he make THAT the select button?!? >.<

Basically, I want to make it so that one button opens the menu (like start would), one button acts as select (and not have it be F5), one button acts as b (cancels choices, and makes you run on the overworld), and one button acts as a (confirming choices, talking to people, and checking objects).

Now, I don't know if I can do that (especially since I'm pretty sure there are references to the buttons everywhere, so I'll miss one somewhere and crash my game or something >.<). So if anyone has any tips on what I should look for, that'd be great.

Also, a person could program any button to any key if they knew the code for that key, right? If so, do you think someone could point me in the direction of those codes? If it doesn't work that way, then it would be great if someone could let me know that, instead. ;)
There are three parts to the input commands. The first is figuring out which key you've actually pressed on the keyboard. These are known as "0x5A", "0x0d", and so on. I call these keys.

The next part is giving these awkward codes a simple name so you can tell at a glance what you're actually doing. These are "Input::A", "Input::UP", and so on. This is what you'll find throughout the scripts. I call these buttons.

The third part is what pressing a button actually does. This all depends on what's going on at the time (i.e. whether you're in the Bag or the Pokédex or a Mart or whatever), so different parts of the scripts each check what's being pressed. They check to see whether you've pressed a particular button, and if so, do this/that/the other. I call these commands.

Look in PokemonEntry, and a little way down you'll find the conversions between the two. They look like the following:

Code:
    when Input::A
     return [0x5A,0x10] # Z, Shift
    when Input::B
     return [0x58,0x1B] # X, ESC
    when Input::C
     return [0x43,0x0d,0x20] # C, ENTER, Space
Luckily, there's a comment next to each line saying what each key code is.

What you can do is find the "Input::F5" line, and change the key code there to the key code for another key (e.g. Tab). Unfortunately I don't know where to find the key codes for any key on a keyboard, so I've just ended up moving the codes around (i.e. using the ones that are already there, but assigning them to different buttons).

The above changes what keys you can use in the game, and what they're called. If you want to change what pressing a button will actually do in a scenario (e.g. pressing the A button in the Bag), you'll need to find the part of the scripts that actually deals with that scenario (e.g. PokemonBag). See below.



One part of the controls in particular I didn't like was that "run" was a separate key to pretty much everything else, and that "open pause menu" was the same key as "cancel" (meaning if you press "cancel" to finish a dialogue, the pause menu pops up, which is annoying). I figured that "back" could be the same key as "run" (since you'll never use the two at the same time), and that "open pause menu" could be a separate key.

Essentially, I switched around the "run" and "open pause menu" controls. Makes sense, right? And it actually works just fine.

The controls (i.e. what pressing a button actually does) are located in lots of places around the scripts. Just search for "Input::" in the appropriate places to find them.

The "run" command is in Walk_Run, in the def "pbCanRun?". It's using button A at the moment, so I changed it to button B (which is used as "back"/"cancel" elsewhere). The "open pause menu" command is in Scene_Map; search for "Input::B" and you should find it. I changed that to button A. Done!



That's just a very brief overview of the controls. It's fiddly stuff, and it's very easy to mess it up (so make backups!). Just remember that there are three parts to the input: finding what's been pressed on the keyboard (PokemonEntry), giving those keys a name (PokemonEntry again), and saying what happens when they're pressed (everywhere).
 

Kaylee Krysteenah Fynch

is rarely here
302
Posts
16
Years
Thanks Maruno, I'll probably stick with that. And yup, I've learned to make backups whenever I do something I'm not sure about - and even sometimes if I do think I'm sure!

Anyway, I was Googling for those keyboard codes, trying to find one that matches up with the numbers used in PokemonEntry. I finally did, but the page won't load, and I had to use that google had in its cache. Because it was hard to find/get to the information, I'll put it up here for anybody who needs it - also, just give me a shout about where and how and whether it should go in the wiki. ;)

The following is mostly copied from where I found it, but I had to fix the formatting (so it's a bit sloppy):
Spoiler:

Probably nobody here needed all of the above, and I know there are some things there that made me go, "huh?" But I didn't want to take any out, just in case someone could make use of it. ;) Also, I haven't tested any of them yet, just so you all know - I just checked that they seemed to match up. Ie, F5 is 74, left arrow is 25.

If you use them, you'll want to put an "0x" in front of them (0x signifies that the following number is a hexidecimal, if I'm remembering correctly). For example, F5's code, 74, becomes 0x74. When in doubt, look at the codes already there. ;)

EDIT: Control change SUCCESS! I have it working a lot like my controls on VBA now. WOOHOO! Thanks for the tips, Maruno. Also, those codes I looked up seem to work - at least the ones I used, which were standard letters. Though I confused myself for a minute with the code for the D key... Argh, when will I stop having these blond moments?!? XD At least I quickly realized what I ought to check this time! ^o^
 
Last edited:
15
Posts
14
Years
  • Seen Jan 11, 2014
Quick question - TMs and HMs appear to be shown in the pocket in the order they are added.

It's not vital, but would be much more aesthetically pleasing if they could be in numerical order (TMs then HMs). Is there a way to do this?



Anybody have a solution for this?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Quick question - TMs and HMs appear to be shown in the pocket in the order they are added.

It's not vital, but would be much more aesthetically pleasing if they could be in numerical order (TMs then HMs). Is there a way to do this?
There are two parts to this request: reorder the items in the TM/HM pocket whenever you add a new item, and forbid the player from rearranging the items in that pocket. Both are simple fixes, if you know where to look.

If you think about it, if you reorder the items when a new item is picked up (or when you've picked up your 100th copy of an item you already have, i.e. it goes into a new slot in the pocket), then that'll work just fine. Using/tossing/giving an item won't change the overall order of the items (taking a new item work the same as adding a new one), and the only other obstacle becomes the ability to rearrange items (see below). Given this, we find the script that deals with adding items, and modifying it slightly.

PokemonBag, "self.pbStoreItem". Looks complicated. But basically, the first part of the "for" loop adds an item to a new slot, and the second part adds it to an already filled slot that has the same item in it. We care about the first part, since that's the one that will change the numerical/alphabetical/whateverical order we want. Obviously, we need to let the item be added first, and only reorder the list after that. And that's what the additional red line below does.

Code:
 def self.pbStoreItem(items,maxsize,maxPerSlot,item,qty)
  raise "Invalid value for qty: #{qty}" if qty<0
  return true if qty==0
  for i in 0...maxsize
   itemslot=items[i]
   if !itemslot
    items[i]=[item,[qty,maxPerSlot].min]
    qty-=items[i][1]
    [COLOR=Red]items.sort! if $ItemData[item][ITEMPOCKET]==4[/COLOR]
    return true if qty==0
   elsif itemslot[0]==item && itemslot[1]<maxPerSlot
    newamt=itemslot[1]
    newamt=[newamt+qty,maxPerSlot].min
    qty-=(newamt-itemslot[1])
    itemslot[1]=newamt
    return true if qty==0
   end
  end
  return false
 end
An important thing to note is that this sorts the items depending on their ID number (i.e. the way they're listed in items.txt). By default, HMs are listed just below the TMs in there, so they come after the TMs in the pocket - it doesn't sort by alphabetical order. Make sure the order you want the items to be in is how they're arranged in items.txt.

This only reorders the TM/HM pocket (or rather, pocket number 4). You can easily expand on it to auto-reorder the berries pocket or anything else (although possibly aside from the berries, I don't know why you'd want to).



Remember there's a second part to this? It's not letting the player rearrange the items by themselves. If they could, then the items would simply revert back to their original list order once something new was added, which would annoy the player.

PokemonBag, the first (and biggest) "pbChooseItem". Somewhere in there is...
Code:
  if Input.trigger?(Input::A)
...followed by the code that will swap two items. You need to add a caveat to this line such that it will only work if A has been pressed AND if the pocket is not the TM/HM pocket. Like so:
Code:
  if Input.trigger?(Input::A) [COLOR=Red]&& $ItemData[itemwindow.item][ITEMPOCKET]!=4[/COLOR]
See? There's barely anything to it, but you'd need to know what you were doing in order to figure it out.
 
2,048
Posts
16
Years
  • Age 31
  • Seen Sep 7, 2023
You can change the sort method by passing a block to the sort function, just so you know ;)
 

Sero

私はセクシーです
82
Posts
15
Years
I was wondering, does anyone have pre-made animation file for the attacks so I can just import them and they would work?
If not, can anyone tell me how to make them. Its too confusiing for me.
 
5
Posts
14
Years
  • Seen Apr 19, 2017
Hey,
I've been changing the midis to the proper ripped R/S mp3s, and modifying the scripts/metadata to point to the mp3s if i have to.
And I've found an annoying bug..
At the start of a battle (wild and trainer, started through debug menu or not), the music starts playing in the MIDDLE and not at the beginning..
Is there any way to rectify this ?
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
If I knew what that meant, I'd probably agree with you.
I was thinking the same thing...

@Sero: I don't think there are any complete animation files, unless they are part of someone's project. Even then, I doubt anyone would give it to you since they can be difficult or time consuming to make (it's something that tends to get put off when making a project, to make more time for scripting, mapping, spriting, etc.). Also, you would need the exact graphics they were using, each named the same. To make your own, you will need some graphics in the Animations folder (you could use what comes in the RTP if you'd like, but they aren't very pokemon-like). To learn how to make them, you should probably just mess around with ones that already exist to see how they function. If you're not a very good artist, you will probably struggle with making them. Also note that the animation editor that comes with essentials is required for moving the battlers, since the one in RMXP is fairly limited.

@Wack0: I was working on that recently, but didn't get it figured out. I'll get back to it sometime and see if I can fix it.
 
Status
Not open for further replies.
Back
Top