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

tajaros

Hi I'm dawg
855
Posts
12
Years
  • I have 2 questions to ask TPC.

    Problem numbers one: I created a level script. Yes I did it the proper way by getting the map offset and such. It is an [2] level script where you walk into the room for the first time and the mom gives you your shoes. It works perfectly fine but everytime I enter the room, the script activates again. I have the right variable under the flags section. Anyone know what the problem might be? Here is the script for you to look at.

    Spoiler:


    Note I created another level script the same way and that one works perfectly fine, it's just this one that keeps repeating.

    Problem numbers two: I wrote a script where you pick up a pokeball containing a Pokemon (It's a long script) and the Pokeball is gone (which is suppose to happen) but when you leave the room and come back, the Pokeball reappears. I don't know what I am doing wrong! I these comands

    hidesprite 0x1
    setflag 0x7

    and I also made the person ID 7. That should work, shouldn't it?

    Please PC help me!

    Change the var you are using, you can't use 0x4000 for your level scripts since it reactivates every time you leave the map or something like that.

    Try changing it to 0x4010 or some other var.
     
    6
    Posts
    11
    Years
    • Seen Oct 25, 2013
    Hello I will make this very simple. I have one problem that is cursing me. I am making a simple trainer script. I have made a script that works in XSE but the only problem is I cant get the player to face me. I understand that the script needs to have lock faceplayer to do so. The only problem is if I put it in my script it causes the screen to go black/red. I hear this is a common problem if you check the trainer box. The only problem if I dont check it the person wont move towards me. Is there some kind of script I can add to my original script so that I dont have to check the trainer box and the trainer will still approach me?

    Here is the original script

    #dynamic 0x800E8A

    #org @start
    trainerbattle 0x0 0x003 0x001 @before @after
    msgbox @beaten 0x6
    release
    end

    #org @before
    = You wont beat\nme soldier.

    #org @after
    = Hmph, as\nyou were.

    #org @beaten
    = Keep moving forward



    ANY help would be greatful
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • Hello I will make this very simple. I have one problem that is cursing me. I am making a simple trainer script. I have made a script that works in XSE but the only problem is I cant get the player to face me. I understand that the script needs to have lock faceplayer to do so. The only problem is if I put it in my script it causes the screen to go black/red. I hear this is a common problem if you check the trainer box. The only problem if I dont check it the person wont move towards me. Is there some kind of script I can add to my original script so that I dont have to check the trainer box and the trainer will still approach me?

    Here is the original script

    #dynamic 0x800E8A

    #org @start
    trainerbattle 0x0 0x003 0x001 @before @after
    msgbox @beaten 0x6
    release
    end

    #org @before
    = You wont beat\nme soldier.

    #org @after
    = Hmph, as\nyou were.

    #org @beaten
    = Keep moving forward



    ANY help would be greatful

    When you check the trainer box, you also need to type in a radius. This radius is how many tiles away the NPC can "see you" from. Also, in your trainer battle command, I'm not too sure, but I remember that being a filler byte (always 0x0) so that could be a problem also.
     
    6
    Posts
    11
    Years
    • Seen Oct 25, 2013
    When you check the trainer box, you also need to type in a radius. This radius is how many tiles away the NPC can "see you" from. Also, in your trainer battle command, I'm not too sure, but I remember that being a filler byte (always 0x0) so that could be a problem also.

    I should have mentioned that I have a set view radius on there already. I have also tried the filler byte as well but no luck.
     

    Aryan143

    The Fennekin Fan!
    757
    Posts
    11
    Years
  • Hello I will make this very simple. I have one problem that is cursing me. I am making a simple trainer script. I have made a script that works in XSE but the only problem is I cant get the player to face me. I understand that the script needs to have lock faceplayer to do so. The only problem is if I put it in my script it causes the screen to go black/red. I hear this is a common problem if you check the trainer box. The only problem if I dont check it the person wont move towards me. Is there some kind of script I can add to my original script so that I dont have to check the trainer box and the trainer will still approach me?

    Here is the original script

    #dynamic 0x800E8A

    #org @start
    trainerbattle 0x0 0x003 0x0 @before @after
    msgbox @beaten 0x6
    release
    end

    #org @before
    = You wont beat\nme soldier.

    #org @after
    = Hmph, as\nyou were.

    #org @beaten
    = Keep moving forward



    ANY help would be greatful

    I tried your script and the only thing you need to change is changed in bold.
     

    ep!c

    Banned
    124
    Posts
    11
    Years
    • Seen Jan 4, 2015
    destinjagold said:
    I seriously doubt that you should be using an offset that is beyond 8 hex characters.

    Well, there are also pointers for 8+ hex characters, which XSE has problems with.
    There are three possibilites to fix.

    1. You make the pointers manually, its a ~2 min work / script.
    2. Make the starterscript into 8-caracter offset and with call @ you point into the expand area
    3. You repoint all pokemon sprites to +1000000, delete the whole pokemon then at D00000, be sure you point the graphics into +1000000 and have 0x800000 - 0xFFFFFF for scripts, which is for even 3 regions lol.
     
    416
    Posts
    11
    Years
    • Seen Feb 10, 2024
    Hello, I am havin issues... when all my pokemon faint I dont respawn... im just getting a black screen...

    I followed this guide:
    http://www.romhackersonline.com/soc...ending-sethealingplace-on-pok-233mon-firered/
    word for word to increase my sethealingplace list... but now I just get a black screen, forcing the player to reset their game...

    logically it should work unless there is a point that guide is missing (or I messed it up somewhere else)

    so is there another guide for this? or does anyone know where the script is that runs after a person dies?
    cause resetting the game woulnt be that bad if it did it automatically... no respawns, when you die you start from your last save point... it would make people save more ;)

    the black screen happen right after the "player whited out" text... before the "player scurried to the pokemon center protecting his pokes from furthur harm" text...
     
    Last edited:

    Crocky

    SuperScarlet!
    97
    Posts
    15
    Years
    • Seen Jul 23, 2020
    Are scripts that do things after a certain amount of steps possible to do in Firered?
    I wanted to make berry trees that regenerate a berry after a certain amount of steps.
    Thanks for your help!
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • Are scripts that do things after a certain amount of steps possible to do in Firered?
    I wanted to make berry trees that regenerate a berry after a certain amount of steps.
    Thanks for your help!

    Errr... It would be tough, but it could be done. It would require a small branch in the step routine, but it is fairly basic ASM in terms of complexity. It can't be done with just a script because scripts lock the player in place. The only way to do it with a script, would be to have a map script which checks the amount of steps since the last time it was used and if so, cause berries to grow. The only problem with this, is the scripts would only be loaded when reentering the map.


    Now that I think about it... I have a vague memory of seeing a note in JPAN's hacked engine that said you could have a script run every step. But I'm not sure. In that case, you could designate a var, and add 1 to it each time. When it hits the number of steps you like, it is reset and berries grow.
     
    949
    Posts
    11
    Years
  • The only way to do it with a script, would be to have a map script which checks the amount of steps since the last time it was used and if so, cause berries to grow. The only problem with this, is the scripts would only be loaded when reentering the map.
    I guess it is the best way, easier to do and makes more sense imo than a method that would make the plants pop-up in an instant. lol

    Now that I think about it... I have a vague memory of seeing a note in JPAN's hacked engine that said you could have a script run every step. But I'm not sure. In that case, you could designate a var, and add 1 to it each time. When it hits the number of steps you like, it is reset and berries grow.
    You're right, I guess yes. But as you said, it would lock and release the player with every step which will be probably annoying.
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • I guess it is the best way, easier to do and makes more sense imo than a method that would make the plants pop-up in an instant. lol


    You're right, I guess yes. But as you said, it would lock and release the player with every step which will be probably annoying.

    Well, maybe not, the calculations of the script could be done extremely fast, and you might not even notice it. If you just had a script itself that was counting your steps you wouldn't have any control over over your character. There is no "let player move" command, lol.

    When you take a step, the game makes thousands of tiny calculations, what is two or three more by running a script every time? You shouldn't have a problem just as long as the script only plays with numbers, not person or object movement.
     

    ep!c

    Banned
    124
    Posts
    11
    Years
    • Seen Jan 4, 2015
    Kurapika said:
    But as you said, it would lock and release the player with every step which will be probably annoying.

    Man, if you just set vars, you don't even need lock and release..
    The WRAM is very very fast, within miliseconds it calculates hundreds of code :)

    And yeah, as long as you "put" the movement into an Assembler-Code, you can make object moves..
     
    11
    Posts
    11
    Years
    • Seen May 3, 2013
    okay this is my script i wrote :
    #org $script
    lock
    faceplayer
    cry 0xA1 145
    #raw 0x33
    pause 0x30
    message $cry
    $cry 1 = Slowpoke! Slow!
    boxset 6
    wildbattle 145 50 0
    pause 0x70
    fadescreen 1
    removesprite 0x800F
    setflag 0x1211
    pause 0x10
    fadescreen 0
    release
    end

    what it is suppose to do is the basic zapdos battle in FR/LG
    it all works apart from it disapearing after battle , it just stays there
    if someone can just point out the mistake i made that would be great
    thanks !

    okay this is my script i wrote :
    #org $script
    lock
    faceplayer
    cry 0xA1 145
    #raw 0x33
    pause 0x30
    message $cry
    $cry 1 = Slowpoke! Slow!
    boxset 6
    wildbattle 145 50 0
    pause 0x70
    fadescreen 1
    removesprite 0x800F
    setflag 0x1211
    pause 0x10
    fadescreen 0
    release
    end

    what it is suppose to do is the basic zapdos battle in FR/LG
    it all works apart from it disapearing after battle , it just stays there
    if someone can just point out the mistake i made that would be great
    thanks !

    oh and the speach was just a test because i used slowpoke as a test
     
    Last edited:

    ep!c

    Banned
    124
    Posts
    11
    Years
    • Seen Jan 4, 2015
    -avoid flags higher than 0x900, this is the point where they go into vars.
    -removesprite? Wtf it this script editor xD in XSE you can use
    hidesprite LASTTALKED or hidesprite 0xnumber..
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • -avoid flags higher than 0x900, this is the point where they go into vars.
    -removesprite? Wtf it this script editor xD in XSE you can use
    hidesprite LASTTALKED or hidesprite 0xnumber..

    I believe he was using pokescript and following foullumps tutorials on youtube. I would suggest swithing over to either XSE 1.1.1 or PKSVUI, and finding a good tutorial on here as they are a bit different.
     
    34
    Posts
    12
    Years
  • I've been looking around some forums to try to find out how to make a repeating level script. One person said that if you set a variable to 0x0 would work, but the game just froze. I have also tried not setting a var, but it still didnt work. Is there any way to make a repeating level script? This is the script I have.

    #dynamic 0x800000

    #org @start
    movesprite 0x2 0x06 0x1E
    hidesprite 0x4
    setvar 0x5006 0x0
    release
    end
     
    11
    Posts
    11
    Years
    • Seen May 3, 2013
    I believe he was using pokescript and following foullumps tutorials on youtube. I would suggest swithing over to either XSE 1.1.1 or PKSVUI, and finding a good tutorial on here as they are a bit different.

    have you got any suggestions?
    because i can't seem to find any good ones
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • I've been looking around some forums to try to find out how to make a repeating level script. One person said that if you set a variable to 0x0 would work, but the game just froze. I have also tried not setting a var, but it still didnt work. Is there any way to make a repeating level script? This is the script I have.

    #dynamic 0x800000

    #org @start
    movesprite 0x2 0x06 0x1E
    hidesprite 0x4
    setvar 0x5006 0x0
    release
    end

    In the map script section of A-map, set your script's var to 5006 and the value to 0.
     
    11
    Posts
    11
    Years
    • Seen May 3, 2013
    another question
    i downloaded XSE 1.1.1 and when ever i open it it just shuts instantly .
    if its a dodgy download could someone link me?
    or could someone tell me a fix
     
    Status
    Not open for further replies.
    Back
    Top