• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Development: Pokémon Fire Red Hacked Engine

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Thanks about that, now my script should work =D.

EDIT: Well my script didn't work.

I'm using PokéScript.

Code:
#org $start
lockall
special 0x8F
checkattack 0x1D
compare 0x800D 0x06
if 0x01 goto $dontknow
storepokemon2 0x00 0x800D
setanimation 0x00 0x800D
message $message1
$message1 1 = Do you want to use ROCK CLIMB\nto climb them?
boxset 5
compare 0x800D 0x00
if 0x01 goto $dontwant
doanimation 0x25
waitstate
setvar 0x800C 0x0
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x1
if 0x01 goto $down
compare 0x800C 0x2
if 0x01 goto $up
compare 0x800C 0x3
if 0x01 goto $left
compare 0x800C 0x4
if 0x01 goto $right
end

#org $down
addvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepdown
compare 0x8005 0x008D
if 0x00 goto $endingstepdown
end

#org $up
subvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepup
compare 0x8005 0x008D
if 0x00 goto $endingstepup
end

#org $left
subvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepleft
compare 0x8005 0x008D
if 0x00 goto $endingstepleft
end

#org $right
addvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepright
compare 0x8005 0x008D
if 0x00 goto $endingstepright
end

#org $stepdown
applymovement $1down
goto $down

#org $stepup
applymovement $1up
goto $up

#org $stepleft
applymovement $1left
goto $left

#org $stepright
applymovement $1right
goto $right

#org $endingstepdown
applymovement $1down
$1down 1 ; #binary 0x10 0xFE
pausemove 0
releaseall
end

#org $endingstepup
applymovement $1up
$1up 1 ; #binary 0x11 0xFE
pausemove 0
releaseall
end

#org $endingstepleft
applymovement $1left
$1left 1 ; #binary 0x12 0xFE
pausemove 0
releaseall
end

#org $endingstepright
applymovement $1right
$1right 1 ; #binary 0x13 0xFE
pausemove 0
releaseall
end

#org $dontknow
message $message3
$message3 1 = A Pokémon could climb them.
boxset 6
releaseall
end

#org $dontwant
releaseall
end

These settings are temporary, like behavior byte, the attack and such.
The scripts stops right before he checks the player facing location.

Try replacing this line...
Code:
copybyte 0x020370D4 0x02036E58
With these...
Code:
#raw 0x15
#raw 0xD4
#raw 0x70
#raw 0x03
#raw 0x02
#raw 0x58
#raw 0x6E
#raw 0x03
#raw 0x02
 

Full Metal

C(++) Developer.
810
Posts
16
Years
Thanks about that, now my script should work =D.

EDIT: Well my script didn't work.

I'm using PokéScript.

Code:
#org $start
lockall
special 0x8F
checkattack 0x1D
compare 0x800D 0x06
if 0x01 goto $dontknow
storepokemon2 0x00 0x800D
setanimation 0x00 0x800D
message $message1
$message1 1 = Do you want to use ROCK CLIMB\nto climb them?
boxset 5
compare 0x800D 0x00
if 0x01 goto $dontwant
doanimation 0x25
waitstate
setvar 0x800C 0x0
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x1
if 0x01 goto $down
compare 0x800C 0x2
if 0x01 goto $up
compare 0x800C 0x3
if 0x01 goto $left
compare 0x800C 0x4
if 0x01 goto $right
end

#org $down
addvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepdown
compare 0x8005 0x008D
if 0x00 goto $endingstepdown
end

#org $up
subvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepup
compare 0x8005 0x008D
if 0x00 goto $endingstepup
end

#org $left
subvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepleft
compare 0x8005 0x008D
if 0x00 goto $endingstepleft
end

#org $right
addvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepright
compare 0x8005 0x008D
if 0x00 goto $endingstepright
end

#org $stepdown
applymovement $1down
goto $down

#org $stepup
applymovement $1up
goto $up

#org $stepleft
applymovement $1left
goto $left

#org $stepright
applymovement $1right
goto $right

#org $endingstepdown
applymovement $1down
$1down 1 ; #binary 0x10 0xFE
pausemove 0
releaseall
end

#org $endingstepup
applymovement $1up
$1up 1 ; #binary 0x11 0xFE
pausemove 0
releaseall
end

#org $endingstepleft
applymovement $1left
$1left 1 ; #binary 0x12 0xFE
pausemove 0
releaseall
end

