• 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.
1
Posts
13
Years
  • Seen Jun 12, 2011
Using Fire Red
editor Notepad to Pokescript
Trigger script
Spoiler:


Here is what it shows in Pokescript after i've Compiled what i typed in notepad
Spoiler:

In game Y/N box comes up and Freezes
______________________
Edit: Wrote script into XSE But it Freezes upon standing on trigger
Spoiler:
 
Last edited:
108
Posts
13
Years
  • Seen Mar 21, 2024
Why is it when I use this as a text script, the character saying it says nothing to me?
#org $text
lock
faceplayer
message $gls
$gls 1 = Hi! I'm Jason.
boxset 6
release
end
 
108
Posts
13
Years
  • Seen Mar 21, 2024
If I were you I'd start using XSE instead of Pokescript ;)
Pokescript is very buggy.

I have tried that to. I always get an error when I go batch compiler.


Spoiler:


This one in xse after trying to go to batch compiler tells me Erroe 13 type mismatch in my file on line 2. Missing #define or paramenter.


Spoiler:


Using this one makes it tell me No #org directives were found.
 

TheDarkShark

Metal Headed Hacker
56
Posts
13
Years
XSE won't understand the $s. You'll have to use @, also, it won't accept the text right under the msgbox command. Try using this instead:

Code:
#dynamic 0x800000
#org @text
lock
faceplayer
msgbox $gls 0x6
release
end

#org @gls
= Hi! I'm Jason.
You really should read a tutorial about XSE scripting.
 
108
Posts
13
Years
  • Seen Mar 21, 2024
XSE won't understand the $s. You'll have to use @, also, it won't accept the text right under the msgbox command. Try using this instead:

Code:
#dynamic 0x800000
#org @text
lock
faceplayer
msgbox $gls 0x6
release
end

#org @gls
= Hi! I'm Jason.
You really should read a tutorial about XSE scripting.

I had to change the $gls to @gls since now I know you can't use $. Ive looked at a few videos on youtube and they all used $ and it worked for them. But I still don't get anything. I compiled that very script, then burned it to the rom, and pasted the offset into a new person event and the person is there but they don't say anything.
 
1,421
Posts
13
Years
I had to change the $gls to @gls since now I know you can't use $. Ive looked at a few videos on youtube and they all used $ and it worked for them. But I still don't get anything. I compiled that very script, then burned it to the rom, and pasted the offset into a new person event and the person is there but they don't say anything.
Maybe the person in the video was using Pokescript, since it uses the $ sign. In XSE and PKSV, you'll have to use the @ sign.
 

LightOfTruth

Member
729
Posts
14
Years
  • Age 31
  • Seen Jul 16, 2020
I have the XSE scripting tutorial stored on my computer as the info is so useful. I still check the thread to see if it has updated though :)
 
26
Posts
13
Years
  • Seen Jan 22, 2012
Quick query, very new to scripting, I know from watching tuts that '\v\h01' is the players name, tried experimenting and discovered '\v\h02' was Pokemon first in party? Well I guess that or starter. What is the code for your rival character like that?
 

Nerketur

PokéScripter
104
Posts
13
Years
Quick query, very new to scripting, I know from watching tuts that '\v\h01' is the players name, tried experimenting and discovered '\v\h02' was Pokemon first in party? Well I guess that or starter. What is the code for your rival character like that?
You could also use [PLAYER] and [RIVAL], just so you know. I don't know the \v\h?? codes for any of them. At least, if you're using XSE.
 

redriders180

Mastermind of Pokemon Glazed
314
Posts
13
Years
Can anyone help me figure out why this script wont work? The script should, when the player walks on it, cause a question mark to go over the players head, and say "I wonder where Mom and Dad are?" but all it does is lock everything and wont release it...

Code:
'---------------
#org 0x6B1EA0
checkflag 0x828
if 0x0 goto 0x86B22B8
end

'---------------
#org 0x6B22B8
lock
applymovement MOVE_PLAYER 0x86B1EAC
waitmovement 0x0
msgbox 0x86B3270 MSG_NORMAL '"I wonder where Mom and Dad are?"
release
setflag 0x828
end


'---------
' Strings
'---------
#org 0x6B3270
= I wonder where Mom and Dad are?


'-----------
' Movements
'-----------
#org 0x6B1EAC
#raw 0x57 'Question Mark (?)
#raw 0xFE 'End of Movements
 
6
Posts
13
Years
  • Seen Apr 8, 2011
