Customizable Domestic Advisor - BUG Edition

Cammagno

King
Joined
Dec 15, 2005
Messages
712
Location
Genoa (Italy)
I've released the 2.0 version of my Cammagno's CDA Pages.
This is a file with my customizated pages for Customizable Domestic Advisor - BUG Edition (CDA).
It is the new version of my old CDA pages, fully updated to include the new BtS features (espionage, civ-specific buildings etc.) and to use the new features added by EmperorFool to BUG Edition of CDA (e.g. smart building columns).

If you find something wrong, please tell me so that I can fix it.
If you don't like my choices, fill free to modify my pages till they suite you.
If you get a good result, fell free to upload it and report it here.
We have planned to make it possible to shift betweeen CDA customization files through the in-game BUG interface, so different CustomDomAdv.txt files will be welcome.

Edit:
The CustomDomAdv.txt file is now included in BUG Mod
A Cammagno'sCDAPagesReadMe.rtf file, listing all the included columns and pages, is also included in BUG Mod, inside the BUG Mod Documentation\Included Mods Docs\
 
For people that want to further customize my pages, or to make a new customized layout for CDA.

CDA customization is very simple. You only have to click on the parchment icon to access the customization interface.
Then, you have to use the buttons there for your purposes. Please note that the left panel has a row for each column that will appear in your page, while the righ one shows (as rows) all the available columns.

Here a give you a short explanation of those buttons

Columns buttons: (upper row)
white left arrow: decrease the size of the selected column (in the left panel)
white right arrow: increase the size of the selected column (in the left panel)
white +: add the selected column (the selected column in the right pane is added to the left one)
white -: remove the selected column (the selected column in the left pane is removed from it)
red up arrow : move the selected column up (so it will be displayed before in the CDA page)
red down arrow: move the column down (so it will be displayed after in the CDA page)

Pages buttons: (lower row)
list: shows the current page and allow you to go to another one
white left arrow: go to the previous page
white right arrow: go to the next page
parchment: toggle normal interface and customization interface
pinned paper: rename selected page
head: add/remove to/from the page the bottom bar with specialists, culture list and GP list
white +: add a new page
white -: remove the selected page
red up arrow: move the selected page up in the list
red down arrow: move the selected page down in the list
monitor: save the last customizations
ban sign: delete last customizations

and here is a pic of them:
 
Sadly, right now it's the CDA.py file. A bunch are mentioned in the comments at the top, and I tried to sync them up, but I may have missed some.

Otherwise, just customize a new page and you see all the columns on the right. They are the "GRANK_foo" ones, IIRC.
EP pointed out to me that their might be spoilerish information included in teh CDA. I opened up the python file and found this nice array (see spoiler) ... is this the complete list of columns available?

