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

Blah

Free supporter
1,924
Posts
11
Years
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.)

Ironically you did exactly as I suggested, rather than the opposite :P
The only difference seems to be that you put the dogs in different places, whereas I assumed the dogs would be in the same map.

Well, I'm glad you're hack is going well now.
 

kj3400

Wants a Magneton for a Charger
53
Posts
12
Years
  • Seen May 11, 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

This is a good question. Are the various HMs tied to a particular badge? Can you change that? And can you give badges in a different order?
 

Blah

Free supporter
1,924
Posts
11
Years
This is a good question. Are the various HMs tied to a particular badge? Can you change that? And can you give badges in a different order?

Open the original script, change which flag to check and recompile it. You could also change it to only work if player has specific items/pokemon/variable is set ect.. For example, a cut tree script is:

#org 0x81BDF13
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
lockall
checkflag FR_BADGE_2
if false jump 0x81BDF87 ' Flag is unset
....
rest of script
...

You would change the colored/bolded part :)
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
they are in the same map... just beside eachother not ontop of...

i did not really understand what you were saying lol... but i learn thru visual osmosis... and it worked ;)

knowledge seeps from higher concentration thru my eyes to lowere concentration till the ammount of knowledge inside my head and outside my head equal out... so I never understand 100% of the code... but if I stare long enough I understand just enough to I can modify it to my will.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Karatekid here's the screenshots of both of the trainers. They have the same problem.

I see no apparent problem. However, I do know that A-map 1.95 has a few bugs. I would say try opening it up in 1.92 and mess with all of the settings for the trainers and then change them back to force a refresh of all of their data. Them me if that works.
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
I seem to have messed up my MSG_FIND somehow...
its just missing... i get blank text boxes when I find a TM... then it says I put whatever item it was in whatever pouch it goes too... its missing the "player found whatever item" text... just blank

can anyone think of a simple way to fix this or atleast get me to that offset... as I cannot decompile msg_find... i need real numbers.

I believe it is:
1A63E8

according to AdvanceText... but pksv cannot decompile it... i get nothing or junk (even on a clean copy of the game)

the code is:
[PLAYER] found a \v[&H03]!
It contains \v[&H02].

but I still cant get it to open in pksv... advancetext confirmed its in the clean game but not in mine... where did it go :(

never mind...

I have no idea where it went... but in AdvanceText i simply wrote in the text it was supposed to have (copy and paste from the clean version) and it repointed it to a new location... and now aparently the MSG_FIND can still find it ;) yay

well... to be honest I put an arbitrary item on the map I was near, with similar code to items that did not work... and this one worked... I have not found a item that was supposed to be there... but in theory the issue is resolved.

its weird because the space was blank... not filled with garble from a code I added... it was empty... for no reason...
 
Last edited:
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
ok, got another weird issue... (i feel like this is becoming a routine)

digletts cave... I can go to the cave entrence from varidian city... and when i go thru the door, is thows the big picture of digletts cave... then goes black... and stays that way... no fade in... never make it to the first room with the ladder down...

I see no script anywhere (level or otherwise) that tells it to show that picture... much less to into digletts cave... its just a simple warp...

it does have a setworldmapflag... but that does nothing...

UPDATE
it happens at both entrances of digletts cave... ever time it shows that image... and only that image... i checked others and i was able to enter fine.
so where can I find the code that tells it to show that image
 
Last edited:
53
Posts
11
Years
  • Seen Feb 1, 2014
Open the original script, change which flag to check and recompile it. You could also change it to only work if player has specific items/pokemon/variable is set ect.. For example, a cut tree script is:

#org 0x81BDF13
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
lockall
checkflag FR_BADGE_2
if false jump 0x81BDF87 ' Flag is unset
....
rest of script
...

You would change the colored/bolded part :)

Of Course i known this is the way. But my question is about Surf, not about Cut....you known at which offset is there the Surf script in Ruby? Or how can i find it.

Thanks a lot

Bye bye
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Of Course i known this is the way. But my question is about Surf, not about Cut....you known at which offset is there the Surf script in Ruby? Or how can i find it.

Thanks a lot

Bye bye

Someone does:). These are things you have to learn how to search for. Load up your rom in a hex edited that supports .tbl and also load that file so you can view the text. Now, search for the exactly line that says, "Would you like to surf?" The offset of this should only happen once.

Take the offset of that text and open it up in XSE. Then proceed to subtract 1 from the offset until you find the rest of the script.


There is the chance that the script is in a different location from the text. So, once you find the text, use the above teqnuique to make it appear fully on XSE (I.e. it should look like this: = The water is a deep blue.....) Then, take the location of that, reverse the byte order, add 08 to the end and search for that. There you will find the pointer to the text which is in the script you want.

Then proceed to use the subtraction technique until you see the whole script.

ok, got another weird issue... (i feel like this is becoming a routine)

digletts cave... I can go to the cave entrence from varidian city... and when i go thru the door, is thows the big picture of digletts cave... then goes black... and stays that way... no fade in... never make it to the first room with the ladder down...

I see no script anywhere (level or otherwise) that tells it to show that picture... much less to into digletts cave... its just a simple warp...

it does have a setworldmapflag... but that does nothing...

UPDATE
it happens at both entrances of digletts cave... ever time it shows that image... and only that image... i checked others and i was able to enter fine.
so where can I find the code that tells it to show that image

Hmm, if I remember correctly, I believe it is attached to the map name, "Diglet's cave". Try changing the map name and see if it stops.

