Jump to content

Photo

Text-based subscreen health "bar"?

text health bar life ff final fantasy custom hp

  • Please log in to reply
5 replies to this topic

#1 MrPow

MrPow

    Initiate

  • Members
  • Location:Earth (Dimension C-137)

Posted 18 October 2016 - 07:41 AM

I want to make a text-based health system for the subscreen in one of my quests

 

 

Instead of displaying hearts or a bar of some type, I wish to represent it in numbers (much like final fantasy games)

 

Example:

    (HP: 66 / 132) [50%]

 

*When Link obtains a 'Heart Piece' his max HP increases by 16

*Some potions restore a set amount of HP, others restore a % of total HP

 

 

Can this be done in the subscreen editor alone, with some clever OCD-style tile layout? or does this require scripting?

 

On a scale from 1 - 10, how difficult would this be to script? (for a complete beginner)

 

Are there any quests that already do this that can be viewed in the editor? (I haven't played any custom quests yet, just been messing with editor)

 

 



#2 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 18 October 2016 - 07:47 AM

Make a new counter object (not counter block) in the subscreen editor and tie it to the health counter. That will make it show your current health on the subscreen.

If you also want to display current max health then you need to do some minor scripting.

#3 MrPow

MrPow

    Initiate

  • Members
  • Location:Earth (Dimension C-137)

Posted 18 October 2016 - 08:21 AM

Make a new counter object (not counter block) in the subscreen editor and tie it to the health counter. That will make it show your current health on the subscreen.If you also want to display current max health then you need to do some minor scripting.

Perfect, thanks.

 

Actually I can't seem to get it working. I set the option on the left to 'Heart', but the Item 1, Item 2, and Item 3 tabs don't have appropriate options.

 

C1yCysH.png


Edited by MrPow, 18 October 2016 - 11:35 AM.


#4 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 18 October 2016 - 01:25 PM

Huh..., well I guess what with the crap I have been doing with counters before I didn't even consider this.... It seems ZQ artificially limits you from drawing the the heart counter this way, so I guess you'd have to script both the current health as well as max health. *throws this into the pile of other arbitrary limitations the engine has*

Anyway, where you selected "heart" is the infinite slot, which is what item determines when the counter displays as if you have infinite of that item.

You'll need someone to script this solution for you, I'd do it myself but I'm terribly busy right now, it is however something rather simple, so you should be able to find someone who can help you with that, or take it as an opportunity to get into scripting (don't be afraid of asking for help)!

#5 MrPow

MrPow

    Initiate

  • Members
  • Location:Earth (Dimension C-137)

Posted 18 October 2016 - 01:34 PM

Huh..., well I guess what with the crap I have been doing with counters before I didn't even consider this.... It seems ZQ artificially limits you from drawing the the heart counter this way, so I guess you'd have to script both the current health as well as max health. *throws this into the pile of other arbitrary limitations the engine has*

Anyway, where you selected "heart" is the infinite slot, which is what item determines when the counter displays as if you have infinite of that item.

You'll need someone to script this solution for you, I'd do it myself but I'm terribly busy right now, it is however something rather simple, so you should be able to find someone who can help you with that, or take it as an opportunity to get into scripting (don't be afraid of asking for help)!

Gotcha. No problem. I feel like I should at least attempt at doing it myself before I ask someone else to do it for me. I just needed to know there wasn't an easier way to accomplish this before I started to dive into scripting. Based on the tiny amount I have read about scripting, I feel like this would be relatively easy to get working.



#6 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 18 October 2016 - 02:55 PM

Based on the tiny amount I have read about scripting, I feel like this would be relatively easy to get working.

It actually is really easy. Drawing to the passive subscreen can be accomplished by using any of the draw commands (DrawCombo, DrawTile, etc) on layer 7 and just using a negative Y value. For example, one of my quests had cooldown meters drawn to the subscreen that looked like this. Drawing them (at least, the fully filled ones) was accomplished with something really simple:

int CooldownBeginX = 95;
int CooldownEndX = 95+64;
int CooldownBeginYA = -18;
int CooldownEndYA = -11;
int CooldownBeginYB = -9;
int CooldownEndYB = -2;

//For reference, these draw the complete filled in meters
	//Screen->Rectangle(7, CooldownBeginX, CooldownBeginYA, CooldownEndX, CooldownEndYA, 129, 1, 0, 0, 0, true, 128);
	//Screen->Rectangle(7, CooldownBeginX, CooldownBeginYB, CooldownEndX, CooldownEndYB, 3, 1, 0, 0, 0, true, 128);
By using two integer draws, one that displays Link->MaxHP and the other displaying Link->HP, you should be able to accomplish the effect you want.
  • MrPow likes this



Also tagged with one or more of these keywords: text, health bar, life, ff, final fantasy, custom, hp

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users