• 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
154
Posts
11
Years
  • Seen Jan 8, 2017
Okay, so what the heck is going on here? I've made plenty of trainer battle scripts before, they're even as easy as copying and pasting the whole thing. So why does this keep happening? I've tried changing the trainers on A Trainer, remaking the script, deleting the event and putting new sprites on the map, and compiling an old battle script that worked in my last hack and this keeps happening. Random glitches that won't even let me battle them.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Okay, so what the heck is going on here? I've made plenty of trainer battle scripts before, they're even as easy as copying and pasting the whole thing. So why does this keep happening? I've tried changing the trainers on A Trainer, remaking the script, deleting the event and putting new sprites on the map, and compiling an old battle script that worked in my last hack and this keeps happening. Random glitches that won't even let me battle them.

I saw this while playing Snakewood yesterday. It is really weird how some trainer battles will that. I think it might be the settings in A-map. Would you be able to post both the script and a screenshot of A-map?

He only has 1 post, so I assume he means he doesn't know how to post it on PC.



This is likely too, however there are also incosistencies within the script.



That random return there is probably causing the random text appearing (at least I hope it is).

Oh, I didn't even check his post count. With the special B4 (easily one of my favorites) it will return the value of the end result of a wild battle. If the Pokemon was captured it returns 0x7. So, by having anything other than that, he must want to jump back to before the wild battle. It may have just been a compiling error, if he was using the old XSE, but maybe not. But now as I look at it more, why is that in the map script? and that map script is completely wrong... Look at the top of it. Those raw's show that he inserted the wrong offset or it wasn't written properly.

An offset just one byte off can cause strange things like this to happen as XSE will try and read the script starting there, so it won't notice if there isn't a command there, it will just read the hex numbers and try and make commands out of them.


In the battle script. Special B4 will never return 0x5. Here is a quote from JPAN-

0B4 after battle, ceratin variables are set. b4 reads them and places on a given variable the status at battle end. *key 0x1 = fainted, 0x7 = captured, 0x4 = escaped*

So, the compare series in the second script needs to be altered.


Here the special I was talking about earlier:
08e Forces map refresh, that is, puts into effect all changes made by setmaptile command

Add this in after mew disappears to see if it will help. Also, make sure you repoint or recompile dynamically. Never add to a script without doing one of those two things.
 
Last edited:

Blah

Free supporter
1,924
Posts
11
Years
I saw this while playing Snakewood yesterday. It is really weird how some trainer battles will that. I think it might be the settings in A-map. Would you be able to post both the script and a screenshot of A-map?



Oh, I didn't even check his post count. With the special B4 (easily one of my favorites) it will return the value of the end result of a wild battle. If the Pokemon was captured it returns 0x7. So, by having anything other than that, he must want to jump back to before the wild battle. It may have just been a compiling error, if he was using the old XSE, but maybe not. But now as I look at it more, why is that in the map script? and that map script is completely wrong... Look at the top of it. Those raw's show that he inserted the wrong offset or it wasn't written properly.

An offset just one byte off can cause strange things like this to happen as XSE will try and read the script starting there, so it won't notice if there isn't a command there, it will just read the hex numbers and try and make commands out of them.


In the battle script. Special B4 will never return 0x5. Here is a quote from JPAN-



So, the compare series in the second script needs to be altered.


Here the special I was talking about earlier:


Add this in after mew disappears to see if it will help. Also, make sure you repoint or recompile dynamically. Never add to a script without doing one of those two things.

He's using an existing script, hence the offsets starting around 0x162000s. Also the special doesn't seem to be a problem, I think it was put there by the original creators. The idea that it's a level script sortof wonders me too. I'll edit this after I check out cerulean cave's level scripts and such.
 

Aryan143

The Fennekin Fan!
757
Posts
11
Years
This is the script I am making. I want that a mankey comes to me and asks to join me when I step on a specific tile and then a Pidgey comes to me immediately and evolves to Pidgeotto and then battles me. Note that 0x2 is because that I replaces no. 2 sprite with Mankey.

