• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Hacks0rus

Monster Raving Looney
24
Posts
12
Years
  • Seen Nov 9, 2012
help needed

Hello all, Having a bit of trouble getting item scripts to work. These are items that the player will find in the pokeballs across the map like in the normal games.

However, I cannot seem to get the item to disappear after finding it.
my script (using advance map and xse):

#dynamic 0x(offset)
#org @start

giveitem 0x4 0x1 0x1
end

This is what I saw in a scripting tutorial. I also tried setflag on the person ID, but the item came back when I left and re-entered the route. Any help would be much appreciated.
 

goldenyellowcrystal

A Black Crystal of Mystery
35
Posts
12
Years
How come when I compile my script in xse it doesnt work but I hear the clicking sound when i play it? (I dont know how to spoiler the script)
Pokemon Fire Red BPRE

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= Hello there.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
How come when I compile my script in xse it doesnt work but I hear the clicking sound when i play it? (I dont know how to spoiler the script)
Pokemon Fire Red BPRE

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= Hello there.

Your script is correctly written so that leads me to believe that it is your version of XSE that is the problem. You most likely have version 1.0.0 (which is notoriously buggy) when you need 1.1.1. Here is a link to download the newer XSE.

As for spoilering text use [spoiler] and [/spoiler] before and after the stuff you want to hide.
 
5,256
Posts
16
Years
Is there some form of level script code that would make it so that when I warp to a map it starts at a black screen? Using fadescreen leaves a second gap where you can see everything and kinda ruins the effect.
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
Is there some form of level script code that would make it so that when I warp to a map it starts at a black screen? Using fadescreen leaves a second gap where you can see everything and kinda ruins the effect.

I suppose you could use the fadescreen on the script that warps you there originally? No idea if that actually works or if it's what you mean :3
 
5,256
Posts
16
Years
I suppose you could use the fadescreen on the script that warps you there originally? No idea if that actually works or if it's what you mean :3

That doesn't work but I'm just putting the script that would happen on Map B happen on Map A and then warp over. Only problem is the fadescreen cancels for a second before it warps so it's just as bad >:

e Well I just cheated and moved the camera while the fadescreen was up to a part of the map that was black and just left it there. It's a cheat but it works I guess.
 
Last edited:
4
Posts
12
Years
  • Seen Nov 13, 2014
I've been using JPAN's FireRed Hack Rom for a week now and I've looked into the Sethealingplace command and I feel I've gotten it right but I guess I put it as the wrong level script or maybe I didn't actually get it right? I'm trying to duplicate the 'warping back to mom when you lose' so here's what I did:

