project-navigation
Personal tools

Author Topic: Lazy HUD v2  (Read 14155 times)

Offline Norby

  • Rookie
  • ***
  • Posts: 43
    • View Profile
Lazy HUD v2
« on: March 12, 2017, 11:37:13 pm »
This HUD is an improved version of Lazy HUD, which originally made by homunculus.
Contain bugfixes and many new functions. For a comparsion the source code of
hud_lazy2.ufo file is three times longer than in v1.

Download Lazy HUD v2 here.



New features:

-Bleedings are displayed with numeric values also next to body part icons.
 Sum of bleedings are appear in big red numbers on the heads of the team.
 
-Hit counters are added to selected solider panel and over TU bars of small
 solider heads, up to 11 hits, which mean the maximal accuracy improvement
 in a mission. To increase it you must manually right click on the fired
 weapon after every successful hit when you heard grunt from the enemy.
 Press middle click on the weapon if you want undo a mistaken right click.

-Skill specific hit counters will increase also. Color is green from 4 hits
 due to more hits will not give more xp using the same skill within a mission.

-Stength, Speed and Mind skill bars are added to selectedSoldier panel.
 Exact skill value is displayed also if the mouse is over a bar.

-Accuracy percent with the current weapon is added into the top right
 corner over the weapon (middle value between accuracy and weapon skill).

-Aliens button draw lines to all visible aliens at once when clicked,
 right click show previous alien.

-Crouch button right click toggle 3TU reserve.

-Maximum of TU and HP bars are rased to the maximal possible values.

-HUD alignment is selectable from left, center, right and rightmost using
 the mouse wheel in settings button.

-Hide the whole HUD with right click on the settings button for screenshots.

-New compact lookout. :)


How to install

Extract the zip file into your personal "base" folder, which is
~/.ufoai/2.5/base in Linux, in Windows it is where you installed the game,
for example C:\Program Files\UFOAI-2.5\base\ .
Then start the game, select Options, Gameplay and change HUD Design to
Lazy HUD v2.

In details this you should copy the ufos/ui/hud_lazy2.ufo file into
~/.ufoai/2.5/base/ufos/ui in Linux, in Windows for example
C:\Program Files\UFOAI-2.5\base\ufos\ui, moreover all files from
pics/lazyhud2 folder into base/pics/lazyhud2 folder.


Optional files

The pics/hud- folder contain images for the default hud without
the thick border decorations. To enable it copy the content also
and remove the "-" sign from the "hud-" folder, so rename to "hud".
This is the way to clear the borders around inventory and physical
stats windows in LazyHUD due to affect both HUDs.

The previous subverisons of hud_lazy2.ufo are named to .ufo-xx,
these are here just for historical reasons but do nothing.


A known problem in Ufoai 2.5 only

Wounds displayed on the head models of soliders are not updated right at
medikit usage in Ufoai 2.5, due to need an event handler which is
introduced in 2.6. In 2.5 a sure way to update the wounds of all soliders
is to move the mouse into the info box of the selected solider and roll
the wheel through the whole team.



Changelog

v2.21
-Mouse wheel change solider on belt, holster, backpack and most buttons.
 Middle click popup the inventory window on these and on floor container.
-Default alignment of HUD is centered better when there are at least 10
 soliders on board. This help to the fixed buttons in the bottom right
 corner do not cover the reaction fire icon of the secondary weapon.
-Click on reactionfire shield next to a fire mode select this mode
 to check the reaction shield at bottom also.
-Clear reactionfire points from main shield button when change solider.
-Fixes in bleeding display for Ufoai v2.6.
-Source code simplification.

v2.20
-Maximum of TU and HP bars are rased to the in-game maximums (59 and 255).
 This is needed due to I can not read the acual values when the HUD loads,
 just after a mouse event fired, causing no bar at all if the first solider
 start with more points than a lower maximum.
-Added even more call of update_max_hp_tu for a bit better support in the
 case when you lower these maximums in confunc hudenable to get longer
 bars with rookie soliders, but in this case you should raise back when
 the best solider step over it else the bar will not be shown instantly at
 the start of missions, just after the first mouseover or similar events.

v2.19
-Skill specific hit counters appear on small solider heads also to help in
 checking through the team which solider should make more hits.
 Now the selected solider panel show these also below each other.