Spoiler:
 
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
He only has 1 post, so I assume he means he doesn't know how to post it on PC.



This is likely too, however there are also incosistencies within the script.



That random return there is probably causing the random text appearing (at least I hope it is).

lol no what I ment was... Pokecommunity required 15 posts before I can post links to another site... and I have my screenshots on my own site I was just going to [ img] them with links

and sure enough that fixed the mew issue... thanks :)

but now... i cant open the rom in AdvanceMap... it freezes if I try to open any map... itll load the rom... but only about a quarter of the connection list... but im not able to open the maps it does bring up on the list... kinda odd...

the game is completely playable tho...

but there is still a couple of things I would like to edit... i wanna get all the mystical dogs released into kanto... not just 1... if anyone knows the offset for that i wouldnt need advancemap to finish the hack lol. (even with advance map im having issue finding these darn dogs)

to be more specific on the dogs:
I dont need the dogs stats or anything that has to do with the roaming or where to find them... I simply need the code that releases the one dog...
it has to check your starter pokemon... so it will either compair 4031 (0-2) or it will use some Special 129 command... neither of which have i found anywhere near the elite four or in pallat town after the elite four... (there are a few compair 4031s but they are all for the rivals battles)... if anyone has any specific data on when these dogs are release or exactly what event causes it... cause if its beating the elite four... it must be in the start up somewhere or someplace I dont know how to get too... (my skill set is limited) checking if the elite four has been beat, then checking your starter... then releasing the dog... grrr
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
lol no what I ment was... Pokecommunity required 15 posts before I can post links to another site... and I have my screenshots on my own site I was just going to [ img] them with links

and sure enough that fixed the mew issue... thanks :)

but now... i cant open the rom in AdvanceMap... it freezes if I try to open any map... itll load the rom... but only about a quarter of the connection list... but im not able to open the maps it does bring up on the list... kinda odd...

the game is completely playable tho...

but there is still a couple of things I would like to edit... i wanna get all the mystical dogs released into kanto... not just 1... if anyone knows the offset for that i wouldnt need advancemap to finish the hack lol. (even with advance map im having issue finding these darn dogs)

to be more specific on the dogs:
I dont need the dogs stats or anything that has to do with the roaming or where to find them... I simply need the code that releases the one dog...
it has to check your starter pokemon... so it will either compair 4031 (0-2) or it will use some Special 129 command... neither of which have i found anywhere near the elite four or in pallat town after the elite four... (there are a few compair 4031s but they are all for the rivals battles)... if anyone has any specific data on when these dogs are release or exactly what event causes it... cause if its beating the elite four... it must be in the start up somewhere or someplace I dont know how to get too... (my skill set is limited) checking if the elite four has been beat, then checking your starter... then releasing the dog... grrr

The A-map problem happened to me on Emerald on one computer, but the exact same program and file (everything of mine is one flash drive) worked on a different one. So, I would say delete A-map and just redownload it to a new folder. Also try cleaning your temp files and registry with a good program called CCcleaner.

I would type up the compare commands that you believe to be involved, and compile it. Then, select the compare commands in a hex editor and search for that string of bytes. The only match should be in the script you are looking for. It is probably not in a regular script but rather built into the game's engine itself.

You could also try searching in the hex editor for what the special would look like compiled which should be 26 31 40 29 01. It should only be in the game once. I'll try myself, but this is how you would go about finding it.


Also, tags require a link... So they won't work either. It kinda bugs you, but it is a good system to prevent spam so I can't argue it.


Edit: There are only three offsets containing the normal special 0x129. It doesn't use the special2 command, and therefore would just look like 25 29 10. I will try and find which one is right.

Edit2: I think I found it, just testing to make sure everything else lines up.

