I'm pretty sure pointer 1A 17 is wrong but I'm not sure.The text she says is located in 18171A.

So, I've got two problems here.I don't know if 1A 17 is pointed wrong or not but the next problem is to change the pointer for the script itself.

As I said in the other thread, I can't use pointer calculator because I've 64 bit Vista which pretty much sucks when making hacks.

I checked Mateo's tutorial about adding new events to maps and understand how to change where event data points to.I just have to know the pointer for 182667, that's all (also, sometime before I saw how to calculate to the pointer without any pointer calculators but didn't really understand it).

Re: Scripting problems

Pointers can be easily calculated in your head. Also, there is obviously Windows Calculator, which you could use.You already have the proper address 60:5B89. You will notice that the pointer part is between 0x4000 and 0x7FFF (inclusive). Your pointer 0x171A points to Rom bank 0x00. If you modify it to be 0x571A (0x4000 + 0x171A), you will actually point to your text in the current bank 0x60.

Re: Scripting problems

I got the rom completely messed up by changing 895B to 6766 and realized what was the problem. So, I don't want to change either the event data or the pointer for it.

Anyway, is the script for mom walking towards you and giving you Pokegear located in the event data ? I couldn't find any moving script there (68 xx + 2b) (what's 2b anyway).Or, is there a pointer there too which tells the game where her script is located ?If so, does event data only tell the rom how many warps, triggers, signposts and people are in the map ?

Sorry if I bother you with so many questions but it's just that I need help learning this.

2b means 2-byte pointer. So this is 68 xx ll hh where hl is the pointer and xx is some value (for 68 it's the person number).

Or, is there a pointer there too which tells the game where her script is located ?

Usually, there is a pointer for every people event (person), every signpost and every trigger event that all point to a script.

However, the script you're looking at is not activated by

stepping on a trigger

talking to a person/signpost

coming in the range of a trainer people event

The logical conclusion from that is, that the script you're looking for is not referenced in the event data, because no event is activating it, as we just saw in the list.Where else could it be? Take my scripting doc and read up on script headers. Script headers can be used for events that perform once you enter a map, e.g. for the first time, after a certain event has happened etc.

Basically, there are two different parts of the script header that both perform different things, which you will both find explained in much more detail in my doc.Basically, the script you're referring to is referenced in there. It's a one-time event and will happen once you enter the map.This is the same as the professor giving you your Pokémon or the Cop asking you the red-haired kid's name. They're both one-time events that are activated through a trigger number (the same that trigger events use).You can pretty much go from there, I think and figure out which script it is. All trigger numbers are set to 0x00 at the game's start with a few exceptions I documented somewhere...

If so, does event data only tell the rom how many warps, triggers, signposts and people are in the map ?

Exactly. Just as described in my scripting doc, this is what event data is! However, it doesn't only tell how many of each there are, but also what properties each has (location, picture, script pointer etc.)

Re: Scripting problems

I'm going to skip that for now but I'll come back to it later when I'm more used to this (I read it but didn't really understand even how to find the script header...)

Still one thing though:Here is the secondary map header address: $09649D (25:649D)

$09649D: 00 04 05 2A 9B 76 60 40 56 89 5B 00

So banks (2A & 60) with their pointers (9B 76 & 89 5B) determine where Map & Event data are located in the rom.What's the use of "40 56" ?

So I guess that bank 25 along with 9D 64 point where the Secondary Map Header is.Are the scripts for all the events of that map located where the pointer 9D 64 (and bank 25) is (expect the one in script header) ?

Re: Scripting problems

So banks (2A & 60) with their pointers (9B 76 & 89 5B) determine where Map & Event data are located in the rom.What's the use of "40 56" ?

That's the pointer to the script header. 0x60 is the rom bank for both, events and script header.

So I guess that bank 25 along with 9D 64 point where the Secondary Map Header is.

Correct, as you gave this offset above.

Are the scripts for all the events of that map located where the pointer 9D 64 (and bank 25) is (expect the one in script header) ?

No, they are usually located as follows:

Script header pointer points to the script header. And event pointer points to events.Events and script header have 2byte pointers to their scripts. From there on, technically, you could call a script from a different rom bank. However, most scripts do not do this and simply are in the script header/event bank.Their location is determined by the fact that at least some bits of the script have to be located in that bank, because events cannot directly point to scripts outside of their banks &#8213; except by calling another script in another bank out of their own script that is definitely located in the same bank as events/script header are.

Re: Scripting problems

Thanks for the help, I'm going to give you some credit too :D

Also, I'm going to edit the Pokegear script soon...

EDIT:I tried to edit the script in script header in which you get Pokegear and successed to do so but the problem is that it can't load movesprites and the script won't end like it usually would.Instead, NPC keeps talking the same things over and over again...

Re: Scripting problems

You will need to deactivate it by activating another trigger that does nothing (usually 0x14 0x01 will suffice for a script executed on first entering the map). Also, make sure the map id is in the table at 25:4000 (GS) and assigned a proper ram slot. If not, the asm is actually buggy and will return the wrong entry in that list.

Also, make sure you choose the proper stage to implement this script. Usually, scripts will use 0x05 or 0x07 IIRC.

Re: Scripting problems

Wow, that is one inaccurate list of scripting commands (or should I say "commandos"). I'd wager that they were all found by guessing what things did, and several are either off or completely wrong. For example, the yes no code description is wrong. You would do much better to just use the application examples in the compendium without letting that stuff distract you.

Re: Scripting problems

I found out that the rom loads elsewhere than from the actual script of the person the data that the person who challenges you is a trainer. I made one person point to an offset which is filled with 00 but still a battle started with a lv0 Tileset number 0.

So does anyone know where do the people load that script ?

The point of changing the script is to make one person a mini-boss who would only challenge you if you answer Yes to a certain question. I also tried to make the actual script to point to another script but it didn't work for some reason, it did actually nothing.

Re: Scripting problems

Okay, the person data has a byte that determines the colour AND whether it is a normal person, an item ball, or a trainer. If it is a trainer, it points to a different format than a normal script. It's all in the compendium, closer to the bottom where it lists event structures.

Re: Scripting problems

Okay, that really helped me a lot but now I'm stuck with another problem (if you dare, you could try to check this offset for me too).

I found the person data but what I found in there didn't make any sense.It lacks the Function data, it's just nowhere to be found :SAlso, does this happen to have something do with it if I said the person gives you his phone number after he beats you ?