- 4
- Posts
- 12
- Years
- Seen Jun 6, 2013
Game: Fire Red
Editor: XSE 1.1.1
Script: De-Leveler
So I thought of an idea for my hack last night. It seems possible, just not quite there yet. Basically a Pokemon De-Leveler that will choose a Poke from the party and reset it to Lv 1. So Charizard gets de-leveled to Lv 1 essentially.
I already know the problem is with the way Im comparing variables in the second check. Just not quite sure how to make it do what I want. The script functions as normal through the second check, but compare always returns 0x0, never 0x1.
A quick explanation of the two specials used and a few others that may work better.
Used-
09F chooses a pokemon for a purpose and stores its position at 0x8004. works even with eggs
0FF checks pokemon in 0x8004's number and places it in given variable
May Work -
0c1 a "silent hatch" code, hatches an egg in your party indicated by 0x8004, even if not an egg (reset level to 5, changes met location, clears EVs)
147 checks your pokemon in position referenced by 0x8004 and returns to the given variable its pokemon number. returns 0x19c if an egg.
1bb Create a full, party ready pokemon, at the trade slot. 0x8004 = pokemon number, 0x8005 = pokemon level, 0x8006 = item held
Special 0c1 actually does almost everything Im looking for all on its own. Except it doesnt reset the Pokemons attacks. If anyone knows a quick way to reset that data, that might be the simplest way.
Im also unclear as to how to create trades in game. Special 1bb might also work if someone knows how to use that one properly.
The script below is obviously unfinished. The way it is currently set up it will be huge, unless special 0c1 can work for this. I also dont have any framework included yet for taking the original Pokemon away, but that can come later.
I really appreciate the feedback this community always provides.
Editor: XSE 1.1.1
Script: De-Leveler
So I thought of an idea for my hack last night. It seems possible, just not quite there yet. Basically a Pokemon De-Leveler that will choose a Poke from the party and reset it to Lv 1. So Charizard gets de-leveled to Lv 1 essentially.
I already know the problem is with the way Im comparing variables in the second check. Just not quite sure how to make it do what I want. The script functions as normal through the second check, but compare always returns 0x0, never 0x1.
A quick explanation of the two specials used and a few others that may work better.
Spoiler:
Used-
09F chooses a pokemon for a purpose and stores its position at 0x8004. works even with eggs
0FF checks pokemon in 0x8004's number and places it in given variable
May Work -
0c1 a "silent hatch" code, hatches an egg in your party indicated by 0x8004, even if not an egg (reset level to 5, changes met location, clears EVs)
147 checks your pokemon in position referenced by 0x8004 and returns to the given variable its pokemon number. returns 0x19c if an egg.
1bb Create a full, party ready pokemon, at the trade slot. 0x8004 = pokemon number, 0x8005 = pokemon level, 0x8006 = item held
Special 0c1 actually does almost everything Im looking for all on its own. Except it doesnt reset the Pokemons attacks. If anyone knows a quick way to reset that data, that might be the simplest way.
Im also unclear as to how to create trades in game. Special 1bb might also work if someone knows how to use that one properly.
The script below is obviously unfinished. The way it is currently set up it will be huge, unless special 0c1 can work for this. I also dont have any framework included yet for taking the original Pokemon away, but that can come later.
I really appreciate the feedback this community always provides.
Spoiler:
'---------------
#org 0x990000
lock
faceplayer
checkflag 0x202
if 0x1 call 0x89901AE
checkflag 0x201
if 0x1 call 0x89901EA
msgbox 0x8990234 MSG_NORMAL '"Hi! Your Pokemon is about to \nget..."
special2 0x8004 0x9F
setflag 0x201
setflag 0x202
release
end
'---------------
#org 0x9901AE
msgbox 0x899025F MSG_NORMAL '"First Check!"
special2 0x8005 0xFF
clearflag 0x202
release
end
'---------------
#org 0x9901EA
msgbox 0x899026E MSG_NORMAL '"Second Check!"
setvar 0x8006 0x3F
compare 0x8005 0x8006
if 0x0 goto 0x899028C
if 0x1 goto 0x899020B
release
end
'---------------
#org 0x99028C
msgbox 0x8990285 MSG_NORMAL '"Fail!"
clearflag 0x201
release
end
'---------------
#org 0x99020B
msgbox 0x899027E MSG_NORMAL '"Here!"
givepokemon 0x3F 0x1 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
clearflag 0x201
release
end
'---------
' Strings
'---------
#org 0x990234
= Hi! Your Pokemon is about to \nget weaker
#org 0x99025F
= First Check!
#org 0x99026E
= Second Check!
#org 0x990285
= Fail!
#org 0x99027E
= Here!
#org 0x990000
lock
faceplayer
checkflag 0x202
if 0x1 call 0x89901AE
checkflag 0x201
if 0x1 call 0x89901EA
msgbox 0x8990234 MSG_NORMAL '"Hi! Your Pokemon is about to \nget..."
special2 0x8004 0x9F
setflag 0x201
setflag 0x202
release
end
'---------------
#org 0x9901AE
msgbox 0x899025F MSG_NORMAL '"First Check!"
special2 0x8005 0xFF
clearflag 0x202
release
end
'---------------
#org 0x9901EA
msgbox 0x899026E MSG_NORMAL '"Second Check!"
setvar 0x8006 0x3F
compare 0x8005 0x8006
if 0x0 goto 0x899028C
if 0x1 goto 0x899020B
release
end
'---------------
#org 0x99028C
msgbox 0x8990285 MSG_NORMAL '"Fail!"
clearflag 0x201
release
end
'---------------
#org 0x99020B
msgbox 0x899027E MSG_NORMAL '"Here!"
givepokemon 0x3F 0x1 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
clearflag 0x201
release
end
'---------
' Strings
'---------
#org 0x990234
= Hi! Your Pokemon is about to \nget weaker
#org 0x99025F
= First Check!
#org 0x99026E
= Second Check!
#org 0x990285
= Fail!
#org 0x99027E
= Here!
Last edited: