Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-10-09 16:56:48

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 66/259
Website

Adding Pokemon Event to New Area

Mateo wrote:

Also, here is an example script for a standing Pokemon, such as Mewtwo.

83-PlayPokemonCry
XX-PokemonNumber
00-Part of cry code
47-LoadFont
4C-LoadText
XXXX-Pointer (2-byte) to text for Pokemon
53-CloseTextbox
49-UnloadFont
67-SetLastPersonTalkedTo
FF-None
1E-SetTypeOfFight
03-SetTypeOfFight
XX-TYpe(See list)
5C-LoadPokemonData
XX-Pokemon
YY-Level
5E-StartBattle
5F-ReloadMap/Return to PC is lost
33-BitTable1Set
XXXX-BitFlag to set
6D-HidePerson
XX-PersonEvent (Goldmap person number + 1)
90-EndOfScript


If I'm not badly mistaken that should work for a generic standing pokemon like the birds. You will need to give the person event the same BitFLag as the one you set, so it will stay hidden. This is not for ones like Ho-oh that need and item, those would be a little different. Here is the list of types of fights:

* 09 for "A wild PKMNNAME appears."; Withdraw possible
* 08 for "PKMNNAME falls from tree."
* 07 for a shiny PKMN
* 06 for win without actual fight
* 05 for fight with possible withdraw
* 04 for "The caught PKMNNAME attacks." (Rod)
* 03 for fight with DUDE’s back pic
* 02 for fight with HIRO’s back pic
* 01 for fight with possible withdraw
* 00 for fight with possible withdraw

Information taken from the compendium's examples and from memory of how I've done it in the past.

Okay so I took this from Mateo's Intro to Scripting Thread.  Im going around looking at the Pokemon Events that happen, like the Lugia Event for example. Im trying to get Mew and Mewtwo as events in the two caves that held items in the Silver Cave. I made the warp points go to and from Cerulean City. I'm just trying to see if I was to go and do this as hex, would I need to be in the event data where Silver Cave would be (0x11CA41 according to the Event Data in Johtomap) Seeing this script, I would use this for Mewtwo, that I have no problem with, problem is where I would put this. When looking at this offset in Translhextion, it appears at the bottom, right above where my Mewtwo script is (start of 0x11CA70). Is this where I would want to repoint my script event at?

Offline

#2 2012-10-09 16:59:59

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,666/3,460

Re: Adding Pokemon Event to New Area

Assuming I read that right, you have the right idea. You go to the location of the events on that map, find free space at the end of the bank, and insert your new script there. Then for the pointer, you just calculate a pointer to the location where you started inserting the new script.

Offline

#3 2012-10-09 17:12:04

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 67/259
Website

Re: Adding Pokemon Event to New Area

Well to better illustrate what I am saying. This is where I am:
Untitled-2.png

Offline

#4 2012-10-09 17:44:06

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,667/3,460

Re: Adding Pokemon Event to New Area

Yes, it looks like you are doing what I said.

Offline

#5 2012-10-09 18:03:57

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 68/259
Website

Re: Adding Pokemon Event to New Area

Okay just making sure XD

Offline

#6 2012-10-09 18:14:39

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 69/259
Website

Re: Adding Pokemon Event to New Area

Okay it worked :3 I was able to battle Mewtwo. Though how do I make it so the Overworld sprite vanishes after the battle? Cuz after I fought it, the sprite was still there.

Offline

#7 2012-10-09 18:20:11

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,668/3,460

Re: Adding Pokemon Event to New Area

The script you quoted should take care of that, since it hides his person event (assuming you put the proper event number) and he should stay hidden assuming that you used the same flag that the item ball used.

The script I posted says Goldmap person number + 1. In Johtomap, you need to add 2 instead of 1. (where Johtomap says person 0, Goldmap says person 1, and the game says Person 2)

Offline

#8 2012-10-09 20:32:05

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 70/259
Website

Re: Adding Pokemon Event to New Area

Okay I was able to get the Mew Script to work, after I fought it. It disappeared, HOWEVER, when I go about doing it with Mewtwo, after Battle, MY Sprite disappears and Mewtwo's OW sprite stays. What does that mean?

Offline

#9 2012-10-09 20:42:42

