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

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
The flags mess up again; it should be set and it's not, once it is. It's really unpredictable.

Have you tried using different flags? Also, what happens if you try the same script ona clean ROM?


Do I need to use the \n \p \l dividers for a braille string?

Actually, you should better decompile some braille script because you're doing it wrong.


Change it to 'No Movement' it'll fix it.

Nope... That won't fix anything. The actual problem is the Movement value. Which usually never is 00 (outdoors, at least). Copy the value from some other existing NPCs on a clean ROM. But wait, what's the second Unknown value?
 

Xatoku

Game Developer
451
Posts
15
Years
Have you tried using different flags? Also, what happens if you try the same script ona clean ROM?




Actually, you should better decompile some braille script because you're doing it wrong.




Nope... That won't fix anything. The actual problem is the Movement value. Which usually never is 00 (outdoors, at least). Copy the value from some other existing NPCs on a clean ROM. But wait, what's the second Unknown value?
I changed it to No Movement and made the Movement value 11. I left the Unkown Value alone.
 
3
Posts
14
Years
  • Seen Aug 31, 2021
i need a little help with a code.
which part of the ingame pokemon trade code
do you change to change the pokemon
traded.

hope this make sense.
i am using XSE and pokemon firered.
please help.
 
Last edited:

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
craig100: Search for Trade Editors in the toolbox, there are a couple. I haven't messed with them myself, but...

Okay, so this script works fine up till the warp, then it just goes to a black screen. I've tried warping to various other locations, and it would either drop me into the middle of the ocean or just go blank again. What'd I do wrong?

Spoiler:


Also, when I decompiled braille scripts, they were each only one line long. Is it possible to make a braille string longer?
 
3
Posts
14
Years
  • Seen Aug 31, 2021
i had seen the tools i wanted to do it in XSE.
because i was trying to figure out.
how to trade two pokemon for one.
for example trade charmander and bellsprout for a lugia.

but thanks though
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
i had seen the tools i wanted to do it in XSE.
because i was trying to figure out.
how to trade two pokemon for one.
for example trade charmander and bellsprout for a lugia.

but thanks though
That will actually require ASM, because the only way to take away a Pokemon in XSE (except through the preset trades) is by using the daycare script to store it. If you're really serious about it, Thethethethe wrote an ASM routine for takepokemon, you can find it if you just go to thethethethe's profile and search for all threads started by him.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Code:
...
...
...
#org @yes
msgbox @letsgo 0x6
applymovement 0x10 @stepaboard
waitmovement 0x0
fadescreen 0x1
warp 0x3 0x45 0x3 0x0D 0x7C
fadescreen 0x0
release
end
...
...
...

I haven't been scripting for a while, but as I recall, warps are usually being read as the last part of the script. Try this...
Code:
#org @yes
msgbox @letsgo 0x6
applymovement 0x10 @stepaboard
waitmovement 0x0
warp 0x3 0x45 0x3 0x0D 0x7C
release
end
I think those fadescreens are useless since warps are usually setting the game to fadescreen automatically, plus the other fadescreen won't be read anymore. I might be wrong though, for it seems that you're scripting on a FireRed ROM. Though it's worth a try. Save a back-up, btw~
No idea about your braille problem.
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Nice new avatar! o.o
The fadescreens aren't the problem(and yes, you're right, they are stupid and unnecessary :\). Actually, I had taken them out of the script, but forgot to take them out of my pasted copy as well, because I'm a goofball.
For the moment, this really isn't that big of a problem (I've got an alternate method planned out anyway), but I'd like to have the issue resolved if for no other reason than so I don't do it again, lol.
Anyway, thanks for your help, I appreciate it.
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
That will actually require ASM, because the only way to take away a Pokemon in XSE (except through the preset trades) is by using the daycare script to store it. If you're really serious about it, Thethethethe wrote an ASM routine for takepokemon, you can find it if you just go to thethethethe's profile and search for all threads started by him.

Nope... he just wanted to edit the in-game trades.


Nice new avatar! o.o
The fadescreens aren't the problem(and yes, you're right, they are stupid and unnecessary :\). Actually, I had taken them out of the script, but forgot to take them out of my pasted copy as well, because I'm a goofball.
For the moment, this really isn't that big of a problem (I've got an alternate method planned out anyway), but I'd like to have the issue resolved if for no other reason than so I don't do it again, lol.
Anyway, thanks for your help, I appreciate it.

