General > User modifications

Lazy battlescape HUD

(1/7) > >>

homunculus:
This is a UFO:AI battlescape HUD that attempts to reduce the required clicking.
This makes it a convenience mod, not a gameplay mod.

Started out as an attempt to popularize mouse wheel use, but found several other ways to make the HUD more convenient, like using the weapon container as a button for shooting rather than having a small button to open the firemode list.

Main features are:

1) The rather large weapon box is used as a button for shooting (right click for shooting, left mouse button for dragging the weapon to another container or floor).
A menu of firemodes pops up when mouse hovers over weapon hand, and the firemodes in the menu can also be clicked with both mouse buttons to shoot.
Alternatively, firemode selection can be changed by mouse wheel.

2) Putting a grenade in hand is as simple as dragging the grenade from belt to hand container (without opening inventory popup, and afterwards closing it).
In the attached screenshot the secondary hand is not visible right now (because the hand is empty), but it will get highlighted when you start dragging.
I think this is a great improvement, as otherwise the inconvenience of opening the inventory popup has often been enough to make me decide in favor of shooting where using a grenade would have been more appropriate.

Also, reaction fire button displays more info (TU of the selected firemode in button label and firemode info in tooltip), option to highlight tiles that are reachable for a soldier, selected soldier panel displays wounds as little bars in main screen in 2.5-dev version, etc.

The 'readme.txt' and 'lazy.bat' are no longer included in the .zip.
Because "it is just a mod" and there are probably many (and possibly more correct) ways of enabling it.
My instructions are as follows:
--- Quote ---the way i use this (ufo:ai battle screen hud mod) on windows xp:
extract (unpack) into userdata folder (folder 'mods' should appear next to the 'base' there):

C:\Documents and Settings\<user name>\Application Data\UFOAI\2.4\mods
(for 2.5, it would be C:\Documents and Settings\<user name>\Application Data\UFOAI\2.5-dev\mods)

and run the game (from where you installed the game) as:
ufo +set fs_gamedir mods
me being lazy enough i certainly don't type it in command prompt, but i have 'lazy.bat' in the folder where i installed the game (same folder where 'ufo.exe' is), and i use a desktop shortcut to the bat.

there are probably other ways to enable the mod, this is just what i did.

summary:
1. unpack in userdata folder
2. create lazy.bat in the folder where the game is installed.
lazy.bat contains one line: ufo +set fs_gamedir mods
3. create shortcut to lazy.bat
4. change icon of lazy.bat shortcut (if you wish) and drag the shortcut to desktop
5. 'lazy hud' should now appear in hud selection in gameplay options.
--- End quote ---
I hope this is clear, at least it looks clear to me (but I am the one who wrote it, so that doesn't mean much).
You can ask questions if something is not clear.
And I am interested in feedback, especially about things that people don't like about this HUD (because the only person I have got criticism from so far is myself).

----------
EDIT year 2023: The lazy2.5-dev worked with some early dev version of 2.5, and I don't remember which version. I was not here when the release version of 2.5 became available, and it does not work with the release version of 2.5.
The lazy2.4 still works with 2.4, though.

Also, if you want to do things more nicely, you might want to put it in a separate folder in mods, as explained here:
https://ufoai.org/forum/index.php/topic,8830.msg68466.html#msg68466

MCR:
1.1, 1.2 very good idea
1.3 should be standard for all battlescape HUDs, right click could reload the weapon
1.4 good idea also
1.5 visually better than using just a string

2.1 I am not sure if I like that one, but I see your point.
2.2 2.1 implies that
2.3 it would be enough to drop it anywhere outside the weapon and belt/holster zones

3.1 also a good idea, some kind of visual level indication is nice to have
3.2 I am not sure how this would end up as it is important to see the main soldier stats of all the soldiers at one glance
3.3 the player should have more control over this one, but currently the code just allows to switch to the next visible alien or the next visible alien from the selected character, so this needs some C code to work
3.4 for consistency...

4.1 I agree (as you know).
4.2 should already be possible (OnMouseEnter, OnMouseLeave script commands)

The biggest problem you will face is the implementation of this - it looks like a LOT of work ;)

If you ask me: GO FOR IT !

You have proven already that you have great ideas regarding the UI, time to implement them :)
If you have troubles with something just ask. Someone always can help you. You could also join our IRC channel...

homunculus:

--- Quote from: MCR on December 23, 2011, 05:01:38 pm ---The biggest problem you will face is the implementation of this - it looks like a LOT of work ;)
--- End quote ---
Well, I like to work intensely, or not at all.
I hope it will be done in a few days.
--- Quote from: MCR on December 23, 2011, 05:01:38 pm ---If you have troubles with something just ask. Someone always can help you. You could also join our IRC channel...

--- End quote ---
No experience at IRC, but as for troubles with scripting, I certainly have some : )
I think I should concentrate on the firemode selection and shooting, that seems to be "the greatest learning barrier", before I do anything else.

2011/12/23 20:24:20 [cmd] add_hud_name
2011/12/23 20:24:20 ^2      Confunc callback
2011/12/23 20:24:20 [cmd] disable_crouch
2011/12/23 20:24:20 ^2      Confunc callback
2011/12/23 20:24:20 [cmd] disable_stand
2011/12/23 20:24:20 ^2      Confunc callback

'add_hud_name' is what is called from within the HUD from within 'func onScriptLoaded', but the other two examples look like the game might call those functions, and that would mean those functions should be implemented in the HUD, so that the HUD could, say, set the 'crouch' button to 'disabled' when the game calls 'disable_crouch'.
Now I am wondering what is the meaning of 'Confunc callback'.

And, how do I know what parameters the 'cmd' things want?

bayo:
I am sorry, i mostly understand nothing, else generalities.
I think you should create a more precise mockup before coding anything. Especially with a real screen size of 800x600.

homunculus:

--- Quote from: bayo on December 23, 2011, 11:11:37 pm ---I am sorry, i mostly understand nothing, else generalities.

--- End quote ---
?
Right now I have been digging into the cvar-s and cmd-s that I got from the cvarlist and cmdlist in the console, to see what is available.
That is where the questions about the meaning of 'Confunc callback' and 'cmd' arguments (like cmd "hud_fireweapon r 0;") came from.
Like trying to learn to cooperate with the framework rather than becoming a victim of the framework and the examples (bit too dramatically said, perhaps, but something in that direction).

Navigation

[0] Message Index

[#] Next page

Go to full version