-Accuracy skill value is white, weapon skill bars got cyan color.
-Big red numbers on heads show the sum of bleeding wounds on all body parts.
-The hud_updateactorwounds called in many places as an attempt to reduce
 the bug when the wounds displayed on the heads of soliders are not updated
 right at medikit usage. This affect Ufoai 2.5 only due to an event handler
 which is introduced in Ufoai 2.6 can solve this.
-Maximum of skill specific hit counters is raised to 11. Will show * over 9
 on the small heads due to no room for more than a single character there.
 Color of these numbers will change to green from 4 due to more hits using
 the same skill will not give more xp for the same solider within a mission.
-Skills of new weapons in Weapon mod of AntJam are added to the list.

v2.18
-Max. values of TU, HP morale and stun bars are increased dynamically.
-Accuracy percent with the current weapon is added into the top right
 corner over the weapon (middle value between accuracy and weapon skill).
-Hit counters now cleared properly between missions.

v2.17
-Mouse wheel on skill specific hit counter in the top left corner on weapon
 can temporary change the skill to be able to check the counters of other
 skills.
-Debug panel is added to middle click on settings button. This display
 the values of cvars and node properties which can help to fix problems.
-Bugfix against "can't remove static nodes in actions@removeAllChild":
 due to removeChild does not work, now not create new child when exist.
-Improvements in hit counter codes.

v2.16
-Skill specific hit counters added, up to 4 hits for each skills.
 Due to the skill of a weapon is not queryable, an internal skill lookup
 list is added for the known weapons. But any new weapons added in the
 future will need additional lines.
 Grenade launcher need an additional manual change of skill type via
 right click in the number in the top left corner over the weapon picture
 if loaded with flechettes, which use close skill and not explosives
 due to the script currently can not read the type of the loaded ammo.

v2.15
-Fixed a bug when ammo is in hand.
-Fixes for the reactionfire TU display.

v2.14
-Fixes for the hit counter feature.

v2.13
-Hit counter is added to selected solider panel and over TU bars of small
 solider buttons, up to 11 hits. To increase it you must manually right click
 on the fired weapon after every successful hit, when you heard "argh".
 Press middle click on the weapon if you want undo a mistaken right click.
-HUD position is refined for each number of solders from 1 to 16.

v2.12
-HUD alignment is adjustable with wheel on menu button instead of moveZone.
-Code cleanup.

v2.11
-Autohide removed, floor is over buttons.
-The small solider team buttons are rearranged into a single long line.
-No next music button, use right click on menu button instead.
-Rightmost HUD alignment is added.

v2.10
-Menu, round and zone buttons are moved to the bottom right corner.

v2.09
-Change solider with mouse wheel on skill bars also.
-Better reactionfire button handler.
-A help for double shot fire mode, gray it out if only one ammo left.

v2.08
-Show numeric value of bleeding next to body part icons.
-Unhide a bit ealier near the bottom of screen.

v2.07
-Show numeric value of skill bar when pointed with mouse in solider panel.
-Better handling of hidden hud.
-Backpack lookout is changed a bit.

v2.06
-Fixes on alingment, hide and autohide features.
-Lookout adjustments.

v2.05
-HUD alignment to right is available.
-Lookout fixes.

v2.04
-Changed numbers on small solider panels to less by one to fit with hotkeys.
-Alignment of HUD is adjustable with mouse wheel also.
-Compact lookout with smaller buttons.
-Unhide over stun bar also.

v2.03
-Fix of autohide to do not clash with HUD alignment.
-Unhide is called on TU bar also.
-Anoher rename (actionListener2) to do not clash with lazyHUD v1.

v2.02
-Many HUD items are placed on autohide panel which slide up/down at the bottom.
 Vertical position is adjustable with mouse wheel on resque zone button.
 Right click on nextMusic button can toggle autohide.
-Hide the whole HUD with right click on the settings button for screenshots.
 Only a small "hud" button will be on screen which will show the HUD again.

v2.01
-Stength, speed and mind bars are added to selectedSoldier panel.
-Aliens button draw lines to all visible aliens at once,
 right click show previous alien.
