• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.
Resource icon

[XML+Python] Event: Civil War 2016-10-05

This small mod component ads 2 events to the game.
The event triggers if you have an unhappy city, and it will lead to a creation of a new civ with this city.
The new civ will be on the same tech level, will get all the units in the city (+2 additional defenders), and will declare war on the previous owner of the city.
The first event has some specific options: You can edit it in the python file that the event should be restricted to only one civ, and that exactly another civ with a defined leader should spawn (as example: Rome gets an event where the Byzantines appear, with Justinian as leader).
The second event is without these restrictions. Is not restricted to any civ, and will first check if the derivative civ is present, and if not it will spawn a random civ.

Contents:
3 XML files:
- Events\EventInfos.xml
- Events\EventTriggerInfos.xml
- Text\CIV4GameText_CivilWar.xml
1 Python file:
- Python\EntryPoints\CvRandomEventInterface.py

The both event files contain 2 new entries at the end of the file, EVENT_CIVIL_WAR_ROME and EVENT_CIVIL_WAR_GENERIC / EVENTTRIGGER_CIVIL_WAR_ROME and EVENTTRIGGER_CIVIL_WAR_GENERIC.
In the python file the event code is at the end, search for civil war - custom event

There are no restrictions in the EventTriggerInfos.xml, besides that the city has to have some :mad:. If somebody uses this event, I really suggest that some more restrictions, like a tech, some :yuck:, or a civic are set. Maybe make it also an 1 time event too (haven't set more restrictions myself, because you always forget something during your tests).

This event was requested by Spillsandstains.
If you have any questions regarding this component, then please ask them in this thread.
  • civilwar_event_1_wY9.jpg
    civilwar_event_1_wY9.jpg
    135.6 KB · Views: 261
  • civilwar_event_2_4H1.jpg
    civilwar_event_2_4H1.jpg
    131.9 KB · Views: 274
  • civilwar_event_3_9YS.jpg
    civilwar_event_3_9YS.jpg
    146.3 KB · Views: 281
Author
The_J
Downloads
619
Views
654
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from The_J

Back
Top Bottom