• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.
Okay, here it is:
Spoiler:

So first I had this set as "02, loads handler etc." then when that didn't worked I tried 03 (on entering map/not menu close) and 04 (loads handler to...). Those were also epic fail. I've already decompiled and rewritten the glitched byte caused by A-map, so that's not the problem.
This is supposed to be an entry script for a concept I had, a sort of reverse-mystery dungeon where the player is a Pokemon who wakes upto find he has become, horror of horrors, a human! It's basically just a mini project that I work on while my other hack is in beta testing.

I just had a thought. There's a pre-existing level script on the map that makes the player look up when the game starts. Would it work if I just put call 0x800000 onto the end of that script?
 
Last edited:
Okay, here it is:
Spoiler:

So first I had this set as "02, loads handler etc." then when that didn't worked I tried 03 (on entering map/not menu close) and 04 (loads handler to...). Those were also epic fail. I've already decompiled and rewritten the glitched byte caused by A-map, so that's not the problem.
This is supposed to be an entry script for a concept I had, a sort of reverse-mystery dungeon where the player is a Pokemon who wakes upto find he has become, horror of horrors, a human! It's basically just a mini project that I work on while my other hack is in beta testing.

I just had a thought. There's a pre-existing level script on the map that makes the player look up when the game starts. Would it work if I just put call 0x800000 onto the end of that script?
Hmm, The pre-existing script, what type of level script is it? Also, are you aware that HackMew's tool can change the direction of where the player faces upon entering map? So if the previous level script's purpose is solely to change the player's facing direction, then you can remove it..
 
Okay, so really I'm not even sure that it's making me face anywhere :\
Here's the script I was talking about:
Spoiler:

And here's the other level script, just a basic sethealingplace that was already there:
Spoiler:

It looks like I won't be able to eliminate the spriteface script without disabling the sethealingplace.
Anyway, the spriteface was 04 Validates values, loads handler etc., the sethealingplace was On entering map/not menu close.
 
Pokemon Red Title Screen Editing

No one seems to have this info up anywhere on the web, so I'm hoping someone here can help me. I need to change the layout of the title screen in Pokemon Red (GB) to look like so: (See 1st attachment: "What I need.png")[stupid 15 post rule]

So far, I have been able to get to this point: (See 2nd attachment: "What I have.png")[stupid 15 post rule]

I already know how to fix the Bulbasaur, but I'm stuck on the rest. In the Japanese Green version, the word "Green" is 2 tiles large, and in Red, "Red" is only 1 tile. The hand problem comes from the Pokeball bounce on the Red version title screen.

So, basically, I need to:
  • Flip the Pokemon and the trainer
  • Stop the hand from moving
  • And change "Red" to "Green"

Any one out there that can help?
 
hey help me out... im lookin to do a script where the player gets a random egg...
i have been doin it hex, and cant figure it out. just tried XSE but it reads "dynamic" and the says "no command dynfbmic" or somethin like that, idk havent seen it since yesterday. idk if XSE accepts variables there either... and the rom is read only, so it cant self edit right? or... could i do a callasm and then use that to edit the argument of giveegg, would that work? seems pointless i know, but i really want to pull this off... thanks in advance.
 
hey help me out... im lookin to do a script where the player gets a random egg...
i have been doin it hex, and cant figure it out. just tried XSE but it reads "dynamic" and the says "no command dynfbmic" or somethin like that, idk havent seen it since yesterday. idk if XSE accepts variables there either... and the rom is read only, so it cant self edit right? or... could i do a callasm and then use that to edit the argument of giveegg, would that work? seems pointless i know, but i really want to pull this off... thanks in advance.

When it coms to scripting XSE can do anything, no need for HEX...

The ROM is Read only, yes, but the thing is scripts and things can hold variables and such very easy.

here is an example of giving a random egg...

Code:
#dynamic 0x800000 //this is the location in the rom that XSE will look for free space when compiling this script

#org @start                    //start of script
random 0x64                    //generates a number between 0 and 100
compare LASTRESULT 0x0
if b_== goto @start           //if the random generates a 0 (Making the egg give a ?????? pokemon) it will try again.
giveegg LASTRESULT          //gives the player an egg containing any of the first 100 pokemon at random
end

