Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Digital display

Open ststl-s opened this issue 3 years ago • 81 comments

Can use Text or SHP show health point and shield point

ststl-s avatar Apr 12 '22 05:04 ststl-s

Nightly build for this pull request:

github-actions[bot] avatar Apr 12 '22 06:04 github-actions[bot]

I saw the discussion on discord, they maybe didn't read the New-or-Enhanced-Logics.md carefully, digital show has local definition, most of functions has local definition except Buildings/Units.ShowHPOffset.WithoutShield.

ststl-s avatar Apr 12 '22 10:04 ststl-s

My point is that there's so much new tags that it would be better as it's own type class.

Metadorius avatar Apr 12 '22 10:04 Metadorius

My point is that there's so much new tags that it would be better as it's own type class.

Ok, I get it, I will improve it later.

ststl-s avatar Apr 12 '22 10:04 ststl-s

Thanks. I will improve these code.

ststl-s avatar Apr 12 '22 11:04 ststl-s

Reconstructed

ststl-s avatar Apr 12 '22 18:04 ststl-s

I found that HP value did not perform well on spies, so I hope to add a percentage to show HP.

NetsuNegi avatar Apr 13 '22 01:04 NetsuNegi

I found that HP value did not perform well on spies, so I hope to add a percentage to show HP.

I don't have time recently. I may do it in the future.

ststl-s avatar Apr 13 '22 01:04 ststl-s

I noticed that Buildings.ShieldNumberInterval= doesn't seem to work? The shield value Interval doesn't changed.

NetsuNegi avatar Apr 14 '22 11:04 NetsuNegi

I noticed that Buildings.ShieldNumberInterval= doesn't seem to work? The shield value Interval doesn't changed.

The first version had some bug, some entries of shield used '_' instead of '.' You can use the current version Here are entries use '_' in the first version this->ShieldValue_ShowBackground.Read(exINI, pSection, "ShieldValue_ShowBackground"); this->ShieldValue_UseSHPShow.Read(exINI, pSection, "ShieldValue_UseSHPShow"); this->ShieldValue_ShowSHP.Read(pINI, pSection, "ShieldValue_ShowSHP"); this->ShieldValue_ShowPAL.Read(pINI, pSection, "ShieldValue_ShowPAL"); this->ShieldValue_ShowInterval.Read(exINI, pSection, "ShieldValue_ShowInterval");

ststl-s avatar Apr 14 '22 13:04 ststl-s

There are some code style, documentation issues and one or two other things that should be addressed.

Update completed

ststl-s avatar Apr 22 '22 15:04 ststl-s

What about the following:

There should be an ability to align the text and anchor it to different sides/corners/center I guess. Did you look into this? IMO at least the anchoring of the text to the left/right/center of HP bar should be customizable. And perhaps it would be good to be able to customize the position (say, maybe someone wants it to display to the right of HP bar), but that can be left for later.

Metadorius avatar Apr 22 '22 18:04 Metadorius

What about the following:

There should be an ability to align the text and anchor it to different sides/corners/center I guess. Did you look into this? IMO at least the anchoring of the text to the left/right/center of HP bar should be customizable. And perhaps it would be good to be able to customize the position (say, maybe someone wants it to display to the right of HP bar), but that can be left for later.

I forgot about it.

ststl-s avatar Apr 23 '22 11:04 ststl-s

What about the following:

There should be an ability to align the text and anchor it to different sides/corners/center I guess. Did you look into this? IMO at least the anchoring of the text to the left/right/center of HP bar should be customizable. And perhaps it would be good to be able to customize the position (say, maybe someone wants it to display to the right of HP bar), but that can be left for later.

Update completed

ststl-s avatar Apr 23 '22 12:04 ststl-s

@8abs We don't sell anything here. In fact, you don't need to compile anything yourself, just scroll through the pull request to find this comment where you can download the most recent build with this particular feature.

Metadorius avatar Apr 25 '22 08:04 Metadorius