Spoiler :
PHP:
self.COLUMNS_LIST = [
				# Name                      Width    Type   CyCityFunction0			CyCityFunction1			Arg									selfFunction							Arg							Title

				("NAME",					95,		"text",	CyCity.getName,			None,					0,									None,									None,						"localText.getText(\"TXT_KEY_DOMESTIC_ADVISOR_NAME\", ()).upper()"),
				("ADVISE_CULTURE",			150,	"text",	None,					None,					0,									self.advise,							"Culture",					"localText.getText(\"TXT_KEY_CONCEPT_CULTURE\", ()).upper()"),
				("ADVISE_MILITARY",			150,	"text",	None,					None,					0,									self.advise,							"Military",					"localText.getText(\"TXT_KEY_ADVISOR_MILITARY\", ()).upper()"),
				("ADVISE_NUTTY",			150,	"text",	None,					None,					0,									self.advise,							"Nutty",					"u\"NUTTY\""),
				("ADVISE_RELIGION",			150,	"text",	None,					None,					0,									self.advise,							"Religion",					"localText.getText(\"TXT_KEY_CONCEPT_RELIGION\", ()).upper()"),
				("ADVISE_RESEARCH",			150,	"text",	None,					None,					0,									self.advise,							"Research",					"localText.getText(\"TXT_KEY_COMMERCE_RESEARCH\", ()).upper()"),
				("ADVISE_SPACESHIP",		150,	"text",	None,					None,					0,									self.advise,							"Spaceship",				"localText.getText(\"TXT_KEY_CONCEPT_SPACESHIP\", ()).upper()"),
				("AUTOMATION",				80,		"text",	None,					None,					0,									self.calculateAutomation,				None,						"u\"AUTO\""),
				("BASE_COMMERCE",			38,		"int",	None,					CyCity.getBaseYieldRate, YieldTypes.YIELD_COMMERCE,			None,									None,						"u\"B\" + self.commerceIcon"),
				("BASE_FOOD",				38,		"int",	None,					CyCity.getBaseYieldRate, YieldTypes.YIELD_FOOD,				None,									None,						"u\"B\" + self.foodIcon"),
				("BASE_PRODUCTION",			38,		"int",	None,					CyCity.getBaseYieldRate, YieldTypes.YIELD_PRODUCTION,		None,									None,						"u\"B\" + self.hammerIcon"),
				("CONSCRIPT_UNIT",			90,		"text",	None,					None,					0,									self.calculateConscriptUnit,			None,						"localText.getText(\"TXT_KEY_CONCEPT_DRAFT\", ()).upper()"),
				("COULD_CONSCRIPT_UNIT",	90,		"text",	None,					None,					0,									self.calculatePotentialConscriptUnit,	None,						"localText.getText(\"TXT_KEY_CONCEPT_DRAFT\", ()).upper() + u\"#\""),
				("CORPORATIONS",			90,		"text",	None,					None,					0,									self.calculateCorporations,				None,						"localText.getText(\"TXT_KEY_CONCEPT_CORPORATIONS\", ()).upper()"),
				("CULTURE",					53,		"int",	None,					None,					0,									self.calculateTotalCulture,				None,						"self.cultureIcon"),
				("CULTURE_RATE",			38,		"int",	None,					CyCity.getCommerceRate, CommerceTypes.COMMERCE_CULTURE,		None,									None,						"self.cultureIcon + u\"R\""),
				("CULTURE_TURNS",			38,		"int",	None,					None,					None,								self.calculateCultureTurns,				None,						"self.cultureIcon + u\"T\""),
				("DEFENSE",					60,		"int",	None,					None,					0,									self.calculateDefense,					None,						"self.defenseIcon"),
				("ESPIONAGE",			    38,		"int",	None,					CyCity.getCommerceRate, CommerceTypes.COMMERCE_ESPIONAGE,	None,									None,						"self.espionageIcon"),
				("ESPIONAGE_DEF",			60,		"int",	CyCity.getEspionageDefenseModifier,	None,		0,									self.calculateEspionageDefense,			None,						"self.espionageIcon + u\"%\""),
				("FEATURES",				106,	"text",	None,					None,					0,									self.calculateFeatures,					None,						"localText.getText(\"TXT_KEY_MISC_FEATURES\", ())"),
				("FOOD",					35,		"int",	None,					None,					0,									self.calculateFood,						None,						"self.foodIcon"),
				("FOUNDED",					80,		"date",	None,					None,					0,									self.calculateFounded,					None,						"localText.getText(\"TXT_KEY_DOMESTIC_ADVISOR_FOUNDED\", ()).upper()"),
				("GARRISON",				30,		"int",	CyCity.getMilitaryHappinessUnits,	None,		0,									None,									None,						"self.militaryIcon"),
				("GOLD",					38,		"int",	None,					CyCity.getCommerceRate, CommerceTypes.COMMERCE_GOLD,		None,									None,						"self.goldIcon"),
				("GRANK_BASE_COMMERCE",		42,		"int",	None,					None,					0,									self.findGlobalBaseYieldRateRank, YieldTypes.YIELD_COMMERCE,		"u\"B\" + self.commerceIcon + u\"g\""),
				("GRANK_BASE_FOOD",			42,		"int",	None,					None,					0,									self.findGlobalBaseYieldRateRank, YieldTypes.YIELD_FOOD,			"u\"B\" + self.foodIcon + u\"g\""),
				("GRANK_BASE_PRODUCTION",	42,		"int",	None,					None,					0,									self.findGlobalBaseYieldRateRank, YieldTypes.YIELD_PRODUCTION,		"u\"B\" + self.hammerIcon + u\"g\""),
				("GRANK_COMMERCE",			38,		"int",	None,					None,					0,									self.findGlobalYieldRateRank, YieldTypes.YIELD_COMMERCE,			"self.commerceIcon + u\"g\""),
				("GRANK_FOOD",				38,		"int",	None,					None,					0,									self.findGlobalYieldRateRank, YieldTypes.YIELD_FOOD,				"self.foodIcon + u\"g\""),
				("GRANK_PRODUCTION",		38,		"int",	None,					None,					0,									self.findGlobalYieldRateRank, YieldTypes.YIELD_PRODUCTION,			"self.hammerIcon + u\"g\""),
				("GRANK_CULTURE",			38,		"int",	None,					None,					0,									self.findGlobalCommerceRateRank, CommerceTypes.COMMERCE_CULTURE,	"self.cultureIcon + u\"g\""),
				("GRANK_GOLD",				38,		"int",	None,					None,					0,									self.findGlobalCommerceRateRank, CommerceTypes.COMMERCE_GOLD,		"self.goldIcon + u\"g\""),
				("GRANK_RESEARCH",			38,		"int",	None,					None,					0,									self.findGlobalCommerceRateRank, CommerceTypes.COMMERCE_RESEARCH,	"self.researchIcon + u\"g\""),
				("GREATPEOPLE",				45,		"int",	CyCity.getGreatPeopleProgress,	None,			0,									None,									None,						"self.figureheadIcon"),
				("GREATPEOPLE_RATE",		38,		"int",	CyCity.getGreatPeopleRate,		None,			0,									None,									None,						"self.figureheadIcon + u\"R\""),
				("GREATPEOPLE_TURNS",		38,		"int",	None,					None,					None,								self.calculateGreatPeopleTurns,			None,						"self.figureheadIcon + u\"T\""),
				("GROWTH",					35,		"int",	None,					None,					0,									self.calculateGrowth,					None,						"self.redfoodIcon"),
				("HAPPY",					30,		"int",	None,					None,					0,									self.calculateNetHappiness,				None,						"self.happyIcon"),
				("HEALTH",					30,		"int",	None,					None,					0,									self.calculateNetHealth,				None,						"self.healthIcon"),
				("LOCATION_X",				50,		"int",	CyCity.getX,			None,					0,									None,									None,						"u\"X\""),
				("LOCATION_Y",				50,		"int",	CyCity.getY,			None,					0,									None,									None,						"u\"Y\""),
				("MAINTENANCE",				30,		"int",	CyCity.getMaintenance,	None,					0,									None,									None,						"u\"%c\" % CyGame().getSymbolID(FontSymbols.BAD_GOLD_CHAR)"),
				("POPULATION",				35,		"int",	CyCity.getPopulation,	None,					0,									None,									None,						"localText.getText(\"TXT_KEY_POPULATION\", ()).upper()"),
				("POPULATION_REAL",			65,		"int",	CyCity.getRealPopulation,	None,				0,									None,									None,						"localText.getText(\"TXT_KEY_POPULATION\", ()).upper() + u\"#\""),
				("POWER",					50,		"text",	None,					None,					0,									self.calculatePower,					None,						"self.powerIcon"),
				("PRODUCING",				90,		"text",	None,					None,					0,									self.calculateProducing,				None,						"localText.getText(\"TXT_KEY_DOMESTIC_ADVISOR_PRODUCING\", ())"),
				("PRODUCING_TURNS",			33,		"int",	None,					None,					0,									self.calculateProducingTurns,			None,						"self.hammerIcon + u\"T\""),
				("PRODUCTION",				38,		"int",	None,					None,					0,									self.calculateProduction,				None,						"self.hammerIcon"),
				("NRANK_BASE_COMMERCE",		42,		"int",	None,					CyCity.findBaseYieldRateRank, YieldTypes.YIELD_COMMERCE,	None,									None,						"u\"B\" + self.commerceIcon + u\"n\""),
				("NRANK_BASE_FOOD",			42,		"int",	None,					CyCity.findBaseYieldRateRank, YieldTypes.YIELD_FOOD,		None,									None,						"u\"B\" + self.foodIcon + u\"n\""),
				("NRANK_BASE_PRODUCTION",	42,		"int",	None,					CyCity.findBaseYieldRateRank, YieldTypes.YIELD_PRODUCTION,	None,									None,						"u\"B\" + self.hammerIcon + u\"n\""),
				("NRANK_COMMERCE",			38,		"int",	None,					CyCity.findYieldRateRank, YieldTypes.YIELD_COMMERCE,		None,									None,						"self.commerceIcon + u\"n\""),
				("NRANK_FOOD",				38,		"int",	None,					CyCity.findYieldRateRank, YieldTypes.YIELD_FOOD,			None,									None,						"self.foodIcon + u\"n\""),
				("NRANK_PRODUCTION",		38,		"int",	None,					CyCity.findYieldRateRank, YieldTypes.YIELD_PRODUCTION,		None,									None,						"self.hammerIcon + u\"n\""),
				("NRANK_CULTURE",			38,		"int",	None,					CyCity.findCommerceRateRank, CommerceTypes.COMMERCE_CULTURE,	None,								None,						"self.cultureIcon + u\"n\""),
				("NRANK_GOLD",				38,		"int",	None,					CyCity.findCommerceRateRank, CommerceTypes.COMMERCE_GOLD,	None,									None,						"self.goldIcon + u\"n\""),
				("NRANK_RESEARCH",			38,		"int",	None,					CyCity.findCommerceRateRank, CommerceTypes.COMMERCE_RESEARCH,	None,								None,						"self.researchIcon + u\"n\""),
				("RELIGIONS",				90,		"text",	None,					None,					0,									self.calculateReligions,				None,						"localText.getText(\"TXT_KEY_ADVISOR_RELIGION\", ()).upper()"),
				("RESEARCH",				38,		"int",	None,					CyCity.getCommerceRate, CommerceTypes.COMMERCE_RESEARCH,	None,									None,						"self.researchIcon"),
				("SPECIALISTS",				209,	"text",	None,					None,					0,									self.calculateSpecialists,				None,						"localText.getText(\"TXT_KEY_CONCEPT_SPECIALISTS\", ()).upper()"),
				("THREATS",					60,		"text",	None,					None,					0,									self.calculateThreats,					None,						"u\"Threats\""),
				("TRADE",					30,		"int",	None,					None,					0,									self.calculateTrade,					None,						"self.tradeIcon"),
			]
