The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Whited Out FireRed

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old March 10th, 2020 (8:30 PM).
FrankTheFoot501 FrankTheFoot501 is offline
 
Join Date: Mar 2020
Posts: 3
Hey guys! New user here. Hopefully someone is able to help me out.

I'm wanting to make a difficult FireRed ROMhack in which the idea of Pokemon Centers are completely reworked. I'd like the completely get rid of the ability to completely heal your team for free, but I'm planning on making potions and ethers more plentiful and easily purchaseable in the game, but if a Pokemon faints, it won't be able to be revived without an actual Revive (which I'll have scattered around the overworld). I should be able to achieve most of this quite easily, just by editting Pokecenter scripts with XSE. One thing that I'm not sure of, is if/how I can change what happens when the player "whites out". It will send the player back home, and fully heal the Pokemon, which doesn't appear to be an easily accessible script through AdvanceMap. I'm hoping to change it to where instead of healing all Pokemon in the party, it will just heal the first one in the party (I know it would cause issues having all of your Pokemon fainted). Does anyone know if this is possible, and if so, how I'd go about doing this? I imagine it would take some use of a hex editor. Any help would be appreciated!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 12th, 2020 (10:34 PM). Edited March 12th, 2020 by DrFuji.
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
Interesting idea. Thankfully you don't have to use a hex editor to do this as it can be achieved through scripting. There are two scripts that activate after wiping out: your mother's script at 0x1A8DD8 and the Pokemon Centre script at 0x1A8D97. Since the party Pokemon locations are at a fixed point in the RAM and we know how they're structured, it is easy to do a bit of RAM editing to set their health to zero. Here's two scripts that will set all of your Pokemon minus your starter's health to zero when you white out:

Here's for the Pokemon Centre:
Spoiler:
#dynamic 0x800000

#org 0x1A8D97
goto @Repoint

#org @Repoint
lockall
textcolor 0x1
msgbox @talk1 0x6
call @Heal
checkflag 0x4B0
if 0x0 call @ExtraInfo
checkflag 0x4B0
if 0x1 call @RegularText
applymovement 0x800D @Move5B
waitmovement 0x0
fadedefault
releaseall
end

#org @Heal
applymovement 0x800D @Left
waitmovement 0x0
doanimation 0x19
checkanimation 0x19
applymovement 0x800D @Down
waitmovement 0x0
writebytetooffset 0x0 0x202433E
writebytetooffset 0x0 0x202433F
writebytetooffset 0x0 0x20243A2
writebytetooffset 0x0 0x20243A3
writebytetooffset 0x0 0x2024406
writebytetooffset 0x0 0x2024407
writebytetooffset 0x0 0x202446A
writebytetooffset 0x0 0x202446B
writebytetooffset 0x0 0x20244CE
writebytetooffset 0x0 0x20244CF
return

#org @ExtraInfo
msgbox @talk2 0x6
return

#org @RegularText
msgbox @talk3 0x6
return

#org @talk1
= First, you should restore your\nPOKéMON to full health.

#org @talk2
= Your POKéMON have been healed\nto perfect health.\pIf your POKéMON's energy, HP,\nis down, please come see us.\pIf you're planning to go far in the\nfield, you should buy some POTIONS\lat the POKéMON MART.\pWe hope you excel!

#org @talk3
= Your POKéMON have been healed\nto perfect health.\pWe hope you excel!

#org @Move5B
#raw 0x5B
#raw 0x1A
#raw 0xFE

#org @Left
#raw 0x2F
#raw 0xFE

#org @Down
#raw 0x2D
#raw 0xFE


And your mum:
Spoiler:
#dynamic 0x800000

#org 0x1A8DD8
goto @Repoint

#org @Repoint
lockall
textcolor 0x1
applymovement 0x1 @Move
waitmovement 0x0
msgbox @talk1 0x6
call @Healing
msgbox @talk2 0x6
fadedefault
releaseall
end

#org @Healing
fadescreen 0x1
fanfare 0x100
waitfanfare
special 0x0
writebytetooffset 0x0 0x202433E
writebytetooffset 0x0 0x202433F
writebytetooffset 0x0 0x20243A2
writebytetooffset 0x0 0x20243A3
writebytetooffset 0x0 0x2024406
writebytetooffset 0x0 0x2024407
writebytetooffset 0x0 0x202446A
writebytetooffset 0x0 0x202446B
writebytetooffset 0x0 0x20244CE
writebytetooffset 0x0 0x20244CF
fadescreen 0x0
return

#org @talk1
= MOM: [player]!\nWelcome home.\pIt sounds like you had quite\nan experience.\pMaybe you should take a quick\nrest.

#org @talk2
= MOM: Oh, good! You and your\nPOKéMON are looking great.\pI just heard from PROF. OAK.\pHe said that POKéMON's energy is\nmeasured in HP.\pIf your POKéMON lose their HP,\nyou can restore them at any\lPOKéMON CENTER.\pIf you're going to travel far away,\nthe smart TRAINER stocks up on\lPOTIONS at the POKéMON MART.\pMake me proud, honey!\pTake care!

#org @Move
#raw 0x2D
#raw 0xFE


To explain what's going on here; you're basically messing with your Pokemon's HP in the RAM. Those 'writebytetooffset' commands are overwriting your Pokemon's current health with zeroes. There are ten of these commands as each Pokemon's health takes up two bytes worth of space, accounting for Pokemon with more than 255 health. Since you're lengthening the healing scripts, they need to be repointed, which is taken care of with the little excerpts at the beginning of each script. Those static pointers at the beginning are where the scripts begin in the base ROM, but it a hassle to find and edit the pointers to those locations every single time, so I like to edit the healing scripts this way. This script should work regardless of whether you have one Pokemon or six.

Good luck with your hack~
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old April 19th, 2020 (5:24 PM).
FrankTheFoot501 FrankTheFoot501 is offline
 
Join Date: Mar 2020
Posts: 3
Sorry for the super late reply here. With the worldwide health crisis, my job situation became more important than this project. I very much appreciate the detailed and thorough response! It's a tremendous help, and not sure I would have landed on that solution without some help. Thank you!

I do have a new issue that I hadn't thought of, however. In order to achieve the game-play environment that I'm looking for, I want to get rid of all "free" heals that don't use resources. Another way that a pokemon can get healed, is by depositing it into a PC, and then pulling it back into your party. This is something that I hadn't really thought of. Not sure if there's a way of fixing this, really, as I don't think the game is set up to remember the health/PP of all Pokemon in the PC (correct me if I'm wrong). And even if there was, this feature I think is more of a fail-safe to prevent the player from filling their party with all fainted Pokemon, which is understandable.

I don't know that I can brainstorm a solution to that issue, and maybe there isn't one. Anyone else have anything?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 16th, 2020 (8:18 AM).
FrankTheFoot501 FrankTheFoot501 is offline
 
Join Date: Mar 2020
Posts: 3
Bump. Would still love to find a solution to this if anyone has any ideas!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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