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

Help Thread: Script Help Thread

Status
Not open for further replies.
change the Learnset by level using G3HS. Make Extremespeed to be learned at Lv5.

I believe they mean for a special Dratini to be given to the player. They don't want all Dratini in the game to have that move, especially not other trainers' Dratini.
 
Last edited:
Okay, so, I am adding Leaf into the story of FireRed as an extra rival. I added her little scene into the script of the Pokeball that you have to choose, but 1. It changed the offsets and 2. It seems to have removed a chunk.

Edit even though I never posted it: I seemed to have figured it out, and I also realized I was putting the wrong thing for waitmovement, but it keeps taking away that chunk and changing the numbers! Do you think I should write it as a brand new offset?

This is the original script:

Spoiler:


This is what the modified script originally looked like in regular format. And yes the dynamic is the same as that first offset. When it shortens it, it takes out the dynamic thing, and I couldn't compile without it.

Spoiler:


And this is what the new weird script looks like:

Spoiler:


It says "Error 6 "Overflow" on line 102" Which says: "goto 0x40012168" and that doesn't exist, nor was it there before!



Edit: Here's my new script, what am I doing wrong?

Spoiler:
 
Last edited:
XSE
Fire Red

My script:

Spoiler:


Basically when you step on a tile, it locks and moves you up a few tiles, in which you see the professor struggling to figure something out, she turns around, walks up to you, says she has somethings for you, walks and gets the dex, the dex disappears, brings you the dex, gives you the dex(activates dex and nat dex menu), tells you to get the shoes off the table, character moves a few steps to the left and gets the shoes(activates running shoes), then runs back to his old spot and faces the proffessor again, then she sends you some messages and once that's done it won't happen again (because of the var?)

My vars and sprites are setup all correct and what not, it compiles fine, but when I open the game and step on the script tile nothing happens at all.

HALP?

Pictures showing vars and stuff correctly inserted:
or not :p
 
Last edited:
@Natzen

You have to assign a value to the var in the script (eg. 0, 1, 2, 3...) that is different than the value you put in the 'Var value' box in A-Map. Most common is 1, so that would be setvar 0x1216 0x1, and then in A-Map it has to be something different than in the script (eg. if you put Ox1 in the script you could leave it as 0000 in A-Map, which is most common).

Vars need a value assigned to them, they are useless without.

Also, make sure 0x1216 is a safe to use var for custom scripts, and that it isn't already used by anothing script in the game.
 
Hiding the Sprite

So I've been trying to hide the Sprite I just talked with.

Spoiler:


That's a simple script. After giving the Pokemon, it should hide. It does hide the sprite but.... after taking a Step, it reappears. I am sure setting a flag makes it permanently hidden. So whats the problem here? Anyone can help?
 
Hiding the Sprite

So I've been trying to hide the Sprite I just talked with.

Spoiler:


That's a simple script. After giving the Pokemon, it should hide. It does hide the sprite but.... after taking a Step, it reappears. I am sure setting a flag makes it permanently hidden. So whats the problem here? Anyone can help?

Unless the 'Person event no' of the sprite is 1, 'hidesprite 0x1' won't work.

The 'hidesprite' command can be used in 2 way:
1. hidesprite 0x(person event no of the sprite you want to disappear), to make a specific sprite on the map disappear, not necessarily the one you're currently talking to
2. hidesprite 0x800F/lasttalked, which hides the sprite you're currently talking to

Hope this helps!
 
Unless the 'Person event no' of the sprite is 1, 'hidesprite 0x1' won't work.

The 'hidesprite' command can be used in 2 way:
1. hidesprite 0x(person event no of the sprite you want to disappear), to make a specific sprite on the map disappear, not necessarily the one you're currently talking to
2. hidesprite 0x800F/lasttalked, which hides the sprite you're currently talking to

Hope this helps!

i know that. I already said 'It hides, but after taking 1 step, it reappears'.
 
i know that. I already said 'It hides, but after taking 1 step, it reappears'.

It sounds like you didn't give your person a person ID/flag. How will s/he hide forever if the game doesn't know to do it? :)
 
It sounds like you didn't give your person a person ID/flag. How will s/he hide forever if the game doesn't know to do it? :)

that worked, thanks!

Oops... my bad. Gonna blame it on the fact that it's way past my bedtime lol

Yeah, setting a flag in the script doesn't do anything if the sprite hasn't been given the same as its ID number.
 
Last edited:
I've just started a few days ago so this is my first post and a very basic question.
I'm working through the XSE tutorials on the pokemonromhacks subreddit so I can get the hang of scripting. This scenario seems fairly simple. I'm in Pallet Town, I talk to a girl who gives me a Lapras, and I use the Lapras to fight Roxanne, after which she gives me a Pikachu. Everything works fine, but when I try to nickname Pikachu, it brings me to Lapras's nickname screen and lets me rename it.

Here's the script for the Roxanne event.
Spoiler:

The dialogue's kinda silly since this is only a test.

I'm not sure if it's needed, but here's the script for the Lapras event.
Spoiler:

Any help would be greatly appreciated!

EDIT: I just played around with it some more and found that when I obtained the starter before Lapras, it would then ask to nickname the starter whenever I tried to nickname a pokemon. I have no clue what could be the cause of this.
 
