1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[MOD] Modified Special Domestic Advisor

Discussion in 'Civ4 - Mod Components' started by 12monkeys, Dec 16, 2005.

  1. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    --------------------------------------------------
    Name : Modified Special Domestic Advisor
    Version : v1.8e
    Date : 14.04.06
    Author : 12monkeys (@civfanatics + @apolyton)
    --------------------------------------------------

    Based on the "Special Domestic Advisor" v0.92 from Requies (@civfanatics), I created this "Modifed Special Domestic Advisor". Some of the new functions have been inspired by the Costomizable Domestic Advisor from Taelis (@civfanatics).

    Features :
    - automatic screen size adjustment. Tested for nearly all available screen sizes, from 1024x786 upwards.
    - fully localizable. Each text is within the added XML-File.
    - fully translated for english and german language.
    - contains 7 views, each with special columns and information : city, specialists, military, building, world wonder, national wonder, team projects. See below for view details.
    - mouse sensitive on screen help. Each column get an own "Help" button. Just move your mouse over it to get a detailed information about the column contents.
    - smart button placements, prevents overlapping view buttons texts.
    - a lot of new columns are prepared and can easliy be activated (see below for details)
    - easy activating, resizing and placement of columns. Must be be done in the source yet!


    View details :
    - City View : containes most of the columns for a quick analysis of the most important modifiers.
    - Specialists View : containes some special columns for production and autmatization
    - Military View : contains columns to display the military status of a city, including the defense capabilites against ground and air attacks.
    - Building View : displays all currently available buildings of your civ and shows if the city have it, can build it, can't build it, is currently building it or if it is obsolete. The view will grow as soon as you get the prerequisites for new buildings.
    - World Wonder View : displays all currently available World wonders of your civ and shows if a city have it, can build it, can't build it, is currently building it or if it is obsolete. Also, it shows, if another civ is currently building that wonder. The view will grow as soon as you get the prerequisites for new wonders.
    - National Wonder View : displays all currently available national wonders of your civ and shows if the city have it, can build it, can't build it, is currently building it or if it is obsolete. The view will grow as soon as you get the prerequisites for new national wonders.
    - Team Project View : displays all currently available team projects of your civ and shows if the city have it, can build it, can't build it, is currently building it or if it is obsolete. The view will grow as soon as you get the prerequisites for new team projects.


    City View columns :
    "NAME" : The name of the city.
    "LANDMARKS" : Some landmarks of the city, displayed as symbols
    "POPULATION" : Population size of the city.
    "HAPPY" : Net happy people. Calculated by happy people minus unhappy people.
    "HEALTH" : Net healthy people. Calculated by good health people minus bad health people.
    "GROWTH" : Indicates the cities growth rate.
    "FOOD" : Net food production. A value is also displayed when there is food production (eg. worker or settler).
    "PRODUCTION" : Net production of the city, which can be used for building units, wonders and buildings.
    "MAINTENANCE" : Total maintenance costs for this city.
    "TRADE" : Net trade income for all trade routes and yield types.
    "COMMERCE" : Base commerce for the city, generated by specialists, buildings, religions...
    "GOLD" : Net gold income per turn.
    "RESEARCH" : Net research rate.
    "CULTURE_RATE" : Net culture rate.
    "CULTURE" : Actual total culture value of this city.
    "GREATPEOPLE_RATE" : Great people rate.
    "GREATPEOPLE" : Actual total great people value.
    "PRODUCING" : What the city currently produces. Queuesize is displayed in square brackets.
    "TURNS" : Number of turns till current production is finshed. Queuesize is displayed in square brackets.

    Specialists View columns :
    "NAME" : The name of the city.
    "AUTOMATION" : Currenty active city automations.
    "RELIGIONS" : Current religions of the city. Holy Cities are also indicated.
    "SPECIALISTS" : Number of active specialists for all kinds.
    "HAPPY" : Net happy people. Calculated by happy people minus unhappy people.
    "GROWTH" : Indicates the cities growth rate.
    "FOOD" : Net food production. A value is also displayed when there is food production (eg. worker or settler).
    "PRODUCTION" : Net production of the city, which can be used for building units, wonders and buildings.
    "GOLD" : Net gold income per turn.
    "RESEARCH" : Net research rate.
    "CULTURE_RATE" : Net culture rate.
    "GREATPEOPLE_RATE" : Great people rate.
    "PRODUCING" : What the city currently produces. Queuesize is displayed in square brackets.
    "TURNS" : Number of turns till current production is finshed. Queuesize is displayed in square brackets.

    Military View columns :
    "NAME" : The name of the city.
    "THREATS" : indicates, that there are enemy units in the city area.
    "DISORDER" : Indicates problems with the citizens: disorder or occupation.
    "NO_MILITARY_ANGER" : Indicates, if there are unhappy people due to missing military ground units.
    "WAR_WEARINESS" : actual War Wearniness in the city.
    "FREE_EXPERIENCE" : Number of free experience points a military units gets when its produced in this city.
    "COASTAL" : Indicates if the city is at the coast.
    "CONSCRIPT_UNIT" : The best unit the city can conscript.
    "DEFENSE_VIS" : Actual defense modifier of the city.
    "DEFENSE_DAMAGE" : Actual city defense damage.
    "DEFENSE_TOTAL" : Total city defense modifier.
    "UNITS_TOTAL_NUM" : Number of own units in the city.
    "UNITS_MIL_NUM" : Number of own military units in the city.
    "UNITS_MIL_GROUND_NUM" : Number of own military ground units in the city.
    "UNITS_MIL_SEA_NUM" : Number of own military sea units in the city.
    "UNITS_MIL_AIR_NUM" : Number of own military air units in the city.
    "UNITS_MIL_GROUND_DEFENSE_SUM" : Sum of combat values of all own military ground units. Represents the city's actual strength against ground attacks.
    "UNITS_MIL_GROUND_DEFENSE_AVG" : Average combat value of all own military ground units. Represents the actual quality of the city defense ground units.
    "UNITS_MIL_AIR_DEFENSE_NUM" : Number of own air defense units in the city (ground, sea or air).
    "UNITS_MIL_AIR_DEFENSE_AVG" : Average air interception probability of all own air defense units in the city. Represents the quality of the city's air defense.
    "UNITS_MIL_AIR_PATROL" : The number of air units currently doing air patrol.

    Available and easily configurable collumns :
    "DATE" : Date the city was founded.
    "POPULATION_REAL" : real population of the city, in citizens.
    "GARRISON" : The number of military units creating happiness in the city.
    "BASE_HAPPY" : Number of happy population.
    "BASE_UNHAPPY" : Number of unhappy population.
    "BASE_GOODHEALTH" : Number of good health people in the city.
    "BASE_BADHEALTH" : Number of bad health people in the city.
    "FOOD_STORED" : The food stored in the city.
    "BASE_FOOD" : Gross food production of the city, before food consumption.
    "BASE_PRODUCTION" : Gross production of the city.
    "MAINTENANCE_DISTANCE" : Maintenance caused by the distance to the capital and/or governement center.
    "MAINTENANCE_NUMCITIES" : Maintenance caused by the total number of cities.
    "GREATPEOPLE_TURNS" : Number of turns till the city creates a great person.
    "POWER" : indicates that the city has a power plant
    "CONSCRIPT" : Can the city conscript units?


    Requirements :
    - works only with Civ4 patch 1.61. If you have Civ4 patch 1.52 you need version v1.8c. If you have Civ4 patch 1.09 use the version v1.1


    Issues :
    - some help texts may exceed the panel size. This is due to the logic I programmed to calculate the panel size. It can be adjusted modifying some constants. If such a thing happens, inform me please.
    - on large city lists the city zoom button stopped working for the lower table lines. Its very likly not to be a problem of my code, but a problem of the firaxis code. This problem still persists in Civ4 patch 1.61.
    - after loading a game from within another game, the call of the MSDA might cause a c++ exception. Just restart the game completely and load the game directly.


    Update :
    v1.8c to v1.8d :
    - simple replace the two file CvModSpecialDomesticAdvisor.py and DomPyHelpers.py with the new ones from this mod.

    v1.8d to v1.8e :
    - simple replace CvScreensInterface.py with the new one from this mod.

    For modders : the changed places in those two files are marked with "12monkeys - 1.61 - begin" and "12monkeys - 1.61 - end". This should make it easier to migrate the changes to your composites.



    Installation :
    copy the files from the ZIP into their corresponding folders in the "My Documents\My Games\Civilization 4" folder. Installation at own risk!. If you already have any version of the "Modified Special Domestic Advisor" installed, you can overwrite it with the new files.
    If you already have modified versions of a file, you can manually merged them by looking for the comments "12monkeys"


    Future functions :
    - interactive column selection, sizing and placement.
    - improved screen update


    Release Notes :
    v1.8e :
    - fixed a problem in the CvScreensInterface.py which I haven't checked while changing to 1.61. Sorry for that and thx to _alphabeta_ for reporting it.

    v1.8d :
    - adapted to work with Civ4 patch 1.61.

    v1.8c :
    - small changes in Italian texts (thx Cammagno)
    - fixed a syntax error in code which could cause a python error and an empty advisor screen (thx Wallabulla for reporting this)

    v1.8b :
    - added Italian translation (thx Cammagno)
    - Button "Redraw" renamed in "Refresh" (english version only)
    - changed Button order so that it is more logical (thx again Cammagno)
    - small fix which causes an exception together with some user-added buildings
    - changed location of the help buttons for the building/wonder screens (thx once again Cammagno)
    - adaption to actual resolution when when changing it in game

    v1.8a :
    - fixed a small bug in the XML file for german version

    v1.8 :
    - lots of changes in the optics
    - added military view
    - added team project view
    - added full localization support, translated for english and german
    - added lots of collumns, not all are displayed but can easliy activated
    - added on screen help for columns and buildings/wonder views
    - added city zoom button from patch 1.52
    - improved buiding view
    - improved wonders views
    - smart button placement (prevents overlapping button texts)

    v1.1 :
    - adapted to work with Civ4 patch 1.52.

    v1.0 :
    - inital relaese

    ----------------------------------------------------------------------
    ModifiedSpecialDomesticAdvisor-v1.0.zip removed with 179 views
    ModifiedSpecialDomesticAdvisor-v1.8a.zip removed with 376 views
    ModifiedSpecialDomesticAdvisor-v1.8b.zip removed with 206 views
    ModifiedSpecialDomesticAdvisor-v1.8d.zip removed with 9 views
     

    Attached Files:

  2. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Some screenshots :

    1.) City View
    2.) City View with column help sample
    3.) Specialists View
    4.) Specialists View with column help sample
     

    Attached Files:

  3. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    1.) Building View
    2.) Building View with view help
    3.) Team Project View
    4.) Team Project View with view help
     

    Attached Files:

  4. lordroy

    lordroy God

    Joined:
    Nov 28, 2001
    Messages:
    148
    Thanx man!


    -=R=-
     
  5. orionis

    orionis Chieftain

    Joined:
    Dec 27, 2005
    Messages:
    3
    firs of all it is my first post i have made - so be nice :)

    i like your mod - but in 1024x768 resolution it is quite hard to read some of the statistics in City View and Specialists View so i work on that a little bit

    i don’t wont post modified file without your permit so i post changes I made.

    modified file: (i post only those lines that was changed)
    \CustomAssets\python\screens\CvModSpecialDomesticAdvisor.py
    ...
    class CvModSpecialDomesticAdvisor:
    ...
    self.nTableX = 5 # Right/Left Margin was 10
    ...
    # Default Column Size Information (The total of all should add up to 1000)
    self.DEF_COLUMN_SIZE_DICT = {
    "AUTOMATION" : 94.0, #80
    "NAME" : 85.0, #100
    "LANDMARKS" : 74.0, #80
    "POPULATION" : 31.0, #30
    "GARRISON" : 31.0, #30
    "HAPPY" : 36.0, #30
    "HEALTH" : 36.0, #30
    "GROWTH" : 36.0, #30
    "FOOD" : 36.0, #30
    "PRODUCTION" : 38.0, #40
    "MAINTENANCE" : 25.0, #30
    "TRADE" : 38.0, #30
    "COMMERCE" : 38.0, #40
    "GOLD" : 38.0, #40
    "RESEARCH" : 38.0, #40
    "CULTURE_RATE" : 38.0, #40
    "CULTURE" : 52.0, #50
    "GREATPEOPLE_RATE" : 38.0, #40
    "GREATPEOPLE" : 45.0, #40
    "PRODUCING" : 115.0, #130
    "TURNS" : 38.0, #40
    }
    ...
    # Default Column Size Information (The total of all should add up to 1000)
    self.SPEC_COLUMN_SIZE_DICT = {
    "RELIGIONS" : 138.0, #100
    "NAME" : 85.0, #120
    "SPECIALISTS" : 229.0, #215
    "HAPPY" : 36.0, #30
    "GROWTH" : 36.0, #35
    "FOOD" : 36.0, #35
    "PRODUCTION" : 38.0, #40
    "GOLD" : 38.0, #40
    "RESEARCH" : 38.0, #40
    "CULTURE_RATE" : 38.0, #40
    "CULTURE" : 52.0, #50
    "GREATPEOPLE_RATE" : 38.0, #40
    "GREATPEOPLE" : 45.0, #40
    "PRODUCING" : 115.0, #130
    "TURNS" : 38.0, #40
    }
    ...
    after # are original values
    it is for v1.1 version of mod (i didn’t check if those settings are same for v1.0)

    with those settings i can see almost all in formations at those screens (at list at my computer in 1024x768 resolution)

    ok i was very long first post :) i hope i was useful if not remove it

    (sorry for my english)
     
  6. orionis

    orionis Chieftain

    Joined:
    Dec 27, 2005
    Messages:
    3
    sorry for posting second post
     
  7. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    @orionis

    thx for the data. I'm usually playing on 1600x1200, so that I have no experiences with 1024x768. I implemented your column sizes in the next update, which is in work right now. Due to some other changes I had to resize some of the collumn a bit, but I only changed text columns (like Name and Production).
     
  8. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Update 1.8 available. See first post!
     
  9. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Found a small bug in the XML file which causes problems in the german language. Fix is already available. Version 1.8a.
     
  10. Cammagno

    Cammagno King

    Joined:
    Dec 15, 2005
    Messages:
    712
    Location:
    Genoa (Italy)
    Oh, this is a very interesting mod, it seems to me that you have chosen the columns and arranged them into pages in a very wisely way: I'll try it in a game session and then I'll give my opinion about its practical use (well, if you are interested, of course :blush: ).
    Now it's hard to choose between your MSDA and Taelis's CDA. I like its custumizablity (columns' size, for example), but I also like your mod's tooltips and use of icons... Well, maybe in the future one of them (or both of them) will evolve to the "definitive" DA.

    I use Requies's Exotic Foreign Advisor, so I've merged a couple of file to make the two mods compatible. I attach them here, in case someone is interested.
    I've also made the Italian translation of your "CIV4ModSpecDomAdvisorInfo.xml" file. I'm checking if it's ok, then I'll attach that file too (obviously, you may include it in your future releases of the mod, if you are interested).
     
  11. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Thx :). Anyway, if you like to change you can do it very easily in the source code. Its just commenting in or out one line.


    Yes, I would appreciate any comments.


    Well, unfortunalty the sources between the two versions are very different now, so it will be hard to merge them. Anyway, I plan to implement a customizing function in the future, but I'm not sure when this will happen.


    Yes, I' definitly interrested to implement it. Just one question : could I contact you in case I have changes in the english or german version so that you can adapt your italian translation?


    If there are other people having other langauge translations, contact me please.
     
  12. Cammagno

    Cammagno King

    Joined:
    Dec 15, 2005
    Messages:
    712
    Location:
    Genoa (Italy)
    Yes, I've seen it (and appreciated very much) :)

    I've played a bit with it and... it's almost perfect, everithing is where I need it :goodjob:
    There is only a couple of very minor things (but it's only a matter of personal preferences, I think... :blush: ):
    IMHO the best position for the "help" icon in the buildings' and wonders' pages is in the top left corner (near the arrow, perhaps), because one can see it better, and because the help buttons in the other pages are also on the top of the page.
    The second one is that IMHO the order of the page buttons is a bit "strange". Maybe a "reverse" order may be more functional: (from left to right) City, Specialists, Military, Buildings, World Wonders, Nat. Wonders, Team Projects, Redraw (oh, what's the use of this one?), Exit.

    Oh, and maybe in a future release a "resources" page may be added... I found the resource columns in the Taelis's CDA to be useful to take the "resources situation" under control (and the "linked city situation" too).

    Oh, actually I wasn't speaking about merging sources, but of two different aproaches towards (maybe) a common superior result. That is, for example in a future release you may add some customizing function (the customizability in the py file is a first important step you have already given us), and maybe he in a future release of his mod may add some tooltips and use icons for columns headers... who knows? So, I think that I was basically speaking of sharing of good ideas to obtain the best final result :)

    Ok, I've checked it and I've attached it :)
    http://forums.civfanatics.com/attachment.php?attachmentid=113064&d=1138084212
    [Note: I've also correct 2 little mistypes in the English lines that I've noticed]

    Of course you can do it!

    Edit: removed file and inserted link to the updated version
     
  13. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    @Cammagno

    First of all, thanks for the feedback (and the flowers :blush:)!

    I will add your ideas to my todo list and will think about them for the next release.

    Also thank you for the translation into italian. It will definitly be added! I'm glad that you offers me translation support. :D



    monk
     
  14. mrcivics

    mrcivics Chieftain

    Joined:
    Jan 11, 2006
    Messages:
    4
    @12monkeys
    Excellent MOD. Thanx
     
  15. Elhoim

    Elhoim Iron Tower Studio Dev

    Joined:
    Nov 3, 2004
    Messages:
    2,034
    Gender:
    Male
    Location:
    San Isidro, Argentina.
    It is compatible with Requies Exotic Foreign Advisor? Because this one overwrites some of that mod files...
     
  16. Cammagno

    Cammagno King

    Joined:
    Dec 15, 2005
    Messages:
    712
    Location:
    Genoa (Italy)
    To use these mods together, you may use my merged files. You can find themhere: http://forums.civfanatics.com/attachment.php?attachmentid=111537&d=1137234299 You may install the original mods as it's explained in their readme files, and then overwrite the 2 files with my files.
     
  17. Elhoim

    Elhoim Iron Tower Studio Dev

    Joined:
    Nov 3, 2004
    Messages:
    2,034
    Gender:
    Male
    Location:
    San Isidro, Argentina.
    Thanks! I was using the customizable domestic advisor, but it was having some problems. I´ll see if I make an advisor of my own, I like things simple. Too much info for me!!
     
  18. billator

    billator Chieftain

    Joined:
    Aug 27, 2005
    Messages:
    12
    First a big well done for this useful mod.

    Do u have a clue is it possible to use it for HOF & GOTM entries?
     
  19. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Sorry, but I have no cle what "HOF" is. Although I know that GOTM means "Game Of The Month" but I don't know anything about it. Just give me some hints, please.


    EDIT : thanks for the positive feedback :D
     
  20. billator

    billator Chieftain

    Joined:
    Aug 27, 2005
    Messages:
    12
    HOF = Hall Of Fame

    They usually do not accept unaproved MODs because are mods that alter the game rules. This mode doesn't alter it it only improves reporting.
     

Share This Page