• 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.
Hey guys, first timer needing help with a FR script
Okay I'm relatively new to this but have been making quick progress with XSE over the past few days. What I'm trying to accomplish is essentially a check to see if the player has already obtained the National Dex (the goal is to open up a new area of the map once the national dex is obtained). I understand that to activate the Nat Dex you use special 0x16F, but I haven't the slightest idea with how to perform a check. Any suggestions ?
 
Hey guys, first timer needing help with a FR script
Okay I'm relatively new to this but have been making quick progress with XSE over the past few days. What I'm trying to accomplish is essentially a check to see if the player has already obtained the National Dex (the goal is to open up a new area of the map once the national dex is obtained). I understand that to activate the Nat Dex you use special 0x16F, but I haven't the slightest idea with how to perform a check. Any suggestions ?

checkflag/setflag
or
setvar/compare
 
checkflag/setflag
or
setvar/compare

I've tried checkflag but have had no luck. Here is a rough approximation of what I have so far:

#dynamic 0x71EA08
#org @start
lock
faceplayer
checkflag 0x500
checkflag 0x16F
compare 0x800D 0x1
if 0x1 goto @natdex
compare 0x800D 0x0
if 0x0 goto @nonatdex
end

#org @natdex
applymovement 0x3 @exclaim
msgbox @enter 0x6
setflag 0x500
release
end

#org @nonatdex
msgbox @sorry 0x6
applymovement 0xff @move
applymovement 0x3 @push
waitmovement 0x0
release
end

#org @enter
= Oh, that's the NATIONAL POK\h1BDEX!\nPlease, go right on ahead!

#org @sorry
= I'm sorry, this area is off limits\nuntil you have obtained the\pNATIONAL POK\h1BDEX.

#org @exclaim
#raw 0x62

#org @move
#raw 0x10

#org @push
#raw 0x10
#raw 0x11
#raw 0x0
 
Waitwaitwait
special and checkflag do not do the same thing. also, flag 500 is not safe.
third, read diegoisawesome's xse tutorial on flags or this one:

OK so I've altered it to now check to see if the player has beaten the Elite Four at least once, which should be flag 82C. So what I now have is:

#dynamic 0x71EA08
#org @start
lock
faceplayer
checkflag 0x200
checkflag 0x82C
compare 0x800D 0x1
if 0x1 goto @natdex
compare 0x800D 0x0
if 0x0 goto @nonatdex
end

...

but still no joy.
 
OK so I've altered it to now check to see if the player has beaten the Elite Four at least once, which should be flag 82C. So what I now have is:



but still no joy.

