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

Blah

Free supporter
1,924
Posts
11
Years
  • 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.
     

    Joexv

    ManMadeOfGouda joexv.github.io
    1,037
    Posts
    11
    Years
  • 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###
     

    Skaraborne

    The sharpest 'mon in the thread
    195
    Posts
    9
    Years
  • 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'...
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • It still says 'Value must be integer'...

    bfb0957.png

    Make sure you have the correct number of parameters.
     
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    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:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • 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.
     
    77
    Posts
    9
    Years
    • Seen Dec 5, 2015
    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?
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • 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. http://www.pokecommunity.com/showthread.php?t=191500
     

    AceRoku

    Dev of Pokemon Flare
    28
    Posts
    9
    Years
    • Seen Mar 21, 2015
    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
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    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:

    AceRoku

    Dev of Pokemon Flare
    28
    Posts
    9
    Years
    • Seen Mar 21, 2015
    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:
    69
    Posts
    9
    Years
  • 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:

    jToTheAvacola

    Banned
    18
    Posts
    9
    Years
    • Seen Sep 4, 2016
    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:
     
    69
    Posts
    9
    Years
  • 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!?
     

    jToTheAvacola

    Banned
    18
    Posts
    9
    Years
    • Seen Sep 4, 2016
    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.
     
    29
    Posts
    9
    Years
    • Seen Apr 17, 2016
    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
     
    3,044
    Posts
    9
    Years
  • 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
     
    282
    Posts
    9
    Years
    • Seen Nov 28, 2021
    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