Customizable Domestic Advisor - comments welcome

terrasol: sorry about that. Are you using CivIV in English? If not, I hope the problem you encountered will be fixed along with Cammagno's.

That's a C++ error, not Python, and I haven't seen it, so I don't know what to do. :(

Now if I had access to the C++ source...
 
Taelis said:
Version 0.92 is ready, with improved localization support. I have hope for this version.

In wy case, 0.92 works fine, no problem anymore! :goodjob:
Furthermore, I like very much the new available columns, and now that I can see how it works, I lke the "flavor" version too (I've installed it).

Very very good job! ;)

[A little suggestion for future releases: maybe you can make different the "global ranking" and the "national ranking" icons, using in one case the icon followed by "#" and in the other case the "#" followed by the icon, or maybe using in one of the cases another simbol instead of "#" Just my two cents, of course :blush: ]
 
After installing this mod in my custom assets folder, I get the following error message when starting the game: "Failed to load python module CvEventInterface".

I don´t have any domestic mod installed, only this one.
 
Taelis said:
Inspired by the fantastic work of Homegrown and Requies, I thought I'd try to extend what they've done and add in game customization - including the ability to add new pages, to add and remove columns from pages, and change the order and width of columns, all from within the advisor itself.

If someone is interested, here there is my configuration file. I've prepared 30 different pages, in which all the available columns are grouped according to different criteria. It may be useful as a starting point for someone who wants a more complex structure of pages than the standard one and who doesn't want to start from "ground zero".
To use it, simply put it in the main Civ4 directory. If you don't like it, remove it and you'll have your standard pages back again. If you have already done some personalization, backup your file before pasting mine in the directory.

Note: The size of the columns is optimized for the Italian titles, so a different optimization may be needed in some cases (for aestetical porpouses only).
I've translated the titles of the pages into English, but some little errors are possible (due to my not-so-good English... for example I'm not sure at all that the names of the religions are correct); however, you can change them easily using the mod interface.

Note #2: Now (version 0.93) the sharing of config files works across languages! Thanks one more time, Taelis! :goodjob:
 
elhoim said:
After installing this mod in my custom assets folder, I get the following error message when starting the game: "Failed to load python module CvEventInterface".

I have the same error if I remove the CustomDomAdv.txt file from the main Civ directory (I did this for a test). Putting it back in the directory, the mod loads without problems again.
 
Cammagno said:
If someone is interested, here there is my configuration file. I've prepared 30 different pages, in which all the available columns are grouped according to different criteria. It may be useful as a starting point for someone who wants a more complex structure of pages than the standard one and who doesn't want to start from "ground zero".

I was hoping people would share their configurations, but just realized - it doesn't work across languages. :eek: :(

I'm not sure how to do it yet, but I promise version 0.93 will somehow support exchanging configuration files despite language differences. :)

Thanks for figuring out the problem on loading too - I'll get to work on 0.93 right away.
 
Taelis said:
I was hoping people would share their configurations, but just realized - it doesn't work across languages. :eek: :(
I'm not sure how to do it yet, but I promise version 0.93 will somehow support exchanging configuration files despite language differences. :)
Thanks for figuring out the problem on loading too - I'll get to work on 0.93 right away.

:)

(I've edited my message to inform of the language poblem in exchanging configuration files)
 
Fixed the loading problem, and the language difficulties in the configuration file. So version 0.93 is ready. :)

Configuration files saved with version 0.93 or later can be exchanged between users with different languages. The column headers for buildings and resources will be automatically translated too (but not the page names).

Configuration files from version 0.92 can only be loaded intact by users with the same language - if you'd like, Cammagno, I can fix your CustomDomAdv.txt and add it to the first page of this thread. (with credit, of course :goodjob:).

You can update it yourself too - just load it with the new advisor and save it again.
 
Taelis said:
Configuration files saved with version 0.93 or later can be exchanged between users with different languages. The column headers for buildings and resources will be automatically translated too (but not the page names).
Configuration files from version 0.92 can only be loaded intact by users with the same language - if you'd like, Cammagno, I can fix your CustomDomAdv.txt and add it to the first page of this thread. (with credit, of course :goodjob:).
You can update it yourself too - just load it with the new advisor and save it again.