#dynamic 0x80000
#org @main
sethealingplace 0x1
setvar 0x405A 0x0004 (that's how it is for bank4, map0, right?)
setvar 0x405B 0x0008 (x-coordinate)
setvar 0x405C 0x0005 (y-coordinate)
end

I put that script in script no (0), script type (on entering map/not on menu close (3))

Then I have:

#dynamic 0x80000
#org @main
special 0x182
end

on script no (1), script type (on entering map/on map close (5))

I'm not sure what I did wrong.
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
That doesn't work but I'm just putting the script that would happen on Map B happen on Map A and then warp over. Only problem is the fadescreen cancels for a second before it warps so it's just as bad >:

e Well I just cheated and moved the camera while the fadescreen was up to a part of the map that was black and just left it there. It's a cheat but it works I guess.

Aha that works, also using a tiny completely black map can be useful as then you can warp after the script (and it could be recycled).
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I've been using JPAN's FireRed Hack Rom for a week now and I've looked into the Sethealingplace command and I feel I've gotten it right but I guess I put it as the wrong level script or maybe I didn't actually get it right? I'm trying to duplicate the 'warping back to mom when you lose' so here's what I did:

#dynamic 0x80000
#org @main
sethealingplace 0x1
setvar 0x405A 0x0004 (that's how it is for bank4, map0, right?)
setvar 0x405B 0x0008 (x-coordinate)
setvar 0x405C 0x0005 (y-coordinate)
end

I put that script in script no (0), script type (on entering map/not on menu close (3))

Then I have:

#dynamic 0x80000
#org @main
special 0x182
end

on script no (1), script type (on entering map/on map close (5))

I'm not sure what I did wrong.

Yeah, that's how JPAN's hacked sethealingplace command works and you've set it out correctly so I'm not sure what could be going wrong. What exactly happens when you've whited out in your hack? Does the game crash? Are you warped to a different map? Does it display the wrong text etc?

I'm also not sure why you're using special 0x182 - Is it really necessary?

Also, you should add an extra '0' onto the end of your #define commands ;)
 

Locust_Arts

Your Rival
1
Posts
12
Years
  • Seen Mar 8, 2012
I am using the following code to attempt to hack Pokemon Emerald. It's a script to give the player a TOGEPI egg. My editor is PKSV-UI.
Spoiler:

If anyone could help me find out what exactly is wrong with this code because it doesn't let me compile it into the game D= that would be AWESOME and I'd love you forever (a long time) =D
 
72
Posts
12
Years
  • Seen Sep 30, 2017
So, what's the deal with the Script Offset in Advance Map? I'm trying to create new signs, I get the event placed, but I can't seem to figure out how the script is corresponding with the Script Offset function. I now randomly change one or two symbols in the code (0x168CD4 becomes 0x168CD3 for example), but that can't be the right way, can it?

For example, in the bedroom you start in, you have this:
'-----------------------
#org 0x168CD2
msgbox 0x818D50B '"[player] played with the NES.\p[.]O..."
callstd 0x3
end


'---------
' Strings
'---------
#org 0x18D50B
= [player] played with the NES.\p[.]Okay!\nIt's time to go!

Now, I have created a new room with another NES and I want it to say something else instead of 'played with the NES', for example '[player] kicked the computer's butt with Mario Kart'. To get that script to work on the second NES, I have to put in a code in the script offset, which in this case should be $168CD2, but that code is already used in the first bedroom. How does this work? Is there a trick to get a new code very easy?
 

droomph

weeb
4,285
Posts
12
Years
So, what's the deal with the Script Offset in Advance Map? I'm trying to create new signs, I get the event placed, but I can't seem to figure out how the script is corresponding with the Script Offset function. I now randomly change one or two symbols in the code (0x168CD4 becomes 0x168CD3 for example), but that can't be the right way, can it?

For example, in the bedroom you start in, you have this:


Now, I have created a new room with another NES and I want it to say something else instead of 'played with the NES', for example '[player] kicked the computer's butt with Mario Kart'. To get that script to work on the second NES, I have to put in a code in the script offset, which in this case should be $168CD2, but that code is already used in the first bedroom. How does this work? Is there a trick to get a new code very easy?
Create a new script with XSE or PKSV or whatever, and then paste the offset that it compiles to into the second Script offset box.

I am using the following code to attempt to hack Pokemon Emerald. It's a script to give the player a TOGEPI egg. My editor is PKSV-UI.
Spoiler:

If anyone could help me find out what exactly is wrong with this code because it doesn't let me compile it into the game D= that would be AWESOME and I'd love you forever (a long time) =D
It should be #dynamic, not #dyn.
 
Last edited:

itman

Back to ROM hacking. :D
98
Posts
16
Years
  • Age 30
  • Seen Feb 5, 2014
Is there a command in XSE to "checkpokemon" in your party? Like, if you have a Blastoise, go to this, while if you have a Charizard, go to this...
 
4
Posts
12
Years
  • Seen Nov 13, 2014
Yeah, that's how JPAN's hacked sethealingplace command works and you've set it out correctly so I'm not sure what could be going wrong. What exactly happens when you've whited out in your hack? Does the game crash? Are you warped to a different map? Does it display the wrong text etc?

I'm also not sure why you're using special 0x182 - Is it really necessary?

Also, you should add an extra '0' onto the end of your #define commands ;)

I'm warped to the first map under heading 0, one of those battle union rooms. I figured out that I had to first use the 'setvar 0x4056' and I tried it but the map completely ignored my level script for some reason. I guess something went wrong with the rom somewhere because I tested the level script in a fresh rom and it worked fine. It might have something to do with me changing the starting point map because when I tried to open the program again using that rom, it gave me a 'runtime error' which didn't happen in the past. I don't know why. I guess I'll just have to start over on a clean rom. Oh well. Thanks for replying anyway.
 
72
Posts
12
Years
  • Seen Sep 30, 2017
Create a new script with XSE or PKSV or whatever, and then paste the offset that it compiles to into the second Script offset box.

Well, yes, I get that, but how do I decide what the 6-symbol offset is? I mean, I have to make one in the script, don't I?

#org 0x168CD2
How do I decide which 6 symbols to use here?
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Well, yes, I get that, but how do I decide what the 6-symbol offset is? I mean, I have to make one in the script, don't I?


How do I decide which 6 symbols to use here?

Use a dynamic offset when writing your script - That is why at the top of one you almost always see the command #dynamic 0x800000'. It will automatically search for free space starting at that point in the ROM and then insert your script when it finds an opening. When you compile the script you'll be given several offsets, choose the first one that is presented as it will correlated to the start of your script if you've written it in a coherent manner. Copy it and place it in the event's script box.
 
72
Posts
12
Years
  • Seen Sep 30, 2017
Use a dynamic offset when writing your script - That is why at the top of one you almost always see the command #dynamic 0x800000'. It will automatically search for free space starting at that point in the ROM and then insert your script when it finds an opening. When you compile the script you'll be given several offsets, choose the first one that is presented as it will correlated to the start of your script if you've written it in a coherent manner. Copy it and place it in the event's script box.

This actually makes so much sense. Thanks!
 

Hacks0rus

Monster Raving Looney
24
Posts
12
Years
  • Seen Nov 9, 2012
Hello, I was wondering if any could help me out here.
Im setting up some level scripts in Pallet, in the downstairs of your house when you are leaving.
I get the script to work all fine and stop after it has activated, but the script starts whenever I enter the map, not on the tile that I want it to activate and have set the script on (at the exit).
How do I get the script to activate when I stand on it?
 
72
Posts
12
Years
  • Seen Sep 30, 2017
Is it possible to change the standard script for things like bookcases, cabinets, dressers and stuff like that?

So you won't get stuff like 'It's a nicely made dresser. It will hold a lot of stuff.'
 
5,256
Posts
16
Years
Is it possible to change the standard script for things like bookcases, cabinets, dressers and stuff like that?

So you won't get stuff like 'It's a nicely made dresser. It will hold a lot of stuff.'

In Advance Map, go to the Block Editor and select the tile you want to change (a TV, bookshelf, whatever), and edit the number in the first box that's titled "Behavior Byte" and change it to $00. So using the example of the Bookshelf tile, you'd replace the $89 part to $00. Hope this helps ;)

Hello, I was wondering if any could help me out here.
Im setting up some level scripts in Pallet, in the downstairs of your house when you are leaving.
I get the script to work all fine and stop after it has activated, but the script starts whenever I enter the map, not on the tile that I want it to activate and have set the script on (at the exit).
How do I get the script to activate when I stand on it?
Level scripts are activated upon entry to the map they are assigned to providing the variable they need is not set. Scripts on the Green S tiles are Trigger Events and are activated when the player steps on them. I think you may have gotten a bit confused there :D
 
Status
Not open for further replies.
Back
Top