Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
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.
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.
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?
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*
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.
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.
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.
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
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!
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 ;)
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
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 ;)
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.
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:
Code:
#dyn 0x740000[B] ' Firstly this is in PKSV not XSE, compile it in PKSV and Decompile it in XSE to fully understand[/B]
#org @start
compare 0x5001 0x2
if == jump @end[B]' If it's 0x2 I assume the full script is completed[/B]
compare 0x5001 0x1
if == jump @check_want[B]' If it's 0x1 then I didn't have room for mankey last time I was here[/B]
msgbox @appears[B] 'The message you had[/B]
callstd MSG_NORMAL
clearflag 0x202 [B]'Set mankey's personID to 202, and set this flag in a green script tile before this script(player's room is a good place)[/B]
reappear 0x2[B] 'Mankey appears[/B]
setvar 0x5001 0x1 [B]' I set 5001 to 1, ensuring I've already had mankey appear[/B]
jump @check_want [B]' I jump to the yesno message, you'll see why[/B]
#org @check_want
msgbox @want[B] ' Ask if I want mankey[/B]
callstd MSG_YESNO
compare LASTRESULT YES[B] ' If yes I jump to @get (yes I jump, not call)[/B]
if == jump @get
msgbox @too_cute [B]'If I said I don't want mankey, it says something like makey's cute though and loops again[/B]
callstd MSG_NORMAL
jump @check_want [B]'Part that makes it loop[/B]
#org @get
countpokemon [B]' Checks the amount of 'mon in my party[/B]
copyvar 0x5002 LASTRESULT [B]' I'm setting 0x5002 to this value for a reason, you'll see why[/B]
compare 0x5002 0x6 [B]' Check if the number of party 'mon are 6[/B]
if == jump @makeroom
addpokemon MANKEY 0x5 NONE 0x0 0x0 0x0 [B]' If less than six give me mankey[/B]
storepokemon 0x0 MANKEY [B]' Equivalent to XSE's bufferpokemon[/B]
message @obtain
fanfare 0x101
showmsg[B] 'Shows the message I prepared[/B]
waitfanfare
msgbox @give_nick[B] 'Ask if I want to nickname it, I'm not forcing a nickname though[/B]
callstd MSG_YESNO
compare LASTRESULT YES[B] 'If yes call @nickname. I'm calling here, not jumping because I will returning to this point later[/B]
if == call @nickname
disappear 0x2 [B]'Mankey disappears[/B]
setflag 0x202 ' set 202
setvar 0x5001 0x2
jump @battle_section[B] ' I don't need to make the jump, but it makes the script more readable[/B]
#org @nickname
copyvar 0x8004 0x5002[B] ' Now I copy 0x5002's value (1-6) into 0x8004[/B]
subtractvar 0x8004 0x1 [B]' I subtract one, because for nickname special you need to set 0x8004 to pokemon slot number (0-5)[/B]
fadescreen FADEOUT_BLACK
special NAME_POKEMON
waitspecial
return [B]'I return back the where this subroutine was called[/B]
#org @battle_section
clearflag 0x201
reappear 0x74[B] ' Mistake? Or you really have someone's person ID set to 116?[/B]
msgbox @force_battle [B]'The pidgey wants to battle text[/B]
callstd MSG_NORMAL
pause 0x40 [B]'Now I create the ingame illusion that it's evolving by quickly flashing the screen white [/B]
fadescreen 0x0
pause 0x40
msgbox @evolving[B] 'pidgey evolving message[/B]
callstd MSG_NORMAL
fadescreen 0x0
pause 0x10
fadescreen 0x0
disappear 0x74 [B]' I don't believe these person IDs you have lol[/B]
reappear 0x72
cry 0x17 0x0[B] 'Not sure if right cry, I just copied what you had[/B]
msgbox @scream [B]' Part where it screams "Pidddddddddgey!"[/B]
callstd MSG_NORMAL
setflag 0x201[B] 'Set flag 201 to keep the pidgey/pidgeotto disappeared[/B]
battle 0x11 0xA 0x0[B] 'Again not sure if right, I just copied what you had[/B]
fadescreen 0x1
disappear 0x72[B]'pidgeotto disappears[/B]
fadescreen 0x0
releaseall [B]'FINALLY WE END[/B]
end
#org @makeroom
msgbox @full_party[B]'tell the player to come back with less than six, also event is paused for duration[/B]
callstd MSG_NOCLOSE
release
end
#org @end
releaseall[B]'script already complete, but player walking in tile anyways[/B]
end
#org @force_battle
= Pidgey wants to battle!\nIt's not very strong though[.]
#org @scream
= PIDEOTTO: Pidddddge!
#org @give_nick
= Give MANKEY a nickname?
#org @evolving
= Wait! Pidgey is evolving!
#org @forced_battle
= This pidgey forces you to\na battle.\pBut it's not strong.
#org @too_cute
= Awww[.]\nIt's eyes gleam with love!\lI can't just leave it.
#org @want
= This Mankey looks cute!\nDo you want to take it with you?
#org @full_party
= I don't have room[.]\nBetter come back for it later!
#org @obtain
= \v\h01 obtained a \v\h02!
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 :)
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.
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 ;)
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.
#org @hey
= My POKEMON will be taken care of\neven if they do lose a lot.
#org @challenge
= My POKEMON are so tiny!\nBut I know they can be tough too!
#org @defeat
= Oh, no!\nMaybe I didn't feed them enough...
Spoiler:
'---------------
#org 0x806CEC
trainerbattle 0x0 0x50 0x0 0x8806D44 0x8806D80
msgbox 0x8806D05 0x6 '"My POKEMON will be taken care of\n..."
release
end
'---------
' Strings
'---------
#org 0x806D44
= My POKEMON are so tiny!\nBut I know they can be tough too!
#org 0x806D80
= Oh, no!\nMaybe I didn't feed them enough...
#org 0x806D05
= My POKEMON will be taken care of\neven if they do lose a lot.
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.
#org @hey
= My POKEMON will be taken care of\neven if they do lose a lot.
#org @challenge
= My POKEMON are so tiny!\nBut I know they can be tough too!
#org @defeat
= Oh, no!\nMaybe I didn't feed them enough...
Spoiler:
'---------------
#org 0x806CEC
trainerbattle 0x0 0x50 0x0 0x8806D44 0x8806D80
msgbox 0x8806D05 0x6 '"My POKEMON will be taken care of\n..."
release
end
'---------
' Strings
'---------
#org 0x806D44
= My POKEMON are so tiny!\nBut I know they can be tough too!
#org 0x806D80
= Oh, no!\nMaybe I didn't feed them enough...
#org 0x806D05
= My POKEMON will be taken care of\neven if they do lose a lot.
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
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.
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.
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:
#org 0x871D206
'-----------------------------------
compare 0x4031 0x0
if == call 0x871D308 ' Equal To
compare 0x4031 0x1
if == call 0x871D40A ' Equal To
compare 0x4031 0x2
if == call 0x871D50C ' Equal To
end
#org 0x871D308
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
special GET_STEPCOUNT
lock
faceplayer
checksound
cry SUICUNE 0x2
message 0x81A7291 ' Wroooooooaaaaaarrrr!
showmsg
waitcry
pause 0x14
playsound 0x0 0x2
waitbutton
battle SUICUNE 50 NONE
setflag 0x807
special BATTLE_PIXELLATE
waitspecial
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if == jump 0x871CEF9 ' Equal To
compare LASTRESULT 0x4
if == jump 0x871D001 ' Equal To
compare LASTRESULT 0x5
if == jump 0x871D001 ' Equal To
setflag 0x202
release
end
#org 0x871D40A
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
special GET_STEPCOUNT
lock
faceplayer
checksound
cry RAIKOU 0x2
message 0x81A7291 ' Wroooooooaaaaaarrrr!
showmsg
waitcry
pause 0x14
playsound 0x0 0x2
waitbutton
battle RAIKOU 50 NONE
setflag 0x807
special BATTLE_PIXELLATE
waitspecial
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if == jump 0x871CEF9 ' Equal To
compare LASTRESULT 0x4
if == jump 0x871D60E ' Equal To
compare LASTRESULT 0x5
if == jump 0x871D60E ' Equal To
setflag 0x202
release
end
#org 0x871D50C
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
special GET_STEPCOUNT
lock
faceplayer
checksound
cry ENTEI 0x2
message 0x81A7291 ' Wroooooooaaaaaarrrr!
showmsg
waitcry
pause 0x14
playsound 0x0 0x2
waitbutton
battle ENTEI 50 NONE
setflag 0x807
special BATTLE_PIXELLATE
waitspecial
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if == jump 0x871CEF9 ' Equal To
compare LASTRESULT 0x4
if == jump 0x871D710 ' Equal To
compare LASTRESULT 0x5
if == jump 0x??????9 ' Equal To
setflag 0x202
release
end
#org 0x81A9236
'-----------------------------------
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
storepokemon 0x0 0x8004
msgbox 0x871D104 ' The \v\h02 ran away...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end
#org 0x81A7291
= Wroooooooaaaaaarrrr!
#org 0x871D104
= The \v\h02 ran away!
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.)
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:
script
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.)
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.
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.)