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

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

zachatoo

Zachatoo
7
Posts
10
Years
    • Seen May 3, 2020
    I seem to be in an odd predicament.
    Spoiler:

    I placed this person event (Advanced Map) in Oak's Lab, wanting it to ask if the player wanted to cheat in order to get through the game more quickly. It should then warp you to another map.

    However, it always accepts @extras as true whether I select yes or no when I entered the Lab before Oak's script entering the grass. Same thing after I choose a starter pokemon. But after Oak's script and before I choose a starter, @extras is always accepted as false. Does it have something to do with Oak's script that interfere's with mine? I don't understand how that's possible due to dynamic scripts.
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • I seem to be in an odd predicament.
    Spoiler:

    I placed this person event (Advanced Map) in Oak's Lab, wanting it to ask if the player wanted to cheat in order to get through the game more quickly. It should then warp you to another map.

    However, it always accepts @extras as true whether I select yes or no when I entered the Lab before Oak's script entering the grass. Same thing after I choose a starter pokemon. But after Oak's script and before I choose a starter, @extras is always accepted as false. Does it have something to do with Oak's script that interfere's with mine? I don't understand how that's possible due to dynamic scripts.

    You forgot the most important line! "compare LASTRESULT 0x1"
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • here is a part of my script:

    "clearflag 0x1357
    applymovement 0x8 @walk1
    applymovement 0x9 @walk2
    applymovement 0xA @walk3
    applymovement 0xB @walk4
    applymovement 0xC @walk5
    waitmovement 0x0
    applymovement 0xFF @walk6
    applymovement 0xB @walk7
    waitmovement 0xFF"

    however, when i do the clearflag, the guys appear but they don't do their walk. i however, do mine and the script continues. help?
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • here is a part of my script:

    "clearflag 0x1357
    applymovement 0x8 @walk1
    applymovement 0x9 @walk2
    applymovement 0xA @walk3
    applymovement 0xB @walk4
    applymovement 0xC @walk5
    waitmovement 0x0
    applymovement 0xFF @walk6
    applymovement 0xB @walk7
    waitmovement 0xFF"

    however, when i do the clearflag, the guys appear but they don't do their walk. i however, do mine and the script continues. help?

    Are they offscreen? Applymovement only works if the people are just off the screen or on it. Any more than one tile offscreen causes issues.
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • Are they offscreen? Applymovement only works if the people are just off the screen or on it. Any more than one tile offscreen causes issues.

    They were initially off screen then I moved them on screen and still the same thing. What I'm thinking is you can't do an applymovement on anyone else after doing a clearflag because I did an applymovement on me, then on them, and it worked. But now I'm having another problem... damn I hate scripts sometimes lol.

    So even though I have setflags set and I fadescreen, the OWs aren't disappearing so I used movesprite command to just move them to a random tree location far far away. Just after that, I removed a flag that was hiding seven sprites. So now when it fades back on, everything looks good except a few OWs aren't loading until I get near them. One of my OWs, #17, was showing through the fadescreen so I had to move him just a little offscreen so you can't see but still it should show those on screen right? Here's a vid.. it'll make it easier if you just see it.

    Edit: swapped positions of a few OWs... it must be the person event or something because when i switched the position, same problem occured but opposite positions.


    Edit: Fixed. Bela told me to use hidesprite instead of movesprite. Fixed the problem.
     
    Last edited:

    GoGoJJTech

    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
    2,475
    Posts
    11
    Years
  • They were initially off screen then I moved them on screen and still the same thing. What I'm thinking is you can't do an applymovement on anyone else after doing a clearflag because I did an applymovement on me, then on them, and it worked. But now I'm having another problem... damn I hate scripts sometimes lol.

    So even though I have setflags set and I fadescreen, the OWs aren't disappearing so I used movesprite command to just move them to a random tree location far far away. Just after that, I removed a flag that was hiding seven sprites. So now when it fades back on, everything looks good except a few OWs aren't loading until I get near them. One of my OWs, #17, was showing through the fadescreen so I had to move him just a little offscreen so you can't see but still it should show those on screen right? Here's a vid.. it'll make it easier if you just see it.

    Edit: swapped positions of a few OWs... it must be the person event or something because when i switched the position, same problem occured but opposite positions.


    Edit: Fixed. Bela told me to use hidesprite instead of movesprite. Fixed the problem.

    Flag 0x1357 Is Not safe. Plus you're using Ruby, so you're probably overwriting vars or pokemon in the PC boxes. It's only safe in FR and only if you extend them.
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • Flag 0x1357 Is Not safe. Plus you're using Ruby, so you're probably overwriting vars or pokemon in the PC boxes. It's only safe in FR and only if you extend them.

    thats for FR. ruby has different safe flags. Just set a random behavior byte to 83 and checked.. no eggs so seems I'm doing everything right. I'm following the patterns of other ruby hacks
     
    10
    Posts
    11
    Years
  • I'm having trouble trying to create complex scripts. I'm wanting to redo all the starting scripts in Pallet town, so I first removed all existing scripts in Pallet and in the Lab. I then made my own script (which compiled successfully), put it into the game under the "Header" tab, and added it on the tile in front of the player's house's door. When I save this and boot up the rom, I get a white screen and am unable to use it (other roms work fine, and removing the script does not fix this). However, I can still load a real time save. When I do that and enter Pallet from the north, the text in my script triggers (although you cannot see the speaker at this location) and then Gary proceeds to say some random lines and make to exiting door sound effect in an endless loop (note that Gary and is lines are no where in this script). I clearly messed up bad, especially with the white screen thing, and I can't very well start with a clean rom because I have so many other scripts and mapping edits in this one. Any ideas on how to fix either of these problems?

    On a somewhat minor note, opening the map for Pallet or Viridian in Advance Map (newest version) causes the following error message to appear: "ERROR: (ENotAPointer) AdvanceMapError(5): Value $FFFFFFFF is not a Pointer! Please contakt [email protected]"

    The script that I am using:

    Spoiler:
     

    Sniper

    ふゆかい
    1,412
    Posts
    10
    Years
  • I'm having trouble trying to create complex scripts. I'm wanting to redo all the starting scripts in Pallet town, so I first removed all existing scripts in Pallet and in the Lab. I then made my own script (which compiled successfully), put it into the game under the "Header" tab, and added it on the tile in front of the player's house's door. When I save this and boot up the rom, I get a white screen and am unable to use it (other roms work fine, and removing the script does not fix this). However, I can still load a real time save. When I do that and enter Pallet from the north, the text in my script triggers (although you cannot see the speaker at this location) and then Gary proceeds to say some random lines and make to exiting door sound effect in an endless loop (note that Gary and is lines are no where in this script). I clearly messed up bad, especially with the white screen thing, and I can't very well start with a clean rom because I have so many other scripts and mapping edits in this one. Any ideas on how to fix either of these problems?

    On a somewhat minor note, opening the map for Pallet or Viridian in Advance Map (newest version) causes the following error message to appear: "ERROR: (ENotAPointer) AdvanceMapError(5): Value $FFFFFFFF is not a Pointer! Please contakt [email protected]"

    The script that I am using:

    Spoiler:

    Can you try again? I re-write the script, use this.

    Code:
    #dynamic 0x800000
    
    #org @start
    setvar 0x4000 0x1
    applymovement 0x3 @move1
    waitmovement 0x0
    msgbox @help 0x6
    applymovement 0x3 @move2
    waitmovement 0x0
    hidesprite 0x3
    setflag 0x400
    release
    end
    
    #org @move1
    #raw 0x62
    #raw 012
    #raw 0x12
    #raw 0x12
    #raw 0xfe
    
    #org @help
    = \v\h01! It's TEAM LEAF. They're\nattacking Pallet!\pThey tried to  steal my grandon's\nPOKéMON, but he stopped them. They\leven burned down  one of the\lhouses!\pI think I saw one of them run\nnorth on Route 1.  If you hurry,\lyou might be able to catch him.
    
    #org @move2
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0xFE
     
    43
    Posts
    14
    Years
    • Seen Jan 26, 2018
    This map script is inside script type 2. The variable is not used and I know that the raw word is 0x0 instead of 0xffff. When I enter the room, the script doesn't activate. I have to step 4 times before it activates. I have made many map scripts this way and have not had this problem before. I am using the english version of firered. The script works fine, it just requires me to step 4 times to start.
    Spoiler:
     
    Last edited:

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • This map script is inside script type 2. The variable is not used and I know that the raw word is 0x0 instead of 0xffff. When I enter the room, the script doesn't activate. I have to step 4 times before it activates. I have made many map scripts this way and have not had this problem before. I am using the english version of firered. The script works fine, it just requires me to step 4 times to start.
    Spoiler:

    not sure if it'll fix the problem, but try going to the script tile on your map and under the first unknown put in $03 and under the second unknown put in $0300.








    ------------------------



    So for my script, initially I need it to checkitem 11A which I've redone into "RARE TACO"
    yet, if you choose no, it works fine but if you choose yes to the "are you hungry" string, even if you don't have the item, it'll follow through with the script. I can't figure out why?

    Here's the script:

    Spoiler:
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • So for my script, initially I need it to checkitem 11A which I've redone into "RARE TACO"
    yet, if you choose no, it works fine but if you choose yes to the "are you hungry" string, even if you don't have the item, it'll follow through with the script. I can't figure out why?

    Here's the script:

    Spoiler:

    You need to add 'compare 0x800D 0x1' after the checkitem command.
     
    10
    Posts
    11
    Years
  • Can you try again? I re-write the script, use this.

    Code:
    #dynamic 0x800000
    
    #org @start
    setvar 0x4000 0x1
    applymovement 0x3 @move1
    waitmovement 0x0
    msgbox @help 0x6
    applymovement 0x3 @move2
    waitmovement 0x0
    hidesprite 0x3
    setflag 0x400
    release
    end
    
    #org @move1
    #raw 0x62
    #raw 012
    #raw 0x12
    #raw 0x12
    #raw 0xfe
    
    #org @help
    = \v\h01! It's TEAM LEAF. They're\nattacking Pallet!\pThey tried to  steal my grandon's\nPOKéMON, but he stopped them. They\leven burned down  one of the\lhouses!\pI think I saw one of them run\nnorth on Route 1.  If you hurry,\lyou might be able to catch him.
    
    #org @move2
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0xFE

    No change, loading the rom still causes a white screen and entering Pallet using a real time save file causes Oak to say his line and then Gary to endlessly say "Okay! I'll make my Pokemon battle to toughen it up. Player! Gramps! Smell ya later!" HOWEVER, there is now small pause before and after Oak speaks, which I assume is his movement in the script being executed, so something changed.
     
    3
    Posts
    10
    Years
    • Seen Oct 18, 2014
    This is probably going to be a horribly newb question. But I'm (slowly) learning to hack a Fire Red ROM, and am trying to make an extra rival for the player. This character is supposed to walk up to the player when they walk over a certain script tile, talk, battle and leave again. I tried making a script for these actions, and managed to make one in XSE that I could compile, but when I re-checked it a large section of it was either changed or gone.

    This is the script I wrote initially:

    Spoiler:


    While this is what it ends up with:
    Spoiler:


    Can anyone help point a newb in the right direction? Any help would be greatly appreciated.

    Oh and I haven't tested this out in the game to see what would happen, as given that the script looks wrong to start with I don't really see a point.
     
    191
    Posts
    10
    Years
  • I am so confused with scripts and I want to release my hack soon http://www.pokecommunity.com/showthread.php?t=314330 Can anyone provide me with an extremely dumbed down tutorial for scripting every single time that I try to script none of my programs work it wont compile any scripts :( what program is the simplest? No past scripting experience I need trainer battles give items normal conversations and a script for teleporting from 1 Island to the route directly below pallet or pallet either way I need this to be a boat warp though and lastly event pokemon scripts so a tutorial to any and all would be much appreciated :D also if you can link me to the program. This is all for Fire Red BTW
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • I am so confused with scripts and I want to release my hack soon http://www.pokecommunity.com/showthread.php?t=314330 Can anyone provide me with an extremely dumbed down tutorial for scripting every single time that I try to script none of my programs work it wont compile any scripts :( what program is the simplest? No past scripting experience I need trainer battles give items normal conversations and a script for teleporting from 1 Island to the route directly below pallet or pallet either way I need this to be a boat warp though and lastly event pokemon scripts so a tutorial to any and all would be much appreciated :D also if you can link me to the program. This is all for Fire Red BTW

    Click here for .rar bundle of tools
    Go there for all the tools you'll need bundled into one .rar provided by linkandzelda.

    XSE v 1.1.1 is the scripting program you want to use.

    there are many scripting tutorials, but I prefer tajaros: Click here



    ---------------------------------------------------------

    I'm trying to implement pokemart command but I'm not entirely sure about the offset part. Does it need to be a predetermined list? diegoisawesome's tutorial doesn't specify because of the #raw stuff. Here is my script (in game, it pulls up a menu BUY SELL QUIT and freezes the screen):

    Spoiler:


    fixed. i didnt put #raw word
     
    Last edited:
    43
    Posts
    14
    Years
    • Seen Jan 26, 2018
    not sure if it'll fix the problem, but try going to the script tile on your map and under the first unknown put in $03 and under the second unknown put in $0300.

    I'm not using a script tile. It is a map script (level script).
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • I'm not using a script tile. It is a map script (level script).

    what are you talking about? you use a script tile WITH level script. you take the script tile and place it wherever the person enters the map, as if the person is standing on the script tile. take the offset of your script and put it into that script tile with the var you chose. then go to header and under Map script, add a new one and select "Validates values, loads handler to 0x03000EB0 (playback) [02]" which is the second option. underneath that youll see flag and value.... put in the value you put in for the script tile and next to that is the offset box labeled "Script offset 2:" put the same offset as the script tile in there and click Save map scripts. CTRL + H and open up the Map script offset in XSE... level script, decompile, change the 0xFFFF to 0x0 and compile and you're good.

    the level script needs to know where the script tile you want it to activate is. cus if i put ten level scripts on a map, it's not gonna just load all ten at once if i step on the map. it's about where you put the script tile.

    tl;dr: use a script tile.
     
    2
    Posts
    13
    Years
    • Seen Sep 14, 2016
    Here is the problem with my script. After the first movement script, something weird happens. I use Fire Red ROM and this is a person event. Here is what it looks like on notepad:
    Spoiler:


    But this is what is looks like in PKSV

    Spoiler:


    So it's clear something is going wrong with the pausemove 0 command. But i don't know what. Something also appears to be odd about the playsfx command as well. I have no idea. Thanks in advance though.
     
    Status
    Not open for further replies.
    Back
    Top