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

Great General modmod - spawn your own

Discussion in 'Rhye's and Fall Modmods' started by Baldyr, Jul 3, 2010.

  1. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    NOTE: This mod-mod has not been updated to beta version 2 of the PyScenario utility. But it still works as a stand-alone mod-mod for the official version of RFC.

    What this mod-mod does, is it spawns Great General units with historical names to a select few Civs.

    I haven't tried to include all Civs or anything, just to create a easy-to-edit script for my PyScenario application. So if you download the modmod from the link below you will also be installing PyScenario as an add-on to Rhye's and Fall of Civilization. Simply unpack all .py files into \Sid Meier's Civilization 4\Beyond the Sword\Mods\Rhye's and Fall of Civilization\Assets\Python\ - to uninstall simply delete the Scenario.py file and the modmod will be disabled.

    So, what the modmod does - or can do - is that it spawns Great General units. Either when a Civ is born - or at a historical date. The latter will only happen if the owner Civ is at war with any other major Civ at that point in the game.

    The real feature here is that you can add to the modmod and/or edit the settings by editing this code in the Scenario.py file:
    Code:
    # leaders
    atSpawn = {
            eMongolia: "Genghis Khan",
            eAmerica: "George Washington",
            eTurkey: "Osman I",
            }
    
    inWartime = {
            eFrance: ("Napoleon Bonaparte", 1800),
            eGermany: ("Heinz Guderian", 1930),
            eGreece: ("Alexander the Great", -330),
            ePersia: ("Cyrus the Great", -550),
            eCarthage: ("Hannibal Barca", -240),
            eRome: ("Gaius Julius Caesar", -100),
            eAmerica: ("Douglas MacArthur", 1940),
            eNetherlands: ("Michiel de Ruyter", 1607),
            }
    It should be pretty self-explanatory but take notice of the very specific syntax! You must include every single parenthesis, quotation, colon and comma. And the Civs themselves must follow the exact spelling found in the same file:
    Spoiler :
    Code:
    # civs
    eEgypt = 0
    eIndia = 1
    eChina = 2
    eBabylonia = 3
    eGreece = 4
    ePersia = 5
    eCarthage = 6
    eRome = 7
    eJapan = 8
    eEthiopia = 9
    eMaya = 10
    eVikings = 11
    eArabia = 12
    eKhmer = 13
    eSpain = 14
    eFrance = 15
    eEngland = 16
    eGermany = 17
    eRussia = 18
    eNetherlands = 19
    eHolland = 19
    eMali = 20
    ePortugal = 21
    eInca = 22
    eMongolia = 23
    eAztecs = 24
    eTurkey = 25
    eAmerica = 26 

    Note that you're not required to learn anything about the PyScenario application, about Python programming or anything like that.

    Also note that this setup has the following limitations: There can only be one Great General per Civ at spawn - and there can only be one Great General spawning in wartime per Civ. (Anything else would have to be added by entering individual PyScenario Triggers of your own.)
     

    Attached Files:

  2. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,501
    Location:
    Poland
  3. astrognash

    astrognash TXT_KEY_CUSTOM_USER_TITLE

    Joined:
    May 10, 2008
    Messages:
    204
    Gender:
    Male
    Location:
    The Empire of North Carolina
    eFrance: ("Napoleon Bonaparte", 1800),
     
  4. Moshe Dayan

    Moshe Dayan Da General

    Joined:
    Apr 9, 2010
    Messages:
    310
    Location:
    Occupying the Sinai
    eAmerica: ("Douglas MacArthur", 1940) :p
     
  5. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    You can make those changes yourselves. :D
     
  6. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Personally, I'd take away this:
    Code:
            eGermany: ("Erwin Rommel", 1940),
    ...and insert this:
    Code:
            eGermany: ("Heinz Guderian", 1930),
    And also exchange this:
    Code:
            eAmerica: ("Dwight D Eisenhower", 1940),
    with:
    Code:
            eAmerica: ("George S Patton", 1940),
    But thats just me. :p

    If someone would like to take the design reigns on this project we could easily make a new version. Game balance would have to be taken into consideration - and not just fill every available slot with generals. :rolleyes: I believe that the original proposal was about game balance, after all.

    So go just ahead and edit and test out different things. Who wants to take point on this?
     
  7. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,604
    Location:
    The city of the original vlaai
    eNetherlands: ("Michiel de Ruyter", 1607),
     
  8. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    One little thing, by the way:

    The year will actually be set as an interval of 10 years (+/- 5). So a 1607 setting will enable the Dutch general to emerge some time between the years 1602 and 1612 - at the first turn that is within that interval and when Dutch are at war.

    So you should probably try to find a year that encompasses the decade when the general in question was at the hight of his career. This is especially important in the 21st century, as 10 years will be spread over more game turns.

    Also, these wartime generals will spawn somewhere inside the core area of the owner. It won't spawn in enemy territory, however...
     
  9. Omega124

    Omega124 Challenging Fate

    Joined:
    Nov 1, 2008
    Messages:
    7,011
    Gender:
    Female
    Location:
    Albany, New York
    I said this on the previous thread, but I'll post it again.

    (Rest isn't important)

    More suggestions:

    Charlemagne could be German Great General upon spawn.
    Saladin could be Arabian Great General in the 1190s
    Afonso Henriques could be Portuguese Great General upon spawn
    Sundiata Keita could be Mali Great General in 1235
    William the Silent (The very same as the LH) could be Dutch Great General in 1572 (See Santa Anna)

    An idea: Why don't we mod the game and add Pizzaro and Cortez into the game as GGs spawned in the Conquistador event? It might give the AI a push to actually conquor, not vassalize, the natives.
     
  10. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,205
    Location:
    Hamilton, NJ
    I agree with the change of Eisenhower to Patton. Patton lead all US forces and was a much better leader IMO.
     
  11. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Not a bad idea so its actually worth to test out. Does someone else know their way around the RiseAndFall module or should I give this a go? (It would be another modmod, though. Once finished things can of course be merged and so on.) I won't be able to do it right away, though.

    I would like it very much if people would install the current mod-mod and edit the Scenario.py file as described above themselves. Because then you would be able to test out any ideas you have - and submit a fully functioning dictionary as a suggestion. This would be a giant leap forward on this thing!
     
  12. astrognash

    astrognash TXT_KEY_CUSTOM_USER_TITLE

    Joined:
    May 10, 2008
    Messages:
    204
    Gender:
    Male
    Location:
    The Empire of North Carolina
    Charlemagne lived and died a good bit before the German spawn date.
     
  13. Jarlaxe Baenre

    Jarlaxe Baenre Emperor

    Joined:
    Feb 17, 2010
    Messages:
    1,958
    Location:
    Calgary, Alberta, Canada
    Maybe if Britain has any North American settlements in 1812 and they are at war with America, they could get Isaac Brock?
     
  14. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    New version is available from the original post!
     
  15. Alexius08

    Alexius08 Emperor

    Joined:
    May 28, 2010
    Messages:
    1,105
    Where's Hideki Tojo? We could spawn him in Japan by 1937.
     
  16. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Suggestion: Add this yourself, test it and report back. :D Then, when someone wants to update the dictionary, they post all the additions here.
     
  17. SalmonSoil

    SalmonSoil Prince

    Joined:
    May 17, 2010
    Messages:
    358
    Would it be possible to do this for other great people too?
     
  18. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Anything can be done, but probably not in a Great General modmod. :D

    Actually, you can have custom units spawns easily with PyScenario. Just make a script for whatever you like.
     
  19. MrBanana

    MrBanana Prince

    Joined:
    Jan 18, 2010
    Messages:
    380
    Location:
    Toronto
    But Rommel is a magnificent bastard...
     
  20. kravixon

    kravixon Warlord

    Joined:
    Aug 9, 2008
    Messages:
    214
    I'd love to use this, but I can't get it to work. I don't have pyscenario, and when I add these files to the python folder I get a "Civ4 has stopped working" message when it should go to the autoplay screen.

    edit: After reading the original post, I guess I do technically have it. I should say that I haven't messed around with it or anything like that.
     

Share This Page