| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Great Scientist
|
Where can I find the code for this function?
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: Code:
Controls.UnitExpenseValue:SetText( Locale.ToNumber( pPlayer:CalculateUnitCost() , "#.##" ) ); Thanks in advance!
__________________
"You don't stop laughing when you grow old, you grow old because you stop laughing" - M Pritchard Economic Left/Right: -1.38 || Social Libertarian/Authoritarian: 2.10 |
|
|
|
|
|
#2 |
|
Great Scientist
|
![]() Please don't all rush to answer, you might crash the forum again .
__________________
"You don't stop laughing when you grow old, you grow old because you stop laughing" - M Pritchard Economic Left/Right: -1.38 || Social Libertarian/Authoritarian: 2.10 |
|
|
|
|
|
#3 |
|
Chieftain
Join Date: Sep 2010
Posts: 10
|
I think all the pPlayer stuff is in the DLL, so you're going to have to wait for the SDK to come out.
|
|
|
|
|
|
#4 | |
|
Great Scientist
|
Quote:
__________________
"You don't stop laughing when you grow old, you grow old because you stop laughing" - M Pritchard Economic Left/Right: -1.38 || Social Libertarian/Authoritarian: 2.10 |
|
|
|
|
|
|
#5 |
|
You caught my attention
Join Date: Dec 2001
Location: The Matrix
Posts: 1,381
|
As far as I can see then it is a call to the DLL and since the SDK hasn't been released yet there is no telling exactly what it does.
__________________
CyberChrist |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|