Which of the setmaptiles didn't work? :) also 282 and 281 are the correct block values?
Hello, everyone! Can anyone tell me how to make a 'nickname your Pokemon' script?
Hello, everyone! Can anyone tell me how to make a 'nickname your Pokemon' script?
Nicknaming is quite easy to do in FireRed and can be done with as little as one/ two specials depending on the situation you're in. The main special you would use is special 0x9E, which opens the nickname screen for your party Pokemon, based on the value of variable 0x8004 (0x0 for your first Pokemon, 0x1 for your second etc). This works in tandem with special 0x9F which allows you to choose a Pokemon in your party and then places its position value in 0x8004. You won't need special 0x9F and can set 0x8004 manually if you know the exact position of the Pokemon in the player's party that you want to change, though this is generally only reserved for when they receive their starter Pokemon. There are other auxiliary specials that can be used but aren't necessary for the script to run properly. You can read about them in the following script or this this thread.
Here's a quick rough example of a nicknaming script in action for FireRed:
Spoiler:#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @Talk 0x5
compare 0x800D 0x1
if 0x0 goto @Skip
msgbox @Choose 0x2
special 0x9F // Selecting which Pokemon you want to nickname
waitstate
compare 0x8004 0x6
if 0x4 goto @Skip // If variable 0x8004 is greater than 0x5 (the sixth party slot) then the player did not choose a Pokemon
special2 0x800D 0x147
compare 0x800D 0x19C
if 0x1 goto @Egg // If the party slot chosen was an egg (Pokemon value of 0x19C) then it can't be nicknamed
special 0x7C // Buffering the chosen Pokemon's name in [buffer1]
special 0x7D
compare 0x800D 0x1
if 0x1 goto @Traded // Checking if the chosen Pokemon was caught by the player or was traded over
msgbox @NiceName 0x5
compare 0x800D 0x0
if 0x1 goto @Skip
msgbox @WhatName? 0x2
fadescreen 0x1
special 0x9E // Opening and using the nickname screen
waitstate
special 0x7C
msgbox @NewNickname 0x2
release
end
#org @Egg
msgbox @EggStop 0x2
release
end
#org @Traded
msgbox @TradedStop 0x2
release
end
#org @Skip
msgbox @Cancelled 0x2
release
end
#org @Talk
= Would you like to nickname a\nPokemon?
#org @Choose
= Which Pokemon would you like to\nnickname?
#org @EggStop
= You can't nickname an egg!
#org @TradedStop
= This Pokemon isn't yours!\nYou got it from somebody else.
#org @NiceName
= [buffer1], that's a nice name.\nDo you want to change it?
#org @WhatName?
= Alright, what should its new\nname be?
#org @NewNickname
= [buffer1]! What a great name!\nI couldn't have named it better\lmyself!
#org @Cancelled
= Come back if you would like to\nnickname your Pokemon.
Don't forget to read the original script in an unmodified ROM and try to follow what its doing so you can learn how it works and how to make your own.
I need help once again. The script below is a level script, but it doesn't seem to run whenever I walk into the lab.
Spoiler:#dynamic 0x802E44
#org @start
applymovement 0x01 @walk1
waitmovement 0x0
msgbox @talk1 0x6
applymovement 0xFF @walk2
waitmovement 0x0
msgbox @talk2 0x6
applymovement 0x01 @walk3
applymovement 0xFF @walk4
waitmovement 0x0
sound 0x9
setvar 0x4016 0x1
release
end
#org @walk1
#raw 0x62
#raw 0xFE
#org @talk1
= Prof. Karri: There you are,\n[player]!\pCome over here, I have something\nto show you!
#org @walk2
#raw 0x11
#raw 0x11
#raw 0xFE
#org @talk2
= Prof. Karri: So, [player].\pI know it's only your first day,\nbut I've been speaking to your\pmother, and she tells me that\nyou've always wanted a Pokemon.\pWell, it just so happens that I\nhave three very special Pokemon\pthat I've been giving out to new\nTrainers!\pIt's only fair for you to have one\nif you're going to be working at\pmy LAB.\pCome out back with me.
#org @walk3
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
#org @walk4
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
Anyway to fix this issue?
If you want a script to run whenever you enter a map, you don't use script tiles. You use level scripts.
Basically level scripts run either before/when you enter a map, and you can specify conditions. Cooley has a level script tutorial, so go ahead and check it out.
Is there an xse script command for a silent item give script? Cause giveitem 0x# 0x1 and 0x1 both give me a obtained popup and I would like one with no popup.:)
I've encountered a strange problem in my Firered Hack. When I get my starter from Prof. Oak, he says "this pokémon is really quite energetic." and after that, the game freezes. Every time. I've looked at the script - which I never changed - and I think I may have messed up when it comes to variable 0x4031. It's an important var when it comes to the starter selection, and I think I used it somewhere else. I'm trying to look for the event I used it in to change it, but is there anything I can do from here?
Any help is appreciated.
Show us the script. The variable isn't special outside the context, so it can still be overwritten without complications. It's quite certain that the problem lies in the script.
I'm hacking pokemon emerald and I made an event where a team aqua member blocks your path.
you battle him, he runs away and you can get trough, but I have a problem.
After the battle, he runs away like he's supposed to, his sprite also dissapears, but whenever you re-enter the map, the aqua member is on the path again...
Aqua member script: note: the person event ID was set to 1 (0001)
Spoiler:
'-----------------------
#org 0x35D25F
lock
faceplayer
msgbox 0x835D2A6 '"\c\h01ÔHuh!?\pYou still want to com..."
callstd 0x6
trainerbattle 0x1 0x12 0x0 0x835D3C4 0x835D400 0x835D281
end
'-----------------------
#org 0x35D281
msgbox 0x835D2FD '"\c\h01ÔAergh! Annoying little\npest..."
callstd 0x6
applymovement 0x1 0x835D299
waitmovement 0x1
hidesprite 0x1
setflag 0x5004
release
end
'-----------
' Movements
'-----------
#org 0x35D299
#raw 16 'Slide Up
#raw 16 'Slide Up
#raw 16 'Slide Up
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 16 'Slide Up
#raw 16 'Slide Up
#raw FE 'End of Movements
'---------
' Strings
'---------
#org 0x35D2A6
= \c\h01ÔHuh!?\pYou still want to come trough here?\pYou persistent little RATTATA!
#org 0x35D3C4
= \c\h01ÔGuess I will need to\nteach you a little lesson!
#org 0x35D400
= Ah darn, not good!
#org 0x35D2FD
= \c\h01ÔAergh! Annoying little\npest...\pDon't mess with our operations!\pThere are tons of us up ahead, a\nbrat like you wouldn't be able to\ldo anything against us!\pTime to warn my companions!
Map script Script type: 03 (On entering map/on menu close)
Spoiler:
'-----------------------
#org 0x335FED
checkflag 0x5004
if 0x1 goto 0x8335FFF
if 0x0 goto 0x8336008
end
'-----------------------
#org 0x335FFF
hidesprite 0x1
end
'-----------------------
#org 0x336008
showsprite 0x1
end
I'm trying to find out why the sprite doesn't want to be hidden when you enter the map for hours now...