Astro's Mod for RFC

astrognash

TXT_KEY_CUSTOM_USER_TITLE
Joined
May 10, 2008
Messages
204
Location
The Empire of North Carolina
Astro's Mod for Rhye's and Fall of Civilization
Introduction
Astro's Mod (named for myself) began a couple days ago when I downloaded Baldyr's wonderful PyScenario. After much troubleshooting, I've finally got something to release to the public as a ModMod to RFC. Currently, the modmod is at version 0.20, and is far from the final release. I would really appreciate it if you downloaded and gave feedback, pointed out historical inaccuracies, and told me about bugs in my code. I also will listen to requests for features and other questions.


Version 0.2 Features and Fixes
First, I made it so that the Great Generals have a spawn area, instead of a tile, which should give them the best chance of spawning possible. Also, I moved Sun Tzu and Afonso Henriques out of the water. :mischief:
The change that upgrades this to v.2 is the addition of a Fall of Rome mechanic, which, over 42 turns, gives Rome hits to stability with increasing frequency, as well as a small chance of Rome fragmenting at some point during those turns, regardless of stability.


Version 0.11 Fixes
Fixed two errors in my script, one in which I mistakenly referred to Babylonia as Babylon, and one where my inner spelling nazi subconsciously corrected iVikingBeserker to iVikingBerserker. I'd like to once again thank Baldyr for pointing these out to me.


Version 0.1 Features
The first part of the modmod involves giving every civilization exactly one unique Great General spawn, occasionally with units where I see fit. They all spawn regardless of whether the civ they're a part of is controlled by the human or the AI, and I've given the Natives two GG spawns, one in Southeast Africa, and one in the American southwest. The generals, civs, and spawn turns are in the spoiler tag.

Spoiler :
Code:
[FONT=Georgia] Egypt - Thutmose III - Turn 55[/FONT]
[FONT=Georgia] India - Chandragupta Maurya - Turn 119[/FONT]
[FONT=Georgia] China - Sun Tzu - Turn 105[/FONT]
[FONT=Georgia] Babylon - Sargon of Akkad - Turn 24[/FONT]
[FONT=Georgia] Greece  - Alexander the Great - Turn 117[/FONT]
[FONT=Georgia] Persia - Cyrus the Great - Turn 105[/FONT]
[FONT=Georgia] Carthage - Hannibal Barca - Turn 126[/FONT]
[FONT=Georgia] Japan - Minamoto no Yoritomo - Turn 236[/FONT]
[FONT=Georgia] Rome - Trajan - Turn 145[/FONT]
[FONT=Georgia] Celtia - Vercingetorix - Turn 144[/FONT]
[FONT=Georgia] Ethiopia - Ezana of Axum - Turn 163[/FONT]
[FONT=Georgia] Maya - Pacal the Great - Turn 183[/FONT]
[FONT=Georgia] Vikings - Cnut the Great - Turn 223[/FONT]
[FONT=Georgia] Arabia - Khalid ibn al-Walid - Turn 184[/FONT]
[FONT=Georgia] Khmer - Jayavarman II - Turn 198[/FONT]
[FONT=Georgia] Spain - El Cid Campeador - Turn 227[/FONT]
[FONT=Georgia] France - Napoleon Bonaparte - Turn 356[/FONT]
[FONT=Georgia] England - Bernard Montgomery - Turn 404[/FONT]
[FONT=Georgia] Germany - Erwin Rommel - Turn 418[/FONT]
[FONT=Georgia] Russia - Ivan the Terrible - Turn 288[/FONT]
[FONT=Georgia] The Dutch - Michiel de Ruyter - Turn 309[/FONT]
[FONT=Georgia] Mali - Mansa Sakoura - Turn 250[/FONT]
[FONT=Georgia] Portugal - Afonso Henriques - Turn 236[/FONT]
[FONT=Georgia] Inca - Pachacuti - Turn 268[/FONT]
[FONT=Georgia] Mongolia - Genghis Khan - Turn 240[/FONT]
[FONT=Georgia] Azteca - Ahuitzotl - Turn 278[/FONT]
[FONT=Georgia] Turkey - Osman I - Turn 251[/FONT]
[FONT=Georgia] America - George Washington - Turn 346[/FONT]
[FONT=Georgia] The Natives - Shaka Zulu - Turn 360[/FONT]
[FONT=Georgia] The Natives - Geronimo - Turn 376[/FONT]

The Great Generals spawn in fairly accurate places, I feel. Also, if you feel I could have picked someone better, please tell me. A lot of these, I would prefer to have someone else, but I couldn't find anyone.


Installation Instructions
To install, unpack all of the .zip file's contents to Rhye's and Fall of Civilization\Assets\Python
Say yes to overwriting everything, but make a backup of your CvRFCEventHandler.py file first!