Miksy91
Member
Registered: 2010-10-16
Post 1,151/2,306

Re: Adding Pokemon Event to New Area

The sprite list works like this in every single map:
00 - Player
01 - Unused
02 --> 0E - People events

I assume you're using "disappear 0x0" sometime during your script.

Last edited by Miksy91 (2012-10-09 20:43:05)

Offline

#10 2012-10-09 20:57:15

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 71/259
Website

Re: Adding Pokemon Event to New Area

Just remember, Im doing the Standing Pokemon Script based on Mateo's guide above. I did the same for Mew and I was able to get it to disappear. And he told me that the HidePerson thing that has to do with the Pokemon OW sprite vanishing since I am using Johto Map, be +2 In this case Mew is Person #0 and Mewtwo would be Person #1. How should I correctly put this in my script?

Last edited by RPD490 (2012-10-09 21:03:10)

Offline

#11 2012-10-09 21:12:34

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,670/3,460

Re: Adding Pokemon Event to New Area

For Mew, you would do disappear 0x2 and for Mewtwo you would disappear 0x3.

Offline

#12 2012-10-09 21:23:22

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 72/259
Website

Re: Adding Pokemon Event to New Area

Alright thank you

Offline

#13 2012-10-09 21:39:49

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 73/259
Website

Re: Adding Pokemon Event to New Area

Lol this is just gonna drag on. Got Mewtwo to disappear after battle, left and didn't appear again. Thats good. NOW Mew doesn't even appear in the other room and I checked my script on PKSV and compared them, they are put in the same way. However Mew still doesn't appear. I really don't know why this is happening. XD If I can just fix this. THEN I can move onto adding the Birds doing this and I think I be set then.

Offline

#14 2012-10-09 22:00:02

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,671/3,460

Re: Adding Pokemon Event to New Area

Can you post both of their scripts here?

Offline

#15 2012-10-09 23:14:06

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 74/259
Website

Re: Adding Pokemon Event to New Area

Okay here it is. Its obvious which script is which. XD
Untitled-3.png

Last edited by RPD490 (2012-10-10 02:22:41)

Offline

#16 2012-10-10 07:27:52

Miksy91
Member
Registered: 2010-10-16
Post 1,152/2,306

Re: Adding Pokemon Event to New Area

Where did you pick up "33 07 8C" and "33 09 3C" ??? Those will definitely run you into glitches sooner or later. To be precise, this is what they do:
09 3C

D7B7 + 3C09 / 0x8 = 0xDF38
D7B7 + 0x8C07 / 0x8 = 0xE937

So according to these calculations, "33 09 3C" should set the second bit in byte at 0xDF38. This is not what you want to do because you're currently affecting the stack by doing so. This is not critical though. But "33 07 8C" should set the highest bit in 0xE937 and here, you're affecting ECHO ram or possibly at the same time, 0xC937 because ram area from 0xC000-0xDEFF is echoed to 0xE000-0xFEFF (in case I remember right here).

Simple solutions to the scripts, take these commands out. "disappear" command is used for setting the bit number used by that person event already so you don't have to set it twice (you've been doing this if Mew's event uses 09 3C and Mewtwo's 07 8C as their bit numbers). If you're using these bit numbers for them in their person events, change them to something else that affects ram area between 0xD7B7-(D88C ?) according to how I showed you to calculate them above.

Last edited by Miksy91 (2012-10-10 07:31:28)

Offline

#17 2012-10-10 12:59:45

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 75/259
Website

Re: Adding Pokemon Event to New Area

Uhhhh oh...^^' I didn't think those had a function, I just picked those bytes by random. But if that is the case, how would I know which bytes to use that would work for both of them, based on that calculation, should I just take D7B7 + XXXX / 0x8 and use those until I get the bytes I need that is in the RAM area?

Offline

#18 2012-10-10 14:21:26

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,672/3,460

Re: Adding Pokemon Event to New Area

The events you replaced started out as item balls, meaning they started out with valid bit Nos. Why did you change them to begin with?

Offline

#19 2012-10-10 18:08:12

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 76/259
Website

Re: Adding Pokemon Event to New Area

I really don't know, it just happened. No biggie I can just look at a clean ROM and use the bytes that they were originally in the modified ROM