I prefer php because it is color coded, not that it actually means anything to me - code has wrapping issues with this text too.
The GRANK_* look like a bit of a 'no spoiler' problem. Can we either remove them or put in an option to disable their display? I think the quickest way is to mod the following items ...

def findGlobalBaseYieldRateRank (self, city, szKey, arg):
def findGlobalYieldRateRank (self, city, szKey, arg):
def findGlobalCommerceRateRank (self, city, szKey, arg):

... with this bit of code at the top (also need to create the BUG option ... DUH!)
PHP:
if not BugScreens.isShowCDAGlobals:
    return 0
PS: Is there a write up on how to create your own layout and / or use Cammagno's pre-defined layout?
 
I've finally worked out how to get your CDA.txt columns displayed. I actually had to go look in the python code.

It needs to go here ... my games\Beyond the Sword\CustomDomAdv\CustomDomAdv.txt

If that directory doesn't exist (as was the case for me), then nothing happens. Anyway, I have a couple of screen shots of all the columns that I will post shortly. Then we need to take a look at see what is a spoiler and what isn't.
 
128


129


130


131


132


133


134


135


136


137
 
138


139


140


141


142


143


144


145


146


147


148
 
149


150


151


152


153


154


155


156


157


158
 
The only spoilers I can see are the GRANK_ ones and the 6 ADVISE_ ones. I think we should remove this from BUG.

