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

[PYTHONCOMP] Specialist Stacker

Discussion in 'Civ4 - Mod Components' started by TheLopez, Jan 27, 2006.

  1. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Specialist Stacker Mod
    By: TheLopez


    Last Updated 11/08/06

    Version: 0.8.1w
    Patch Compatibility: Warlords v2.0.8.0
    MP Compatible: ?
    Download Mod v0.8.1w

    Version: 0.8
    Patch Compatibility: v1.61
    MP Compatible: ?
    Download Mod v0.8

    Version: 0.6.2
    Patch Compatibility: v1.52
    MP Compatible: ?
    Download Mod v0.6.2


    Description:
    This mod "stacks" the specialized citizens, super specialized citizens and angry
    citizens instead of displaying them side-by-side. It also makes use of the space
    to the left of the specialized citizens by allowing them to span into two columns
    instead of just one. This will allow for more than the vanilla six specialized
    citizens to exist in the game.


    Image before using Specialist Stacker Mod[TAB][TAB][TAB][TAB]Image after using Specialist Stacker Mod
    without angry citizen stacking:[TAB][TAB][TAB][TAB][TAB][TAB]with angry citizen stacking:
    [TAB][TAB][TAB][TAB]
    (Note the nice new images for the Great General, Great Doctor and Great Statesman :D)

    Image before using Specialist Stacker Mod:[TAB][TAB][TAB][TAB]Image after using Specialist Stacker Mod:
    [TAB][TAB][TAB][TAB]


    Image after using Specialist Stacker Mod with super specialist stacking turned on using the variables:
    Specialist Stack Width = 9
    Highlight Forced Specialists = true
    Stack Super Specialists = true
    Max Super Specialist Buttons = 6
    Super Specialist Stack Width = 15
    Display Unique Super Specialists Only = true
    Dynamic Super Specialists Spacing = false




    Image after using Specialist Stacker Mod with super specialist stacking turned on using the variables:
    Specialist Stack Width = 9
    Highlight Forced Specialists = true
    Stack Super Specialists = true
    Max Super Specialist Buttons = 6
    Super Specialist Stack Width = 15
    Display Unique Super Specialists Only = true
    Dynamic Super Specialists Spacing = true




    Image after using Specialist Stacker Mod with super specialist stacking turned on using the variables:
    Specialist Stack Width = 9
    Highlight Forced Specialists = true
    Stack Super Specialists = true
    Max Super Specialist Buttons = 6
    Super Specialist Stack Width = 15
    Display Unique Super Specialists Only = false
    Dynamic Super Specialists Spacing = true



    The same information displayed in the warlords version is now displayed in v1.61.


    Installation Instructions:

    1) Unzip this into the "civ4_install_folder\Mods\" folder.
    2) Open the CivilizationIV.ini configuration file
    3) Change the Mod line to read: Mod = Mods\Specialist Stacker
    4) Load the game.
    5) Then play as normal.


    -----Notes to Modmakers-----

    I have modified the CvMainInterface.py and Dr Elmer Jiggle's CvConfigParser.py
    file. I have added #< STACKER START > and #< STACKER END > in all of the places
    that I have made changes to the files.

    As of version v0.6.1 the Specialist Stacker configuration options have been moved
    to the "Specialist Stacker Config.ini" file. There are 11 variables that can be
    used to configure the stacker settings and are well documented in the INI file.
    Please note that you no longer need to copy the "Specialist Stacker Config.ini"
    file to the "civ4_install_folder\Mods\" directory. Just make sure that you put
    a copy of the "Specialist Stacker Config.ini" in your directory and you update
    the modName variable in the CvModName.py file with your mod's name.

    I highly recommend that you use Dr Elmer Jiggle's INI parser if you want to
    allow players to configure your mod through INI files.

    If you use this mod, all I ask is that you give me credit.


    -----Version Information-----

    -----v0.8------

    - Added the WIDGET_FREE_CITIZEN widget definition as defined in the Warlords
    SDK.

    - Added the methods from the Warlords SDK to enable the usage of the
    WIDGET_FREE_CITIZEN widget definition.

    - Changed the appropriate free specialist code in CvMainInterface.py to use the
    new WIDGET_FREE_CITIZEN widget definition to display the total additions from
    each type of specialist and the total from all of the specialists together.
    Requested by Zuul.

    Spoiler :


    -----v0.7------

    - Updated all code to be compatible with the v1.61 patch!

    -----v0.6.2------

    - Updated the mod to use the latest version Dr Elmer Jiggle's INI parser code.


    -----v0.6.1------

    - Updated Dr Elmer Jiggle's to look in the "civ4_install_folder\Mods\<ActiveModName>"

    directory. The <ActiveModName> is retrieved from the modName variable in the
    CvModName.py file. With these changes the mod component configuration INI files
    will no longer need to live in the "civ4_install_folder\Mods\" directory.

    -----v0.6------

    - Integrated Dr Elmer Jiggle's INI parser code and created the INI file
    containing all of the possible values that can be used to configure the
    features in the mod

    - Updated Dr Elmer Jiggle's to look in the "civ4_install_folder\Mods\"
    and "<userDir>\Mods\" directories. Also added and tested a fix provided
    Dr Elmer Jiggle fixing the default INI values bug.


    -----v0.5------

    - Added the coded needed to make angry citizens stack including a variable
    allowing to turn the angry citizens stacking feature on and off. It is
    turned off by default.

    - Added a variable to allow specifing distance between the angry citizens
    stacked specialists

    - Added a variable to specify if all angry citizens specialists should be
    displayed or not.

    - Added a variable to specify if angry citizens should be dynamically spaced
    or not


    -----v0.4------

    - Added a "Specialists" label and background above the specialists

    - Added the coded needed to make super specialists stack including a variable
    allowing to turn the super specialists stacking feature on and off. It is
    turned off by default.

    - Added a variable to allow specifing distance between the super stacked
    specialists

    - Added a variable to specify if all super specialists should be displayed or
    not.

    - Added a variable to specify if specialists should be dynamically spaced or
    not


    -----v0.3------

    - Added code to make specialized citizen span two columns instead of one

    - Added a variable allowing to turn on and off the highlighting of forced
    specialized citizens

    - Added a variable to allow specifing distance between the stacked specialists

    -----v0.2------

    - Updated code to make specialists stack from right to left

    - Started cleaning up code to allow reuse in other mods.


    -----v0.1------

    - Setup Specialist Stacker infrastructure

    - Isolated code responsible for displaying and updating specialists


    -----To Do-----

    - Modularize the code even more to allow specification of columns of
    specialized citizens


    -----===Credits & Thanks===-----

    - Exavier
    [TAB]Composite Mod - readme.txt format


    - Snaitf
    [TAB]For starting the changes needed to make this mod component happen.

    - Chalid
    [TAB]For providing the suggestion that super specialists should stack
    [TAB]like the regular specialists

    - Dr Elmer Jiggle
    [TAB]For providing the INI file parser code allowing for players to
    [TAB]customize this mod without having to touch the python code!!!
     
  2. This is great little change that just give it an extra level of polish. You're on a roll today! :)

    BTW: Forgive the noob question but what is MODCOMP?
     
  3. Chalid

    Chalid Black Dragon

    Joined:
    Nov 24, 2005
    Messages:
    1,742
    Location:
    Munich, Germany
    I'd like that stacking effekt for the super specialists too.

    And I see your buttons, they should be reworked for your new specialists i (dont forget those stars for the super specialists either).
     
  4. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    MODCOMP = Mod Component. It is a term I am starting to use for some of my Civ4 mods that aren't stand alone mods.


    Ok, i'll add it as an option that is turned off by default.


    For whatever reason whenever I convert images back to DDS they turn out blurry, check out the promotions for either the Great Doctor or Great General Amped Mods. I have been trying to find a solution for this but have found none. Let me know if you have any tricks for converting PS or image files to DDS without them turning out blurry.
     
  5. Chalid

    Chalid Black Dragon

    Joined:
    Nov 24, 2005
    Messages:
    1,742
    Location:
    Munich, Germany
    I do this completly in gimp, so no need for converting. :)
     
  6. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    I can do direct importing from DDS to PS and back but still get the blurry icon images :mad:
     
  7. Are you using the NVidia DDS converter for PS? Cause if you are, then try playing with the options cause there are tons of them there (although for me it worked fine with the defaults plus the alpha channel).
     
  8. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Ok Chalid, I have implemented the new super specialist stacking. I hope you and everyone else likes the results.
     
  9. fitchn

    fitchn Civ Fanatic

    Joined:
    Jun 27, 2003
    Messages:
    332
    Location:
    Delaware (USA)
    Agh! Beat me to it! I added this feature a couple of weeks ago to a mod I'm working on, but I wanted to finish up a few other components first before publishing... Oh, well! Nice job, though!
     
  10. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    fitchn, is your's configurable? If you look at my CvMainInterface.py file there are a bunch of variables that you can use to configure the look and feel of the stacked specialists and super specialists.
     
  11. fitchn

    fitchn Civ Fanatic

    Joined:
    Jun 27, 2003
    Messages:
    332
    Location:
    Delaware (USA)
    It's semi-configurable; all of my changes are controlled by constants set at the beginning of the file. My mod only enabled the overlapping icons though, not the second column of specialists (although I was able get more working specialists in the single column without having to shrink or move the icons). I was just pretty excited that I was able to figure it out when everyone else *seemed* to be stumped. :crazyeye:

    Guess I just need to get my work out faster! I've got a few other features in it that haven't been yet... ;)

    BTW, keep up the great work!
     
  12. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Are you stacking both the specialists and the super specialists? Or just the specialists? Have you figured out how to dynamically space out the super specialists? If you haven't you can DL my mod and see how I did it there if you want.

    Oh BTW, this isn't a full mod. Just a component for mods.
     
  13. Chalid

    Chalid Black Dragon

    Joined:
    Nov 24, 2005
    Messages:
    1,742
    Location:
    Munich, Germany
    I really like it. Just one more thing i stumbled across. How about stacking the "Rioting Specialists" ?

    This request seems strange? - Now yesterday playing FfH-Mod an enemy changed 2 civics and I suddenly had about 15 Rioting people in my largest city ....
     
  14. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon

    Chalid, I am at work right now but I don't foresee that being an issue. I will make it configurable like the rest of the options with the default being set to non-stacking. How does that sound?

    What do you think of the labeling I added for the specialists like the "Buildings" label?

    EDIT: Oh and one more thing, I don't know if you got the latest versions of the Great Doctor, Great General Amped and Great Statesman mods but I have updated their graphics per your request.
     
  15. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Well it looks like my ADD kicked in yesterday after work cause I completely forgot about adding feature into the Specialist Stacking Mod and started working on my other new super secret mod :satan:. Anyways, it's there now and I have added new screenshots, enjoy. Note the nice new images for the Great General, Great Doctor and Great Statesman :D
     
  16. Chalid

    Chalid Black Dragon

    Joined:
    Nov 24, 2005
    Messages:
    1,742
    Location:
    Munich, Germany
    Extremly cool.
     
  17. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Alright guys, I've implemented Dr Elmer Jiggle's INI parser code in the Specialist Stacker mod. Just read the updated mod description, it should explain everything. If you don't, let me know and I'll try to help you as best as I can.
     
  18. jray

    jray King

    Joined:
    Jan 31, 2006
    Messages:
    925
    Location:
    North Carolina (USA)
    Awesome mod! I love it!

    I can't get it to read the INI file though. I merged this mod into Alerum's Unaltered Gameplay mod, putting everything into CustomAssets. So where do I put the INI files where they will be read? I already tried My Games\Sid Meier's Civilization 4\ (the parent directory of CustomAssets) and also the MODS subdirectory and even MODS\Specialist Stacker\, but none of them were processed. Thanks!
     
  19. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    You need to put it in the Alerum's unaltered gameplay mod directory. You should only need the "Specialist Stacker Config.ini" file.
     
  20. jray

    jray King

    Joined:
    Jan 31, 2006
    Messages:
    925
    Location:
    North Carolina (USA)
    FYI, Dr Elmer Jiggle just released v1.2 of Civ4lerts, which contains a corrected version of his config parser. It wasn't scanning the parent of CustomAssets like it was intended to, but now it does.

    I just verified that when I put everything in CustomAssets (with nothing at all in Mods), it now reads the config files that are placed in the parent of CustomAssets, including yours. So, all is well!
     

Share This Page