A "Better" Domestic Advisor ?

homegrown

Missionary of Sorenism
Joined
Jan 5, 2002
Messages
203
Location
Houston TX
OK, I've taken the plunge and with little more than Gingerbreads "Learn Python" thread, I've been able to make some improvements to the Domestic Advisor in the game.

Here is a screenshot of the advisor that ships with the game.



The column headings are: Date founded (capital?), City Name, Population, Happiness, Unhappiness, Angry, Food produced, Healthy, Unhealthy, Food eaten, Hammers, Gold, Science, Culture, Total Culture, Great People, Total Great People, Producing

List of Changes

1. Removed the Capital Star from the Date
2. Add a Religions column
3. Add a City Garrison column
4. Combine Happy/Unhappy/Angry into "Net Happiness"
5. Combine Food produced/eaten into "Food Turns until Growth"
6. Combine Healthy/Unhealthy into "Net Healthiness"
7. Add City Maintenance Cost
8. Add Turns til Production Complete
9. Institute Landmarks

Landmarks are to visually represent which cities contain special buildings or special situations. Examples are Versaille/Forbidden Palace, National Wonders, Power Plants, Revolt, Occupation.

In the release version, there are still some functions that we can't directly access (or at least I can't) with python yet, but in the future Landmarks will designate whether a city is having We Love the King Day. Other suggestions I've heard were to show World Wonders that allow or create their own unit, airports, courthouses...

Screenshot of the Improved Version



Column Headings:

Date founded, City Name (with landmarks), Religions, Population, City Garrison Strength, Net Happiness, Food Turns to Growth, Net Health, Hammers, Gold, City Maintenance, Science, Culture, Total Culture, Great People, Total Great People, Producing, Turns to Production Complete.

In the Landmarks section, The Gold Star is Capital, Silver Star is Versaille/Forbidden Palace, the Bullet is a National Wonder (limit 2), Power, Occupation and Occupation Timer.

You can get the mod here. Unzip it into your "My Documents/My Games/Civ 4/" folder or whereever you are saving your games via /ALT.

Issues: Might cause an unhandled python exception if you should lose a city to barbarians at some point, but should still display correctly.

Bug reports and comments/suggestions are welcome.

Enjoy
Homegrown

edited to reflect changes since initial posting

edited 26 Dec, 2005 with v.1.52 compatible files, see post #117

Download:

Domestic Advisor v.1.52 | Clock Mod v.1.52
 
Ahh u can never get to much of info and statistics!!!!
Im gonna try this (that is once i get the game:mischief: ).
:goodjob:
 
This is great!

Can you mod the other 2 advisors like foreign and military, too?
They are so damn bad... there shoult be more transparancy!

I really miss how many units i can handle until i have to pay money for them on the military advisor screen or even better on the mainscreen near the money on the top left...
also the tech points i generate at the moment...

something like this:
top left should stay -> number of all units now (green until you break the linit than red)/units for free(yellow) -> 22/12
and
top left should also stay -> number of techpoints i generate -> 312 (blue)


Is it possible to realize?
 
BaalRoG said:
Is it possible to realize?

I was thinking of looking at the Finance Advisor next, but still really unsure how I want to go with it. It looks like all the commerce stuff is exposed, so it's just a matter of deciding what information to show and finding a place on the interface to stick it.
 
i dont understand why they didnt break down all the informations which pop up on the finance advisor after going over with the mouse cursor...

it would be much nicer to see the infos directly... maybe with placeholders after the right costs-section...example:

unit costs -> 4
|-> Units free (12) -> 3
|-> blabla -> 1
-------------------
inflation costs -> 5
|-> blabla -> #
|-> blabla -> #
-------------------
and so on...
===============
Total costs


Its only an idea, but the financial advisor now really nervs a lot...

Another missing function is the military advisor screen which misses the "upgrade units" button... or did i oversee it?
 
that is a very nice mod. As soon as the game is installed (if it ever is installed), I'm downloading. congrats on such a good mod
 
This looks spectacular. I think I'll wait until the city names are clickable before I give it a shot though. Great work!
 
Nice changes. That way, there's a lot more useful info given on just one screen. :)

BTW, is this the same "homegrown" on the old Impressions' city-builder forums?
 
Ogedei_the_Mad said:
BTW, is this the same "homegrown" on the old Impressions' city-builder forums?

Yes, that's me.

I worked on sorting more today. It's *almost* there, but not quite.
 
Wow! Great work Homegrown! Your setup looks much better. As soon as you get it to sort and link I'll be all over it! Once I get the game that is... (stupid midterms!)
 
Maybe if I explain what the issue is with sorting, someone might have some ideas. It *does* sort, but instead of sorting by integer values, it is sorting by string values. So one list might go ['1','13','16','2','22','3','31','4']. However, most of the time, it does print a coherent sorted list.
 
This is really cool. Right now I'm trying to figure out how you did this. (I'm new to Python but not new to programming.)

In CvDomesticAdvisor.py:


# Religions Column
screen.setTableColumnHeader( "CityListBackground", 2, localText.getText("Religions", ()).upper(), 130 )



From the Python for cIV Class Reference:

STRING getText(STRING szTag, TUPLE args)
LPCTSTR getText(const TCHAR * szTag, python::tuple& args)


Here are my questions

- General Python: when you call ()).upper() what object are you referencing?
- cIV: How did you determine the members of python::tuple& args? I'm guessing that any collection of three values qualifies as a tuple. I see the first member is "Religions" and appears as the name of the column so that is a no-brainer. What are ()).upper() and 130?

Thanks!
 
homegrown said:
Maybe if I explain what the issue is with sorting, someone might have some ideas. It *does* sort, but instead of sorting by integer values, it is sorting by string values. So one list might go ['1','13','16','2','22','3','31','4']. However, most of the time, it does print a coherent sorted list.

Damn... is this changable?
 
Uty said:
This is really cool. Right now I'm trying to figure out how you did this. (I'm new to Python but not new to programming.)

In CvDomesticAdvisor.py:


# Religions Column
screen.setTableColumnHeader( "CityListBackground", 2, localText.getText("Religions", ()).upper(), 130 )



From the Python for cIV Class Reference:

STRING getText(STRING szTag, TUPLE args)
LPCTSTR getText(const TCHAR * szTag, python::tuple& args)


Here are my questions

- General Python: when you call ()).upper() what object are you referencing?
- cIV: How did you determine the members of python::tuple& args? I'm guessing that any collection of three values qualifies as a tuple. I see the first member is "Religions" and appears as the name of the column so that is a no-brainer. What are ()).upper() and 130?

Thanks!

I dunno Python, but I'm guessing 130 has something to do with column size? (width)
 
Top Bottom