The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script FIRERED: Problem with Nuzlocke Script - Need some help (https://www.pokecommunity.com/showthread.php?t=385817)

naksile December 19th, 2016 1:13 AM

FIRERED: Problem with Nuzlocke Script - Need some help
 
Alright I solved this problem myself. I had to run the "Hacked routine applier.exe" and open my rom, and check the two boxes, hit apply the above, then save the rom. It seemed to work like a charm.

I'll just leave this thread here in case anyone else encounters the same problem. Thanks :)

Spoiler:
Alright I'm working on a Nuzlocke script that will kill all your fainted pokemon.

After some searching it seemed that JPAN's "Fire Red Hacked Engine" would be the best place to start, because it gives you a couple of new special commands, namely 0x62 which will kill the pokemon in a specified slot (or, if set to F, all your pokemon).

But when I tried this level script, nothing happens:

Code:

#dynamic 0x800000

#org @start
Setvar 0x8004 0xF
special 0x62
Setvar 0x4000 0x1
msgbox @1 0x6
release
end

@#org 1
= Testing.


That above code is supposed to be a bare-bones script which kills all the pokemon in the player's party. A working code (that I've been debugging, so it has a bit of meat) came from Spherical Ice's script on another Nuzlocke rom discussion thread. (I'd link it but I don't have enough posts yet)

Code:

#dynamic 0x800000

#org @start
setvar 0x4000 0x1 //Make sure it only runs once per map load
call @snippet1
release
end

//---------------
#org @snippet1
msgbox @1 0x6
closeonkeypress
setvar 0x8004 0x0 // This will first check the Pokémon in the 1st Slot of the Player's party.
goto @snippet2

//---------------
#org @snippet2
msgbox @4 0x6
compare 0x8004 0x6  // If the script is going to check the (non-existent) 7th slot, instead go to @snippet3.
if 0x1 goto @snippet3
special2 LASTRESULT 0x65  // Otherwise, check the HP of the Pokémon in the current slot.
compare LASTRESULT 0x0  // If the HP is equal to 0...
if 0x1 call @snippet4  // ...then call @snippet4
addvar 0x8004 0x1  // Move onto the next slot...
goto @snippet2  // ...and repeat the process.

//---------------
#org @snippet3
msgbox @5 0x6
compare 0x8004 0x1
if 0x0 call @snippet5 // If a Pokémon hasn't been erased, then call @snippet5.
end // end the script

//---------------
#org @snippet4
msgbox @6 0x6
special 0x62 // Erase the party Pokémon in the current slot.
setvar 0x8004 0x1 // Tell the script that at least one Pokémon has been erased.
return // Go back to @snippet2.

//---------------
#org @snippet5
msgbox @7 0x6
msgbox @2 0x6 //"Oh, you don't have any fainted Pok..." // Display a congratulatory message
return // Go back to @snippet3, essentially to go to @snippet6

//---------------
//Strings
//---------------

#org @1
= You see?\nThe level script worked!
#org @2
= You have no fainted Pokemon.
#org @3
= Your fainted monsters have been removed.
#org @4
= Snippet 2
#org @5
= Snippet 3
#org @6
= Snippet 4
#org @7
= Snippet 5



My problem is that neither of these scripts seem to work, even the bare bones. Maybe I'm not getting the functions into the game properly. It seems easy enough on JPAN's tool, just checkmark the special functions I want (which is only these two, 0x62 for killing pokemon and 0x65 for checking their HP) and hit "Apply above hack".

If I can't get JPAN's script to work, how would I be able to check pokemons HP and kill (release) them every time I load a map?

Thanks for any help.


All times are GMT -8. The time now is 9:18 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.