Small UI mods - how difficult?

Everything about mods can be found here.

Moderator: Morax

Small UI mods - how difficult?

Postby Fernest » 11 Jun 2014, 07:01

I'd like to write some small UI mods for FAF, which are supposed to decrease Micro.
But I'm not sure if the following (separate UI mods) would be easy or difficult to implement, given that I know similar languages to Lua, but have no experience with the FA libraries.
Could someone, who has experience assess this tasks (just an "easy" or "hard" would help me a lot)

1: New Hotkey: Repair in selection.
Press a key and all the engineers (or generally build units) in the selection get repair commands on all damaged units in the selection.

2: New Hotkey: Repair damaged aircrafts.
Press a key and all selected aircrafts, which are damaged (e.g. <90% health) are ordered to refuel.
Possible Extension: The refuel command is inserted in front of the current command (e.g. damaged ASFs, which are on patrol are sent to repair and then to their patrol again). If no current command exists the refuel is inserted in front of a move command to the current location. (Landed bombers/gunships get repair and return to their current location)

3: Timed Function: Idle patrolling engineers, which have not reclaimed for e.g. 30 seconds
Every 10 seconds a counter for every patrolling engineer is increased. It is reseted by reclaiming. If the counter is >=3 the engineer gets a stop command.

4: New Behavior/Trigger: Randomize patrol for new, patrolling engineers.
If a factory has a patrol queue and has built an engineer, this engineer gets one random patrol-waypoint of this queue as his first waypoint. (Factories which built many engineers for reclaiming purposes won't clump them together on one spot, but spread them out -> Less clusters of engineers, who run around together and try to reclaim the same object, but block each other)

5: New Behavior/Trigger: Load unit into transport after production
If one or more transports assist a factory and the waypoint of that factory is e.g. less than 50 meters away from that factory one transporter gets the command to load the unit, if it is capable to load it (but it does not deliver it). I think this reduces the needed micro for drops. Especially if several factories and many transports are involved.
(I now this has the risk of loosing loaded, waiting transports to ASF fly by. Still, I think this is handy.)

6: New Behavior: Kennel and Shoulder-Drones reclaim on patrol.
Like every other unit with a build-rate.

7: Bug?-Fix: Kennel-Drones assisting Shoulder-Drones help building stuff (instead of just following the shoulder drone)
Like they do, if they assist an engineer/acu/sacu.

8: New Trigger: Play a sound once, if an engineer/ACU becomes idle.
Both should never be idle, but rather building, reclaiming or assisting stuff or just patrolling around to fool bombers.
In combination with stop-patrol-if-no-reclaim you could get some feedback, when an area is fully reclaimed.
(Why sound? I think the current visual feedback is overwhelming as it is and because I would not want to dive into FA's UI framework in the beginning)

9: New Trigger: Add new unit to control group of the factory.
Select one or more factories and assign it to a control group -> Every new unit gets added to that control group.
(Select all ASF factories to control group 1 -> all built ASFs can be controlled with 1)

10A: I don't even know if the engine allows this: Assisting markers.
Add an annotated/persistent marker to the map (these labels/markers/captions you put on the map. I forgot the name). If the marker (which would be treated like a unit) is selected, you can give it commands e.g. a queue of patrol points.
If units or factories assist this marker, all current and new built units get a move command to the marker and get e.g. the patrol queue as their new command.
This way you could do stuff like this: Create a patrol marker and its waypoints. Assist it with a factory -> new units start patrolling that route. Build more factories, assist that marker again, they patrol all the same. Enemy attacks, divert half the ASFs, when done just let them assist the marker again -> They start patrolling again.

10B: More advanced version: All units that assist the marker are stored. If the marker waypoints get updated all existing units get their commands updated. (e.g. Extending patrol territory of your northern air-force)

10C: Even more advanced: The marker itself can be moved. (Maybe by copying and deleting the old one, if a new one with the same name (and same owner) gets created) Thus you can do more abstract stuff like this: Set Marker e.g. "E" (Eastern Front) assist it by factories and your current army. If the war progresses you move it further into enemy territory. The existing army and future units move to the new desired location.

10D: Even more: If an allied player assists the marker the ownership of the current/new unit gets transfered to the creator of the marker. These transfered units are treated like before (adapting marker's commands and such).
e.g. designated air-guy needs more ASFs in the east. You take half your air force and two of your air facs and assist his defensive marker. You help him, you even pay for the units, but he can micromanage it himself.

Any ideas how hard it will be to implement?
Fernest
Crusader
 
Posts: 25
Joined: 09 Dec 2013, 22:19
Has liked: 0 time
Been liked: 0 time
FAF User Name: Fernest

Re: Small UI mods - how difficult?

Postby Zock » 11 Jun 2014, 10:54

3: Timed Function: Idle patrolling engineers, which have not reclaimed for e.g. 30 seconds
Every 10 seconds a counter for every patrolling engineer is increased. It is reseted by reclaiming. If the counter is >=3 the engineer gets a stop command.


Atackmove does that


5: New Behavior/Trigger: Load unit into transport after production
If one or more transports assist a factory and the waypoint of that factory is e.g. less than 50 meters away from that factory one transporter gets the command to load the unit, if it is capable to load it (but it does not deliver it). I think this reduces the needed micro for drops. Especially if several factories and many transports are involved.
(I now this has the risk of loosing loaded, waiting transports to ASF fly by. Still, I think this is handy.)


Transports already do that, except that they will deliver the units. I don't think you can overwrite that with a different behaviour.


9: New Trigger: Add new unit to control group of the factory.
Select one or more factories and assign it to a control group -> Every new unit gets added to that control group.
(Select all ASF factories to control group 1 -> all built ASFs can be controlled with 1)


It already works like this!
gg no re

ohh! what a pretty shining link! https://www.youtube.com/c/Zockyzock
User avatar
Zock
Supreme Commander
 
Posts: 1395
Joined: 31 Aug 2011, 22:44
Has liked: 173 times
Been liked: 397 times
FAF User Name: Zock

Re: Small UI mods - how difficult?

Postby Fernest » 11 Jun 2014, 17:15

Atackmove does that

I know. It makes sense in combination with the " Randomize patrol for new, patrolling engineers" .
Thus you have two different behaviors when you mass produce engis for reclaim purposes:
Attack-Move: Default reclaim along the given path.
Patrol: Spread engis around to reclaim stuff in a broader area with reduced danger of clustering. The stop-patrol makes them idle, thus you know when they are done reclaiming (if they are not stopped they start running in circles).

Transports already do that, except that they will deliver the units.

Which is the dangerous and the bad part about it.

It already works like this!

Could you explain how you do that? Is it some special hotkey?
If I assign a fac to control group 1 (ctrl + 1), I get only the fac, if I press 1. If it produces some units, they are not selected by pressing 1 at any time.
Fernest
Crusader
 
Posts: 25
Joined: 09 Dec 2013, 22:19
Has liked: 0 time
Been liked: 0 time
FAF User Name: Fernest

Re: Small UI mods - how difficult?

Postby Zock » 11 Jun 2014, 17:34

No, it works exactly as you describe it. See here, even the unit in production already gets the 1 hotkey:

http://i.imgur.com/oQTlwsr.jpg
gg no re

ohh! what a pretty shining link! https://www.youtube.com/c/Zockyzock
User avatar
Zock
Supreme Commander
 
Posts: 1395
Joined: 31 Aug 2011, 22:44
Has liked: 173 times
Been liked: 397 times
FAF User Name: Zock

Re: Small UI mods - how difficult?

Postby Sheeo » 11 Jun 2014, 17:50

It's all possible, and a lot of the things you describe are actually already in the game.

Difficulty is a subjective matter. I can't tell you how difficult it'll be for you to implement it, sorry.
Support FAF on patreon: https://www.patreon.com/faf?ty=h

Peek at our continued development on github: https://github.com/FAForever
Sheeo
Councillor - Administrative
 
Posts: 1038
Joined: 17 Dec 2013, 18:57
Has liked: 109 times
Been liked: 233 times
FAF User Name: Sheeo

Re: Small UI mods - how difficult?

Postby Fernest » 11 Jun 2014, 19:15

Zock wrote:No, it works exactly as you describe it. See here, even the unit in production already gets the 1 hotkey:
http://i.imgur.com/oQTlwsr.jpg


You are 100% right. I can't even replicate it in a way so it does _not_ work.
I must've been drunk or something, when I tried to do it.
Fernest
Crusader
 
Posts: 25
Joined: 09 Dec 2013, 22:19
Has liked: 0 time
Been liked: 0 time
FAF User Name: Fernest

Re: Small UI mods - how difficult?

Postby Crotalus » 12 Jun 2014, 10:53

A general rule is UI mods cannot give commands that requires a target unit/location like move, patrol, attack, repair to units, only "instant" commands like stop, pause, upgrade, factory build, dive etc.

The following are impossible in my view: 1, 4, 5, 6, 7, 10

Rest is probably doable, how easy / hard it is depends on who tries to make the mod.
Crotalus
Priest
 
Posts: 319
Joined: 27 Jan 2013, 20:37
Has liked: 2 times
Been liked: 102 times
FAF User Name: Crotalus

Re: Small UI mods - how difficult?

Postby Domino » 22 Jun 2014, 11:35

all commands are possible from the UI you just have to know how to impliment them. :)
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest