This is currently on version 0.94.
[Edit] See this post for 0.95, which is compatible with the 1.61 patch [/Edit]
[Edit] See this post for 0.95, which is compatible with the 1.61 patch [/Edit]
Code:
Exotic Foreign Advisor
______________________
This advisor came about because the original Advisors seems to have a dearth of important information
Credits: SupremeOverlord - for the Enhanced Foreign Advisor from which the code for the Resource and Tech screens were taken (with a fix or two and some changes)
Bhruic - for the "Tradeable" mod from which the idea was gained to separate the resources into "Surplus" (more than just 1) and "Used" (only 1).
Mysterio10000 - for suggesting adding the qualitative attitude to glance screen and the centering of the Foreign Advisor title
Cammagno - for pointing out and testing a bug related to Glance coloring and translating some of the text into Italian.
Major Tom - for pointing out a bug and providing a save file to fix it with
Features
________
1. Added in a "Glance" screen which shows how each AI feels toward everyone else. Also added in color coding and the ability to sort this screen.
a) This is basically a big table which I generated myself where the ROW leaderhead is the target and the COLUMN leaderhead is the one whose attitude is listed (so if you check on the number where Washington's ROW meets Montezuma's COLUMN, you are viewing Montezuma's attitude TOWARD Washington).
b) The color coding right now is based on player's attitude toward another. If he's friendly to another, it's green. If he's pleased with another, it's cyan. If he's annoyed with another, it's magenta. If he's furious with another, it's red.
c) To sort on a leaderhead (how that leader feels about other players), just LEFT-click on that leaderhead or ANY NUMBER in that leaderhead's COLUMN.
d) To change the direction of sorting, click on the big + button in the top left corner.
e) None indicates either the leaders have not met or that they are the same leader.
2. Added in an Info screen with the following information.
a) A player's state religion (and if he has the holy city)
b) The trade is the net trade you have with EACH opponent for ALL your cities. So, if you close open borders, you will LOSE this amount of commerce (and likely gain a much smaller amount)
c) The current civics this player is running (from left to right is Government, Legal, Labor, Economy, Religion)
d) The player's favorite civic (along with the type of civic)
3. Added in resources and technologies that the leader WANTS to the main resource and technology trading screens. Resources are divided into "Surplus" (Player has > 1) and "Used" (Player has ONLY 1) resources. Thanks to Supreme Overlord for the basic code.
4. Added in the technologies that the other players can research BASED ON THE INFORMATION from the technology trading screen. IOW, it will only calculate which technologies the other players can research based on what you know they have.
From SupremeOverlord's Readme:
_____________________________
FEATURES
--------
General:
- Displaying the names of the leaders of the other civs can be switched on or off.
- The border around the rows can be switched on and off.
Resources:
- At the top of the screen the available amount is shown for all the resources that a
player has extra's of.
- The amount can be configured to show the total available amount or the extra available
amount (total - 1).
- The resources that a player can trade with another civ are shown on the same row as the
resources that that civ will or won't trade with the player.
- The resources that a player can trade are divided into two groups. One for the
resources for which the player has extra's available and another for those resources
for which the player has no extra's.
- It is possible to group the columns showing resources together as export or import.
- The amount of gold that a civ can pay per turn is displayed
- It is possible to show two extra columns to display the resources that are traded in
active deals.
- When the active deals are displayed the total gold amount that is traded is also shown,
a positive amount means that the civ is paying the player, a negative amount means that the
player is paying the other civ
Technologies:
- For each other civ three columns are used to display the techs that civ wants, the techs
that civ will trade and the techs that civ won't trade.
- An extra column is used to display the amount of gold that the civ can pay
- You can use small (32x32) and large (64x64) icons for the technologies.
CHANGING THE LAYOUT
-------------------
You can change the layout of the screen by editing the file 'CvForeignAdvisor.py' in the
'Assets\python\screens' folder of the mod.
In this file you need to look for the line 'def __init__(self):' (somewhere at the top of
the file). All the options are listed below this line and have the format
'self.OPTION_NAME = value.
Installation
____________
Exotic Foreign Advisor should NOT be installed in your main Civ IV location, as it will overwrite one necessary file.
Instead, it should be installed at: "My Documents\My Games\Civilization 4\.
Prior to installation make sure you have upgraded to patch 1.09 as the compatibility changed when Civ IV upgraded (some functions were renamed).
Please note that you MAY have to clear your cache once or twice before the installation/uninstallation will be complete. To do this, hold down the SHIFT button right after you launch Civ IV (i.e., double click the icon). Or go to your cache folder (for me it's My Documents\TempSettings\(UserName)\AppData\My Games\Civilization 4\cache) and delete everything from the directory (this is the recommended method).
To install: Just unzip the zip file with the target being the above indicated directory (may be different for different languages).
Installation will create many new files. The following is the list:
-CvExoticForeignAdvisor.py in subdirectory CustomAssets\python\screen
-TechTree.py in subdirectory CustomAssets\python\screen
-IconGrid.py in subdirectory CustomAssets\python\screen
-CvReqScreensInterface.py in subdirectory CustomAssets\python\entrypoints,
-DomPyHelpers.py in subdirectory CustomAssets\python
-CIV4AdvisorInfo.xml in subdirectory CustomAssets\xml\text
-CIV4EnhancedTextInfos.xml in subdirectory CustomAssets\xml\text
-white_circle_50.tga and white_circle_50.dds in subdirectory CustomAssets\art\Interface\buttons
-white_circle_40.tga and white_circle_40.dds in subdirectory CustomAssets\art\Interface\buttons
-white_circle_20.tga and white_circle_20.dds in subdirectory CustomAssets\art\Interface\buttons
-up_arrow.xcf, up_arrow.tga and up_arrow.dds in subdirectory CustomAssets\art\Interface\buttons
-down_arrow.xcf, down_arrow.tga and down_arrow.dds in subdirectory CustomAssets\art\Interface\buttons
and will create a new copy of two files:
-CvScreensInterface.py in CustomAssets\python\entrypoints
-CIV4ArtDefines_Interface.xml in CustomAssets\xml\art
To uninstall, all that is needed is to move, remove, or rename the CvScreensInterface.py from the My Documents\My Games\Civilization 4\ directory AND ANY SUBDIRECTORIES OF IT.
Note: If you have BOTH the Special Domestic Advisor and the Exotic Foreign Advisor, install the CvReqScreensInterface.py AS CvScreensInterface.py in the aforementioned directory.
To combine this mod to another mod, just add the new files CvExoticForeignAdvisor.py, DomPyHelpers.py, and Civ4AdvisorInfo to the aforementioned My Documents directory (or your mod directory) and make the changes documented in CvScreensInterface.py if you have changed it in your mod.
Known Problems
______________
None
Future TODO
___________
History
_______
v0.94
- Fixed a major bug where if another civ can trade a technology but "can't research" it, the foreign advisor screen becomes unresponsive.
v0.93
- Fixed a bug where the glance screen wasn't colored correctly for Italian
- Added in the technologies which another player can research to the technology trading screen.
- Added in cammagno's italian translated xml file
v0.92
- Fixed a bug where the glance screen wasn't colored correctly for foreign languages.
- Changed the Foreign Advisor Title so that it's in the center of the screen.
v0.91
- Colored the glance number based on the qualitative attitude one player has toward another
- Changed the resource and tech trading screens to SupremeOverlord's version because they were far superior to mine
- Added in religion, civic, and favorite civic information to the renamed "Info" screen (was "Gold")
- Made it compatible with v1.52 patch
- Changed Exotic Foreign Advisor so that it actually inherits from the Foreign Advisor so that the code we actually don't change is used (in case Firaxis makes some improvements in other areas).
v0.9
- beta version of release (waiting for feedback on it and still need to pretty up and document a lot of the code).