1. Is there a way to add new pokemon into the game? I've got some ideas for some custom pokemon. would I have to change the name and sprite of an existing pokemon to make my own- or is there an easier way? is it even possible?
This is indeed possible, and you don't even have to script it! Try the
Gen III Suite to edit and expand them 'mons. Please note using this tool, it works for FireRed and not Emerald. FireRed has the best support anyways as far as tools go so you're better off hacking that one for the time being. Sprite editing is a little trickier and you will need to use
Nameless Sprite Editor but you should probably focus on making the actual data files first and cross that bridge when you come to it.
3. I've looked around, and I can't seem to find an exact definition for "offset". I understand that it is the memory address that data is stored, but I feel like I'm missing some big things that would help me understand how everything works a little better.
Figured this one should be answered before question 2.
Basically your ROM is exactly 16 MB large. An offset is just a location in that ROM. For example 0x000000 is just the very beginning of your ROM, and every number onwards from that is just how far away from the beginning you are. You need these offsets because, for example, the game needs to load a script, it needs to know what part of the ROM to look at. Scripts basically boil down to basic hexdecimal data stored inside the ROM for the engine to use. Offsets can also point to strings, movement data, or literally anything you want that the engine can understand. A single letter (hex byte) in the data is a single offset, and almost everything you store will take up more than one offset.
Another thing that confused me in the beginning - when people say pointer that's basically a fancy word for offset. It's the same thing.
2. in terms of scripting, I've noticed every (or most) scripts start with #dynamic 0x800000. if every script uses the number 800000, how will the compiler (or whatever is fetching the script) know which one to use? is there something I'm missing here?
When you use the
#dynamic keyword, XSE does not actually write your script to pointer 0x800000. It searches for
free space to write your script
starting at the offset 0x800000 so you won't accidentally overwrite another script of yours (which could seriously mess things up). This is called using
dynamic offsets. It's better shown with an example. Here is a very simple message box:
Code:
#dynamic 0x800000 [B]' Where to start looking for free space for the dynamic offsets[/B]
#org @main [B]' Dynamic offsets are used in place of normal ones until it's compiled.[/B]
lock
msgbox @1 0x6 [B]' You can use dynamic offsets inside commands too, it will reference the #org @1 below.[/B]
release
end
#org @1
= This is a textbox.
So the #org allows you to make dynamic offsets (the @main and @1) without worrying about finding free space or overwriting scripts. Once you press compile in XSE, at the bottom there will be a list of the dynamic offsets translated into the "real" offsets. Let's say if you compiled the code above but there was already some stuff at 0x800000, it would keep looking for free space and tell you on the compile screen that @main is actually at 0x800A4B or something since that's where it found free space in the ROM for it.
So if you type 800000 as the script number in AdvanceMap, it won't work or run the wrong script. Once you compile, look for the "real" offset in the compile screen. That is what you type in.
We usually start at 0x800000 because that's a nice round number around where the core, original game scripts are. Technically you could push it and start the dynamic at 0x720000 for free space. It's just a matter of preference.
Keep in mind that using all that is completely optional and you can just use a regular pointer in the org like
#org 0x800C23 or whatever if you
know that there's nothing there to accidentally delete. But it's provided by XSE as a failsafe in scripting and allows you to focus on the actual scripting part instead of dealing with ROM data.
-----
I hope I helped out. Feel free to ask clarifying questions if you're still confused. :)