-Crouch button right click and wheel toggle 3TU reserve.
-Weapon left click execute action (aiming crosshairs) as well as right click.
-TU bar background color changed to black.
-Smaller head models.
-Toggle alignment of HUD to left or center with right click on resqzone button.
-Fix a bug which bring up settings screen at every second solider selection.
-Fix reactionfire button to stay inactive when only 3TU is reserved for crouch.
-Components are renamed (like cmpAction2) to works in parallel with lazyHUD v1.


I hope you will enjoy the features of Lazy HUD v2. :)

License: CC BY-NC-SA 4.0

Norby
« Last Edit: March 12, 2017, 11:42:20 pm by Norby »

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Lazy HUD v2
« Reply #1 on: February 12, 2023, 11:26:15 pm »
Well, a long time has passed, and the author is probably not reading it.
And the last development of the game seems to be from 2014.
But there seem to be people still playing the game.

When I tried this mod, first it crashed the game at loading screen. That was on Windows 10.
But I did not give up.
I got it to work by removing the unnecessary files named 'Optional files' in Norby's post.
That is, those files:
Quote
The pics/hud- folder contain images for the default hud without
the thick border decorations. To enable it copy the content also
and remove the "-" sign from the "hud-" folder, so rename to "hud".
This is the way to clear the borders around inventory and physical
stats windows in LazyHUD due to affect both HUDs.

The previous subverisons of hud_lazy2.ufo are named to .ufo-xx,
these are here just for historical reasons but do nothing.
Then it worked very well in both 2.5 and 2.6-dev.

There are two main criticisms that I have.

First, in my opinion it is impolite to put text on top of the face of a portrait. I understand there was the problem to be solved with the floor container (and I think your placement is better), and probably some struggle with the script, and the face and text problem was secondary at that moment.
Perhaps it would be better to make some space for the portrait at the left amd put the text to the right of the portrait.

Second, it is way better to put the mod in user data folder as described here:
https://ufoai.org/forum/index.php/topic,8830.msg68466.html#msg68466
Of course, I changed that, and anyone else can also copy the files there.
But the mod worked both ways, and worked rather well.

It raised some other minor questions like:
Is anyone really using the 'reserve time units for crouch' feature?

Maybe I will continue this feedback post some day, maybe not.
At least now it is posted that you might need to remove the unnecessary files to make the mod work.
And it is quite a good and fully functional convenience mod for the battlescape.

Offline Norby

  • Rookie
  • ***
  • Posts: 43
    • View Profile
Re: Lazy HUD v2
« Reply #2 on: February 13, 2023, 03:49:39 am »
Wow, thanks for the reply. :)

I played under Linux together with the extra files without any problem. I do not tested under windows so thank you for the fix!

I used the "user data folder" (home dir) in linux, also thanks for the description how to use it under windows.

Yes, I like to use the  'reserve time units for crouch'.

Personally I liked the lookout of this HUD much more than others, this is why I started to improve it to fit for my needs, so big thanks for the original version. I learned a lot about HUD scripting during the improvement, it was a good and enjoyable programming experience. :)




Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Lazy HUD v2
« Reply #3 on: February 18, 2023, 05:48:14 am »
Yes, someone who is using Windows could have told you years ago.
Feedback can be kind of important that way.

For example, I found that it is possible that the HUD only shows 4 first soldiers in the soldier selection (finished the battle by only selecting soldiers on screen, no real drama). This happened in a battle where one of my soldiers got stunned and recovered. I do not remember if the stunned soldier was the 5-th soldier, he could have been. That is a rare occasion, a developer of a HUD might not get into this situation while playtesting, so people should let him know.

----------

And different opinions are always welcome. I do not understand why some people see differences as conflict. Maybe I am an autist or something?
In my case, opinions and criticisms might be good ideas, might help me to generate better ideas, or just help me to put my own opinion into context / perspective.
I felt like I was making a HUD that will be inferior to what it could have been with proper criticism and comments, and that was uninspiring. Also, I would learn less.

For example, I separated the buttons for clarity, but actually I liked it much more when you put them close together (less visual clutter).

If I had thought of not drawing the button borders at all, I most probably would have done different kind of icons and made all the buttons like you did with the settings and end turn button. I mean, at the moment the shape of reaction fire button is a square like every other button and you would need to look at the icon. But with no border and background the visible shape would have been a shield (the icon), and perhaps would have been easier to find without looking too much that way. So the player would look more at the battle and less at the buttons.