Well, you better decompile some in-game scripts, from a clean ROM. So you'll see how to use the warp commands correctly. And no, what destinedjagold posted is not totally correct. Oh, BTW, you don't need any fadescreen after warp, because the game will take care of that.
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Nope... he just wanted to edit the in-game trades.




Well, you better decompile some in-game scripts, from a clean ROM. So you'll see how to use the warp commands correctly. And no, what destinedjagold posted is not totally correct. Oh, BTW, you don't need any fadescreen after warp, because the game will take care of that.

Er, I idolize you, but you've gotten a little mixed-up.
First, about the trades, he wanted to create a trade of two Pokemon for one, which would, as far as I know, require ASM...

Second, I've used the warp command before, and it's worked beautifully. Also, I mentioned in my last post that I had already removed the fadescreen commands...
Thanks though! For the moment, I'm just circumventing the problem and taking the storyline in a different direction.

EDIT: May have found the warp problem, by looking at my own scripts from earlier 0.o
EDIT AGAIN: Thanks Hackmew for making me look at the script more closely. Turns out (as you probably know), I had written the map offsets in hex, so I just changed them to decimal and now it works! Awesomeness! Thanks again!
 
Last edited:

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Er, I idolize you, but you've gotten a little mixed-up.
First, about the trades, he wanted to create a trade of two Pokemon for one, which would, as far as I know, require ASM...

Well, not really, it's just I quoted your message instead of him's. His previous message was actually different. Then he asked to trade two Pokémon for one, instead. And that would require ASM indeed. BTW, the thethethethe routine was and still is buggy, so I guess the one I posted would be a better choice.


EDIT AGAIN: Thanks HackMew for making me look at the script more closely. Turns out (as you probably know), I had written the map offsets in hex, so I just changed them to decimal and now it works! Awesomeness! Thanks again!

You're welcome. Out of curiosity, did you remove all fadescreens and put a waitstate right after the warp command?
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
I removed the fadescreens, but didn't insert a waitstate.
...
Come to think of it, I have no clue what waitstate does. Time to break out the ol' command guide, I guess :s
I didn't know you'd made an ASM routine for that, I'll have to search that later. I thought thethethethe's was the only one out there.
Thanks again!
EDIT: Okay, so the XSE guide says that waitstate tells the script to "wait state." What exactly does that mean?
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
EDIT: Okay, so the XSE guide says that waitstate tells the script to "wait state." What exactly does that mean?

The game will be waiting and the player will be locked in the meanwhile. It used in scripts where there's a screen fading (e.g. the naming special), and the scripts needs to wait till the screen fades back to continue. Okay, it might not be a really good explanation, but that's more or less what it happens.
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Ah, I see. So it basically keeps me from walking around while the game prepares the warp. Thanks!
 
1
Posts
15
Years
  • Seen Feb 21, 2010
Part of script disappears

Hi, this is my first time posting here, but I've been lurking a lot.
I did a search for my problem but I didn't see anything related so please forgive me if this actually has been asked before.
Anyway, my problem:
Base game: FireRed
Script editor: XSE
I changed the starter pokemon, and then I tried changing the text that shows when you choose one for each pokeball on the table, in XSE. However, after I compile it and close XSE, it doesn't quite save it right. The text for the first pokemon (the leftmost one) seems to disappear.

Before compiling:
Spoiler:


After compiling:
Spoiler:


Any help would be greatly appreciated. Thanks.
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
Hi, this is my first time posting here, but I've been lurking a lot.
I did a search for my problem but I didn't see anything related so please forgive me if this actually has been asked before.
Anyway, my problem:
Base game: FireRed
Script editor: XSE
I changed the starter pokemon, and then I tried changing the text that shows when you choose one for each pokeball on the table, in XSE. However, after I compile it and close XSE, it doesn't quite save it right. The text for the first pokemon (the leftmost one) seems to disappear.

Before compiling:
Spoiler:


After compiling:
Spoiler:


Any help would be greatly appreciated. Thanks.

Okay, judging by this you used an original script for the game, but it seems you may have edited it adn overwritten some stuff. My advice is to write the script yourself from scratch or enable the refactoring mode on XSE so every time you recomplie, it's at a clean offset.
 
1,344
Posts
14
Years
  • Seen Dec 10, 2021
Game: Firered
Type: Person event
editor: Pokescript
Script:
Spoiler:

Screenie:
3b89a9a8d1.png
 
Status
Not open for further replies.
Back
Top