THIS IS NOT A SCRIPT REQUEST, I just want someone to point me in the right direction, and I know there is like a billion tutorials, but I just dont know how to put it all together

Ok, so this is what I want to happen, the player is standing on a beach and has nowhere to walk but upwards, when the player is off the beach, i want the rival character (the opposite gender protagonist) to approach from the top, and talk to the player, then i want a flag to be set so this wont happen again.

Basicly, what Im asking is:
-How do you type the gender (sprite) of the rival as the opposite of the player
-How do you make people move in to talk to the player (and then make them go away)
-How do you set the correct flag
-How do you put it all together correctly

Im obviously a begginer at this, but if I could just finish the first little scene, Id learn a whole lot, Thanks :)
 

masterquestmq

Enthusiastic Rom Hacker
194
Posts
13
Years
  • Seen Nov 19, 2023
Can anyone help me figure out why this script wont work? The script should, when the player walks on it, cause a question mark to go over the players head, and say "I wonder where Mom and Dad are?" but all it does is lock everything and wont release it...

Code:
'---------------
#org 0x6B1EA0
checkflag 0x828
if 0x0 goto 0x86B22B8
end

'---------------
#org 0x6B22B8
lock
applymovement MOVE_PLAYER 0x86B1EAC
waitmovement 0x0
msgbox 0x86B3270 MSG_NORMAL '"I wonder where Mom and Dad are?"
release
setflag 0x828
end


'---------
' Strings
'---------
#org 0x6B3270
= I wonder where Mom and Dad are?


'-----------
' Movements
'-----------
#org 0x6B1EAC
#raw 0x57 'Question Mark (?)
#raw 0xFE 'End of Movements


try this

#dynamic 0x800000
checkflag 0x200
if 0x0 goto @hey!
if 0x1 goto @end
end

#org @hey!
lock
applymovement 0xFF @move
waitmovement 0xFF (FF is the player)
msgbox @talk 0x6
setflag 0x200
release
end

#org @move
#raw 0x57
#raw 0xFE

#org @talk
= I wonder where Mom and Dad are?

#org @end
release
end


IMPORTANT!!
In the script tile of Advance map place 0300 in unknown and 4050 in the box below it (variable number i think) this will make the applymovement work in the game.

also flag 0x828 is a special flag as it activated the pokemon menu in the game, this should only be used when u get ur first pokemon

U also need to put 0x1 because when you step on the tile again it will release you immediately after the event has taken place.

this should do it. pm me if it still does not work
i did not have time to try the script out but im fairly sure it works.

THIS IS NOT A SCRIPT REQUEST, I just want someone to point me in the right direction, and I know there is like a billion tutorials, but I just dont know how to put it all together

Ok, so this is what I want to happen, the player is standing on a beach and has nowhere to walk but upwards, when the player is off the beach, i want the rival character (the opposite gender protagonist) to approach from the top, and talk to the player, then i want a flag to be set so this wont happen again.

Basicly, what Im asking is:
-How do you type the gender (sprite) of the rival as the opposite of the player
-How do you make people move in to talk to the player (and then make them go away)
-How do you set the correct flag
-How do you put it all together correctly

Im obviously a begginer at this, but if I could just finish the first little scene, Id learn a whole lot, Thanks :)


Unfortunately i can only answer 3/4 questions
As this is not a script request ill just point you in the right direction
1) Correct flag is an unused flag in the game id start with 0x200 and move up by one when creating another flag,
2) Move talk leave, that is an applymovement script, simple to master if you sit down and look at it check tutorial section
3) put it all together its an applymovement script

ill give you a skeleton of what your scriipt will look like

#dynamic 0x800000
#org @start
checkflag 0x200
if 0x0 goto @t
if 0x1 goto @a

#org @t
lock
applymovement 0x(spritenumber)
waitmovement 0x(same above)
msgbox @talk 0x6
setflag 0x200
release
end

#org @a
release
end

NOTE the scriipt above is not finish u need to fill in the msg, and the overworld number of the sprite and ohh yeah the movement.

See tutorial secrtioni XSE diegoisawesome tutorial

give it 20 min you'll know what to do trust me.
 
Last edited:
108
Posts
13
Years
  • Seen Mar 21, 2024

Maybe the person in the video was using Pokescript, since it uses the $ sign. In XSE and PKSV, you'll have to use the @ sign.

I still dont get why the characters wont say anything to me after I paste the offset and save. The added person event is there but they dont say anything.
 

Nerketur

PokéScripter
104
Posts
13
Years
Can anyone help me figure out why this script wont work? The script should, when the player walks on it, cause a question mark to go over the players head, and say "I wonder where Mom and Dad are?" but all it does is lock everything and wont release it...

Code:
'---------------
#removeall 0x6B1EA0
#org @start
checkflag 0x800
if [COLOR=Red]0x1[/COLOR] goto @end
lock
applymovement MOVE_PLAYER @question
waitmovement 0x0
msgbox @wonder MSG_NORMAL '"I wonder where Mom and Dad are?"
release
setflag 0x800
end

'---------------
#org @end
end

'---------
' Strings
'---------
#org @wonder
= I wonder where Mom and Dad are?


'-----------
' Movements
'-----------
#org @question
#raw 0x57 'Question Mark (?)
#raw 0xFE 'End of Movements

IMPORTANT!!

In the script tile of Advance map place 0003 in unknown and 4050 in the box below it (variable number i think) this will make the applymovement work in the game.

also flag 0x828 is a special flag as it activated the pokemon menu in the game, this should only be used when u get ur first pokemon

Your script is "right", but it uses a bad coding style. =P So, his original works the best, though that note of the Pokemon menu is correct, IF he's using FireRed/LeafGreen.

As a note, if you don't use lock, release is not needed, and actually, there's a faster way, that I have in the quotes.

The variable number can be ANY unused variable. It's basically checking to see if that variable is set to 3, (Which is what I think that does) before it allows script-based movements. In any case, 4050 is safe to use. But not EVERY variable is safe. Check the research thread to find out why. I think it's only the 4000's that are safe. Meaning 4000-4FFF. In any case, though, testing is vital to ensure success.

THIS IS NOT A SCRIPT REQUEST, I just want someone to point me in the right direction, and I know there is like a billion tutorials, but I just dont know how to put it all together

Ok, so this is what I want to happen, the player is standing on a beach and has nowhere to walk but upwards, when the player is off the beach, i want the rival character (the opposite gender protagonist) to approach from the top, and talk to the player, then i want a flag to be set so this wont happen again.

Basicly, what Im asking is:
-How do you type the gender (sprite) of the rival as the opposite of the player
-How do you make people move in to talk to the player (and then make them go away)
-How do you set the correct flag
-How do you put it all together correctly

Im obviously a begginer at this, but if I could just finish the first little scene, Id learn a whole lot, Thanks :)

Unfortunately i can only answer 3/4 questions
As this is not a script request ill just point you in the right direction
2) Move talk leave, that is an applymovement script, simple to master if you sit down and look at it check tutorial section
3) Correct flag is an unused flag in the game id start with 0x200 and move up by one when creating another flag,
4) put it all together its an applymovement script

ill give you a skeleton of what your scriipt will look like

#dynamic 0x800000
#org @start
checkflag 0x200
if 0x1 goto @a
lock
applymovement 0x(spritenumber)
waitmovement 0x(same above)
msgbox @talk 0x6
setflag 0x200
release
end

#org @a
end

NOTE the scriipt above is not finish u need to fill in the msg, and the overworld number of the sprite and ohh yeah the movement.

See tutorial secrtioni XSE diegoisawesome tutorial

give it 20 min you'll know what to do trust me.

Again, bad coding style, but I fixed it up. Everything else you said is right.
You should NEVER have two if-statements one after the other. Though it does work in some cases, it won't work in every case. So just don't use it.
The game never does, so why should you?

Also, there are a few other things you'll need to add. You'll need to add blockers in A-Map, and put it all in a Script tile. =)

I still dont get why the characters wont say anything to me after I paste the offset and save. The added person event is there but they dont say anything.

There are many reasons for this.

  1. You have the incorrect offset of the script in A-Map
  2. You are using a bad location in the ROM (Some places get overwritten as the game-play progresses)
  3. You are using movement scripts without setting an unused variable to 0003 in A-Map. 4050 is a good choice
  4. You are not using XSE.
  5. You are pasting the offset to a ROM that you are not using.
I'm guilty of the last one. I tried everything, and then realized that I wasn't testing the ROM I changed. I was testing a completely different ROM. Trust me, it happens. So make sure that you're testing the ROM that you're changing.
 
108
Posts
13
Years
  • Seen Mar 21, 2024

There are many reasons for this.

  1. You have the incorrect offset of the script in A-Map
  2. You are using a bad location in the ROM (Some places get overwritten as the game-play progresses)
  3. You are using movement scripts without setting an unused variable to 0003 in A-Map. 4050 is a good choice
  4. You are not using XSE.
  5. You are pasting the offset to a ROM that you are not using.