Keep in mind this is just the bare essentials.
Lets say you want the script to give you one of 3 pokemon... Pikachu, Ralts, or Larvitar for instance...
This one will be a real script, ready for game... (As if it were to be placed on a sprite...)

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x1000
if b_== goto @AlreadyHave       //If the player already has the egg, skip the script and branch off.
message @hello 0x5                 //This asks the player if he/she wants the egg
compare LASTRESULT 0x0
if b_true goto @end                 //The compare LASTRESULT and this line checks if the player says NO, or presses B, if so, it branches away from here.
countpokemon
compare LASTRESULT 0x6
if b_== goto @FullParty            //If the player's party is full, skip everything and branch off
random 0x2                            //Generates a random number from 0 to 2
copyvar 0x7000 LASTRESULT    //Moves the result of Random to variable # 0x7000
compare 0x7000 0x0
if b_== goto @PIKA                 //If it is 0, go to the pikachu script
compare 0x7000 0x1
if b_== goto @RALTS               //If it is 1, go to the ralts script, the rest of this script can be dedicated to larvitar
giveegg 0xF6                          //Gives a Larvitar Egg
bufferpokemon 2 0xF6              //Buffers larvitar's name to a buffer...
message @GaveEgg 0x6
setflag 0x1000                        //Sets a flag so you can't get the egg again.
release
end

#org @PIKA
giveegg 0x19
bufferpokemon 2 0x19
message @GaveEgg 0x6
setflag 0x1000
release
end

#org @RALTS
giveegg 0x188
bufferpokemon 2 0x188
message @GaveEgg 0x6
setflag 0x1000
release
end

#org @AlreadyHave
message @AlreadyHaveEgg 0x6
release
end

#org @FullParty
message @PartyIsFull 0x6
release
end

#org @end
message @no 0x6
release
end

#org @hello
= Hello, want this egg?

#org @no
= No? Suit yourself...

#org @GaveEgg
= Really?  You'll love this here\n[buffer2] egg! It's warm!

#org @PartyIsFull
= Sorry, your party is full...

#org @AlreadyHaveEgg
= You already got an egg!\nWhat more do you want?!

XSE can do anything you want... no problems...
This help ya at all?
 
When it coms to scripting XSE can do anything, no need for HEX...

The ROM is Read only, yes, but the thing is scripts and things can hold variables and such very easy.

here is an example of giving a random egg...

Code:
#dynamic 0x800000 //this is the location in the rom that XSE will look for free space when compiling this script

#org @start                    //start of script
random 0x64                    //generates a number between 0 and 100
compare LASTRESULT 0x0
if b_== goto @start           //if the random generates a 0 (Making the egg give a ?????? pokemon) it will try again.
giveegg LASTRESULT          //gives the player an egg containing any of the first 100 pokemon at random
end
Keep in mind this is just the bare essentials.
Lets say you want the script to give you one of 3 pokemon... Pikachu, Ralts, or Larvitar for instance...
This one will be a real script, ready for game... (As if it were to be placed on a sprite...)

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x1000
if b_== goto @AlreadyHave       //If the player already has the egg, skip the script and branch off.
message @hello 0x5                 //This asks the player if he/she wants the egg
compare LASTRESULT 0x0
if b_true goto @end                 //The compare LASTRESULT and this line checks if the player says NO, or presses B, if so, it branches away from here.
countpokemon
compare LASTRESULT 0x6
if b_== goto @FullParty            //If the player's party is full, skip everything and branch off
random 0x2                            //Generates a random number from 0 to 2
copyvar 0x7000 LASTRESULT    //Moves the result of Random to variable # 0x7000
compare 0x7000 0x0
if b_== goto @PIKA                 //If it is 0, go to the pikachu script
compare 0x7000 0x1
if b_== goto @RALTS               //If it is 1, go to the ralts script, the rest of this script can be dedicated to larvitar
giveegg 0xF6                          //Gives a Larvitar Egg
bufferpokemon 2 0xF6              //Buffers larvitar's name to a buffer...
message @GaveEgg 0x6
setflag 0x1000                        //Sets a flag so you can't get the egg again.
release
end

#org @PIKA
giveegg 0x19
bufferpokemon 2 0x19
message @GaveEgg 0x6
setflag 0x1000
release
end