Edit3: Oh my god... The script it's in, it can't be... It's in the script where Cielo connects with with Lanett on One Island... So the dogs aren't released after the Elite Four... It's when you can trade with Ruby and Saphire!

Script offset is 0x170EC5 line #87.
 
Last edited:
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
The A-map problem happened to me on Emerald on one computer, but the exact same program and file (everything of mine is one flash drive) worked on a different one. So, I would say delete A-map and just redownload it to a new folder. Also try cleaning your temp files and registry with a good program called CCcleaner.

I would type up the compare commands that you believe to be involved, and compile it. Then, select the compare commands in a hex editor and search for that string of bytes. The only match should be in the script you are looking for. It is probably not in a regular script but rather built into the game's engine itself.

You could also try searching in the hex editor for what the special would look like compiled which should be 25 29 01 31 40. It should only be in the game once. I'll try myself, but this is how you would go about finding it.


Also, tags require a link... So they won't work either. It kinda bugs you, but it is a good system to prevent spam so I can't argue it.[/QUOTE]

lol I know they require a link, i was using them when it told me i couldnt do it :( so i had to explain why i couldnt give a screenshot... its alright tho.. Ive been around forums enough to see my share of spammers ;)

I shall deffinately try searching through a hex editor like you said... while I may not be able to read alot out of a hex editor, it should give me an offset that I can use in pksv...
the compair 4031 is used by the rival every time you fight him... special 129 simply calls on the data stored in var 4031... 2 ways to do the same thing... i have yet to see special 129 used tho. ... (heres hoping its used for this) they will only have an outcome of 0, 1, or 2 depending on which starter you chose

for the rival battles it looks like:
[SPOILER]compare 0x4031 0x2
if == call 0x8162B1E ' Equal To
compare 0x4031 0x1
if == call 0x8162B31 ' Equal To
compare 0x4031 0x0
if == call 0x8162B44 ' Equal To[/SPOILER]
with each offset being a different battle sequence... so each battle has 3 different offsets for 3 different battles that could be performed at that point... so fighting him in oaks lab and in the elite four would look completely different, I could not compile this script and search for it or I would find... that exact battle (which happens to be his first elite four battle) I could search compare 0x4031 and follow each of those offsets to see if they are a battle or some non rival related event tho... having a new way to search the rom should prove promesing

and thanks for the tip on advancemap... hopefully that will work ;)
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
lol I know they require a link, i was using them when it told me i couldnt do it :( so i had to explain why i couldnt give a screenshot... its alright tho.. Ive been around forums enough to see my share of spammers ;)

I shall deffinately try searching through a hex editor like you said... while I may not be able to read alot out of a hex editor, it should give me an offset that I can use in pksv...
the compair 4031 is used by the rival every time you fight him... special 129 simply calls on the data stored in var 4031... 2 ways to do the same thing... i have yet to see special 129 used tho. ... (heres hoping its used for this) they will only have an outcome of 0, 1, or 2 depending on which starter you chose

for the rival battles it looks like:
Spoiler:

with each offset being a different battle sequence... so each battle has 3 different offsets for 3 different battles that could be performed at that point... so fighting him in oaks lab and in the elite four would look completely different, I could not compile this script and search for it or I would find... that exact battle (which happens to be his first elite four battle) I could search compare 0x4031 and follow each of those offsets to see if they are a battle or some non rival related event tho... having a new way to search the rom should prove promesing

and thanks for the tip on advancemap... hopefully that will work ;)

You posted after I had found it. Look up at my last post, edit3.

It was the only one of the three locations I could find that actually was in a real used script. And it's placement makes sense.
 

Blah

Free supporter
1,924
Posts
11
Years
This is the script I am making. I want that a mankey comes to me and asks to join me when I step on a specific tile and then a Pidgey comes to me immediately and evolves to Pidgeotto and then battles me. Note that 0x2 is because that I replaces no. 2 sprite with Mankey.

Spoiler:

If this is one of those green script tiles, you've got a ton of structure errors in the script. The first and most obvious error is that even after the script on this tile is run once, it will keep running everytime you walk into it simple because you haven't used any flags (or variables)!
The second is probably the reason you're having the error you are having. It's the whole "jump" thing. I might make a video or something on jump vs call. People keep getting those messed up and causing their scripts to function incorrectly.

When you are starting out, or are working on a script that is "difficult", you must first identify what you want happening. That sound simple and stupid, but what I mean is you want to evaluate different situations that the event will get you into. For example, this one here allows the player to have a choice to adopt the Mankey. What if the player says no? Does the Mankey go away and the Pidgey/Pideotto still attack? Does the Mankey stay there forever until you feel like adopting it? These are good questions that you should answer first. There are also the yes cases. Say I accepted it's offer to join my team, but my current team is full (what then?). What if I accepted the offer, but then later lost in battle to Pidgeotto?

So then lets, look at the script again. When reviewing it, I'm going to make the following assumptions:
- The player MUST accept the Mankey's offer, or it will keep asking until you say yes.
- The player is allowed to give it a nickname
- If the player doesn't have space in the party, he/she must come back with an open slot


#org 0x750000
msgbox 0x8750067 MSG_NORMAL
showsprite 0x2 'First problem, the mankey appears before you instantly (looks bad ingame).
msgbox 0x8750079 MSG_YESNO
compare LASTRESULT 0x1 ' If yes, we jump (go to this jump now and read my comments on it).
if 0x1 goto 0x87500B5
compare LASTRESULT 0x0' If no, we jump (go to this jump now and read my comments on it).
if 0x0 goto 0x87500D3
hidesprite 0x2 'From here down, nothing is run. This is because you checked no and yes.
showsprite 0x74
msgbox 0x87500E3 MSG_NORMAL '"This Pidgey forces you to\n a batt..."
msgbox 0x875011F MSG_NORMAL '"Wait!Pidgey is evolving!"
fadescreen 0x1
hidesprite 0x74
fadescreen 0x0
showsprite 0x72
cry 0x17 0x0
msgbox 0x875013A MSG_NORMAL '"PIDGEOTTO: Pidddddge!"
wildbattle 0x11 0xA 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x72
setobedience 0xE1E3
setobedience 0xE1E3'Forgot release end here, also, you don't need to set obedience at all

'---------------
#org 0x7500B5 ' No checks are made to see if party is full, also not allowed to nickname
givepokemon 0x38 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x8750152 MSG_NORMAL '"It seems happy."
waitfanfare
release 'Release and end implies end of the script. We don't fight Pidgey is player says YES.
end 'Now go back to the main body

'---------------
#org 0x7500D3 'Just a simple message, don't need to jump for this, you can put it in main body
msgbox @0x8750153 MSG_NORMAL
release 'Release and end implies end of the script. We don't fight Pidgey if player says YES.
end 'Now go back to the main body

Now we see that you've miss used your jumps and the logic is a little flawed in the script because of it. Here's a template of what it should look like:

Spoiler:

REQUIRED TO MAKE THIS WORK:
- Pidgey and Pidgeotto person ids set to 202 in A-MAP
- Mankey person ID set to 201 in A-MAP
- Flags 201, 202 unused, and set before this event (in players room = best place)
- variables 5001, 5002 unused
- Pidgey Person event number in Advance map set to 116
- Pideotto Person event number in Advance map set to 114

Technical Notes:
- This is for FireRed
- This was written in pksv
- I have not tested this, but I planned it out while writing the post so it will work
- I'm using the variable 0x5001 to keep track of how much of the script was complete

General Notes:
- Call is generally used when you want to do little things then come back to the main script
- Jump is used when you don't want the rest of the script to run given a condition
- Also, you can take this 1 step further with the special 0xB4. You can check if it was defeated, and if it was you can do a little "Pidgeotto ran away from further shame" or something

