Graphically Displaying HP Percentages

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Graphically Displaying HP Percentages

Postby taliss » Sat Sep 14, 2013 6:06 am

In this SS The percentages of DMG are displayed, How would one go about achieving this? Any help would be appreciated.
Image
http://scr.hu/0pp2/4sj9e/
taliss
 
Posts: 18
Joined: Tue Oct 30, 2012 10:03 pm

Re: Graphically Displaying HP Percentages

Postby borka » Sat Sep 14, 2013 6:28 am

At the moment i only can remember of old Mentor/Deboon client having this, maybe someone merged that into another client as the screenshot is this world...
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Graphically Displaying HP Percentages

Postby taliss » Sat Sep 14, 2013 7:06 am

UNION Client, It shows percentages. For future reference this simply uses a numerical number to reflect the decay stage rather than a shade of red. It would be amazing if it was an accurate percentage though. Or an HP reading that allowed you to count down the remaining HP.
taliss
 
Posts: 18
Joined: Tue Oct 30, 2012 10:03 pm

Re: Graphically Displaying HP Percentages

Postby NOOBY93 » Sat Sep 14, 2013 7:31 am

Just edit the res files of the damaged segments and put numbers or some other indicators on
Jalpha wrote:I believe in my interpretation of things.
User avatar
NOOBY93
 
Posts: 6528
Joined: Tue Aug 09, 2011 1:12 pm

Re: Graphically Displaying HP Percentages

Postby borka » Sat Sep 14, 2013 7:36 am

For exact damage numbers the server prolly needs to send you the information (while i don't know whether the server has accurate numbers -> RNG)

NOOBY93 wrote:Just edit the res files of the damaged segments and put numbers or some other indicators on


yep put in
Code: Select all
NOOBY
instead of
Code: Select all
25%
:P
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Graphically Displaying HP Percentages

Postby NOOBY93 » Sat Sep 14, 2013 7:42 am

borka wrote:For exact damage numbers the server prolly needs to send you the information (while i don't know whether the server has accurate numbers -> RNG)

NOOBY93 wrote:Just edit the res files of the damaged segments and put numbers or some other indicators on


yep put in
Code: Select all
NOOBY
instead of
Code: Select all
25%
:P

wtf is that supposed to mean
I'm trying to help OP
Jalpha wrote:I believe in my interpretation of things.
User avatar
NOOBY93
 
Posts: 6528
Joined: Tue Aug 09, 2011 1:12 pm

Re: Graphically Displaying HP Percentages

Postby borka » Sat Sep 14, 2013 8:30 am

Which .res files and what to edit in there ?!? Nothing else to do? !? :roll:
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Graphically Displaying HP Percentages

Postby Xcom » Sat Sep 14, 2013 12:39 pm

No these changes are an overlay and haven't got anything to do with res images. The red tint is placed on objects as a number is received from the server. The number can be found in mapview.java on one of the lines I have forgotten about. If anyone wants it I'll try dig it up. The 25% values are basically a text display like name tags generated as the value changes from 0 as not damaged to 3 or something being 75% damaged.

I didn't fix this on my own client cause I didn't know how to find a good way to make that text display. It semi complicated to setup so unless your up for a challenge it wont be easy to add.

About getting the exact damage value its impossible but it's possible to get a more detailed damage value by bashing objects. The hourglass displays the damage the object have taken from 0 to 21.
User avatar
Xcom
 
Posts: 1105
Joined: Wed Dec 14, 2011 1:43 pm

Re: Graphically Displaying HP Percentages

Postby borka » Sat Sep 14, 2013 5:54 pm

:lol: Xcom i've been ironical about NOOBY

Just as an example (Do not use )

Code: Select all
Config.java
 89   public static boolean showHP = false;
326   showHP = options.getProperty("showHP", "false").equals("true");
410   options.setProperty("showHP", showHP ? "true" : "false");

MapView.java

1292    if (Config.showHP) {
        GobHealth hlt;
     if ((hlt = (GobHealth)((Gob)part.owner).getattr(GobHealth.class)) != null) {
       String f = "\n"+Float.valueOf((float)(hlt.asfloat() * 100.0D)) + "%";
       g.text(f, part.sc().add(10, 20));
             }
1298   }

MenuGrid.java

327  } else if (list[1].equals("showhp")) {
            Config.showHP = !Config.showHP;
           String str = "Display Buildings Health: " + (Config.showHP ? "ON" :      "OFF");
           this.ui.cons.out.println(str);
            this.ui.slen.error(str);
332           Config.saveOptions();
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap


Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 0 guests