Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → Some help:How to create and change Events ?[Pokemon Silver]

#1 2013-09-20 18:29:59

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 218/947
Website

Some help:How to create and change Events ?[Pokemon Silver]

I got a problem with events.

How do i add a trainer battle event
How do i add event like the starters
How do i add events like rock smash
How to make an event,that a trainer comes to you and gives something

Offline

#2 2013-09-21 11:29:02

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 98/430
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Tauwasser's Scripting Compendium contains everything you need to know about scripting in Gold and Silver

Before you add a new event to a map it's likely that you won't have space unless you repoint the Map Event Header. You have to head to the Second Map Header of the map, and edit the pointer to the map event header to point to an offset of the same bank where there is no more data. Then copy all the data belonging to the Map Event Header and paste it in the offset you made the pointer point to. Now, you'll usually have plenty of space to add new events for that map until the last offset of the bank. I don't know the offsets of the Second Map Headers of Silver, but there is documentation about them in the dissasembly of Pokemon Crystal, which should make the job easier. The Map Event Header pointer is the tenth and eleventh bytes from the start of the Second Map Header of the map.


How do i add a trainer battle event

There is a lot of documentation about this in the forums. Check http://hax.iimarck.us/forum/10/

How do i add event like the starters

You got to be a bit more specific about this one. The easiest thing would be to edit Elm's existing script if you wanted the Pokemon to be different. In that case, for each of the three Pokemon, you'll have to edit:
- Elm's text ("do you want [Pokemon], the [type] Pokemon?")
- The picture when you "talk" to the Pokeball
- The cry
- The Pokemon itself
- The name of the Pokemon that it's shown when you receive it (there is a script for that, which converts the pokemon no. to its name, and that name is shown then in the text)

How do i add events like rock smash

Rock smash events are treated as person events which means their event definitions go along with the other person events in the map event header of the map. The person event definition for a rock smash boulder is:

[0x59] [x and y coordinates (two bytes)] [0x18] [0x00] [0xFF] [0xFF] [0x00] [0x00] [pointer to script (two-byte pointer)] [flag (2 bytes)]

To make the rock smash boulder always show, flag is 0xFFFF.

The script for a rock smash boulder is: [0x0C] [0x0F] [0x00]. If you wanted to add more than one rock smash boulder to the same map, just make all of them point to the same script.

How to make an event,that a trainer comes to you and gives something

To make a person give you an item, you'll have to use the give item script:

[9D][item no][amount]

This script obviously has to be part of the script of the person that gives away the item. Usually you'd first make the person show the corresponding text, then make it give the item, and finally make it show another closing text. To show text you can use the following script:

[0x47 (load font)] [0x4C (show text)] [2-byte pointer to text] [0x53 (close text)] [0x49 (load moving sprites)]  (See the scripting compendium for more information.)

If the item the person gives away is not a key item, you'll have to check for full bag. The give item script [9D] returns 00 or 01 depending on whether your bag is full (00) or there is space for the item that is about to be given (01). You'll have to perform an 'if false' (aka if bit is 0) pointing to a script that shows text telling that bag is full.

For the 'if false' RAM check: [0x08] [2-byte pointer to script]

So: [0x6A] [0x47] [0x4C] [2-byte pointer to text] [0x53] [9D] [item no] [amount] [0x08] [2-byte pointer to full bag script] [0x4C] [2-byte pointer to text] [0x53] [0x49] [0x90]

6A turns person to Hiro and 90 ends the script.

Last edited by Crystal_ (2013-09-21 11:41:10)

Offline

#3 2013-09-21 12:29:39

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 766/1,194
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

@Crystal Posts like this are what we need on this forum! Maybe someone should add this topic to Sticky, because this post on it contains a lot of information and links to tutorials. :)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#4 2013-09-21 18:30:30

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 221/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Crystal_ wrote:

Tauwasser's Scripting Compendium contains everything you need to know about scripting in Gold and Silver

Before you add a new event to a map it's likely that you won't have space unless you repoint the Map Event Header. You have to head to the Second Map Header of the map, and edit the pointer to the map event header to point to an offset of the same bank where there is no more data. Then copy all the data belonging to the Map Event Header and paste it in the offset you made the pointer point to. Now, you'll usually have plenty of space to add new events for that map until the last offset of the bank. I don't know the offsets of the Second Map Headers of Silver, but there is documentation about them in the dissasembly of Pokemon Crystal, which should make the job easier. The Map Event Header pointer is the tenth and eleventh bytes from the start of the Second Map Header of the map.