Aside from the few technical issues there, what about the Mankey's relation to the story (I know that this is unrelated to the script, but it's for you own understanding). Why is this random Mankey comming up to me and wanting to join my team? It sounds absurd and doesn't really make sense for it to volunteer itself to a life long commitment.

Well, next time don't expect a reply this detailed. I sorta felt nice on this one, and noticed a lot of people in this thread don't plan things through on bigger scripts (they just dive in). If you don't understand anything about the script I put up feel free to ask questions, I will try to answer them :)
 
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
You posted after I had found it. Look up at my last post, edit3.

It was the only one of the three locations I could find that actually was in a real used script. And it's placement makes sense.

you sir... are amazing...

thank you so much ;)

stupid interwebz gave me wrong info... everywhere I looked said it was released after the elite four... nowonder i couldnt find it

now its time to stare at this code till i magically understand it (thats kinda how i learn... thru osmosis)

especially since ive never played this part of the game... im hacking thru only a gen 1 and 2 knowledge set..
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
you sir... are amazing...

thank you so much ;)

stupid interwebz gave me wrong info... everywhere I looked said it was released after the elite four... nowonder i couldnt find it

now its time to stare at this code till i magically understand it (thats kinda how i learn... thru osmosis)

especially since ive never played this part of the game... im hacking thru only a gen 1 and 2 knowledge set..


That is what I always believed. Which is why I was so shocked. The other two locations, I could never make a logical script out of. In one, the special was followed by setmapflag 0x2294 or something like that and the other was just random commands with really high setflags and such.

I think it is one of those things that Game Freak lied about in the game walkthrough guide thing in order to make it seem more heroic and also to force the player to keep searching and end up going to the Sevi Islands instead of just throwing down the game. It might have also been to help discourage hackers from finding it by hiding it somewhere else, but obviously if that was the case... It didn't work:p.

Diegoisawesome's tutorial is a great place to learn scripting if you need some help.
 
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
That is what I always believed. Which is why I was so shocked. The other two locations, I could never make a logical script out of. In one, the special was followed by setmapflag 0x2294 or something like that and the other was just random commands with really high setflags and such.

I think it is one of those things that Game Freak lied about in the game walkthrough guide thing in order to make it seem more heroic and also to force the player to keep searching and end up going to the Sevi Islands instead of just throwing down the game. It might have also been to help discourage hackers from finding it by hiding it somewhere else, but obviously if that was the case... It didn't work:p.

Diegoisawesome's tutorial is a great place to learn scripting if you need some help.

ive got it saved, ive started through it, but usually stop to do some work on this hack lol

it seems that Special 129 is the thing that actually releases the pokemon... because immediately after it, the script is ended, there is no call for me to follow and alter... I need to find out how to redefine what these specials do...

so how do you decide what hex values to search for... ive decided to search for every instance of: "compare 0x4031"

I assembeled it, saved it, opened it in a hex editor and searched for those numbers... with no luck...

I wish I could just open the entire rom in pksv... im sure it would take time... but I can wait ;)
 
Last edited:
154
Posts
11
Years
  • Seen Jan 8, 2017
Karatekid, here's the scripts, both compiled and not. Also is the map with the events of the map, the two trainers that mess up are the two person events in the upper left. The one from my previous post is the higher up of the two, to be specific.
Spoiler:

Spoiler:

http://i30.photobucket.com/albums/c304/starkat_/ROUTE1_evt_zpsad6e6c11.png
 

Blah

Free supporter
1,924
Posts
11
Years
Karatekid, here's the scripts, both compiled and not. Also is the map with the events of the map, the two trainers that mess up are the two person events in the upper left. The one from my previous post is the higher up of the two, to be specific.
Spoiler:

Spoiler:

http://i30.photobucket.com/albums/c304/starkat_/ROUTE1_evt_zpsad6e6c11.png