To Do

  • Finish and implement various Roman triggers, including:

  • The Germanic Campaigns
  • The Punic Wars
  • Various other pushes to expand as Rome really did when Rome is an AI.
  • Make the Fall of Rome more likely through stability, etc.
  • Make a couple changes to the city name manager.
  • Make spawns for the other Great People, if possible.
  • Change the defined target tiles for the Generals to zones, to give the units the best possible chance of actually spawning.
  • Make it so that certain city names change if a nation is vassalized by certain other nations, e.g. Greece, Rome, Arabia vassalizing Carthage, Egypt, Babylonia, etc.


Known Bugs
None :cool:


Special Notes

I would like to thank Baldyr for creating such a wonderful tool as PyScenario, and for helping me get PyScenario working on my computer.
By the way, for those of you using the tool in Notepad, make sure that when you save the file, it's encoded in UTF-8. :goodjob:
I'd also like to thank Rhye for creating something which is less like a mod and more like Civilization 4.5.

This version of the modmod uses PyScenario v.1.022, and works on RFC 1.187 for BtS.
 

Attachments

  • Astro's Mod v.2.zip
    28.1 KB · Views: 79
Reserved
Voorbehou
E rezervuara
محجوز
Պաշտպանված են:
Qorunur
Gordeak
Зарэзерваваныя
Резервирано
Reservat
保留的
Rezervirano
Rezervované
Reserveret
Gereserveerd
Reserveeritud
May pinaglalaanan
Varattu
Réservé
Reservado
დაჯავშნული
Reserviert
Ρεζέρβέ
Rezève
שמור
सुरक्षित
 
Fenntartott
Cadangan
Forchoimeádta
Riservato
予約済み
소유
Rezervēts
Saugomos
Се задржани
Riżervat
Reservert
محفوظ
Zarezerwowany
Rezervat
Зарезервированный
Резервисан
Rezervovanej
Rezervirano
Zimehifadhiwa
Reserverat
ลิขสิทธิ์
Ayrılmış
Зарезервований
محفوظ
Cedwir
רעזערווירט
 
It turns out we're both doing the same project. :p I'm actually coding a easy-to-modify version of the discussed Great General mod-mod. With your permission I could actually use use some of your general data. :D

This has of course no bearing on your own work or design, so just run with it! :goodjob:
Spoiler :
My script will use some Python code to generate the Triggers dynamically, instead of having to manually type each entry. You will be adding and modifying entries in a dictionary instead.
Code:
for ePlayer in range(con.iNumMajorPlayers):
        
        name = onBirth.get(ePlayer, None)
        if isStr(name):
                tCoords = con.tCapitals[ePlayer]
                pTrigger = Trigger(ePlayer).label(name)
                pTrigger.turn(con.tBirth[ePlayer]).owned(tCoords)
                pTrigger.units(tCoords[0], tCoords[1], con.iGreatGeneral).flag(name, True)
                pTrigger.message(name + " is championing the rise of " + getPlayer(ePlayer).getCivilizationShortDescription(0) + "!")
                
        name, iYear = atWar.get(ePlayer, None)
        if isStr(name) and isInt(iYear):
                pTrigger = Trigger(ePlayer).label(name).once().target(con.tCoreAreasTL[ePlayer], con.tCoreAreasBR[ePlayer])
                pTrigger.year(iYear-5, iYear+5).war(None)
                pTrigger.units(None, None, con.iGreatGeneral).flag(name, True)
                pTrigger.message(name + " has been tasked with leading the %s1 armies!", True)
All this is yet to be tested though, so don't give it much consideration. :p

You realize that you can have cities change name within the confines of your own PyScenario script? Just use the lost() Condition and the name() Action to change the name once the city changes owners. You can do it the way Rhye did it - by looking up cities by name - or you could lookup the map tile instead. (I recommend the latter method, as this circumvents the entire issue with cities sometimes changing names in a less predictable fashion.) Make sure to refer to the API entries for both methods before you use them.
 
Well, my changes to the city name manager consist of changing the names of where cities are founded. For example, Having Neapolis and Pompeii on different tiles makes next to no sense to me, considering their close real-life proximity, so one change will be having that tile just be Neapolis, which lasted longer. Also, I can't resist the temptation to replace either Norfolk or Charleston with a North Carolinian city.
 
Did you use my updated citynamemanager-file from my development-thread?

I agree about Neapolis/Pompeii, maybe change Pompeii to Neapolis if the city is still Roman on a certain date?
With a message saying: 'The city of Pompeii was partly destroyed by a vulcano, the city is being rebuild and renamed Neapolis.'
 
Well, I'm thinking I may very well incorporate your city-name manager, but it's not my top priority for the mod right now.
 
Top Bottom