SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [REL] Colored Hull Integrity Indicator (https://www.subsim.com/radioroom/showthread.php?t=159866)

h.sie 01-04-10 03:16 AM

[REL] Colored Hull Integrity Indicator
 
< Updated first post - original first post deleted >


Colored Hull Integrity Indicator
------------------------------

Up to now there are only two options for SH3:
To hide or to show the hull integrity percentage numbers.
A compromise was not possible.

But now I found a way to display the hull integrity in 4 colors:

green: Integrity 90% - 100% (no or minor damage)
yellow: Integrity 60% - 89% (damage)
orange: Integrity 30% - 59% (heavy damage)
red: Integrity 0% - 29% (critical damage)

which at least for me is a good compromise and hopefully
a step into more realism for SH3.

Screenshot: (the transparency appears in the image only, not in game).
Screenie shows Hull Integrity: Orange (= Heavily damaged, 30-59%)

http://img508.imageshack.us/img508/3714/hull.jpg


The main principle of this mod is simple:
I created a new Font type which shows color flags instead of numbers.
Only the middle of the three percentage numbers is important.
If it's a 9 or 0 (9x% - 100%) => a green flag is shown.
If it's a 6,7 or 8 (6x% - 8x%) => a yellow flag is shown.
And so on. The other two numbers are covered by a black mask image.


Unfortunately, this mod needs some changes in the menu_1024_768.ini
and the three xx_menu.txt files. But because there are hundreds of
different versions of these files (many GUI mods available),
it's easier for me to write a DIY-manual than to make hundreds of
compatibility patches for all these GUIs.

The DIY-manual is part of the DIY-Kit, which can be found on my mediafire page.

--------------------------------------------------------------------------------
I also uploaded a ready-to-use demo version for those people who want to see
how the mod looks like and works. It's only for GWX3 and it's not compatible to any GUI-mod.
----------------------------------------------------------------------------------


Optional stuff (in folder "Optional"):
--------------------------------------

1) Disabler-Mod. Re-activates the Hull Integrity output in percent.
So that the user can decide which output he gets (colors or numbers).
The Disabler-Mod only makes sense, if my Colored Hull Integrity Mod
is irreversibly integrated into a GUI.

2) Optional colors for color blind people. The font "HullInteg1.tga"
must be overwritten by that one from the Optional folder.



Compatibility with SH3-Commander
--------------------------------

Unfortunately, this mod is not compatible to the "Show/Hide Hull Integrity"
Option of SH3-Commander.

If you use SH3-Commander, you have to choose "Show Hull Integrity"
to make this mod work correctly.

The "Hide Hull Integrity" option of SH3-Commander does not work.
(A red flag remains all the time that indicates a critical hull
damage regardless of the actual hull condition).


TO COMPLETELY HIDE the Hull Integrity information, 2 steps are necessary
------------------------------------------------------------------------

First: Disable the Colored Hull Integrity mod.
Second: Use the "Hide Hull Integrity" option of SH3-Commander.


Credits to:
-----------
GWX-Team: For GWX.
JScones: JSGME, Sh3Cmdr.
SkWasjer: S3D.
Rubini: Optional colors for color blind people.

Hope you like it,
h.sie

h.sie 02-08-10 03:25 AM

In the meantime, while working on my edition of ACM-GUI-Reloaded, I found a solution to restrict the hull integrity information to only six values:

100%, 80%, 50%, 30%, 10% and 0%.

For me that's a good compromise between the present solutions: fully show or hide the hull integrity percentage.

It's not hard to do.

1) First you have to create a new font by copying an existing one. Then you have to edit the .off file of your new font (using S3D) in order to make the numbers (0 to 9) have a FIXED WIDTH.

2) Use the new font for ItemID=0x67000404 in menu.ini. Don't forget to register the new font in the beginning of menu.ini.

3) Make the hull percentage output string right-aligned by setting TextFlags=0x1A for the above-mentioned Item.

Because of step 2) and 3) the last digit of the hull percentage now has a fixed position regardless of the percentage number shown.

4) Create an intransparent tga-image and paint a "0 %" on it and hide the last digit of the percentage number by that image. Now only 10%-steps are shown: 100%, 90%, ... 10%, 0%.

5) Edit the .tga file of the new font and overwrite the 9 and 7 by an 8. Then overwrite the 6 by a 5 and the 4 by a 3 and the 2 by a 1.

Now only the values 100%, 80%, 50%, 30%, 10% and 0% can be shown.

I'll include this in my next version of ACM-Reloaded-h.sie's Edition.

h.sie

Uber Gruber 02-08-10 08:34 AM

Thats an excellent idea h.sie :up:

I imagine the same procedure would also work for WO range estimates ? If so then we should be able to get ranges in multiples of 1000 meters instead of the amazingly accurate ranges we get now.

As Beery once said - it's all about uncertainty:yep:

:salute:

Hitman 02-08-10 08:42 AM

Quote:

I imagine the same procedure would also work for WO range estimates ? If so then we should be able to get ranges in multiples of 1000 meters instead of the amazingly accurate ranges we get now.
Ha ha first thing I too thought about when reading the post :haha:

