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

metapod23

Hardened Trainer
673
Posts
15
Years
    • Seen Aug 18, 2016
    Okay, so I've reworked my script, and thanks to pokepal and cooley's expert guidance, the sprite will actually move correctly now. The only problem is that he reappears every time I exit the map... I've set his people number to 0001, so what have I messed up this time?
    Thanks for the help guys, here's the script.
    EDIT: The sprite's event number is also 1, second-to-top Unknown is 3, and Movement is 11.
    This script takes place exactly one tile in front of the center warp into Viridian Forest (from route 2). The person I use in it is standing just to the left of the kid who says he and his friends are here to catch Bug Pokemon. If you like, enter the script and a sprite into your own ROM and test it for yourself; you'll see what I mean.
    It would also be great if someone could write their own script for this scenario and show me, so I can see exactly how I'm supposed to do it. I can't figure out what I'm doing wrong and it's driving me insane.
    Oh, and this is a side note, but I can't edit walking frames into the sprite. I saved this sprite over a sprite that doesn't normally move at all, so if I try to make a walking frame, it duplicates it over his standing frame. How do I fix that?
    Spoiler:

    Sorry if I'm asking too many questions at once...

    Did you assign a flag number to the sprite you want to hide under PERSON ID? Like, try assigning 1000 to it, then put setflag 0x1000 in your script.
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Age 29
    • Seen Apr 7, 2014
    I don't think you can use the flag 0x1 because it's already set. It's already used by the game?
    Also use only "fadescreen 0x0".
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Age 31
    • Seen Jul 22, 2012
    Thanks guys, you were right, it turned out to be the flag I was using. I wound up changing over to flag 0xF1, which is working just fine. Thanks for the help, I appreciate it.
    By the way, is there even any such thing as a flag 0x1000?
    Anyway, it doesn't matter. I'll be back, I'm sure.
     

    Samike360

    Lover of May
    397
    Posts
    15
    Years
  • Thanks guys, you were right, it turned out to be the flag I was using. I wound up changing over to flag 0xF1, which is working just fine. Thanks for the help, I appreciate it.
    By the way, is there even any such thing as a flag 0x1000?
    Anyway, it doesn't matter. I'll be back, I'm sure.

    Yeah, actually you should use flags 0x1000 and up, they are safer. I always use those in my hacks now.
     

    ruby

    [span="howdy;partner"][/span]
    1,390
    Posts
    20
    Years
    • Age 31
    • Seen Mar 27, 2024
    Does anyone know the special to reset the map in Emerald?

    special 0x8E doesn't work. :/
     
    2
    Posts
    14
    Years
    • Seen Aug 3, 2010
    okay, so I have begun working on a pokehack to try and get a feel for it down, and I was messing around with some tools today. i had to update my AdvanceMap to find the feature, but I figured out how to delete a scripted even, and like an idiot I deleted one of the signs in Pallet Town. now, that's fine, I can just remake it, but I'm having a weird problem using AdvanceMap and XSE in conjuction. The scripts won't compile into my rom for some reason.

    I'm using a FireRed ROM, and XSE with AdvanceMap, as I said above. Both programs are current, and I took some screenshots to play through this.

    Image one: find an empty offset. Got it.

    Image two: Then, I find the offset. Again, easy.

    Image three: now i've got my signpost (this code compiles fine and works, I've already done it with one other sign. for some reason, the first compiling of the code will save right, but if i try to edit it after i've already put a script in it, it doesn't work)

    Image four: compiles fine.

    Image five: clicked no on this, but i've tried it with saving the script copy too

    And then when I open that script up again with the "Open Script" button, I'm back to the first image. It doesn't save the script at all. As I said above, if this is the first time I've edited the script it will usually save, but if I try to edit it again later, it won't save. Any ideas what I'm doing wrong?
     
    185
    Posts
    16
    Years
  • Well, I'm back already. Now, I think this problem probably lies in Advance Map, but I've already squared away the Movement and Unknown values of the sprite, so that's not the problem. Basically, I have a trainer with a view radius of four and the following script, but if I step one tile down and to the right of her, the whole screen goes red. Thanks for your patience.
    Spoiler:

    The trainerbattle you're trying to call might be bugged. Have you tried a diffirent one?
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Age 31
    • Seen Jul 22, 2012
    @-Dark-, Yes, actually, and the same thing happened.
    @tempestdevil, Make sure that when you try to compile the script you have the ROM open and not just the .rbc file. In the same way, when you want to save your script, make sure you do so in .rbc format.
    By the way, compiling the script doesn't save it. It just puts it into the game, and decompiling a script, editing it, and recompiling it is a big no-no. Hope that helped.
     

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • I'm sure this has been asked before, I can't seem to find the answer anywhere;

    What's the offset for the truck movement/sound script?

    Preferably in Emerald, R/S will do though.
    Do you plan to attempt to remove the Truck Intro script? On your own?
    There's more to it, than a simple script :P
     

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • okay, so I have begun working on a pokehack to try and get a feel for it down, and I was messing around with some tools today. i had to update my AdvanceMap to find the feature, but I figured out how to delete a scripted even, and like an idiot I deleted one of the signs in Pallet Town. now, that's fine, I can just remake it, but I'm having a weird problem using AdvanceMap and XSE in conjuction. The scripts won't compile into my rom for some reason.

    I'm using a FireRed ROM, and XSE with AdvanceMap, as I said above. Both programs are current, and I took some screenshots to play through this.

    Image one: find an empty offset. Got it.

    Image two: Then, I find the offset. Again, easy.

    Image three: now i've got my signpost (this code compiles fine and works, I've already done it with one other sign. for some reason, the first compiling of the code will save right, but if i try to edit it after i've already put a script in it, it doesn't work)

    Image four: compiles fine.

    Image five: clicked no on this, but i've tried it with saving the script copy too

    And then when I open that script up again with the "Open Script" button, I'm back to the first image. It doesn't save the script at all. As I said above, if this is the first time I've edited the script it will usually save, but if I try to edit it again later, it won't save. Any ideas what I'm doing wrong?
    Errr, this isn't a scripting question. I mean, this thread is for script help, not XSE won't save help. You should contact HackMew for a question like this :)

    But as for your script:
    If you use "msgbox @text 0x3" meaning SignPost type of message, than you don't need to put "lock, faceplayer" into the script. Unless you want to be stuck to it until the message is done displaying xD
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Age 31
    • Seen Jul 22, 2012
    I'm reposting this problem. I've been working on it, and I can't seem to figure it out. I've even tried copying a script from the actual game, editing it, and inserting it in a different offset, and this still happens. Any help would really be appreciated, almost to the point of idol worship (just kidding).

    Now, I think this problem probably lies in Advance Map, but I've already squared away the Movement and Unknown values of the sprite, so that's not the problem. Basically, I have a trainer with a view radius of four and the following script, but if I step one tile down and to the right of her, the whole screen goes red. Thanks for your patience.

    Spoiler:
     

    ruby

    [span="howdy;partner"][/span]
    1,390
    Posts
    20
    Years
    • Age 31
    • Seen Mar 27, 2024
    Do you plan to attempt to remove the Truck Intro script? On your own?
    There's more to it, than a simple script :P
    I've done it now, who ever said I thought it was just a simple script?

    Thanks for the special though, guys. :]

    I've got another problem though.

    I can't get any of my scripts to run as soon as the player enters the map from a warp, they just go to a black screen. :/

    I have advancemap set to run this script "On entering map/not menu close":
    [jq]'---------------
    #org 0xE40810
    lockall
    applymovement MOVE_PLAYER 0x8040E73
    applymovement 0x1 0x8040443
    waitmovement 0x0
    pause 0x10
    applymovement 0x1 0x8040493
    waitmovement 0x0
    msgbox 0x8E40973 MSG_NORMAL '"May I see your ticket please Sir?\..."
    fadesong 0x217
    pause 0x10
    playsong 0x219 0x1
    pause 0x50
    warpmuted 0x1 0x3 0xFF 0x0 0x0
    releaseall
    end


    '---------
    ' Strings
    '---------
    #org 0xE40973
    = May I see your ticket please Sir?\p[player] flashed the FERRY TICKET.\pExcellent, go ahead and board the ship.


    '-----------
    ' Movements
    '-----------
    #org 0x40E73
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x2 'Face Left
    #raw 0xFE 'End of Movements

    #org 0x40443
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0xFE 'End of Movements

    #org 0x40493
    #raw 0x8 'Step Down (Normal)
    #raw 0xB 'Step Right (Normal)
    #raw 0x2 'Face Left
    #raw 0xFE 'End of Movements[/jq]It runs perfectly fine if I put it on a person or sign, what am I doing wrong?
     

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • I'm reposting this problem. I've been working on it, and I can't seem to figure it out. I've even tried copying a script from the actual game, editing it, and inserting it in a different offset, and this still happens. Any help would really be appreciated, almost to the point of idol worship (just kidding).

    Now, I think this problem probably lies in Advance Map, but I've already squared away the Movement and Unknown values of the sprite, so that's not the problem. Basically, I have a trainer with a view radius of four and the following script, but if I step one tile down and to the right of her, the whole screen goes red. Thanks for your patience.

    Spoiler:
    Luckily for you, I've fixed this problem for a friend before.
    Follow these steps:
    1. Add another person to the map, and make sure it doesn't share the same Person number.
    2. Delete the old person(the trainer)
    3. Put the New person in the same spot and input the same settings, including the script offset.

    And it should work now..


    I've done it now, who ever said I thought it was just a simple script?

    Thanks for the special though, guys. :]

    I've got another problem though.

    I can't get any of my scripts to run as soon as the player enters the map from a warp, they just go to a black screen. :/

    I have advancemap set to run this script "On entering map/not menu close":
    [jq]'---------------
    #org 0xE40810
    lockall
    applymovement MOVE_PLAYER 0x8040E73
    applymovement 0x1 0x8040443
    waitmovement 0x0
    pause 0x10
    applymovement 0x1 0x8040493
    waitmovement 0x0
    msgbox 0x8E40973 MSG_NORMAL '"May I see your ticket please Sir?\..."
    fadesong 0x217
    pause 0x10
    playsong 0x219 0x1
    pause 0x50
    warpmuted 0x1 0x3 0xFF 0x0 0x0
    releaseall
    end


    '---------
    ' Strings
    '---------
    #org 0xE40973
    = May I see your ticket please Sir?\p[player] flashed the FERRY TICKET.\pExcellent, go ahead and board the ship.


    '-----------
    ' Movements
    '-----------
    #org 0x40E73
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x2 'Face Left
    #raw 0xFE 'End of Movements

    #org 0x40443
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0x8 'Step Down (Normal)
    #raw 0xFE 'End of Movements

    #org 0x40493
    #raw 0x8 'Step Down (Normal)
    #raw 0xB 'Step Right (Normal)
    #raw 0x2 'Face Left
    #raw 0xFE 'End of Movements[/jq]It runs perfectly fine if I put it on a person or sign, what am I doing wrong?
    Are you sure the X/Y coordinates are 0x0 and 0x0?
     

    ruby

    [span="howdy;partner"][/span]
    1,390
    Posts
    20
    Years
    • Age 31
    • Seen Mar 27, 2024
    Yeah, trust me.

    And I know that's not the problem anyway, even with coordinates that are are within the map it still goes to black when that script is set to run on entering the map.

    Is there a way to make it run a script after that warpmuted?
     

    Samike360

    Lover of May
    397
    Posts
    15
    Years
  • Yeah, trust me.

    And I know that's not the problem anyway, even with coordinates that are are within the map it still goes to black when that script is set to run on entering the map.

    Is there a way to make it run a script after that warpmuted?

    Try the "validates values" one under header (the 2nd choice for the level scripts)
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Age 31
    • Seen Jul 22, 2012
    Luckily for you, I've fixed this problem for a friend before.
    Follow these steps:
    1. Add another person to the map, and make sure it doesn't share the same Person number.
    2. Delete the old person(the trainer)
    3. Put the New person in the same spot and input the same settings, including the script offset.

    And it should work now..
    Well that stinks. I tried a few things, thought my rom was corrupted, and just restarted the entire hack before I saw this post.
    Oh well, thanks very much for answering. I'll know what to do in the future.
    Appreciate it. It's great that you take the time to help out noobs like me in the help thread while you work on your hack. Thanks again!


    EDIT:
    Okay, since I last posted, I've found three things I want to learn that I haven't been able to find in the XSE tutorials.

    1. How do I hide a sprite until a flag is set? I know the normal hidesprite command, but I want to know how to keep a sprite from existing on the map until I've completed a certain event.

    2. How do I make a sprite disappear after a certain flag is set, without having to talk to him/her?

    3. How do I edit the terrain with a script? For example, in cooley's hack, Eruption, he makes Mr. Pokemon use a card key to get through a hedge, and the hedge's tiles are changed to accomodate entry. How do I do that?

    Thanks all, I think I'm starting to get the hang of scripting.
     
    Last edited:

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    1. How do I hide a sprite until a flag is set? I know the normal hidesprite command, but I want to know how to keep a sprite from existing on the map until I've completed a certain event.

    There are certain flags you can use for this. 2c is one of them - it's the one used to hide Professor Oak's sprite in Pallet Town. If you set any sprite to this, it will stay hidden on the map until a script activates a showsprite command for it. There's also a similar flag for the people in Saffron City, 3e or 3f or something.

    2. How do I make a sprite disappear after a certain flag is set, without having to talk to him/her?

    In the script that you're using to set the flag, use "hidesprite" to hide the sprite you don't want to be seen. If you're hiding a sprite on a map other than the one you're in at the time, then you'll probably have to make a script for the header of the map that sprite is in.

    3. How do I edit the terrain with a script? For example, in cooley's hack, Eruption, he makes Mr. Pokemon use a card key to get through a hedge, and the hedge's tiles are changed to accomodate entry. How do I do that?

    I'm not sure how it was done in the Eruption hack, but one way to do this is to make a sprite of the thing you want to appear - like how the small trees that get cut aren't actually part of the terrain, but are separate person events. Like, if you were going to cut a hedge, you could put in a sprite with the image of a hedge, then hide the sprite to allow passage.

    Hope some of this helps!
     
    Status
    Not open for further replies.
    Back
    Top