#org @RALTS
giveegg 0x188
bufferpokemon 2 0x188
message @GaveEgg 0x6
setflag 0x1000
release
end

#org @AlreadyHave
message @AlreadyHaveEgg 0x6
release
end

#org @FullParty
message @PartyIsFull 0x6
release
end

#org @end
message @no 0x6
release
end

#org @hello
= Hello, want this egg?

#org @no
= No? Suit yourself...

#org @GaveEgg
= Really?  You'll love this here\n[buffer2] egg! It's warm!

#org @PartyIsFull
= Sorry, your party is full...

#org @AlreadyHaveEgg
= You already got an egg!\nWhat more do you want?!
XSE can do anything you want... no problems...
This help ya at all?
it can do Nearly anything you want :p it can't insert tiles but it can map with setmaptile :D
 
awesomeness

well i didnt need a whole script, kinda overkill... but in a good way, save me some time. most helpful forum i been on, thanks a bunch ::hi-fives::

yeah i wanted to have a game, where a good part of the game was spent with a "temporary" beast pokemon, and then have that one stolen, and have them start "over" from a random egg and a b-rate poke. yeah. cause im crazy like that
 
well i didnt need a whole script, kinda overkill... but in a good way, save me some time. most helpful forum i been on, thanks a bunch ::hi-fives::

yeah i wanted to have a game, where a good part of the game was spent with a "temporary" beast pokemon, and then have that one stolen, and have them start "over" from a random egg and a b-rate poke. yeah. cause im crazy like that
Hm, that sounds interesting, but it could present problems if you've only got an egg in your party for any major length of time. Still, sounds like a cool idea! Sort of like the Digimon World DS games.
...erm, anyone figured out why my level script won't work?

I'm also having one more issue, that might be a bit easier to resolve, with this script:
Spoiler:

The applymovement doesn't function. Unknown is 3, var is 4050, etc. What's wrong?
 
Last edited:
Give Pokemon script error

no matter what answer i choose, either yes or no, i still get the reply as if i said no, im trying to hack pokemon ruby, any ideas?
 
Can you post the script so I can see what's wrong...?
sorry...im trying a give houndour script

'-----------------------
#org 0x803000
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880305D
msgbox 0x8803069 '"Hey,\nwould you like gift from \nTh..."
callstd 0x5
compare 0x0 0x1
if 0x1 goto 0x8803028
msgbox 0x8803094 '"Oh, thats too bad."
callstd 0x6
release
end

'-----------------------
#org 0x80305D
lock
faceplayer
msgbox 0x88030DC '"Hows it doing?"
callstd 0x6
release
end

'-----------------------
#org 0x803028
lock
msgbox 0x88030A7 '"Oh cool!\nIt's His Favorite"
callstd 0x6
copyvar 0x8004 LASTRESULT
givepokemon 0xE4 0x20 0x0 0x0 0x0 0x7D
nop1
copyvar 0x0 0x0
nop
nop
nop
nop
nop
msgbox 0x88030C2 '"PLAYER received Houndour!"
callstd 0x6
setflag 0x200
release
end


'---------
' Strings
'---------
#org 0x803069
= Hey,\nwould you like gift from \nTheSolcity?

#org 0x803094
= Oh, thats too bad.

#org 0x8030DC
= Hows it doing?

#org 0x8030A7
= Oh cool!\nIt's His Favorite

#org 0x8030C2
= PLAYER received Houndour!
 
The Solcity~~~

Alright... First of all, get the newest version of XSE, as the callstd line is useless and invalid in the new one.

There are a couple of errors here:

Code:
'-----------------------
#org 0x803000
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880305D
 
[B]msgbox 0x8803069 '"Hey,\nwould you like gift from \nTh..."[/B]
[B]callstd 0x5[/B]
[I]//The callstd line is unnessecary in the new XSE. Omit that line and just add "0x5" after the msgbox on the same line[/I]
 
[COLOR=red][B]compare 0x0 0x1[/B][/COLOR]
[COLOR=red][I]//Here's your main problem. Instead of 0x0 use LASTRESULT to operate a yes/no box[/I][/COLOR]
 
if 0x1 goto 0x8803028
 
[B]msgbox 0x8803094 '"Oh, thats too bad."[/B]
[B]callstd 0x6[/B] 
[I]//Same here, and continue[/I]
 