Thank you very much for informing me that "Nightly Build" is what I need. I'm less than a noob on programming and this website's UI and basic functions. I only come here to download your masterpieces to enhance my DIY map. This function really would make my map wonderful. Thank you all for your contribution. (BTW, I will never make any profit with my map. Even I give out money as bonus for my own group of friend to play and compete to the last survivor with this map. This bring us a lot of joy. My comment about giving you money above is only for gratefulness. After all even Github support people sponsoring the contributor. Hope you can understand it.

8abs avatar Apr 26 '22 13:04 8abs

Is there going to be a "HugeBar" part for boss unit?

NotAGeek25 avatar Apr 26 '22 19:04 NotAGeek25

How about customized font position by using coordinate and offer an option whether display maximum HP. Obviously the maximum HP part makes the text too long. (500/500 seems too long compared with a direct 500)

NotAGeek25 avatar Apr 26 '22 21:04 NotAGeek25

Is there going to be a "HugeBar" part for boss unit?

No.

ststl-s avatar Apr 27 '22 03:04 ststl-s

How about customized font position by using coordinate and offer an option whether display maximum HP. Obviously the maximum HP part makes the text too long. (500/500 seems too long compared with a direct 500)

It may be updated in a week. Including percentage display and hide strength.

ststl-s avatar Apr 27 '22 03:04 ststl-s

All code has been completed and will not be updated unless errors are found during testing.

ststl-s avatar May 07 '22 15:05 ststl-s

image I am not sure if default values are valid/suitable. This is with those values overriden:

[DigitalDisplayTypes]
0=DEFHPDISPLAY

[DEFHPDISPLAY]
UseSHP=yes
SHP.Interval=4,0
SHP.Interval.Building=4,2

Offest seems to be gone somewhere and building HP are drawn whereever.

Metadorius avatar May 09 '22 14:05 Metadorius

image I am not sure if default values are valid/suitable. This is with those values overriden:

[DigitalDisplayTypes]
0=DEFHPDISPLAY

[DEFHPDISPLAY]
UseSHP=yes
SHP.Interval=4,0
SHP.Interval.Building=4,2

Offest seems to be gone somewhere and building HP are drawn whereever.

I use my own SHP file to display the location is just right. Just like the illustration

ststl-s avatar May 09 '22 15:05 ststl-s

That's not the point. The point is that it doesn't work as expected by default (without specification of any parameters). The only difference between my and your SHP is that I have a smaller SHP size. By not working as expected I meant that the building text is drawn in other direction and default offset on a unit is too big. Maybe also alignment needs to be adjusted.

Metadorius avatar May 09 '22 15:05 Metadorius

That's not the point. The point is that it doesn't work as expected by default (without specification of any parameters). The only difference between my and your SHP is that I have a smaller SHP size. By not working as expected I meant that the building text is drawn in other direction and default offset on a unit is too big. Maybe also alignment needs to be adjusted.

Wait a minute, the building display doesn't look normal. let me have a look.

ststl-s avatar May 09 '22 15:05 ststl-s

How to deal with the display of units? The size of SHP canvas is different.

ststl-s avatar May 09 '22 15:05 ststl-s

Not a full review, but a bit of the feedback. We'll give more feedback later when I get it working on my setup.

  1. You missed Offests in the docs.
  2. I think you should remove separate building and non-building intervals and leave only one interval. We already have an ability to specify different display types, so this is redundant.

Metadorius avatar May 09 '22 15:05 Metadorius

How to deal with the display of units? The size of SHP canvas is different.

Different between what? Ideally the drawing needs to be done relative to health bar.

Metadorius avatar May 09 '22 15:05 Metadorius

image Modified like this? I don't know why the direction of your building display would be abnormal. Maybe you can use negative intervals.

ststl-s avatar May 09 '22 15:05 ststl-s

image The default interval is a negative number, and the description in the docs is incorrect.

ststl-s avatar May 09 '22 15:05 ststl-s