Offline

#20 2012-10-10 18:28:48

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 77/259
Website

Re: Adding Pokemon Event to New Area

Okay looking at the ROM before I did all the changes to the two caves, both item balls had a flag set and byte of 9C06 (Upper Cave) and 9D06 (Lower Cave) I went ahead and tried applying it to the modified ROM. Also got rid of the disappear command from Mewtwo since techincally both of these events are on the same map just in two different locations. Mew APPEARED Again and disappeared after Battle....now Mewtwo is doing what Mew did before and not showing up.

.....

Im starting to wonder if this game is starting to hate me and doesn't want me to mess with it anymore.

Also I did the calculations that Miksy91 did and these are what showed up, mind you that I have no idea what I am really suppose to know here since he sprung this up late last night and I just check this post this morning.

D7B7 + 9C06 / 0x8 = 0xEB38
D7B7 + 9D06 / 0x8 = 0xEB57

Offline

#21 2012-10-10 18:51:11

Miksy91
Member
Registered: 2010-10-16
Post 1,153/2,306

Re: Adding Pokemon Event to New Area

*Figured I showed the calculations wrong; 3C09 there is actually 0x93C (and 8C07, 0x78C).
You should get the same ram address (D88A) with both your calculations there because you can use that "calculation" to find the byte in ram where the bit value is stored. 8 bits values are stored in one single byte.

Last edited by Miksy91 (2012-10-10 18:52:12)

Offline

#22 2012-10-10 19:51:28

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 78/259
Website

Re: Adding Pokemon Event to New Area

EDIT: Okay I decided to keep Mew set at 9C06 and 78C0 for Mewtwo in where they belong, the Flag Set and Bit. Started the game, BOTH of them appear where they are suppose to be, have Disappear 0x2 (Mew) and 0x3 (Mewtwo) set, they disappear after the battle. Leave the room and come back, still gone.

I THINK I FINALLY GOT IT. OMFG! I don't think I wanna change what I just did so, Im just gonna declare that I was able to get it working, I hope that is how it was done, I just don't wanna mess with their code again.


So I would do it like "D88A + 93C0 / 0x8 = D9B1" and "D88A + 78C0 / 0x8= D97B" ?

Last edited by RPD490 (2012-10-10 20:16:08)

Offline

#23 2012-10-10 23:35:58

Miksy91
Member
Registered: 2010-10-16
Post 1,154/2,306

Re: Adding Pokemon Event to New Area

No, unfortunately you didn't get it right this time either (although it seems to be working fine, it's actually not) :\
What I pointed out before, original bit numbers 9C06 and 9D06 affect ram memory address D88A which is part of ram that is used for flags (in other words, this part of ram is safe to use for bit numbers).

Use the original bit numbers and you're good to go. In case you want to be able to make a complete overhaul of Gold/Silver like I'm making, you'll have to learn how the bit number system works correctly but for situations such as this, that knowledge won't be needed. And don't set any bit numbers during the script with 33 [2-byte Bit Number] command (don't use this command at all). This is not needed because the bit number used be the person event is already set when it's made to "disappear" so setting another bit number would be completely useless.

Last edited by Miksy91 (2012-10-10 23:38:54)

Offline

#24 2012-10-10 23:52:03

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,677/3,460

Re: Adding Pokemon Event to New Area

I really need to update that post to stop promoting that. That's my bad.

Offline

#25 2012-10-11 04:37:47

RPD490
Member
From: Blackthorn City, Johto
Registered: 2012-09-29
Post 79/259
Website

Re: Adding Pokemon Event to New Area

Okay Im done, I'm just gonna stop now. Obviously I am not meant for this kinda of stuff, I try to follow directions and I can't seem to do get anything right. I just either make the same exact mistake again or make a new one. Either way, I am just digging myself deeper into the hole so. Im just gonna forget about making these two, as well as the birds events because, whats the point?

Just making them part of the wild is probably the only thing I can do that will work with no problems whatsoever, even if seems sketchy and amateurish and dumb, I don't what else I can do. If I keep going with it, then Im just gonna f-up more and it will drive me crazy and I won't get anywhere with this so.

Yeah...thats that.

Offline

Board footer

Powered by FluxBB