release
end
 
'-----------------------
#org 0x80305D
lock
faceplayer
[B]msgbox 0x88030DC '"Hows it doing?"[/B]
[B]callstd 0x6[/B]
release
end
 
'-----------------------
#org 0x803028
lock
[B]msgbox 0x88030A7 '"Oh cool!\nIt's His Favorite"[/B]
[B]callstd 0x6[/B]
copyvar 0x8004 LASTRESULT
givepokemon 0xE4 0x20 0x0 0x0 0x0 0x7D
 
[B]nop1 [/B]
[I]//nops not needed[/I]
 
copyvar 0x0 0x0
[B]nop [/B][I]//Same, and down[/I]
[B]nop[/B]
[B]nop[/B]
[B]nop[/B]
[B]nop[/B]
[B]msgbox 0x88030C2 '"PLAYER received Houndour!"[/B]
[B]callstd 0x6[/B]
 
[B]setflag 0x200 [/B]
//[I]Use flags higher than 0x900. Most flags below used by the game[/I]
 
release
end
 
 
'---------
' Strings
'---------
#org 0x803069
= Hey,\nwould you like gift from \nTheSolcity?
 
#org 0x803094
= Oh, thats too bad.
 
#org 0x8030DC
= Hows it doing?
 
#org 0x8030A7
= Oh cool!\nIt's His Favorite
 
#org 0x8030C2
= PLAYER received Houndour!

Instead, try this script:

Code:
'-----------------------
#dynamic 0x800000
 
#org @start
 
lock
faceplayer
checkflag 0x900
if 0x1 goto @done
msgbox @hey 0x5
compare LASTRESULT 0x1
if 0x1 goto @get
msgbox @bad 0x6
release
end
 
'-----------------------
#org @done
lock
faceplayer
msgbox @how 0x6
release
end
 
'-----------------------
#org @get
lock
msgbox @cool 0x6
copyvar 0x8004 LASTRESULT
givepokemon 0xE4 0x20 0x0 0x0 0x0 0x7D
copyvar 0x0 0x0
msgbox @received 0x6
setflag 0x900
release
end
 
 
'---------
' Strings
'---------
#org @hey
= Hey,\nwould you like gift from \nTheSolcity?
 
#org @bad
= Oh, thats too bad.
 
#org @how
= Hows it doing?
 
#org @cool
= Oh cool!\nIt's His Favorite
 
#org @received
= PLAYER received Houndour!

Let me know if you have any more problems
 
Alright... First of all, get the newest version of XSE, as the callstd line is useless and invalid in the new one.

There are a couple of errors here:

Code:
'-----------------------
#org 0x803000
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880305D
 
[B]msgbox 0x8803069 '"Hey,\nwould you like gift from \nTh..."[/B]
[B]callstd 0x5[/B]
[I]//The callstd line is unnessecary in the new XSE. Omit that line and just add "0x5" after the msgbox on the same line[/I]
 
[COLOR=red][B]compare 0x0 0x1[/B][/COLOR]
[COLOR=red][I]//Here's your main problem. Instead of 0x0 use LASTRESULT to operate a yes/no box[/I][/COLOR]
 
if 0x1 goto 0x8803028
 
[B]msgbox 0x8803094 '"Oh, thats too bad."[/B]
[B]callstd 0x6[/B] 
[I]//Same here, and continue[/I]
 
release
end
 
'-----------------------
#org 0x80305D
lock
faceplayer
[B]msgbox 0x88030DC '"Hows it doing?"[/B]
[B]callstd 0x6[/B]
release
end
 
'-----------------------
#org 0x803028
lock
[B]msgbox 0x88030A7 '"Oh cool!\nIt's His Favorite"[/B]
[B]callstd 0x6[/B]
copyvar 0x8004 LASTRESULT
givepokemon 0xE4 0x20 0x0 0x0 0x0 0x7D
 
[B]nop1 [/B]
[I]//nops not needed[/I]
 
copyvar 0x0 0x0
[B]nop [/B][I]//Same, and down[/I]
[B]nop[/B]
[B]nop[/B]
[B]nop[/B]
[B]nop[/B]
[B]msgbox 0x88030C2 '"PLAYER received Houndour!"[/B]
[B]callstd 0x6[/B]
 
