- 1
- Posts
- 120
- Days
- Seen Jan 15, 2025
Hello, I'm trying to see if I can get enemy health displayed as text similar to how it's displayed for the player.
Does anyone know of any resources that would be helpful in figuring out how to do this? Or possibly other hacks that achieved this that I could study?
I'm pretty new to editing decomps don't have a super strong coding background (mostly javascript), but I understand a good amount of basic things. I feel good about editing moves and pre-existing data, for example. However, I haven't been very successful at understanding how the battle ui works.
I've mostly been picking and changing things src/battle_interface.c.
I've mainly been playing around with the UpdateHpTextInHealthbox and UpdateHpTextInHealthboxInDoubles functions to see if I could possibly either (a) create a new text 'window' that displays the enemy mons current health or (b) repurpose the SwapHpBarsWithHpText function exclusive to double battles to also work for enemy mons. The rom hack I'm working on uses a lot of double battles, so it would be fine if this only functioned for those, if that's an easier approach. It would also be totally fine if only the CURRENT HP was displayed. Whatever can make this as simple to do as possible.
So far, I can successfully have the pre-existing text box for the players mons display the enemy health values by messing with the UpdateHpTextInHealthboxInDoubles and SwapHpBarsWithHpText functions, but I'm still struggling to understand how I could go about getting the enemy their own text.
Does anyone here have any experience with this they might be able to offer me?
(Apologies if this is the wrong place to post this, and for my coding ignorance.)
Does anyone know of any resources that would be helpful in figuring out how to do this? Or possibly other hacks that achieved this that I could study?
I'm pretty new to editing decomps don't have a super strong coding background (mostly javascript), but I understand a good amount of basic things. I feel good about editing moves and pre-existing data, for example. However, I haven't been very successful at understanding how the battle ui works.
I've mostly been picking and changing things src/battle_interface.c.
I've mainly been playing around with the UpdateHpTextInHealthbox and UpdateHpTextInHealthboxInDoubles functions to see if I could possibly either (a) create a new text 'window' that displays the enemy mons current health or (b) repurpose the SwapHpBarsWithHpText function exclusive to double battles to also work for enemy mons. The rom hack I'm working on uses a lot of double battles, so it would be fine if this only functioned for those, if that's an easier approach. It would also be totally fine if only the CURRENT HP was displayed. Whatever can make this as simple to do as possible.
So far, I can successfully have the pre-existing text box for the players mons display the enemy health values by messing with the UpdateHpTextInHealthboxInDoubles and SwapHpBarsWithHpText functions, but I'm still struggling to understand how I could go about getting the enemy their own text.
Does anyone here have any experience with this they might be able to offer me?
(Apologies if this is the wrong place to post this, and for my coding ignorance.)