Thanks again for your wonderful job :goodjob:

I've updated my config file with version 0.93, and I've translated the titles of the pages into English (some little errors are possible, due to my not-so-good English... for example I'm not sure at all that the names of the religions are correct); I've uploaded it editing my previous message.

Of course you can add it to the first page of this thread! You (and everybody else) can use it as you want, edit it as you want (and of course correct it if it has some English error), upload it where you want (with or without credits, I don't care :) )... its use is absolutly free. :)
 
Great! Now it works flawlessly!! Thanks!!!
 
with V0.93 all is ok

i have a suggestion, cause in older versions i had a column for the really goldproduction of a city and i have tested with your advisor with the following code

Code:
*****first part*****
("GOLD",			38,	"int",	None,					CyCity.getCommerceRate,		CommerceTypes.COMMERCE_GOLD,		None,					None,					"self.goldIcon"),
[COLOR="Red"]("GOLD_DIFF",			30,	"int",	None,					None,				0,					self.calculateGoldDiff,			CommerceTypes.COMMERCE_GOLD,		"u\"%c\" % CyGame().getSymbolID(FontSymbols.BAD_GOLD_CHAR)"),[/COLOR]
("GRANK_BASE_COMMERCE",		38,	"int",	None,					None,				0,					self.findGlobalBaseYieldRateRank,	YieldTypes.YIELD_COMMERCE,		"self.commerceIcon + u\"#\""),

*****second part*****
self.PROBLEM_VALUES_DICT = {
	"GARRISON" : 0,
	"HAPPY" : -1,
	"HEALTH" : -1,
	"GROWTH" : -1,
	"FOOD" : -1,
[COLOR="red"]	"GOLD_DIFF" : -1,[/COLOR]
             }

*****third part*****
def calculateMaintenance (self, city, szKey, arg):
	return unicode(city.getMaintenance())

[COLOR="red"]def calculateGoldDiff (self, city, szKey, arg):
	gd = city.getCommerceRate(arg) - city.getMaintenance()
	return gd[/COLOR]

def calculateTrade (self, city, szKey, arg):
	nTotalTradeProfit = 0

of course this is only a suggestion, but may be some other like this too
 
Nice job :goodjob:. Definitely incorporated some features that I was thinking about (including the flavor domestic advisor).

Interesting what you did with the dictionaries.... :lol:

If I get around to it (I'm currently focusing on the Foreign Advisor and other projects), I'll see what I can incorporate into the Domestic Advisor.

Req
 
hi unfortunatly the advisor has crashed again....but now i can say you the line of code what makes the crash

Code:
# Add blank rows to the table
for i in cityRange:
    screen.appendTableRow (page)
    szWidgetName = "ZoomCity" + str(i)
    if (cityList[i].getName() in self.listSelectedCities):
        screen.selectRow( page, i, True )
    if not self.PAGES[self.currentPageNum]["showSpecControls"]:
        [COLOR="Red"]screen.setImageButton( szWidgetName, zoomArt, 0, 0, 24, 24, WidgetTypes.WIDGET_ZOOM_CITY, cityList[i].getOwner(), cityList[i].getID() )[/COLOR]
        screen.attachControlToTableCell( szWidgetName, page, i, 0 )

if i comment out this lines
Code:
    #if not self.PAGES[self.currentPageNum]["showSpecControls"]:
        #[COLOR="Red"]screen.setImageButton( szWidgetName, zoomArt, 0, 0, 24, 24, WidgetTypes.WIDGET_ZOOM_CITY, cityList[i].getOwner(), cityList[i].getID() )[/COLOR]
        #screen.attachControlToTableCell( szWidgetName, page, i, 0 )

all is ok...may be it helps you to find the problem
 
Taelis, I'm having a slight issue with the advisor. It's a late era Marathon Game, and when I hurry production from the advisor screen, the advisor goes blank. The advisor is still open, just has no information. It started doing it only later in the game, when my cities went over 21 and need to scroll down to be viewed.
 
Back
Top Bottom