What is the difference between HAS_BONUS_FISH and BONUS_FISH?
 
HAS_BONUS_FISH shows an "x" if the city has the bonus, "-" or empty if not. This is a nice narrow column so you can fit all bonuses on a single page.

BONUS_FISH shows the effects of having fish if the city has it, like "+1:health:". Some of these get really wide due to corporations.

The advisors just show you what the Civ4 advisors show you, I thought. Nutty is kinda random. It's all based on what buildings the city has and what you can currently build.
 
@Ruff - I thought you were advocating adding a BUG option like "Allow Global Rank Columns" on the Advisors tab. If so, this is far easier for someone to re-enabled than if we remove them from Cammagno's pages.

That being said, I'm fine with removing them from CDA entirely. My only quibble is that I hate taking out features unless absolutely necessary.
 
@Ruff - I thought you were advocating adding a BUG option like "Allow Global Rank Columns" on the Advisors tab. If so, this is far easier for someone to re-enabled than if we remove them from Cammagno's pages.
Lets go with that option. I will add it to the code tomorrow by just replacing the rank with a red "x".

Coding done, will test tomorrow - yawn!
 
I've finally worked out how to get your CDA.txt columns displayed. I actually had to go look in the python code.

It needs to go here ... my games\Beyond the Sword\CustomDomAdv\CustomDomAdv.txt