While trying H-Hour's HUD (Default HUD in 2.6-dev) I found it made sense to put the stun bar on top of the health bar (like reserved time units is on time units bar).

Maybe it would be better to show the full view of the selected soldier, perhaps at the left of the selected soldier details box (like at the left in 2.6-dev Default HUD, but smaller) and it could also double as a crouch / stand button. This way there would be no big portrait, but the special crouch button would also become unnecessary.

Just the heart would have been a much better icon for body wounds than trying to draw a body with a tiny heart in it, I feel a bit ridiculous for doing it the way I did. It looks like a bag with some fastener on it. Someone could have told me in the comments.

------------

And, also, as I experienced this week (trying out my own HUD and yours) that while I was scripting the HUD I was paying attention to what works as intended, but not really understanding what is the most convenient way to do things. This time I had a gameplay goal. I remembered I wanted to try specializing one base on workshops and another base on labs, but never did so back then. So, I was playing rather than playtesting.

I noticed that I never used the mouse wheel to change the fire mode and I never even looked at the fire mode text in the weapon box, I always chose the fire mode by clicking in the list that pops up at mouse-over. If you (and other people) also use the fire mode selection the same way, you could make (or, if you are not playing any more--you could have made) this button even smaller. Also, in my own HUD, I should have separated the fire modes in the fire mode list more clearly (H-Hour did something like this in his HUD).

I should have set reaction fire active when reaction fire mode is selected, like you did in your HUD. Obviously, that is what the user wants to do most of the time.

I should have made the containers that have nothing in them (like an empty left hand container) not pop up at mouse-over. Or, if that is not possible, perhaps I should have made them always visible. Sometimes I wanted to select a soldier at the edge of the screen, just to find out that the previously invisible empty off-hand container pops up on top of it.

I should have made a button in the fire modes list that would let the user shoot even if there are not enough time units because some are reserved for reaction fire (probably with exclamation mark icon). So the user could cancel the reaction fire and shoot without going back and forth between fire modes and the reaction fire button.

---------

In your HUD, I would have liked to look at fire mode list even if there were not enough TU to shoot, though. Also, I saw you only updated fire modes at mouse over, but not at soldier select. Was there some complication?

Up and down arrows on keyboard did not change level in 2.6-dev. They do work in Default HUD, perhaps it could be copy-paste from there.

I could not get the transparent-background stat and inventory windows to work. In 2.6-dev the result was stats and inventory window like in Default HUD but somehow without the wounds data (so wounds are only visible in the selected soldier box).

Is there a convenient way to reserve time units for using headgear?

-----------

I cannot remember any other comments right now.
In what state is the lazy hud version 2 at the moment? Are you still playing / changing it?
Or maybe some day some archaeologist finds this game and this mod and the comments might have a potential to be useful.
« Last Edit: February 18, 2023, 10:25:24 am by homunculus »

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Lazy HUD v2
« Reply #4 on: February 21, 2023, 02:57:48 pm »
I don't know, maybe I will reorganize this stuff.

A lot of it is psychology and would rather belong in the offtopic section. Maybe I will reorganize this stuff some time in the future, but no promises.

You liked the scripting, you wrote?
What about LUA, to my knowledge at least, although being very old, is being accepted by the most religious informatics gurus. Like in JavaScript you can create new dialects, in Lua you can create new ... I don't know, my experience with LUA is more than zero but limited ... if I understand correctly, new languages.

So, there is some non-zero level of initiative that I could develop my Lazy HUD again some day because of the LUA, no promises.

If you understand correctly, we have different priorities, as far as I understand. You want minimalism, I want less clicks.

I have nothing against minimalism, for example:
Pressing Esc twice also changes music.
Pressing Esc once opens the menu. So, the menu button is also kind of unnecessary. Both could be just in the tooltip of the end turn button.

Offline Norby

  • Rookie
  • ***
  • Posts: 43
    • View Profile
Re: Lazy HUD v2
« Reply #5 on: February 22, 2023, 12:52:25 am »
Well, I am not playing it at the moment and not planning to change it further. Your opinions are good, make it if you want and feel free to publish it as v3. :)