WarNPeaceScript
This mod component is a simple python mod component which allows players to script war and peace declarations into their game, depending on maps, turns or dates.
The download contains:
- CvEventManager.py. The file has 4 modifications. At 2 places you have to change the path to the XML with the actual script data.
PHP:
WarNPeace.loadEvents("Mods/WarNPeaceScript/Assets/XML/CustomXML/WarNPeace.xml")
WarNPeaceScript is here the name of the mod. If you merge this into your mod, you'll have to change it.
- WarNPeace.py. You don't have to change anything here, just drop it in the same folder like CvEventManager.py
- CustomXML\WarNPeace.xml. The data file for the events. It currently contains 3 example events:
- Attacker and Defender have to be civs. Event will be ignored if either civ is not present at the start of the game.
- Type: Either WAR or PEACE. The status will be locked afterwards (means if you put WAR in there, the both civs will not be able to make peace again, if PEACE they'll not be able to declare war again. Other events will override this)
- Map: Put -1 into Map to apply events for the regular game. Else put there the map name without file extension.
- Date: For date, put 0 if it should be ignored (turn will be taken instead), else your date (-3920 refers to 3920 B.C., 1990 would refer to 1990 AD, etc).
- For turn, just put the turn you want it to happen. Will be ignored if set to -1.
- Message: The text string there will appear as popup for both defender and attacker. The popup will not appear if the event is redundant (means if you script a war, and both civs are already at war, you'll not get a popup)
- 1 text XML for the mentioned message
- One map by Iuvavus to demonstrate the map dependency.
This mod component was requested by dacubz145.
------------------------
Alchemy lab
This mod component ads the wonder "Alchemy laboratory" to the game.
This wonder is cheaper than normal wonders in that time span and has a python effect attached: It will create a random available wonder in the city.
If no wonder is available (if everything is already built), you'll not gain anything.
It might also happen, that a wonder, which you yourself are already building in another city, gets created.
It's a bit gambling

.
There's 1 change in the Python\CvEventManager.py file. The change is commented with "alchemy lab".
As art this mod component uses the
Amethyst College by
Psychic_Llamas.
The image for the button was taken from
here.
This mod component was partially a request by
Spillsandstains.
---------------------
2 row religion advisor
ATTENTION: Documentation of this screen is extremly poor. It's probably better to use
these screens instead.
Title already says it: This screen ads a second row to the religions, so that you can fit more on the screen without making it dynamic/adding a scroll bar.
I've basically copied all the needed stuff and adjusted height + width. I did some things before i really knew what i were doing, so everything in the file itself looks like a mess, there are way to many comments, all the code is wrongly distributed...i'd not really advise anyone to use it, if he wants to make serious changes. I still want to upload it, someone might find it useful.
There are 2 variables in the file, which you can tweak if necessary:
###2 row religions - start
self.X_RELIGION_START = 140
self.DX_RELIGION = 93
###2 row religions - end
first variable determines where the icons begin at the left, the second variable determines the distances between the icons.
This mod component was a partial request by
Kathy.
I did NOT make the additional religions in the screen and they are NOT in this download. They are from
JARM
------------------------
Project: Renaissance
This modcomponent adds the custom project "Renaissance" to the game. Building this project will trigger a golden age (length of GA scales automatically).
This mod component includes:
- 2 XML files: the ProjectInfos.xml for the project entry, and a text XML for the custom text
- 1 Button
- 2 Python files: CvEventManager.py and CvGameUtils.py. There is one change in each python file, and they are labeled with "Renaissance".
ATTENTION: Since there's no real value assigned to python projects, the AI will not build them. Due to that, there's a custom AI part included (the change in CvGameUtils), which will make the AI build the project under the right circumstances. But the AI will not be very smart in its decision. So please carefully monitor the AI if you add this project and adjust values if needed.
Thanks at this point to God-Emperor, who gave me a important hint here.
This mod component was done as request from el_hidalgo.
Button image and text snipped are taken from wikipedia (links are included).
-------------------
Project: Hanseatic League
This modcomponent adds the custom project "Hanseatic League" to the game. Building this project will grant a free great merchant and a free galleon with the promotions sentry and navigation 1.
This mod component includes:
- 2 XML files: the ProjectInfos.xml for the project entry, and a text XML for the custom text
- 1 Button
- 2 Python files: CvEventManager.py and CvGameUtils.py. There is one change in the CvEventManager python file and 2 changes in CvGameUtils, and they are labeled with "Hanseatic League".
ATTENTION: Since there's no real value assigned to python projects, the AI will not build them. Due to that, there's a custom AI part included (the change in CvGameUtils), which will make the AI build the project under the right circumstances. But the AI will not be very smart in its decision. So please carefully monitor the AI if you add this project and adjust values if needed.
Thanks at this point to God-Emperor, who gave me a important hint here.
This mod component was done as request from el_hidalgo.
Button image and text snipped are taken from wikipedia (links are included).
------------------------------------------------------
StartingPopup
StartingPopup: Civ specific
It has been several times been requested: This is a simple example how to add a popup at the beginning of a mod, directly after the dawn of men screen.
There's one change in CvEventManager.py, search for "starting popup".
One XML file is included for the example text.
Promotion: Barbar hunter
Promotion: Hunter
These mod components ad a promotion to the game, which allows units to gain experience through fights against barbarian/animal units, even after they reached the 5XP limit for fight against animals/10XP against barbarians. The promotions will also be used by the AI under certain circumstances.
The download includes besides the PromotionInfos.xml and text XML for the promotion entry the CvEventManager.py with 2 changes (labeled with hunter / barbar hunter) and the promotion button (out of
this pack by Rabbit, White).
In the modified sections there are 2 things mentioned which influence the AI: TRAIT_AGGRESSIVE , as well as BUILDINGCLASS_GREAT_WALL for barbar hunter. You have to change these entries if you removed them in your mod.
guidelines for AI decissions:
These mod components were requested by hrochland.
In case people are interested in similar mod components, they should take a look at
Basic Barbarian Great General Experience.