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

Help Thread: Script Help Thread

Status
Not open for further replies.
The ID number should be the species number. Rattata would be 0x13 (19 in decimal) for example.

This is for XSE probably, as PKSV never used this... But I haven't tried yet.
 
This is for XSE probably, as PKSV never used this... But I haven't tried yet.

PKSV is the script editor I use as well. The program converts your word representations into the hexadecimal version before compile time. It's a perk when programming in C, most other languages use other aliasing features. Anyways, the problem is that PKSV's #defines file isn't expandable because the .dat file is irregular. Therefore you NEED to use the numbers instead or recompile the .dat file.

Using the hexadecimal is supported, I'm adept enough at scripting and know enough about the program to confidently tell you this.
 
This is for XSE probably, as PKSV never used this... But I haven't tried yet.

Well in order to be able to add the pokemon name things into xse you need to open up the stdpoke.rbh file in the xse directory and add this line for every pokemon you added
#define PKMN_Perkamern 0x###
 
PKSV is the script editor I use as well. The program converts your word representations into the hexadecimal version before compile time. It's a perk when programming in C, most other languages use other aliasing features. Anyways, the problem is that PKSV's #defines file isn't expandable because the .dat file is irregular. Therefore you NEED to use the numbers instead or recompile the .dat file.

Using the hexadecimal is supported, I'm adept enough at scripting and know enough about the program to confidently tell you this.

It still says 'Value must be integer'...
 
Fixed my main issue but I also have another question. Can you forcibly make the player's character warp to another room through a level script, or can you not?
 
Last edited:
Fixed my main issue but I also have another question. Can you forcibly make the player's character warp to another room through a level script, or can you not?

Yes you can. There is a command named "warp" as well as another one to do it without sound. "F1" in XSE opens the command help menu where you can see the details/parameters to use it.
 
I'm back, unfortunately with the same problem.

First off, here's my script:
Spoiler:


The header is set so the level script is 03 - On entering map/not on menu close. Here's some additional info:

This is to be loaded by the first map the player loads into
This is script no 02
I am using FireRed
I'm using a patch that gets rid of the intro (can find link on request)

I'm not completely out of troubleshooting possibilities at this point, though help would be appreciated. Is there anything I'm missing?
 
I'm back, unfortunately with the same problem.

First off, here's my script:
Spoiler:


The header is set so the level script is 03 - On entering map/not on menu close. Here's some additional info:

This is to be loaded by the first map the player loads into
This is script no 02
I am using FireRed
I'm using a patch that gets rid of the intro (can find link on request)

I'm not completely out of troubleshooting possibilities at this point, though help would be appreciated. Is there anything I'm missing?

Change the level script to 02, and use a variable. https://www.pokecommunity.com/threads/191500
 
Hi, I've written a script tile which when stepped on will cause someone to block your way and say stuff like "You can't pass etc"

When I tested it, the game froze, can you guys tell me what's problem ?

I find it much easier to deal with PKSV-UI so I've written it there.
Code:
#dyn 0x71A455
#org @main
lock
faceplayer
compare 0x4055 0x4
if == jump @got
applymovement 0x4 @move
pauseevent 0x0
message @getfirst
callstf MSG_NORMAL
applymovement PLAYER @moveback
pauseevent 0x0
message @danger
callstd MSG_NORMAL
applymovement @return
pauseevent 0x0
release
end

#org @got
release
end

#org @move
M run_right run_up run_up run_right look_down end

#org @getfirst
= Wild pokemon live \nin tall grasses.

#org @moveback
M walk_down end

#org @danger
= I advice to get first a pokemon\nfrom professor OAKwood

#org @return
M run_left run_down run_down run_left look_down end
 
Hi, I've written a script tile which when stepped on will cause someone to block your way and say stuff like "You can't pass etc"

When I tested it, the game froze, can you guys tell me what's problem ?

I find it much easier to deal with PKSV-UI so I've written it there.
Code:
#dyn 0x71A455
#org @main
lock
faceplayer
compare 0x4055 0x4
if == jump @got
applymovement 0x4 @move
pauseevent 0x0
message @getfirst
callstf MSG_NORMAL
applymovement PLAYER @moveback
pauseevent 0x0
message @danger
callstd MSG_NORMAL
applymovement @return
pauseevent 0x0
release
end

