| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Prince
Join Date: Nov 2005
Posts: 381
|
This is currently on version 0.94.
[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).
Last edited by Dianthus; Apr 19, 2006 at 09:32 AM. |
|
|
|
|
|
#2 |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Screenshots!
New Screenshot!
Spoiler:
Basic Glance Screen Spoiler:
Sorted Glance Screen Spoiler:
Info Screen Spoiler:
Resource Trading Spoiler:
Tech Trading Spoiler:
Last edited by Requies; Jan 04, 2006 at 06:48 AM. |
|
|
|
|
|
#3 |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Future Issues
|
|
|
|
|
|
#4 |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Reserved for future use
|
|
|
|
|
|
#5 |
|
Chieftain
Join Date: Jun 2005
Posts: 32
|
This is great work, Requies. Seems to be a must have.
Had a quick glance at it and it works fine. However, as you point out it is unfortunately not to find Gold/Turn amount that the opponent is willing to trade. The treasury amount of an AI in the "gold screen" is not the same amount as in the trade screen. Am I missing something? Last edited by Major Tom; Dec 09, 2005 at 05:47 AM. |
|
|
|
|
|
#6 |
|
Prince
Join Date: Nov 2005
Location: Wesley Chapel, FL
Posts: 309
|
Excellent job, Requies!
Thanks for incorporating Bhruic's mod, since it's very useful and one whose functions should have been in Civ IV from the start. I have a suggestion: Since +3 net relations (as an example) with one leader doesn't always equate to the same attitude as +3 net relations with another leader, it'd be helpful to see the leader's attitude toward the target listed below the net relations number, if possible. Also, in your readmes, I'd suggest indenting the required files and their path locations instead of listing them all in a single paragraph. It'd make it more user friendly on the reader. Keep up the good work! |
|
|
|
|
|
#7 | |
|
Prince
Join Date: Nov 2005
Location: Wesley Chapel, FL
Posts: 309
|
Quote:
|
|
|
|
|
|
|
#8 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
. Ever wonder why their treasury is always a multiple of 10? Hmmmm, I wonder if I should change it.... Well, what do you guys think? Change it so the gold is always rounded down? Req |
|
|
|
|
|
|
#9 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
Heh, I do. The only problem is that these forums take out all white space . If you look at the actual README file, you'll see the indentation.... I could put it as a code snippet, if that would help?Req |
|
|
|
|
|
|
#10 |
|
Chieftain
Join Date: Jun 2005
Posts: 32
|
Regerding treasury. It is not a matter of rounding down (not important). I am trying to persuade Cathrine into something and in gold screen she has 3517 gold (or is it commerce?). In diploscreen she has 1720 available.
|
|
|
|
|
|
#11 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
.Hmmm, not sure what to do since the diplomacy screen seems to be written in C++ and I don't have access to the same functions. I'll try looking for another function which simulates the diplo screen function. Req |
|
|
|
|
|
|
#12 |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Can you post a save file where the leaders have a larger amount of gold? I want to see if I can come up with the formula that they use in the diplomacy screen.
Thanks, Req |
|
|
|
|
|
#13 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
Req |
|
|
|
|
|
|
#14 |
|
Emperor
Join Date: Nov 2005
Posts: 1,455
|
Hmm, looks like you should be able to get the Gold they'll trade from the Civ4LeaderHeadInfos table.
getMaxGoldPerTurnTradePercent() getMaxGoldTradePercent() Problem is, it seems most leaders have 10 and 5/10 respectively. From the above description of Catherine (who has a '5' for iMaxGoldTradePercent), that means she should have only been willing to trade 175 gold. Bh Last edited by Bhruic; Dec 09, 2005 at 07:45 AM. |
|
|
|
|
|
#15 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
Otherwise, I might have to scrap the Gold part, and since that's a part that so many people clamor for, I'd hate to do that. Thanks for the input! Req |
|
|
|
|
|
|
#16 |
|
Chronic Slacker
Join Date: Nov 2004
Location: Middle of Virginia Hair: None
Posts: 5,832
|
in your demo screens, How does everyone have extra hit singles, movies, and musicals?
__________________
Mii Wii Number - 8312 8910 9560 5088
NEVER UNDERESTIMATE THE POWER OF STUPID PEOPLE IN LARGE GROUPS --never fight with an idiot, for he'll bring you down to his level and beat you by experience.-- >>>>"imagine a super idiot so idiotic you don't even say a word and he starts laughing at what you said. That'd be amazing" - B <<<< "Stupid is forever. You can't change stupidity." - Temple's Basketball Coach John Chaney to the home crowd |
|
|
|
|
|
#17 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
Req |
|
|
|
|
|
|
#18 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
It basically combines both what they might want to trade for and what YOU might want to trade for on the same line. I was trying to figure out a better way to do it, but this was the best so far. I also posted a poll (which only 4 people responded too ) and 3 of them liked the new screen while 1 wasn't sure why he didn't like it....If you have a better idea of how to divide it up and still show all the data, please let me know! Req |
|
|
|
|
|
|
#19 |
|
Chronic Slacker
Join Date: Nov 2004
Location: Middle of Virginia Hair: None
Posts: 5,832
|
I don't look for polls.. sorry. But I do have a suggestion... Eliminate the Used section from the AI's line. You can see your used resources at the top. I just now saw the "Will Trade" section
.
__________________
Mii Wii Number - 8312 8910 9560 5088
NEVER UNDERESTIMATE THE POWER OF STUPID PEOPLE IN LARGE GROUPS --never fight with an idiot, for he'll bring you down to his level and beat you by experience.-- >>>>"imagine a super idiot so idiotic you don't even say a word and he starts laughing at what you said. That'd be amazing" - B <<<< "Stupid is forever. You can't change stupidity." - Temple's Basketball Coach John Chaney to the home crowd |
|
|
|
|
|
#20 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
Any other thoughts on this? I was also wondering what to do with the top row, but I might just leave it as is if I remove the used resources from the line for each player. Req |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Requies Exotic Foreign Advisor for Warlords | Zarah Neander | Civ4 - Modpacks | 17 | Aug 02, 2007 09:11 PM |
| Do you want a better Foreign Advisor in? | Elhoim | Civ4 - Rhye's and Fall of Civilization | 7 | Aug 18, 2006 11:46 AM |
| Foreign Advisor | Major Tom | Civ - Ideas & Suggestions | 0 | Dec 03, 2005 03:37 PM |
| Foreign advisor | Thrillhouse15 | Civ3 - General Discussions | 4 | Nov 17, 2003 05:22 PM |
| A better foreign advisor | Mathias | Civ3 - General Discussions | 17 | Dec 16, 2002 04:42 AM |