• 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.
50
Posts
11
Years
  • Seen Jan 4, 2021
That's because you're not actually using black tiles. They appear black in Advance Map but that's only because they're using the transparent colour of a palette which just happens to be black. You're going to have to create another tile which uses a non-transparent black palette slot to make those tiles.

Thanks, finally got it working.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
As Ash493 stated, you forgot to end the movement raws with 0xFE.
Code:
#clean
#dynamic 0x8000C4

#org @main
applymovement 2 @move1
waitmovement 2
end

#org @move1
#raw 0x08
[COLOR=Red]#raw 0xFE[/COLOR]
However, you stated that even with that, the script still freezes.
If that is true, then I suggest you check your script tile's values in Advance Map.

Spoiler:
Thanks, this got it working (I guess you have to specify an unused var number even if you don't need one in the script?), although he takes more than one step... he actually walked all the way off screen, and I'm permanently locked in place, even with the 0xFE. I'll mess around with it and see if I can get it working on my own, but here's what I have just in case you can get me an answer faster than I can. lol
Code:
;---------------
#org 0x80017C
applymovement 0x5 0x8800188
waitmovement 0x5
end


;-----------
; Movements
;-----------
#org 0x800188
#raw 0x8 ;Step Down (Normal)
#raw 0xFE ;End of Movements
 

Renegade

Time for real life...
995
Posts
12
Years
Thanks, this got it working (I guess you have to specify an unused var number even if you don't need one in the script?), although he takes more than one step... he actually walked all the way off screen, and I'm permanently locked in place, even with the 0xFE. I'll mess around with it and see if I can get it working on my own, but here's what I have just in case you can get me an answer faster than I can. lol
Code:
;---------------
#org 0x80017C
applymovement 0x5 0x8800188
waitmovement 0x5
end


;-----------
; Movements
;-----------
#org 0x800188
#raw 0x8 ;Step Down (Normal)
#raw 0xFE ;End of Movements

I don't what that walking off screen thing is about (because I haven't followed this thread in a while) but you need to put "release" before "end" to free your character from being locked in place.
 

Marohak

Asker of Dumb Questions
25
Posts
10
Years
Wow, gonna be using this thread alot :D

Using XSE, if I change nothing of a script except the speech, the lines go over each other.
What can I do to fix this?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Thanks, this got it working (I guess you have to specify an unused var number even if you don't need one in the script?), although he takes more than one step... he actually walked all the way off screen, and I'm permanently locked in place, even with the 0xFE. I'll mess around with it and see if I can get it working on my own, but here's what I have just in case you can get me an answer faster than I can. lol
Code:
;---------------
#org 0x80017C
applymovement 0x5 0x8800188
waitmovement 0x5
end


;-----------
; Movements
;-----------
#org 0x800188
#raw 0x8 ;Step Down (Normal)
#raw 0xFE ;End of Movements

As CrystalStatic stated, add a "release" command right before the "end" command.
Code:
#org 0x80017C
applymovement 0x5 0x8800188
waitmovement 0x5
[COLOR="red"]release[/COLOR]
end
Also, I absolutely have NO idea why your NPC walked all the way with just one single stepping command. =/


Wow, gonna be using this thread alot :D

Using XSE, if I change nothing of a script except the speech, the lines go over each other.
What can I do to fix this?

Write a new speech and point the script to your new speech script: link for a small tutorial.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
Thanks, release stopped him from from taking more than one step and it all works fine now.

I have about a billion other questions, but I'll start with this one... When I setvar 0x4000 1 (or 0x1, tried both) nothing seems to happen. Based on DrFuji's explanation, I thought that if the script's var number, set in advance map, was 4000, with a var value of 0, setting it to 1 in the script should cause the script to no longer execute after that... but it does. Am I wrong? Not sure what I did differently, but this is working now.

So, this is what I've got so far... You start in your bed, and when you take one step out, your mom comes up the stairs and walks up to you to tell you some intro-y stuff. I have a few problems though. First of all, how do I make your mom invisible until the script starts? As it is, she's just standing on the stairs. Second, how can I make her actually stay hidden once the script ends. As soon as I take a step, she reappears. I've also tried movesprite(and hidespritepos) to get her out of the way, and she still came back on top of the stairs. Also, how do I play the stair sound effect? (I think it'd just be the normal sound effect that plays when you warp.)
Spoiler:

And another question that I can't seem to find anywhere... how do I give the player the pokedex (and national dex)? Specifically for Ruby... I can find a million tutorials for everything with FR/LG, but nothing on RSE.
 
Last edited:

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Because [supporter]QuilavaKing[/supporter] is having trouble with his script, he doesn't want to keep wasting bytes with trashy scripts. #Clean will overwrite the newly compiled script to the last used #dynamic offset.
I know what clean does... I was asking why he had to write it into the script :P

Code:
;---------------
#org 0x80017C
applymovement 0x5 0x8800188
waitmovement 0x5
end


;-----------
; Movements
;-----------
#org 0x800188
#raw 0x8 ;Step Down (Normal)
#raw 0xFE ;End of Movements
Can I advise something? It's best to use waitmovement 0x0 as it's pause that works everytime.

And another question that I can't seem to find anywhere... how do I give the player the pokedex (and national dex)? Specifically for Ruby... I can find a million tutorials for everything with FR/LG, but nothing on RSE.
You should have checked my "About Me" xD

National Dex Ruby:
writebytetooffset 0x2 0x2026B00
writebytetooffset 0x3 0x2026B01
writebytetooffset 0xDA 0x2024EBE
writebytetooffset 0x67 0x2026A5A
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
First of all, how do I make your mom invisible until the script starts?

You can simply put her into 'Hidden' through Advance Map, and just add the 'show' command (it's 0x55 in Ruby, but not sure in FireRed) in each applymovement of your script.

Second, how can I make her actually stay hidden once the script ends. As soon as I take a step, she reappears.

If you will follow my suggestion in your first question, then she'll automatically disappear.
If however, you will choose a different way, then to permanently make her invisible, use the 'hidesprite 0x<her person number in hex>' and immediately followed by a 'setflag' command.
Make sure that you are setting the flag that she has.


Also, how do I play the stair sound effect? (I think it'd just be the normal sound effect that plays when you warp.)

I believe that there's a command 'sound', but I never actually tried that yet.
Although I am quite sure that there's a documented list of sounds in the game.
I believe that the thread is located in the Resource and Development section.


And another question that I can't seem to find anywhere... how do I give the player the pokedex (and national dex)? Specifically for Ruby... I can find a million tutorials for everything with FR/LG, but nothing on RSE.

As Ash493 stated, copy that code and place them right after the flag for the PokéDex.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
As Ash493 stated, copy that code and place them right after the flag for the PokéDex.
How to activate the pokedex was what I was actually asking for. I actually found that bit of code in an earlier post of yours while searching this thread shortly after posting that, but I still can't find anything on how to activate the regular pokedex... I've been searching for hours on multiple sites, and it just doesn't exist (for R/S)... while we're on it, I'll also need to know how to activate the pokemon menu, give badges, etc. I've found all this stuff for FR/LG already several times, but again, not for R/S.
 
69
Posts
11
Years
  • Seen Nov 17, 2013
How to activate the pokedex was what I was actually asking for. I actually found that bit of code in an earlier post of yours while searching this thread shortly after posting that, but I still can't find anything on how to activate the regular pokedex... I've been searching for hours on multiple sites, and it just doesn't exist (for R/S)... while we're on it, I'll also need to know how to activate the pokemon menu, give badges, etc. I've found all this stuff for FR/LG already several times, but again, not for R/S.

Just open the scripts where these happen. If you want to learn how to give a gym badge open a script of a gym leader and look through it.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
Just open the scripts where these happen. If you want to learn how to give a gym badge open a script of a gym leader and look through it.
Believe me, I tried that (with the pokedex anyway) and couldn't figure it out at all. The only thing that even seemed possible was special 0x9E, but that opened the nicknaming screen. I finally found it with google though, so I've got it figured out now. Although, on a route with no pokemon data, I found a level 47 sunflora in the grass after activating the pokedex... not a problem yet afaik, because I can just set pokemon data and hopefully it won't happen, but just a strange little side effect lol.
 
Last edited:
1,309
Posts
12
Years
  • Age 31
  • Seen Nov 24, 2023
Worried that I may have screwed something up a lot in my rom, for some reason whenever i give an item, instead of the automatic "PLAYER received a _" message, this appears...
[I can't post a URL link because havent had 15 posts... but it says

" en't
available..."


Can anyone help me? I hope i havent ruined my rom, unfortunately the problem is present in all my backups and ive been working on it for 5 months so really dont want to start over... Thanks to anyone who can tell me how to fix this
 
69
Posts
11
Years
  • Seen Nov 17, 2013
Worried that I may have screwed something up a lot in my rom, for some reason whenever i give an item, instead of the automatic "PLAYER received a _" message, this appears...
[I can't post a URL link because havent had 15 posts... but it says

" en't
available..."


Can anyone help me? I hope i havent ruined my rom, unfortunately the problem is present in all my backups and ive been working on it for 5 months so really dont want to start over... Thanks to anyone who can tell me how to fix this

Can you post the script here?
 
1,309
Posts
12
Years
  • Age 31
  • Seen Nov 24, 2023
Can you post the script here?


it is happening in every giveitem script I make. I've even tried using "giveitem2" to try and fix the problem but when I tried that the game froze.

I'm using FR ROM and JPAN's Clearing Patch (NOT hacked engine)

Spoiler:


Did some research on my last post and found something odd.

I opened up my ROM in ItemEditor and it came up with an error message, all the data was totally corrupted and messed up. It was sadly the same for all of my backup roms, even the ones I saved at earlier times, but the funny thing is I opened my clean, untouched roms and the same thing happened? has anyone heard of this
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
How to activate the pokedex was what I was actually asking for. I actually found that bit of code in an earlier post of yours while searching this thread shortly after posting that, but I still can't find anything on how to activate the regular pokedex... I've been searching for hours on multiple sites, and it just doesn't exist (for R/S)... while we're on it, I'll also need to know how to activate the pokemon menu, give badges, etc. I've found all this stuff for FR/LG already several times, but again, not for R/S.

Activating the Pokedex is simply just activating its flag with the setflag command.
The Pokedex flag is 0x801 in Ruby, 0x829 in FireRed and 0x861 in Emerald.
 
69
Posts
11
Years
  • Seen Nov 17, 2013
it is happening in every giveitem script I make. I've even tried using "giveitem2" to try and fix the problem but when I tried that the game froze.

I'm using FR ROM and JPAN's Clearing Patch (NOT hacked engine)

Spoiler:


Did some research on my last post and found something odd.

I opened up my ROM in ItemEditor and it came up with an error message, all the data was totally corrupted and messed up. It was sadly the same for all of my backup roms, even the ones I saved at earlier times, but the funny thing is I opened my clean, untouched roms and the same thing happened? has anyone heard of this

Were your patches backed up to your computer or somewhere online? If it was online can you send me a link to the patch? Maybe your computer is messing up the files somehow.
Also does it say " en't
available..." in advance text too?
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
Activating the Pokedex is simply just activating its flag with the setflag command.
The Pokedex flag is 0x801 in Ruby, 0x829 in FireRed and 0x861 in Emerald.
Yeah, I was able to find it after a lot of googling. I really wish there was a sticky thread that has all this information in one place... you'd get a lot less repeated questions here, I'm sure.

Thanks for all the help though. I'm a good ways into my plot scripts now, and I'm having no issues atm. Couldn't have done it without you. lol (Although, I'm sure I'll have more questions at some point. lol)



Okay, I've found something really strange now... is there a limit to the number of movements per sprite per script? I have quite a few in this script (about 230 lines total) and for this last movement I was doing, only the first part happens.

Here it is:
Spoiler:

The player moves right once and that's it. He's following the professor back to the lab at this point, and the professor goes all the way to the lab no problem, but the player only moves once. I've tried deleting the professor's last move, and switching the order of them in the code, and either way he only moves once. Is there any way around this?
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I really wish there was a sticky thread that has all this information in one place... you'd get a lot less repeated questions here, I'm sure.

There are, although not stickied. They're called "scripting tutorials" in the Tutorials section.

Okay, I've found something really strange now... is there a limit to the number of movements per sprite per script? I have quite a few in this script (about 230 lines total) and for this last movement I was doing, only the first part happens.

Here it is:
Spoiler:

The player moves right once and that's it. He's following the professor back to the lab at this point, and the professor goes all the way to the lab no problem, but the player only moves once. I've tried deleting the professor's last move, and switching the order of them in the code, and either way he only moves once. Is there any way around this?

Post your entire script.
What you provided is not really helpful.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
There are, although not stickied. They're called "scripting tutorials" in the Tutorials section.
I know, I'm using DiegoIsAwesome's for most of my information, but it's very much incomplete. All of the tutorials are. All of the information is available, but it's spread out so much that it's very difficult to find, plus 99% of the tutorials are done for FR/LG, not R/S, so finding specific flags, specials, etc for these games has been very difficult.


Post your entire script.
What you provided is not really helpful.
I have no idea what I did differently, but now it just works... this seems to be happening a lot. Several times now, something has been broken completely, and I go away for a little bit and then without even changing the script it works again.
 
50
Posts
11
Years
  • Seen Jan 4, 2021
So, I have a script which works completely fine except for the fadescreen commands. I want the screen to fade until the end of the script but for some reason it won't stay faded. I even added a pause in there to try to delay when the screen fades back to normal but it won't work. The idea that the script is supposed to execute is unfinished but I wanted to test it before continuing. Can anyone let me know what I am doing wrong? PS. the character starts in black tiles if you need to know.

Spoiler:
 
Status
Not open for further replies.
Back
Top