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

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

[XML+Python] Event: Civil War

  1. The_J
    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.

    Images

    1. civilwar_event_1_wY9.jpg
    2. civilwar_event_2_4H1.jpg
    3. civilwar_event_3_9YS.jpg