Oh, you want KarateKid to help you. :(
Nothing is wrong with the script itself. I doubt there is any problem in using 0x50 either, so it's a mystery!
Maybe some of the more exprienced hackers have had this problem and can help you.

Here are things you can try:
1) Check no 2 people have the same Person ID number (I know it sounds stupid, but try it)
2) Script is compiled in right ROM.
3) Check no 2 trainers use the same trainer ID?
4) Make a person event, and let it's script tell you whether or not the trainerflag is set for 0x50. We can go from there
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
ive got it saved, ive started through it, but usually stop to do some work on this hack lol

it seems that Special 129 is the thing that actually releases the pokemon... because immediately after it, the script is ended, there is no call for me to follow and alter... I need to find out how to redefine what these specials do...

so how do you decide what hex values to search for... ive decided to search for every instance of: "compare 0x4031"

I assembeled it, saved it, opened it in a hex editor and searched for those numbers... with no luck...

I wish I could just open the entire rom in pksv... im sure it would take time... but I can wait ;)

I don't think that there will be a compare because it is specific to what it does. Why not just write it at the end of your script? No one will know that it didn't happen when the player was told it happened, they are locked in the script? Oh, and if I remember correctly, there is a bank containing pointers to all of the specials, however, most of them are ASM routines.

If you are trying to make different Pokemon roam, just use JPAN's engine, he added a way to make any Pokemon you want roam.

Oh, you want KarateKid to help you. :(
Nothing is wrong with the script itself. I doubt there is any problem in using 0x50 either, so it's a mystery!
Maybe some of the more exprienced hackers have had this problem and can help you.

Here are things you can try:
1) Check no 2 people have the same Person ID number (I know it sounds stupid, but try it)
2) Script is compiled in right ROM.
3) Check no 2 trainers use the same trainer ID?
4) Make a person event, and let it's script tell you whether or not the trainerflag is set for 0x50. We can go from there

I was the one who asked for him to post everything earlier:p.

I actually wanted a screenshot of the settings for each person event in A-map. I don't think it is a scripting error, if I remember correctly, the problem was the script activating when you weren't in the line of sight. This to me seems like an A-map problem, because it is the settings for the person event that control when the trainer will move.
 
Last edited:
53
Posts
11
Years
  • Seen Feb 1, 2014
I don't known if is the correct section.

If in Ruby i wanna use Surf after 4th badge instead of 5th, what i've to change?

Thanks
 
154
Posts
11
Years
  • Seen Jan 8, 2017
I don't think that there will be a compare because it is specific to what it does. Why not just write it at the end of your script? No one will know that it didn't happen when the player was told it happened, they are locked in the script? Oh, and if I remember correctly, there is a bank containing pointers to all of the specials, however, most of them are ASM routines.

If you are trying to make different Pokemon roam, just use JPAN's engine, he added a way to make any Pokemon you want roam.



I was the one who asked for him to post everything earlier:p.

I actually wanted a screenshot of the settings for each person event in A-map. I don't think it is a scripting error, if I remember correctly, the problem was the script activating when you weren't in the line of sight. This to me seems like an A-map problem, because it is the settings for the person event that control when the trainer will move.
No offense FBI Agent, I'll gladly accept anyone's help, haha. ^^
Oh my bad, I'll have those up here later. Although I can tell you know the only things I did were the usual. Set the trainer box to 01 and then I gave them a 3 view radius.
 
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
I don't think that there will be a compare because it is specific to what it does. Why not just write it at the end of your script? No one will know that it didn't happen when the player was told it happened, they are locked in the script? Oh, and if I remember correctly, there is a bank containing pointers to all of the specials, however, most of them are ASM routines.

If you are trying to make different Pokemon roam, just use JPAN's engine, he added a way to make any Pokemon you want roam.

my goal was to make all 3 dogs raom... by changing what event... instead of searching for which 1 to let roam it would just release all 3...

but since that seems to be above my skill set I have changed my sights...

I am putting 2 events throughout the land that will also be based on your starting pokemon... and you will fight the other 2 dogs ;)

