[MODCOMP] MFinance: Financial Advisor

Melinko

Reverend
Joined
May 11, 2006
Messages
131
Location
Home
Took a day off, and wrote a quick Financial Advisor Screen. I have three categories (Commerce, Income, and Expenses), and each has at least three things under them. I tried to write it as clearly as I could for further editing, and to making adding new information under the category easy, all you have to do is add 2 parts (which are clearly commented).

To open the screen I gave two options, one is Shift + F, and the other is a button of a money sign in the top left (Right beside the diplomacy button). Neither are over ridding anything else that I know of so I am hoping those key bindings should work. :)

There is an Dll file that comes with it, but it is only required for the Total Cost of Improvements using the function explained below. If you take the Dll file out then it will still work, but it will use the iCost in CIV4BuildInfos. If you modify the cost in SDK without the Dll it will not see that as getBuildCost is not ran. But just to be clear.. the Dll is not required, but is only for that extra functionality.

I exposed getBuildCost(CyPlot* pPlot, int /*FeatureTypes*/ eFeature) to python. Basicly it gives you the cost of building an improvement on that plot, and all you have to give it is a Plot Object, and a integer BuildType. For example, in CIV4BuildInfos, BUILD_FARM is 1.

I added this because getBuildCost takes all the modifiers and then computes the total with the modifiers. This will help if you want to change the cost in SDK, because of some modifier, or in some way don't want it to be the same as the CIV4BuildInfos.

It is a modcomp, and not meant for play by itself, but if you do, hope you enjoy it. :goodjob:

Download: MFinance: The Advisor Screen
 
The first one is displaying the button in the main screen that will lead you to the financial advisor screen.

The second one is the financial advisor screen.
 

Attachments

  • Financial Button.JPG
    Financial Button.JPG
    94.1 KB · Views: 411
  • Financial Advisor Screen.JPG
    Financial Advisor Screen.JPG
    102.1 KB · Views: 566
:thumbsup:

Here are some things you could add:

Total gold given to king
Total gold spent (and on resources/ships/units).
Average gold income per turn.
Average population increase per turn.
 
The advisor button should be on the right with the other advisors. Left is given over to system utilities. :)
 
:thumbsup:

Here are some things you could add:

Total gold given to king
Total gold spent (and on resources/ships/units).
Average gold income per turn.
Average population increase per turn.

Thanks! Will look into those I like the gold given to king, and Gold income/spent per turn. :goodjob:

Cool idea! :) You could add a % sign to the taxrate though, just 3 by itself looks a little strange.

Also, nice work on the currency button, it looks clean and professional. :goodjob:

About that % it would be the only one with anything behind it like that... but :) I will take a look at it when I get home.

To add it...

Code:
Change the line -
dExpenses["TXT_KEY_FINANCIAL_ADVISOR_CURRENT_TAX"] = gc.getActivePlayer().getTaxRate()

To-
dExpenses["TXT_KEY_FINANCIAL_ADVISOR_CURRENT_TAX"] = str(gc.getActivePlayer().getTaxRate()) + " %"

A little bird suggested to me that I fold my loan system into this... I think that little bird had some good advice ;)

That is a really awesome little bird ;) prob real smart too LOL j/k (Any questions let me know but I think most of it is pretty self-explanatory :)

The advisor button should be on the right with the other advisors. Left is given over to system utilities. :)

Was worried about this mass clutter of buttons on the right when I get home this will be something else I check into, but it sometimes seems just a new button wherever ya add it is kinda wierd to get use to at first :)
 
Oooo, nice, I love new screens. :goodjob:

The only problem with putting the Main Interface Button on the right, is that the right is already full. I ran into this same problem with my JTradeRoutes mod.
 
A second row? Tack it onto the domestic advisor? There's a number of routes.

I just like consistency. :)
 
A second row? Tack it onto the domestic advisor? There's a number of routes.

I just like consistency. :)

What I mean is under the first row of buttons, between the Domestic Advisor and Europe pictures. (There is a little space between the bottom of them about the size of the top of a button, that looks like prime land for expansion) ;)

If I tack it to the domestic advisor, I am afraid it would be harder to get to it, and be a pain to look up. I just wanted a quick easy way to get info on your finances.

And nothin' wrong with consistency, I am just trying to nail down where would be the best other place for it :)

how do you install this?
You download the zip, and extract it. You should get a folder with stuff in it. In your colonization folder there should be a Mods directory.. If there isn't you may have to add one. Just move the folder into that directory.

In game just load a mod like you normally would.
 
i like this alot, is there anyway to put it in the game so it plays by default, so it will work with other mods? or is that not possible?
 
i like this alot, is there anyway to put it in the game so it plays by default, so it will work with other mods? or is that not possible?

The only way to play by default is to run the exe shortcut with the mod loaded automatically (I think I included one in there if not let me know I will be sure to get it in there).

But to include this in other mods yes.. but if they have the same changed Python files you will need to put them together, or if they have a .dll you will need to either combine them, or just not use the SDK part of the mod (Just take out the .Dll that is in there, or replace it with the one you want to use) and it should still work.

If you run into any problems feel free to ask, but I hope that answers your question on combining. :goodjob:
 
One thing I did kinda of notice is some of the improvements people suggest, are changes I would have to make in SDK. I am really hoping to keep this a python mod with SDK as an option so might be a little slow in adding any SDK changes.

Got a little busy with Mtech today, but will update very soon with that % thing that was brought up, and Dale's OCD button mod LOL :joke:
 
Hello,

I am unable to access the financial advisor by using Shift+F, and the icon is unavailable as show in the attached PrintScreen.

Can you fix this issue?

Thank you
 

Attachments

  • civ.JPG
    civ.JPG
    344.2 KB · Views: 86
Back
Top Bottom