http://forums.civfanatics.com/showpost.php?p=6091412&postcount=19
:rolleyes: :lol:

If that directory doesn't exist (as was the case for me), then nothing happens.

That dir is created when you install BUG, and the file is put inside it...

Anyway, I have a couple of screen shots of all the columns that I will post shortly. Then we need to take a look at see what is a spoiler and what isn't.

I think none of them is spoiler, only the G_RANK, but I'll look at them again. :)
 
@Ruff - I thought you were advocating adding a BUG option like "Allow Global Rank Columns" on the Advisors tab. If so, this is far easier for someone to re-enabled than if we remove them from Cammagno's pages.

That being said, I'm fine with removing them from CDA entirely. My only quibble is that I hate taking out features unless absolutely necessary.


But if the aim is to make it Unaltered Gameplay, what is the meaning of making those columns optional? If we consider them spoiler, I think we have to remove them (not only from my pages, from the CDA itself). If we simply want to hide them, we can remove them from my pages (anyway, not all possible columns are there, even if almost all of them are), and if someone wants them can add them using the easy customizing interface... this is the power of CDA, and I'm greatly in favor of pushing people to use it instead of using pre-made pages... my pages are thought as a basis for further customization and as an example of how to do it, more then as a final result.
In this view, hiding columns from the option screen doesn't seem to me as a great idea... Anyway, my personal opinion about these coloumns is hat they are not so spoiler, it's not a very useful info that they provide...
 
I'm with Cammagno on this one. Either remove them from Cammagno's pages and force them to customize CDA to see them or completely remove them from CDA.
 
A couple of requests for CDA :blush: :

- clicking on the city name should center the main screen to the selected city (not zoom on it). Now the city is selected, the lower part of the main screen has its options, but the main screen doesn't go to it, so to move the main screen to it I have to use the cicling city arrows (left and then right or right and then left).

- about the arrows for cicling the CDA pages, the next one should go back to the first page when the active page is the last one.
 
about the arrows for cicling the CDA pages, the next one should go back to the first page when the active page is the last one.

Done. Please test it for me if you can while I do the other request.
 
- clicking on the city name should center the main screen to the selected city (not zoom on it).

Does the normal DA work this way? I ask because looking at the code they both do exactly the same thing.
 
I'm with Cammagno on this one. Either remove them from Cammagno's pages and force them to customize CDA to see them or completely remove them from CDA.

I've removed G_RANK columns from CDA pages.

Edit:
My opinion is that for now it's ok, so single player users are still able to use them, simly customizing CDA. It can be considered as hiding them and obliging people to purposelly edit the mod to bring them back.
 
Top Bottom