But no, I think it won't work with range because it appears in the message bar and in different positions, always using the same font as the rest of teh messages, so you can't apply the trick :damn:

h.sie 02-08-10 10:44 AM

As Hitman already said: This trick won't work for the WO range.

The only possibility I see is to add escape sequences (e.g. something like '0x08' for backspaces) into the output string "Current range: %4.0f"

Using the backspaces one could maybe overwrite the output

from 13500m to 13000m or similar.

But I don't know how to add these control sequences. Maybe it's impossible.

Stiebler 02-08-10 12:34 PM

The idea of introducing back-spaces into the pseudo-C line for the watch-officer's ranges was suggested some time ago.

Unfortunately, it doesn't work. I tried it.

Stiebler.

makman94 02-08-10 12:36 PM

thats very nice idea H.Sie ,especially for the wo! :up:

you mean that with these changes (if you manage to import it into the game) the wo will give ranges of 500m ?

i think that Uber is involved at the past with this subject and ,maybe, you two together can figure out what is going on !

all the best to this effort :up:

Rubini 02-08-10 12:51 PM

Quote:

Originally Posted by h.sie (Post 1261565)
In the meantime, while working on my edition of ACM-GUI-Reloaded, I found a solution to restrict the hull integrity information to only six values:

100%, 80%, 50%, 30%, 10% and 0%.

For me that's a good compromise between the present solutions: fully show or hide the hull integrity percentage.

It's not hard to do.

1) First you have to create a new font by copying an existing one. Then you have to edit the .off file of your new font (using S3D) in order to make the numbers (0 to 9) have a FIXED WIDTH.

2) Use the new font for Item-Id 0x67xxxxxx (exact number will follow) in menu.ini. Don't forget to register the new font in the beginning of menu.ini.

3) Make the hull percentage output string right-aligned by setting TextFmt=0x1A for the above-mentioned Item.

Because of step 2) and 3) the last digit of the hull percentage now has a fixed position regardless of the percentage number shown.

4) Create an intransparent tga-image and paint a "0 %" on it and hide the last digit of the percentage number by that image. Now only 10%-steps are shown: 100%, 90%, ... 10%, 0%.

5) Edit the .tga file of the new font and overwrite the 9 and 7 by an 8. Then overwrite the 6 by a 5 and the 4 by a 3 and the 2 by a 1.

Now only the values 100%, 80%, 50%, 30%, 10% and 0% can be shown.

I'll include this in my next version of ACM-Reloaded-h.sie's Edition.

h.sie

This is great. I also already have looked to this issue some years ago but didn't achieve any good result.

Your solution is very good, it will be enough as a mid range option (much better than the actual nothing or all) and please make it also GWX 3.0 compatible.:up:

LGN1 02-08-10 01:23 PM

Hi h.sie,

nice idea. However, I am wondering whether a more simple solution is to use SH3 Commander's crush depth randomization option. With a randomization of the crush depth by approx. 10%, I think the hull integrity number is also not too accurate. I use the full text version in combination with the SH3Commander feature and I think it is just fine.

Anyway, a solution for the WO would be really great!

Cheers, LGN1

h.sie 02-09-10 02:33 PM

Thanks, for your replies, guys, I'll answer tomorrow. Currently I'm testing very interesting things. It's getting better and better. Playing with the .off files of the Fonts, I'm now able to display self-made little color flags instead of numbers or characters.

Only the middle digit of the three hull integrity percentage digits is relevant for us.

If 0 (100%) or 9 (90%) -> a green flag is shown.

If 5 (50%) or 6 (60%) -> a yellow flag is shown. and so on.

So hull integrity can be shown in 5 color steps, the same as the stealth-meter works: green, lightgreen, yellow, orange, red.

In my opinion it's better than the numbers.
Or what do you think?

Sailor Steve 02-09-10 03:23 PM

I think words would be the best, if possible.

Excellent

Good

Fair

Poor

We're In Trouble

Barring that, the flags sound like a great idea.

h.sie 02-09-10 03:35 PM

Hi Sailor,

words are not possible.

h.sie

tonschk 02-09-10 03:53 PM

The % Hull integrity is just the information about how many Hit Points are still available , therefore the % Hull integrity have nothing to do with the hull of the sub, I just installed SH3 Commander to have my % Hull integrity , because unfortunately GWX Gold remove this very needed information , I need The % Hull integrity and I want The exact information about how many hit points are still available

Uber Gruber 02-09-10 04:56 PM

Curses to them and their lot:03:

h.sie 02-10-10 03:58 AM

Hi tomschk,

I try to make the game as "realistic" as possible, and I think a real kaleun did not know how many "hitpoints" are left for his sub. Or was there a gauge showing "hitpoints: 75,5%"?? So I try to reduce the detail of the information given to get a historical feeling, but I do not force anyone to use my idea.

h.sie


@makman: sorry, but the WO range cannot be modded this way.


All times are GMT -5. The time now is 09:53 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.