[B]setflag 0x200 [/B]
//[I]Use flags higher than 0x900. Most flags below used by the game[/I]
 
release
end
 
 
'---------
' Strings
'---------
#org 0x803069
= Hey,\nwould you like gift from \nTheSolcity?
 
#org 0x803094
= Oh, thats too bad.
 
#org 0x8030DC
= Hows it doing?
 
#org 0x8030A7
= Oh cool!\nIt's His Favorite
 
#org 0x8030C2
= PLAYER received Houndour!
Instead, try this script:

Code:
'-----------------------
#dynamic 0x800000
 
#org @start
 
lock
faceplayer
checkflag 0x900
if 0x1 goto @done
msgbox @hey 0x5
compare LASTRESULT 0x1
if 0x1 goto @get
msgbox @bad 0x6
release
end
 
'-----------------------
#org @done
lock
faceplayer
msgbox @how 0x6
release
end
 
'-----------------------
#org @get
lock
msgbox @cool 0x6
copyvar 0x8004 LASTRESULT
givepokemon 0xE4 0x20 0x0 0x0 0x0 0x7D
copyvar 0x0 0x0
msgbox @received 0x6
setflag 0x900
release
end
 
 
'---------
' Strings
'---------
#org @hey
= Hey,\nwould you like gift from \nTheSolcity?
 
#org @bad
= Oh, thats too bad.
 
#org @how
= Hows it doing?
 
#org @cool
= Oh cool!\nIt's His Favorite
 
#org @received
= PLAYER received Houndour!
Let me know if you have any more problems



I Dont think im entering it right, all it does is freeze and play a glitch sound...im using pokescript to insert it, any ideas what went wrong?



*EDIT* Never mind i fixed it =) anything else i should know?
 
I Dont think im entering it right, all it does is freeze and play a glitch sound...im using pokescript to insert it, any ideas what went wrong?



*EDIT* Never mind i fixed it =) anything else i should know?

Haha yes. Pokescript is a problem :P
Any scripting questions just let me know
 
Here's one:
I am coding a cutscene, and I am trying to move the camera around, I have tried multiple methods-
fading, moving the camera, unfading.
Making multiple sprites, hiding them, moving, showing them.
Fading the screen, moving the player...
Anyway, to speed things up, I did a movesprite on the player sprite, but the camera stays put. I attempted to do a 'movesprite 7F', but the camera still didn't move.
So,
TLDR:
Is there a way to make the camera 'jump' to a certain coordinate pair, or is the only way to move it the moveplayer... script.
 
Last edited:
Here's one:
I am coding a cutscene, and I am trying to move the camera around, I have tried multiple methods-
fading, moving the camera, unfading.
Making multiple sprites, hiding them, moving, showing them.
Fading the screen, moving the player...
Anyway, to speed things up, I did a movesprite on the player sprite, but the camera stays put. I attempted to do a 'movesprite 7F', but the camera still didn't move.
So,
TLDR:
Is there a way to make the camera 'jump' to a certain coordinate pair, or is the only way to move it the moveplayer... script.

so you wanna move he camera?
it's possible through scripting.

I do not think you can 'jump' to a specific position but you can use applymovement and you will use 0x7F, and not 7F... hex is different from a number and a letter. =/

Anyways, before the applymovement command, you should add the command that will tell the ROM that you will move the camera, and that command is...
Code:
special 0x113
and to tell the ROM that you finished using the camera, use the code...
Code:
special 0x114
...

so your script should look like...

Code:
...
special 0x113
applymovement 0x7F @move
waitmovement 0x0
...
...
...
special 0x114
 
Hey, is there any way to put Unown text into a script?
And has anyone figured out why my level script wasn't working yet?
Oh, and I have another question. You know how when fishing you have to press A within a certain amount of time in order to land the fish? Well, is there any way I can insert something like that into a script, preferably also with timed B, L, and R presses too? So basically the player would have to press a sequence of buttons, each one within a time limit.
 
Last edited:
Hey, is there any way to put Unown text into a script?
And has anyone figured out why my level script wasn't working yet?

In your level script, I think you forgot waitmovement 0x0 under the applymovement command, since it's not working.
 
Status
Not open for further replies.
Back
Top