#org $endingstepright
applymovement $1right
$1right 1 ; #binary 0x13 0xFE
pausemove 0
releaseall
end

#org $dontknow
message $message3
$message3 1 = A Pokémon could climb them.
boxset 6
releaseall
end

#org $dontwant
releaseall
end

These settings are temporary, like behavior byte, the attack and such.
The scripts stops right before he checks the player facing location.

(sorry irish_witch)
DONT USE POKESCRIPT!
XSE, and PKSV are much better and updated, plus there is (that i know of) lots more support available.
 

PeregrineFig

Starting Pokémon Obsidian
202
Posts
14
Years
Huh.

Is it just me, or does this remove everything from Pallet Town, including the Fly Spot? I tried it on a clean ROM and it does the same thing...

I patched this over my hack, which was using only scripts in the 700000s. It wiped clean almost everything from what was formerly Pallet Town. But for me it left the flight spot intact, just deleted all my people, step-tiles, signposts, warps, and level scripts. Oddly, though, it only did this to map 3.0.
 

Ninja Caterpie

AAAAAAAAAAAAA
5,979
Posts
16
Years
I patched this over my hack, which was using only scripts in the 700000s. It wiped clean almost everything from what was formerly Pallet Town. But for me it left the flight spot intact, just deleted all my people, step-tiles, signposts, warps, and level scripts. Oddly, though, it only did this to map 3.0.

For me, it only did it to map 3.0 as well. It wiped everything except for warps and fly-spots from every other map, and absolutely EVERYTHING from 3.0, including the fly spot.

And this is on a clean ROM.
 
62
Posts
14
Years
  • Seen Oct 24, 2013
Try replacing this line...
Code:
copybyte 0x020370D4 0x02036E58
With these...
Code:
#raw 0x15
#raw 0xD4
#raw 0x70
#raw 0x03
#raw 0x02
#raw 0x58
#raw 0x6E
#raw 0x03
#raw 0x02

I'm gonna try that right now.



(sorry irish_witch)
DONT USE POKESCRIPT!
XSE, and PKSV are much better and updated, plus there is (that i know of) lots more support available.

Don't think that way... sorry but since I use XSE database, thu commands and functions are the same. I just use XSE for decompiling scripts.
 
17
Posts
14
Years
  • Seen Jun 21, 2023
I'm trying to use the special 0x58, but not how to use the variable 0x8006 to load the pointer...

Someone can give me an example of how to use all special so I can understand?

I managed to use the special 0x56 to swarm-roam pokemon, but I could not with this ...
 
Last edited:

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
I found a rather annoying problem in the application.
When you open the character hack or overworld hack, you can't close the dialog window. It is annoying if you pushed it by accident.
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
I found a rather annoying problem in the application.
When you open the character hack or overworld hack, you can't close the dialog window. It is annoying if you pushed it by accident.

Yeh that happens to me as well
and i also didnt understand the overworld tutorial very well
so can you explain it to me?
 

Sonikku17

Wanderer
18
Posts
15
Years
  • Age 31
  • Seen Aug 20, 2015
I have a quick question regarding special 0x18B, the "Show uncompressed picture" special. For the most part, I get how it works. However, I'm a bit confused about the first part of the table, the fossil pointer. It says it is a
"pointer to a section of data that has the needed information for the function to work," but I'm not sure what this means, or what the needed information would be. If anyone can help me understand this, it would be greatly appreciated!
 

JPAN

pokemon rom researcher
104
Posts
15
Years
  • Seen Jul 2, 2016
I have a quick question regarding special 0x18B, the "Show uncompressed picture" special. For the most part, I get how it works. However, I'm a bit confused about the first part of the table, the fossil pointer. It says it is a
"pointer to a section of data that has the needed information for the function to work," but I'm not sure what this means, or what the needed information would be.
The table at the manual shows that data right below it. The data at the fossil table is composed of only two pointers, the data pointer and the palette pointer. The data pointer, the other structure I talk about, must be stored somewhere else in the ROM, and contains the pointer to the uncompressed image, and 12 extra bytes I know nothing about. Those bytes must be 00 08 58 1b 00 00 00 00 00 00 00 00, otherwise the image shows displaced (like some glitch pokemon from Red).
 
202
Posts
14
Years
  • Seen Jan 6, 2017
How do you set one variable to a value, and then change it to another value?

I am using the Fire Red Hacked engine, and I used this code which changes the level of the Pokémon a gym leader has to three levels higher than your highest level Pokémon.