here is the first event:
Spoiler:


my big issue with this is Im a little lost on the level script for this... the event works fine (as far as I can test with only 1 game save)

I want to have it check if flag 844 is set to make the event visable... then compare 4031 to see which sprite to show for the event... because there are all 3 dogs in the sprites (141,142,143)

so for this event (ive only wrote out the one so far, but the other will be very similar, itll just have different flags and the compare 4031 will be offset)
if 4031 = 1 itll show sprite 142 for person id 201
if 4031 = 2 itll show sprite 143 for person id 201
if 4031 = 0 itll show sprite 141 for person id 201

but only after CELIO successfully connects to LANETTE (when you're allowed to trade to R/S/E.)

does that make since?
 
Last edited:

Blah

Free supporter
1,924
Posts
11
Years
my goal was to make all 3 dogs raom... by changing what event... instead of searching for which 1 to let roam it would just release all 3...

but since that seems to be above my skill set I have changed my sights...

I am putting 2 events throughout the land that will also be based on your starting pokemon... and you will fight the other 2 dogs ;)

here is the first event:
Spoiler:


my big issue with this is Im a little lost on the level script for this... the event works fine (as far as I can test with only 1 game save)

I want to have it check if flag 844 is set to make the event visable... then compare 4031 to see which sprite to show for the event... because there are all 3 dogs in the sprites (141,142,143)

so for this event (ive only wrote out the one so far, but the other will be very similar, itll just have different flags and the compare 4031 will be offset)
if 4031 = 0 itll show sprite 142 for person id 201
if 4031 = 1 itll show sprite 143 for person id 201
if 4031 = 2 itll show sprite 141 for person id 201

but only after CELIO successfully connects to LANETTE (when you're allowed to trade to R/S/E.)

does that make since?

From what I gather, you are trying to make a script where you battle one of the three dogs depending on the value in 4031?

Instead of trying to change the sprite of a specific overworld to one of the three dogs, it's far easier to create 3 seperate overworlds and "show" one of the sprites (depending on 4031).

Something of this structure:

checkflag 0x844
compare LASTRESULT FALSE
if == jump :end
compare 0x4031 0x0
if == jump @raikou_appear
...
...
...
:end
release
end

#org @raikou_appear
clearflag 0x200 'all dogs can have 200 as a flag, it shouldn't matter, set this in the players room or something
reappear 0x[person ID unique to raikou]
....
battle script
...
setvar 0x5000 0x1
release
end

For level scripts, the way you insert them is different. There is a tutorial by Cooley for level scripts in the tutorial section (just use the search function) that goes through how very nicely. It's for XSE, but it can be applied to PKSV by ticking off the levelscript box when you go to decompile.
 
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
thanks FBI agent...

while I probably ended up doing exactly the opposite of what you had said... your comments struck an idea in my brain and I got her working...

basically, I created 3 dogs with the same code and different sprites... and I gave each one a different ID, then somewhere else I turned all the IDs off... and turned one back on based on 4031 later in the game...

and the cool part is... I did not turn off the sprited immediately... I did turn them off before you could get to them and at a mandatory spot in the game... so you cant access em... but in the beginning of the game if you pay attention you can see one of the dogs chillin off the beaten path... but by the time you get to that area, he will be gone ;)

and if you pick charmander that dog will apear later... in that spot... if you picked a different starter, another dog will apear NEAR that area... each of the 3 sprites is actually in a different spot... so each dog that appears show up in a little bit different location. they are kinda beside each other but in the beginning of the game you can only see the closest one to the road...

and thanks to everyone else in this thread who helped me (or anyone else for that matter)
lord knows I needed it and now my hack is complete

rest assured I did not just hop on to ask help without doing a weeks research on the issue with no luck... so you guys really helped me finish my hack (it was the last thing to do because I solved every other problem before this one.)
 
Status
Not open for further replies.
Back
Top