Crus8r
Chieftain
- Joined
- Feb 4, 2015
- Messages
- 56
If the worker you previously captured from barbs or stole from a CS or AI civ is later captured by a barb (or an enemy) and recaptured again by you, you get the "keep or return" option.
I'm not aware of any way to rename workers (ordinarily you can only rename units when prompted to choose a promotion for that unit).
There is a way to add that functionality to the UI, but it requires adding a few lines of code to one of the game files... I find it really handy, personally, and well worth the effort, but it might be a bit daunting for some folks...
REMEMBER TO ALWAYS BACKUP FILES BEFORE EDITING THEM!!!
1. Open the UnitPanel.lua file in ..\Civilization V\Assets\DLC\Expansion2\UI\InGame\WorldView folder (for BNW)
2. Scroll down to this section:
Spoiler :
Code:
--------------------------------------------------------------------------------
-- Unit Name clicked event handler
--------------------------------------------------------------------------------
function OnUnitNameClicked()
-- go to this unit
UI.LookAtSelectionPlot(0);
end
Controls.UnitNameButton:RegisterCallback( Mouse.eLClick, OnUnitNameClicked );
Controls.UnitPortraitButton:RegisterCallback( Mouse.eLClick, OnUnitNameClicked );
function OnUnitRClicked()
local unit = UI.GetHeadSelectedUnit();
if unit then
-- search by name
local searchString = Locale.ConvertTextKey( unit:GetNameKey() );
Events.SearchForPediaEntry( searchString );
end
end
Controls.UnitPortraitButton:RegisterCallback( Mouse.eRClick, OnUnitRClicked );
--------------------------------------------------------------------------------
-- InfoPane is now dirty.
--------------------------------------------------------------------------------
Code:
function OnUnitNameRClicked()
-- rename this unit
OnEditNameClick();
end
Controls.UnitNameButton:RegisterCallback( Mouse.eRClick, OnUnitNameRClicked );
4. The section should look like this after you paste:
Spoiler :
Code:
--------------------------------------------------------------------------------
-- Unit Name clicked event handler
--------------------------------------------------------------------------------
function OnUnitNameClicked()
-- go to this unit
UI.LookAtSelectionPlot(0);
end
Controls.UnitNameButton:RegisterCallback( Mouse.eLClick, OnUnitNameClicked );
Controls.UnitPortraitButton:RegisterCallback( Mouse.eLClick, OnUnitNameClicked );
function OnUnitNameRClicked()
-- rename this unit
OnEditNameClick();
end
Controls.UnitNameButton:RegisterCallback( Mouse.eRClick, OnUnitNameRClicked );
function OnUnitRClicked()
local unit = UI.GetHeadSelectedUnit();
if unit then
-- search by name
local searchString = Locale.ConvertTextKey( unit:GetNameKey() );
Events.SearchForPediaEntry( searchString );
end
end
Controls.UnitPortraitButton:RegisterCallback( Mouse.eRClick, OnUnitRClicked );
--------------------------------------------------------------------------------
-- InfoPane is now dirty.
--------------------------------------------------------------------------------
(If anything goes wrong, just overwrite the modded file with the backup you made before you started...)
Now you can rename units by selecting them and then right-clicking on their name in the interface
Crus8r