I know that the pictures happen automatically and in other places like the power plant. Are you able to enter the cave afterwards? Or does it just stay black?
 
Last edited:
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
Hmm, if I remember correctly, I believe it is attached to the map name, "Diglet's cave". Try changing the map name and see if it stops.

I know that the pictures happen automatically and in other places like the power plant. Are you able to enter the cave afterwards? Or does it just stay black?

I tried rewriting the map names (i removed the apostrophe) and it did not change anything (except the spelling of the name in the corner) so I changed it to route 11... it went black with no picture... so its something after the picture...

and no it just stays black :( gotta restart the game.

i copied the maps and put in different banks, then re routed all the warps... it changed nothing...

its like its running a map script... even though there is none... (its running a failing map script)

I tried changing the warps sothat they skip those first entry rooms and go straight to the ladders in the main cave... no luck

im going to try skipping the cave with the warps... one exit to the other... its not a good solution, i would rather fix the problem, i just cant find a problem, it looks exactly like the clean copy.

skipping the cave, going from one exit to the other... worked going from rt 11 to rt 2... but trying to come back... it gave that pic and froze up again... both warps were put in correctly (as far as linked to eachother)

it like the rt 11 warp warps before it show the pic, and the rt2 warp warps after the pic...
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I tried rewriting the map names (i removed the apostrophe) and it did not change anything (except the spelling of the name in the corner) so I changed it to route 11... it went black with no picture... so its something after the picture...

and no it just stays black :( gotta restart the game.

i copied the maps and put in different banks, then re routed all the warps... it changed nothing...

its like its running a map script... even though there is none... (its running a failing map script)

I tried changing the warps sothat they skip those first entry rooms and go straight to the ladders in the main cave... no luck

im going to try skipping the cave with the warps... one exit to the other... its not a good solution, i would rather fix the problem, i just cant find a problem, it looks exactly like the clean copy.

skipping the cave, going from one exit to the other... worked going from rt 11 to rt 2... but trying to come back... it gave that pic and froze up again... both warps were put in correctly (as far as linked to eachother)

it like the rt 11 warp warps before it show the pic, and the rt2 warp warps after the pic...

Okay, I have had several experiences with black maps. The most common fix, you already tried, and that is reinserting the maps in a new bank. Try it again, you may have inserted into a second corrupted bank:p. The other cause was when I was experimenting with increasing the number of OW's in Ruby. When the game failed to load an OW, everything just went black.

So, try removing all events from the map. Save the map so you can reload them later if it doesn't fix it.
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
sorry for the latish reply... my comp exploded... I had a heck of a time recovering my rom... i nearly cried

I simply went back to a backup that did not have the issue and redid the work that I had done after that backup (i back it up everytime I do somehting important)

I can only assume part of my mew script had overwrote something important for that area... I was able to put it in a new area (clean) and i nolonger have this issue...

I dont use @dyn 740000 ... i dont trust it... I manually inserted stuff and I think I put it in an area thats too small...

now i dont have this problem... but Ill continue playing to see what else ive jacked up ;)
 

Blah

Free supporter
1,924
Posts
11
Years
sorry for the latish reply... my comp exploded... I had a heck of a time recovering my rom... i nearly cried

I simply went back to a backup that did not have the issue and redid the work that I had done after that backup (i back it up everytime I do somehting important)

I can only assume part of my mew script had overwrote something important for that area... I was able to put it in a new area (clean) and i nolonger have this issue...

I dont use @dyn 740000 ... i dont trust it... I manually inserted stuff and I think I put it in an area thats too small...

now i dont have this problem... but Ill continue playing to see what else ive jacked up ;)

There is no problem with dyn 740000. You probably compiled it with one less zero or your script was incorrect. 740000 is where a good chunk of free space starts (I can't imagine you overwriting original game code with that).
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
There is no problem with dyn 740000. You probably compiled it with one less zero or your script was incorrect. 740000 is where a good chunk of free space starts (I can't imagine you overwriting original game code with that).

Make sure it is #dynamic 0x74000. And please trust it, it is far, far safer than manual insertion. Trust me, I didn't learn about dynamic insertion until I was well into hacking and you wouldn't believe the amount of problems it had caused. Always do it dynamically when possible.
 

blue

gucci
21,057
Posts
16
Years
Just wondering where I've gone wrong with this script. I want it so that when the player talks to the NPC without the fourth badge, they block the way but when they get the fourth badge they've moved allowing you to enter the buildng.

Here's the script:
Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Just wondering where I've gone wrong with this script. I want it so that when the player talks to the NPC without the fourth badge, they block the way but when they get the fourth badge they've moved allowing you to enter the buildng.

Here's the script:
Spoiler:

The line after check flag needs an if statement:

If 0x0 goto @notenabled
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
There is no problem with dyn 740000. You probably compiled it with one less zero or your script was incorrect. 740000 is where a good chunk of free space starts (I can't imagine you overwriting original game code with that).

lol i never said there was a problem... i just dont like it automatically placing my codes, i would rather know where my codes are... easier to change them later... i dont mind putting thinks in the free space there (i understand why dyn 740000 is used) i just like putting my codes in a spicific location rather than using the dynamic command.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
lol i never said there was a problem... i just dont like it automatically placing my codes, i would rather know where my codes are... easier to change them later... i dont mind putting thinks in the free space there (i understand why dyn 740000 is used) i just like putting my codes in a spicific location rather than using the dynamic command.

Okay, but you do realize that you can save the log of where every offset was placed after you compile, right?
 
Status
Not open for further replies.
Back
Top