setvar 0x4052 0x203
trainerbattle 0x1 etc
setvar 0x4052 0x0

The var first gets set to the value that makes the Pokélevels what I wanted them to be, which worked. But after the battle, all trainer Pokémon levels are still 3 levels higher than my highest level Pokémon. If the value of 4052 is 0, it should cancel the change?

Thanks.
 
202
Posts
14
Years
  • Seen Jan 6, 2017
Scripts don't continue directly after the trainerbattle 0x1, they continue at the third pointer in the command. That might be your problem.

Nah, I actually used trainer battle 0x3, which has a script straight after the battle (and the following script does work, as I receive the rewards etc)

I even tried making a tilescript on the way out to set the variable to the new value. That didn't work either =/
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I was trying to use special 0x13 to change a Pokemon's happiness, but couldn't get it to work. I have an adoption house for abused Pokemon, so if someone adopts, in this case, a Rattata, I want it to have low happiness.

So I make the script only work if you have 5 or less Pokemon in your party. Then, after I used the give pokemon command, I use countpokemon to determine how many are there so that I can set variable 0x8004 to the right number. Like, if the player has 6 Pokemon after "adopting" Rattata, I have the script go to this:

Code:
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13

which, from my understanding, should make Rattata's base happiness be reduced by 60 (as 3C is 60 in hex, and you add 1 to the beginning to subtract from happiness). But when I have the guy rate its happiness, its still at its base happiness (70).

I've tried different things, including using special 0x6 with it, but nothing made it work for me. I'm moving on from it now, because it's not that important, but I was just wondering if there was anything I could do to make it work properly?
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
@metapod23: Use special 0x6 before AND AFTER. Like so:
Code:
special 0x6
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
special 0x6
The first usage decrypts the Pokémon for editing, the second one recrypts the Pokémon into the party.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
@metapod23: Use special 0x6 before AND AFTER. Like so:
Code:
special 0x6
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
special 0x6
The first usage decrypts the Pokémon for editing, the second one recrypts the Pokémon into the party.

Well, weird glitchiness abounds. If I have my Pikachu at the front of my party when I receive Rattata, the Pokemon I receive is a clone of Pikachu, with the same amount of damage that Pikachu has at the time and same exact stats and level, but with a lower level of happiness. If another Pokemon is in front, I get Rattata, but its happiness is unchanged ...

For reference, this is the script - I have 5 Pokemon in my party when I go to get Rattata:

Code:
#org 0x836DD2
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x8836E87
fanfare 0x101
msgbox 0x8836E65 MSG_KEEPOPEN '"You adopted the abused RATTATA!"
closeonkeypress
setflag 0x1119
hidesprite 0x4
givepokemon 0x13 0x5 0x0 0x0 0x0 0x0
countpokemon
compare LASTRESULT 0x2
if 0x1 goto 0x8836E42
compare LASTRESULT 0x3
if 0x1 goto 0x8836E49
compare LASTRESULT 0x4
if 0x1 goto 0x8836E50
compare LASTRESULT 0x5
if 0x1 goto 0x8836E57
compare LASTRESULT 0x6
if 0x1 goto 0x8837941

#org 0x837941
special 0x6
setvar 0x8004 0x5
setvar 0x8005 0x13C
special 0x13
special 0x6
end
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
Try setting 0x8004 to the party Pokémon number before using the special 0x6. Saying that, there was a much simpler way of making that script:

Code:
#org 0x836DD2
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x8836E87
fanfare 0x101
msgbox 0x8836E65 MSG_KEEPOPEN '"You adopted the abused RATTATA!"
closeonkeypress
setflag 0x1119
hidesprite 0x4
givepokemon 0x13 0x5 0x0 0x0 0x0 0x0
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
special 0x6
setvar 0x8005 0x13C
special 0x13
special 0x6
end
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Try setting 0x8004 to the party Pokémon number before using the special 0x6. Saying that, there was a much simpler way of making that script:

Code:
#org 0x836DD2
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x8836E87
fanfare 0x101
msgbox 0x8836E65 MSG_KEEPOPEN '"You adopted the abused RATTATA!"
closeonkeypress
setflag 0x1119
hidesprite 0x4
givepokemon 0x13 0x5 0x0 0x0 0x0 0x0
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
special 0x6
setvar 0x8005 0x13C
special 0x13
special 0x6
end

It worked! Thanks! And thanks for the simpler script - I used it and it works fine. :)
 
Back
Top