#org @got
release
end

#org @move
M run_right run_up run_up run_right look_down end

#org @getfirst
= Wild pokemon live \nin tall grasses.

#org @moveback
M walk_down end

#org @danger
= I advice to get first a pokemon\nfrom professor OAKwood

#org @return
M run_left run_down run_down run_left look_down end

Have you got the script-tile info filled in in A-Map?

If not: Script tiles require variables to work properly, have a look at this tutorial to see what you should do in A-Map. I'm not used to PKSV-UI, so I'm afraid I can't say if anything else is wrong.
 
Last edited:
The Var number I put was 8001 instead of 4055... mybad XD

Thanks for the quick reply,magic !

Edit: I got it ! Thanks magic, your work like MAGIC!
 
Last edited:
I'm hacking FireRed with Advance Map and eXtreme Script Editor. I'm trying to add a quote to an NPC in the Lavender Volunteer Pokémon House. Here is her script right now.
Spoiler:

I want to add this to her script, which registers her in the Fame Checker and prints a message, and then I want it so if flag 0x23c is active it will jump to the current script, otherwise it will print this message.
Spoiler:

Basically, I want her to say two different things depending on a flag, but register her in the Fame Checker regardless. Jumping to another line of dialogue based on event flags and registering her in the Fame Checker while printing a line of dialogue work just fine, but when I'm combine the two the script rubs off on other NPCs or the script is truncated or changed when I compile it.
 
Last edited:
I'm hacking FireRed with Advance Map and eXtreme Script Editor. I'm trying to add a quote to an NPC in the Lavender Volunteer Pokémon House. Here is her script right now.
Spoiler:

I want to add this to her script, which registers her in the Fame Checker and prints a message, and then I want it so if flag 0x23c is active it will jump to the current script, otherwise it will print this message.
Spoiler:

Basically, I want her to say two different things depending on a flag, but register her in the Fame Checker regardless. Jumping to another line of dialogue based on event flags and registering her in the Fame Checker while printing a line of dialogue work just fine, but when I'm combine the two the script rubs off on other NPCs or the script is truncated or changed when I compile it.

On a related note, does anyone know how to change the overworld sprites as depicted in the Fame Checker?

This script should accomplish what you want, don't forget to change the offset of the OW to 0x16B1AA in advance map.

Spoiler:
 
This script should accomplish what you want, don't forget to change the offset of the OW to 0x16B1AA in advance map.

I set the offset correctly, and it works fine when the flag is on, but the offset when the flag is off condenses to this when I compile it in eXtreme Script Editor:
Spoiler:

In-game, it pops up an endless string of garbage characters. Help!?
 
I set the offset correctly, and it works fine when the flag is on, but the offset when the flag is off condenses to this when I compile it in eXtreme Script Editor:
Spoiler:

In-game, it pops up an endless string of garbage characters. Help!?

Just repoint everything. That usually means your space isn't free enough and you're overwriting things.
 
How would I make a script so that when I step on a tile, (first tile on route 1, actually) it gives me the national dex? I know it involves applymovement and the specialflag for the national dex (0x16F). I don't know how to put it all together though. I'm trying to make it so that there are no messages or anything, just that the player walks over it and there you go, you have it, they won't even notice anything happened. This is for XSE, by the way. Please help?

Thank you,
MadHacker
 
How would I make a script so that when I step on a tile, (first tile on route 1, actually) it gives me the national dex? I know it involves applymovement and the specialflag for the national dex (0x16F). I don't know how to put it all together though. I'm trying to make it so that there are no messages or anything, just that the player walks over it and there you go, you have it, they won't even notice anything happened. This is for XSE, by the way. Please help?

Thank you,
MadHacker

That's really easy. And, if you want to learn scripting, diegoisawesome's XSE Scripting tutorial, and you will learn scripting in a week or something. Here's the link.

But here's what the script looks like:

Spoiler:


There! I will not explain it, since, I presume, you're following diegoisawesome's tutorial, but, if you need any explanation, kindly VM me! :D
 
Hi,

Would somebody mind checking over my XSE script to see if it will do what I want it to do before I compile please? I've wrecked two ROMS by messing up script.


Spoiler:


My script reads:

Spoiler:


Thanks!
 
Last edited:
Status
Not open for further replies.
Back
Top