How do i add a trainer battle event

There is a lot of documentation about this in the forums. Check http://hax.iimarck.us/forum/10/

How do i add event like the starters

You got to be a bit more specific about this one. The easiest thing would be to edit Elm's existing script if you wanted the Pokemon to be different. In that case, for each of the three Pokemon, you'll have to edit:
- Elm's text ("do you want [Pokemon], the [type] Pokemon?")
- The picture when you "talk" to the Pokeball
- The cry
- The Pokemon itself
- The name of the Pokemon that it's shown when you receive it (there is a script for that, which converts the pokemon no. to its name, and that name is shown then in the text)

How do i add events like rock smash

Rock smash events are treated as person events which means their event definitions go along with the other person events in the map event header of the map. The person event definition for a rock smash boulder is:

[0x59] [x and y coordinates (two bytes)] [0x18] [0x00] [0xFF] [0xFF] [0x00] [0x00] [pointer to script (two-byte pointer)] [flag (2 bytes)]

To make the rock smash boulder always show, flag is 0xFFFF.

The script for a rock smash boulder is: [0x0C] [0x0F] [0x00]. If you wanted to add more than one rock smash boulder to the same map, just make all of them point to the same script.

How to make an event,that a trainer comes to you and gives something

To make a person give you an item, you'll have to use the give item script:

[9D][item no][amount]

This script obviously has to be part of the script of the person that gives away the item. Usually you'd first make the person show the corresponding text, then make it give the item, and finally make it show another closing text. To show text you can use the following script:

[0x47 (load font)] [0x4C (show text)] [2-byte pointer to text] [0x53 (close text)] [0x49 (load moving sprites)]  (See the scripting compendium for more information.)

If the item the person gives away is not a key item, you'll have to check for full bag. The give item script [9D] returns 00 or 01 depending on whether your bag is full (00) or there is space for the item that is about to be given (01). You'll have to perform an 'if false' (aka if bit is 0) pointing to a script that shows text telling that bag is full.

For the 'if false' RAM check: [0x08] [2-byte pointer to script]

So: [0x6A] [0x47] [0x4C] [2-byte pointer to text] [0x53] [9D] [item no] [amount] [0x08] [2-byte pointer to full bag script] [0x4C] [2-byte pointer to text] [0x53] [0x49] [0x90]

6A turns person to Hiro and 90 ends the script.

Thank you! But,when i open an event it shows some numbers at function picture etc.

Offline

#5 2013-09-21 18:34:58

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 222/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

TheMoneyOfTheWorld wrote:

@Crystal Posts like this are what we need on this forum! Maybe someone should add this topic to Sticky, because this post on it contains a lot of information and links to tutorials. :)

Yeah it contains lot of information. Also do you know how to post sticky threads ?

Offline

#6 2013-09-21 19:53:15

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 770/1,194
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Pokemon_Master wrote:
TheMoneyOfTheWorld wrote:

@Crystal Posts like this are what we need on this forum! Maybe someone should add this topic to Sticky, because this post on it contains a lot of information and links to tutorials. :)

Yeah it contains lot of information. Also do you know how to post sticky threads ?

Sticky is not a status for a topic which you can easily choose. It must be given to a topic by an Admin or a Moderator.


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#7 2013-09-24 22:01:25

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 266/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

I got another problem. When i try to add new events,the old events will dissappear. GoldMap displays also an error message like access denied

Offline

#8 2013-09-25 06:01:03

Miksy91
Member
Registered: 2010-10-16
Post 1,901/2,311

Re: Some help:How to create and change Events ?[Pokemon Silver]

Pokemon_Master wrote:

I got another problem. When i try to add new events,the old events will dissappear. GoldMap displays also an error message like access denied

You'll have to repoint the event data to blank space, and re-write the events there to be able to add new ones.
See Mateo's tutorial in Gen II tut. section.

Offline

#9 2013-09-25 09:49:49

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 269/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Miksy91 wrote:
Pokemon_Master wrote:

I got another problem. When i try to add new events,the old events will dissappear. GoldMap displays also an error message like access denied

You'll have to repoint the event data to blank space, and re-write the events there to be able to add new ones.
See Mateo's tutorial in Gen II tut. section.

