Jamesds
Great Scientist
I've never really delved into Civ modding before, but in the interest of learning more about the game mechanics I've been exploring the Assets folder and checking out some of the Lua files. I've never learned Lua before, but it's similar to other languages I know so I'm fine with reading through it.
I was interested in the mechanics behind unit maintenace costs, so I checked out the Economics Advisor UI script file and found a call to pPlayer.CalculateUnitCosts() where it puts that value in the expenses part of the sidebar.
Assets\UI\InGame\Popups\EconomicOverview.lua: Line 279, Col 64:
It sounds like that function would explain to me everything I'm wanting to know. However, I can't find this function in the Assets folder with a simple search. Is this function, and the player class (I presume) it belongs to part of the SDK, or is it lying around somewhere for me to check it out sooner? Might it be in the SDK DLL, and if so, how should I go about reading that?
Thanks in advance!
I was interested in the mechanics behind unit maintenace costs, so I checked out the Economics Advisor UI script file and found a call to pPlayer.CalculateUnitCosts() where it puts that value in the expenses part of the sidebar.
Assets\UI\InGame\Popups\EconomicOverview.lua: Line 279, Col 64:
Code:
Controls.UnitExpenseValue:SetText( Locale.ToNumber( pPlayer:CalculateUnitCost() , "#.##" ) );
It sounds like that function would explain to me everything I'm wanting to know. However, I can't find this function in the Assets folder with a simple search. Is this function, and the player class (I presume) it belongs to part of the SDK, or is it lying around somewhere for me to check it out sooner? Might it be in the SDK DLL, and if so, how should I go about reading that?
Thanks in advance!