That's wrong. If you beat the e4 then it should continue. plus the format for checkflag is:
.....
checkflag 0x(#)
if 0x1 goto @yesit'sset
goto @nowaybro
.....
 
That's wrong. If you beat the e4 then it should continue. plus the format for checkflag is:
.....
checkflag 0x(#)
if 0x1 goto @yesit'sset
goto @nowaybro
.....

OK, so technically this should work ?

#dynamic 0x71EA08
#org @start
lock
faceplayer
checkflag 0x200
checkflag 0x82C
if 0x1 goto @natdex
goto @nonatdex
end

Still not working
 
OK, so technically this should work ?



Still not working

One checkflag man. Your checking 200 then 82c or whatever, so 200 is totally being bypassed. Also how do you mean not working?
 
One checkflag man. Your checking 200 then 82c or whatever, so 200 is totally being bypassed. Also how do you mean not working?

Even without the
checkflag 0x200
i get nothing. The person I'm supposed to be talking to just says nothing at all. Here is where I'm at now:

//---------------
#dynamic 0x71EA08
#org @start
lock
faceplayer
checkflag 0x82C
if 0x1 goto @natdex
goto @nonatdex
end

#org @natdex
applymovement 0x4 @exclaim
msgbox @enter 0x6
release
end

#org @nonatdex
msgbox @sorry 0x6
applymovement 0xff @move
applymovement 0x4 @push
waitmovement 0x0
release
end

#org @enter
= Oh, that's the NATIONAL POK\h1BDEX!\nPlease, go right on ahead!

#org @sorry
= I'm sorry, this area is off limits\nuntil you have obtained the\pNATIONAL POK\h1BDEX.

#org @exclaim
#raw 0x62

#org @move
#raw 0x10

#org @push
#raw 0x10
#raw 0x11
#raw 0x0
 
Even without the
checkflag 0x200
i get nothing. The person I'm supposed to be talking to just says nothing at all. Here is where I'm at now:

1 you forgot a waitmovement
2 at the end of each movement you need a
#raw 0xfe​
This is the terminator byte for movements, much how ff is the terminator for texts
 
1 you forgot a waitmovement
2 at the end of each movement you need a
#raw 0xfe​
This is the terminator byte for movements, much how ff is the terminator for texts

Thanks for the help, I'm getting a lot closer now.
OK so now the NPC will interact correctly but after the script is executed the player is unable to move.

#org @start
lock
faceplayer
checkflag 0x82C
if 0x1 goto @natdex
goto @nonatdex
end

#org @natdex
applymovement 0x4 @exclaim
waitmovement 0x0
msgbox @enter 0x6
release
end

#org @nonatdex
msgbox @sorry 0x6
applymovement 0xff @move
applymovement 0x4 @push
waitmovement 0x0
release
end

#org @enter
= Oh, that's the NATIONAL POK\h1BDEX!\nPlease, go right on ahead!

#org @sorry
= I'm sorry, this area is off limits\nuntil you have obtained the\pNATIONAL POK\h1BDEX.

#org @exclaim
#raw 0x62
#raw 0xfe

#org @move
#raw 0x10
#raw 0xfe

#org @push
#raw 0x10
#raw 0x11
#raw 0x0
#raw 0xfe
 
Thanks for the help, I'm getting a lot closer now.
OK so now the NPC will interact correctly but after the script is executed the player is unable to move.

If it's a level script you need to cancel the 0xFFFF in the header script.
 
It's not a level script (AKAIK), it's a person event. He's basically just gonna block the path until you beat the E4.

Oh wow I see the issue. You forgot to move the guard out of the way bro.
 
Oh wow I see the issue. You forgot to move the guard out of the way bro.

Nono, the idea is that if you talk to the guard he will either let you pass or not, but there is also a gap next to him that will have another script that essentially makes him talk to you and push you backwards. The issue isn't that he goes back to his original position and I can't get past him, the issue now is that once he has successfully pushed the player backwards all of the players movements freeze.
 
Nono, the idea is that if you talk to the guard he will either let you pass or not, but there is also a gap next to him that will have another script that essentially makes him talk to you and push you backwards. The issue isn't that he goes back to his original position and I can't get past him, the issue now is that once he has successfully pushed the player backwards all of the players movements freeze.

In A-Map, is the guard's movement set to "No movement" or "Look down"? If it's look down, change it to no movement and check it in-game.
 
So i just applied Jpan engine, i just realized that the patch clear out every script in my ROM, including PokemonCenter script, any help for making a pokemon center script? i'd only know special 0x1 (which is used for healing your party) but there should be a command to make a pokemon center animation, any help? i'm not really asking for a script, but i'd be really glad if someone give me an example script
 
So i just applied Jpan engine, i just realized that the patch clear out every script in my ROM, including PokemonCenter script, any help for making a pokemon center script? i'd only know special 0x1 (which is used for healing your party) but there should be a command to make a pokemon center animation, any help? i'm not really asking for a script, but i'd be really glad if someone give me an example script

In the "Hack Applier" folder, go to the "Script" folder, then open "Nurse original script.rbc".
These files should be default set to XSE opening. Plus it's special 0x0 since 0 is the first slot. Just an FYI.
 
Status
Not open for further replies.
Back
Top