Last edited:
I've just started a few days ago so this is my first post and a very basic question.
I'm working through the XSE tutorials on the pokemonromhacks subreddit so I can get the hang of scripting. This scenario seems fairly simple. I'm in Pallet Town, I talk to a girl who gives me a Lapras, and I use the Lapras to fight Roxanne, after which she gives me a Pikachu. Everything works fine, but when I try to nickname Pikachu, it brings me to Lapras's nickname screen and lets me rename it.

Here's the script for the Roxanne event.
Spoiler:

The dialogue's kinda silly since this is only a test.

I'm not sure if it's needed, but here's the script for the Lapras event.
Spoiler:

Any help would be greatly appreciated!

EDIT: I just played around with it some more and found that when I obtained the starter before Lapras, it would then ask to nickname the starter whenever I tried to nickname a pokemon. I have no clue what could be the cause of this.

Spoiler:


So, this is what I added/changed:
#org @nickname
countpokemon = counts #pkmn in party
subvar 0x800D 0x1 = substracts 1 from that #, cuz the game really counts your party pkmn starting with 0 rather than 1
copyvar 0x8004 0x800D = copies the # of pkmn that was applied to 800D over to 8004 to let the game know it needs to take the last pkmn in your party(which is the one you just obtained)
fadescreen 0x1 = screen goes black
special 0x9E = nickname screen pops up
waitstate
msgbox @5 0x2
release
end

So, you have to specify to the game which pkmn in your party is going to receive the nickname, or it will just take the first one by default.

Also, as you can see, I copied the @5 textbox down to the nickname portion as well, otherwise it would only say this text if you clicked 'no' to the nickname question (well at least I think so, not sure)

Apply that to the Lapras script as well, and to any future give- or findpokemon scripts.

Hope this helps! Please report back your results!
 
Last edited:
Thanks so much for the fix! It worked for the Pikachu event, but oddly enough I experienced the same nickname bug for the starter when I obtained it after Lapras. I'm guessing this is because the starter is supposed to be the first pokemon obtained.

I do have one question. I understand the need to copy the value in 0x800D to another data location because 0x800D is designated as LASTRESULT, but why specifically copy it to 0x8004? Is 0x8004 specifically designated to be used for this purpose by special 0x9E? Hope this makes sense, I'm still getting used to using the terminology properly.
 
Thanks so much for the fix! It worked for the Pikachu event, but oddly enough I experienced the same nickname bug for the starter when I obtained it after Lapras. I'm guessing this is because the starter is supposed to be the first pokemon obtained.

Correct. There should be no need to tell the game to name the last pkmn in the party as at that point point your starter is supposed to be the only one in there.
I do have one question. I understand the need to copy the value in 0x800D to another data location because 0x800D is designated as LASTRESULT, but why specifically copy it to 0x8004? Is 0x8004 specifically designated to be used for this purpose by special 0x9E? Hope this makes sense, I'm still getting used to using the terminology properly.

0x8004 is not used exclusively for nicknaming a certain pkmn. It's just a general variable used for storing different values related to Pokémon that can then be applied in many different ways.

For example, checking if a specific pkmn is in the party:
setvar 0x8004 0x19
special2 0x800D 0x17C
compare 0x800D 0x1
if 0x1 goto @something


In this example, you check if there is a specific pkmn in your party. You apply the value of 0x19 to 0x8004; the value (0x19) in this case is the pkmn you want to check for, 0x19 translates to 25 which is Pikachu, so basically you assign Pikachu to 0x8004. Then, 0x17C checks if the pkmn stored in 0x8004 during the last command is in your party; if it is, it assigns 0x1 to the variable 0x800D/LASTRESULT, if not it assigns 0x0. Finally, the next 2 commands tell the game to go and run @something if the last command, the LASTRESULT, checked out as Ox1, so if Pikachu is in your party.

EDIT: removed some repeating text.

It's really used in different ways.
 
Last edited:
I see, I think I understand. Something I'm really not used to in programming is how versatile I've learned hex values to be. I'll continue on with any tutorials I can find. Thanks!
 
I see, I think I understand. Something I'm really not used to in programming is how versatile I've learned hex values to be. I'll continue on with any tutorials I can find. Thanks!

You're very welcome!

Good luck learning! I'm still just learning myself, ha! Not a pro yet.

If you ever get stuck at something, run into any issues, need help with a script, there are enough people here willing to help out, me included. We're all learning together.

See ya around the forum!

EDIT: Oh gosh, I just some repeating text in my previous post lol fixed.
 
Last edited:
Hello

I tried multiple times to put a script where someone walks to you with applymovement and that they fight you and after a battle he disappears with fadescreen and hidesprite. However nothing worked so far :/

Has anyone maybe a script for that?
 
Hello

I tried multiple times to put a script where someone walks to you with applymovement and that they fight you and after a battle he disappears with fadescreen and hidesprite. However nothing worked so far :/

Has anyone maybe a script for that?

What have you got so far?
 
Can someone explain me about nicknaming in Pokemon Ruby. I read some tutorial and they could not clear my doubts. Help will be appreciated.
 
Status
Not open for further replies.
Back
Top