Thanks! But why GoldMap displays an error message it wont let me save the edited ROM. It says can't create file access denied. Can you help me ? Please Miksy

Last edited by Pokemon_Master (2013-09-25 09:50:52)

Offline

#10 2013-09-25 10:06:12

Miksy91
Member
Registered: 2010-10-16
Post 1,903/2,311

Re: Some help:How to create and change Events ?[Pokemon Silver]

You're probably having the rom file as "Read-only". That means, the "user" (which is you) can only read the file, but not re-write data of it.
Right click the rom file with mouse and choose Properties. There, change it to "not Read-only".

Offline

#11 2013-09-25 10:16:26

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 270/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Miksy91 wrote:

You're probably having the rom file as "Read-only". That means, the "user" (which is you) can only read the file, but not re-write data of it.
Right click the rom file with mouse and choose Properties. There, change it to "not Read-only".

Thank yooooooooouuuuu! I forgot that protected files can't be edited.

Offline

#12 2013-09-28 19:24:05

Skurbert
Member
Registered: 2012-12-16
Post 54/95

Re: Some help:How to create and change Events ?[Pokemon Silver]

Thanks to Miksy91 and Mateo , we can, with the help of Tauwasser's Scripting Compendium, create our own trainers with ease. Do what I did and throw off your fear of The hex Editor - For example Goldfinger.

Here are some codes you can use in Hex:

Signpost: 47 4C [Pointer] 53 49 90

Simple Talk-to-NPC: 51 [Pointer] 6A 47 4C 53 49 90

[Bit no. (2byte)][Trainer Group][Trainer Number][2byte pointer to Text when seen][2byte pointer to text when trainer beaten][2byte pointer to script when lost (0000=Blackout)][2byte pointer to script if won/talked to again]

But be ready for several headaches when coding stuff. :P

Last edited by Skurbert (2013-09-28 19:25:47)

Offline

#13 2013-09-30 10:56:09

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 305/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Yet another problem: When i change a thing like map or wild pokemon and open VisualBoyAdvance,nothing looks changed as it were not changed. When i open GoldMap the map and wild pokemon data are   changed. I think the Pc i use has the problem,because i tried it in another Pc and worked. Please help!

Offline

#14 2013-09-30 12:17:10

Miksy91
Member
Registered: 2010-10-16
Post 1,913/2,311

Re: Some help:How to create and change Events ?[Pokemon Silver]

Pokemon_Master wrote:

Yet another problem: When i change a thing like map or wild pokemon and open VisualBoyAdvance,nothing looks changed as it were not changed. When i open GoldMap the map and wild pokemon data are   changed. I think the Pc i use has the problem,because i tried it in another Pc and worked. Please help!

That's because of a thing called RAM memory.
The current in-game data is stored in a memory called ram. For example, if you have a save state in original Route 29, do changes to that map with a map editor and open the save file with an emulator, none of the changes take place. This is just because the original data of Route 29 is stored in ram of the save file.
However, if you go out of the area and return there again, the changes will take place since then, they are loaded from ROM memory (which you changed with the map editor) to RAM for usage.

See for more info in my hacking tutorials - explained in part 4 or so.

Last edited by Miksy91 (2013-09-30 12:18:32)

Offline

#15 2013-09-30 12:26:00

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 309/947
Website

Re: Some help:How to create and change Events ?[Pokemon Silver]

Miksy91 wrote:
Pokemon_Master wrote:

Yet another problem: When i change a thing like map or wild pokemon and open VisualBoyAdvance,nothing looks changed as it were not changed. When i open GoldMap the map and wild pokemon data are   changed. I think the Pc i use has the problem,because i tried it in another Pc and worked. Please help!

That's because of a thing called RAM memory.
The current in-game data is stored in a memory called ram. For example, if you have a save state in original Route 29, do changes to that map with a map editor and open the save file with an emulator, none of the changes take place. This is just because the original data of Route 29 is stored in ram of the save file.
However, if you go out of the area and return there again, the changes will take place since then, they are loaded from ROM memory (which you changed with the map editor) to RAM for usage.

See for more info in my hacking tutorials - explained in part 4 or so.

Thank you Miksy. I didn't saved the game while playing. Anyway for more information i will watch your video tutorials on YouTube.

Offline

  • Index
  • → Help/Question
  • → Some help:How to create and change Events ?[Pokemon Silver]

Board footer

Powered by FluxBB