[UI MOD] Light Touch: Worker Automation, Unit Control Functionality

It works fine when i start a new game with the mod, but when i load a saved game (the previously working one) the mod doesn't work anymore. I right click a worker on a city and no menu pops up asking which automation i want them to do.
 
It works fine when i start a new game with the mod, but when i load a saved game (the previously working one) the mod doesn't work anymore. I right click a worker on a city and no menu pops up asking which automation i want them to do.

I would guess that you are loading game from the main menu. Are you sure that you have went to "Mods" under main menu before loading the game?
 
is the mod compatable with Unofficial Patch and Vanilla Enhanced? In my game workers stop working when enemy is near but right clicking on city does bring up automate menu.

What do I have to edit to start game with right click fortify option off?
 
is the mod compatable with Unofficial Patch and Vanilla Enhanced? In my game workers stop working when enemy is near but right clicking on city does bring up automate menu.

What do I have to edit to start game with right click fortify option off?

You can turn the right-click-fortify off in the Options menu in Diplo Corner, then it will be off for the rest of the game. Is there some specific reason why you want it off at the start?

The mod used to be compatible with Unofficial Patch when it combined the two. I don't know about now, I'll need to take a look.

Workers would stop working if some other mod modifies UnitPanel.lua, but that would be the only negative effect.
 
You can turn the right-click-fortify off in the Options menu in Diplo Corner, then it will be off for the rest of the game. Is there some specific reason why you want it off at the start?

I know I can turn it off, I just want it to be off when I start a game.

I just checked Unofficial Patch and Vanilla Enhanced. It does modify UnitPanel.lua.
 
I know I can turn it off, I just want it to be off when I start a game.

I just checked Unofficial Patch and Vanilla Enhanced. It does modify UnitPanel.lua.

Alright, to change a default option you have to go to GlobalProperties.lua, and modify it like this:

Code:
function LoadPropertiesOnStartup()
	...
	g_LTO_AlertFortify 		= g_LTO_AlertFortify or (g_LTO_AlertFortify==nil and [COLOR="Red"]false[/COLOR]); -- before this was set to true
        ...
end

Also, thanks for checking Thal's Patch. You need to add a single line to his (or anyone's) version of UnitPanel.lua to allow workers to continue work when enemy is near:

Open his CiVUP - Civ V Unofficial Patch\Core\Misc UI\UnitPanel.lua, search for function OnUnitActionClicked, add a single line of code to it to it so it looks like:
Code:
function OnUnitActionClicked( action )
    if bOkayToProcess then
		if (GameInfoActions[action].SubType == ActionSubTypes.ACTIONSUBTYPE_PROMOTION) then
			Events.AudioPlay2DSound("AS2D_INTERFACE_UNIT_PROMOTION");	
		end
		Game.HandleAction( action );
[COLOR="Red"]		--XX LightTouch mod XX
		LuaEvents.UnitActionButtonClicked( action );
		--XX LightTouch mod END XX[/COLOR]
    end
end
 
Open his CiVUP - Civ V Unofficial Patch\Core\Misc UI\UnitPanel.lua, search for function OnUnitActionClicked, add a single line of code

Now workers dont stop when enemy is near but they perform action at beginning of turn no matter what is ticked in options.
 
Now workers dont stop when enemy is near but they perform action at beginning of turn no matter what is ticked in options.

There seems to be a bug that that the option of whether to do action at beginning or end of turn doesn't work sometimes and all units make their move at the beginning of turn regardless. I will look into it.

Does it happen only to workers or military units as well?
 
Hi dear civ fanatics :)

I'm back after a long period of time that I was busy with other commitments and didn't have time to play or mod civ 5. I'm back for now, and will do my best to keep LightTouch up to date. The new updated version is attached to the OP. It's now compatible with latest patches of both Vanilla and Gods and Kings.

The bug with units moving at the beginning of turn seems to persist, and has to do with the way the end-of-turn condition is identified by the game engine.

Please, report any bugs and enjoy the mod.
 
When I select a worker and right click a city, my worker moves towards that city.

EDIT: I found out why this is, I was launching the game from the main menu, not via the mods dialogue.

However now I have Light Touch working, it's preventing me from swapping units.

Any ideas?
 
When I select a worker and right click a city, my worker moves towards that city.

EDIT: I found out why this is, I was launching the game from the main menu, not via the mods dialogue.

However now I have Light Touch working, it's preventing me from swapping units.

Any ideas?

Swapping units doesn't work with LightTouch it seems. I will try to fix it.
 
Thanks Redox :)
 
Top Bottom