• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Help displaying enemy health as text (pokeemerald)

  • 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.)
     
    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.)
    For double battles you can remove this line of code to be able to see enemy's health by pressing start, but the enemy's hp looks a bit glitchy so you'll probably want to modify the code that draws it.
    [PokeCommunity.com] Help displaying enemy health as text (pokeemerald)
     
    Back
    Top