I'm guilty of the last one. I tried everything, and then realized that I wasn't testing the ROM I changed. I was testing a completely different ROM. Trust me, it happens. So make sure that you're testing the ROM that you're changing.
[/QUOTE]


Well, I click to add a person event and the person I add is right in front of the house in pallet town(fire red). So I know I'm using the right ROM. I'm using XSE and then batch compiler. Then it finds me an offset and I copy it and paste it into the offset section in Advanced Map on the person event I just added. I save like a millions times and then try it. The person is always there. As many times as I try something different they are always where I put them but they dont' say anything.

Spoiler:


Spoiler:


Is something wrong with my scripts?
 
Last edited:
23
Posts
13
Years
  • Age 29
  • Seen Jun 3, 2013
Okay, here is the issue:

Game: FireRed
Type: Trigger
Editor: AM/XSE
Script:
Spoiler:


At the end of the script, it freezes the game... I don't know whats wrong.
 

Nerketur

PokéScripter
104
Posts
13
Years

Nerketur said:
There are many reasons for this.

  1. You have the incorrect offset of the script in A-Map
  2. You are using a bad location in the ROM (Some places get overwritten as the game-play progresses)
  3. You are using movement scripts without setting an unused variable to 0003 in A-Map. 4050 is a good choice
  4. You are not using XSE.
  5. You are pasting the offset to a ROM that you are not using.
I'm guilty of the last one. I tried everything, and then realized that I wasn't testing the ROM I changed. I was testing a completely different ROM. Trust me, it happens. So make sure that you're testing the ROM that you're changing.

Well, I click to add a person event and the person I add is right in front of the house in pallet town(fire red). So I know I'm using the right ROM. I'm using XSE and then batch compiler. Then it finds me an offset and I copy it and paste it into the offset section in Advanced Map on the person event I just added. I save like a millions times and then try it. The person is always there. As many times as I try something different they are always where I put them but they dont' say anything.

Spoiler:


Spoiler:


Is something wrong with my scripts?

Indeed. I'm surprised that the scripts compile. I fixed the scripts in the quote. =) In any case, I don't use the batch compiler, I simply use the compile button (The icon on the toolbar with two gears. Saving in XSE does nothing, and in order to see any change, you have to completely close the ROM and open it again, and I'd suggest starting the game from the beginning. If not, at least enter and leave a building, before actually seeing if the code changed.

The only other thing I can see happening is misunderstanding which offset means what. =P

Okay, here is the issue:

Game: FireRed
Type: Trigger
Editor: AM/XSE
Script:
Spoiler:


At the end of the script, it freezes the game... I don't know whats wrong.

The only problems I saw are changed in RED in the quote. Other than those things, nothing is really wrong with the script. It could freeze for other reasons, such as incorrect movements, invalid movements, etc.
 

redriders180

Mastermind of Pokemon Glazed
314
Posts
13
Years
Thanks for the help, the script now works!

I just have another question...How do I change where the player starts when the player starts a new game? I'm modifying a Ruby Rom, and it starts by having seperate genders in seperate houses, but I want to change that so both genders start in one house, and in their room instead of outside the house and all that walking, etc.

Also, when you have a script, i think i know what to do, but when you have a person event, and you want them to walk away, do you have to do anything special to make the applymovement command work?

Thanks for the help ^w^
 
108
Posts
13
Years
  • Seen Mar 21, 2024


Indeed. I'm surprised that the scripts compile. I fixed the scripts in the quote. =) In any case, I don't use the batch compiler, I simply use the compile button (The icon on the toolbar with two gears. Saving in XSE does nothing, and in order to see any change, you have to completely close the ROM and open it again, and I'd suggest starting the game from the beginning. If not, at least enter and leave a building, before actually seeing if the code changed.

The only other thing I can see happening is misunderstanding which offset means what. =P



The only problems I saw are changed in RED in the quote. Other than those things, nothing is really wrong with the script. It could freeze for other reasons, such as incorrect movements, invalid movements, etc.

Yes I do have to close out of the game to see the new code take effect but I still don't get any messaging. I don't have to start from the very beginning. I think Ill make another video. Maybe someone can point out my mistake. I know I got a script for obtaining the national dex much earlier so all pokemon could evolve but the person who gives it to you is in viridian in my hack and he doesn't say anything. Just a Duh Duh Duh Da music like you got something and thats it.
 
Status
Not open for further replies.
Back
Top