Modding: Events

From Surviving the Aftermath Wiki
Jump to navigation Jump to search

Event basics[edit | edit source]

You can create your own in-game encounters and add them to the game as mods. Just like any other mod, you first need to do a basic modding setup detailed in Modding:Basics. Once you have your mod tool project ready, you will need a localization file and an event folder that should already be there. In the pre-existing 'Mod' file you need to add a name, a description and an icon for your mod, as well as input the preferred version number. Use the localization file for adding texts and the pre-existing event can be modified with 'Notepad++ or a similar editor(set language to XML to get color-coded tags). Other ready made event examples can be found at the end of this document.

Every game event requires text for descriptions, sounds, choices and an illustration to put it all together. This document will go over the syntax and everything you need to write an event, even from scratch. Event XML files should always follow the following naming convention: “Eventnamehere.event”. This can simply be done by renaming your file, if it ends in .xml for example.

Bare minimum an event needs:

  • Name of the event
  • Initial description text
  • One choice and its button text
  • Description of the outcome
  • Event illustration
  • Event XML file named “Eventnamehere.event”

You can create simple events such as survivors coming over to ask for food or more elaborate ones with several different options and outcomes. Triggers enable you to tie the event to a specific time of day, building present in the colony and so on. Various content options allow you to tweak sound and 3D models attached to the situation.

Events can:

  • Give, take or exchange resources
  • Give more colonists (but not take away)
  • Add conditions to incoming or existing colonists (injury, radiation sickness etc.)
  • Affect the colony’s overall happiness

All ID’s with a hashtag # refer to a text in a localization file, which are converted to an actual text string in-game. For example, <button text_key="#EVENT_EXAMPLE_GO" /> could convert to a button reading “Let the colonists go”. You can also write your own texts by adjusting the localization file in the project, or by leaving out the hashtag(#) and writing directly in the XML. For example: <button text_key="Your text goes here" />.

Basic XML structure[edit | edit source]

Here’s an abbreviated example event with bolded parts explaining in detail what each of them does.

Lists[edit | edit source]

First, list all the resources and possible random event results. Events and quests can give resources while only events can give new colonists to the player. If you want randomization to your quest results like positive or negative outcomes, you must list them here.


   <Resource list name> 		List of resources
       <Resource types used> 		Type and quantities of the resources
   </Resource list name>

   <Colonist list name>		List of new colonists
       <Colonists you might receive>	Gender, age and possible conditions of the colonist(s)
   </Colonist list name>

   <Event list name> 			List of random outcomes
       <Positive event /> 		ID of the positive outcome
       <Negative event /> 		ID of the negative outcome
   </Event list name>
   <Catastrophe list name> 		List of catastrophes
      <Catastrophe involved> 		Any catastrophes that may be relevant to your event, e.g. as a trigger condition
   </Catastrophe list name>

	<resource_list name="YOUR_01_FOOD_01">
		<resource type="Potato" min="10" max="25" />
	<resource_list name="YOUR_SEED_01">
		<resource type="Carrot" min="1" max="1" />
		<resource type="Sunflower" min="1" max="1" />

	<colonist_list name="EVENT_YOUR_COLONISTS_01">
		<colonist age="10" gender="male" />
		<colonist age="31" gender="female" />
	<catastrophe_list name="EVENT_NAME_DISASTERS">
		<catastrophe name="Winter"/>
	<event_list name="EVENT_YOUR_01_RESULTS">
		<event_id id="EVENT_YOUR_01_GOOD_RESULT" />
		<event_id id="EVENT_YOUR_01_BAD_RESULT" />


Initial setup[edit | edit source]

Then, set up what the player sees in the notification, what text the initial description uses, different choices, illustration and other parameters such as triggers, 3D models and sound assets.

<Event ID> 				Unique ID for the event and timeout conditions

       <Event content /> 		Various parameters for refining the event
       <Triggers /> 			When and why the event is triggered, usually how many days have passed, the time of day or which buildings need to be built

<event id="EVENT_YOUR_01" timeout="200" >                                            

<content header_key="Name of your Event"
	desc_key="Description of your Event"
	notification_header_key="Notification title for your Event"
	notification_desc_key="Notification description for your Event"
	appear_position_type ="Colony"/>
<trigger type="DaysPassed" min="12" max="9999" />
<trigger type="TimeOfDay" min="0.20" max="0.80" />
<trigger type="CurrentCatastrophe" white_list="true" catastrophe_list="EVENT_NAME_DISASTERS" />  

Player choices[edit | edit source]

Choices the player can make will be listed next immediately below the initial setup in the XML file.

       <choice> 			A choice the player can take
           <Button text />              Text on the button
           <Load result />              Which result is loaded after pressing the button
Example of three choices:
	<button text_key="First choice button text here" />
	<result type="LoadEvent" target_event_id="EVENT_YOUR_01_RESULTS" />
	<button text_key="Second choice button text here" />
	<result type="LoadEvent" target_event_id="EVENT_YOUR_01_RESULTS_2" />
	<result type="ModifyResources" modify_type="removeSame" amount="1" list_name="YOUR_01_FOOD_01" is_hidden="false" />

	<button text_key="Third choice button text here" />
	<result type="LoadEvent" list_name="EVENT_YOUR_01_RESULTS_3" />

<lifetime unique="true" />

Results[edit | edit source]

Finally, create results for the choices a player makes

<Positive result> 			Text and content of the result
   <Result 1 content /> 
       <choice>		                Parameters of the result
          <Button text /> 		Button text in once the event is over
          <Load result /> 		Results of this outcome

<Negative result>
   <Result 2 content />
          <Button text /> 		Button text in once the event is over
          <Load result /> 		Results of this outcome

<event id="EVENT_YOUR_01_RESULT" parent_event_id="EVENT_YOUR_01"> 

	<content header_key="Name of your Event"
	desc_key="Description of this result"
	soundevent_id="Positive" />

                <result type="ModifyColonistsNeeds" event_need_id="AGREE" happiness_delta = "0.2" duration ="800" />
		<result type="SpawnColonists" modify_type="add" amount="2" list_name="EVENT_YOUR_COLONISTS_01" is_hidden="false" />
		<result type="RunAnimation" animation_name="Exit" is_hidden="true" />
		<button text_key="#EVENT_DONE" />

	<lifetime unique="false" />

Adding events into the game[edit | edit source]

Once your event is done, you can build your mod add it into the game. Follow the instructions in modding: basics to do this. Ensure you have the correct version of Unity and mod tool project installed.

Once your files are all ready and in the right folders, click "Build Mod" from Mod->Build Mod. You can then launch the game and the mod should be visible under the "Mods" menu if it is enabled in your playset.

Image of building a mod
Building the mod
Mod in Epic Games
Mods must be added to the right playset in the launcher

Testing the event[edit | edit source]

Once the event is in the game it should be tested to ensure it works properly. After launching the game errors can sometimes be spotted from the player-prev log, which can be found from: %USERPROFILE%\AppData\LocalLow\Iceflake Studios\Surviving the Aftermath\

To make testing quicker, you can add priority to your events or quests. This makes them spawn more likely once all the other trigger conditions are met. This can be done by inputting priority value after event ID as follows:

<event id="EVENT_EVENTNAME" priority="5000">

List data[edit | edit source]

Resources[edit | edit source]

Listing resources:

<resource_list name="YOUR_RESOURCES_01">
	<resource type="Plank" min="25" max="35" />
	<resource type="Fiber" min="15" max="25" />
	<resource type="Concrete" min="20" max="30" />

Giving the player resources:

<result type="ModifyResources" modify_type="add" amount="1" list_name="YOUR_RESOURCES_01" />

Removing resources from the player:

<result type="ModifyResources" modify_type="removeSame" amount="1" list_name="YOUR_RESOURCES_02" />

Some IDs differ from their resource name due to changes in the game (for example ID for Junk is “Scrap”). To add seeds or eggs set compatible crop or insect type min and max amount to "1".

Resource name ID and syntax

Resource name ID/Syntax
Logs Wood
Wood Plank
Metal Metal
Junk Scrap
Parts Parts
Hunting Rifle Guard_Rifle
Shotgun Guard_Rifle_2
Automatic Rifle Guard_Rifle_3
Basic Tools Tools
Durable Tools Tools_2
Superior Tools Tools_3
Basic Clothing Cloth
Sturdy Clothing Cloth_2
Protective Clothing Cloth_3
Flax seed Flax
Fiber Fiber
Metal Scrap Debris
Plastic Trash Trash
Firewood Firewood
Rubble Rubble
Concrete Concrete
Rare Metals Rare
Herbs Medicinalherb
Medicine Medicine
Iodine Pills Iodine
Antibiotics Antibiotics
Herbal Medicine Herbal
Components Component
Electronics Electronics
Plastic Plastic
Fun Box Entertainment
Iodine Pills Iodine
Antibiotics Antibiotics
Corn Corn
Potatoes Potato
Wheat Wheat
Cabbages Cabbage
Lettuce Lettuce
Carrots Carrot
Soybeans Soybean
Peanuts Peanut
Fish Fish
Venison Venison
Prime Meat PrimeMeat
Berries Berries
Crickets Crickets
Cockroaches Cockroaches
Canned Fruit CannedFruit
Jerky Jerky
Protein Bars ProteinBars
Prime Meat PrimeMeat
Mealworms Mealworms
Buffaloworms Buffaloworms
Waxworms Waxworms
Insect Meal MealInsect
Mixed Meal MealMixed
Meat Meal MealMeat
Vegetable Meal MealVeg
Milk Milk
Flour Flour
Bread Bread
Beetle Bread BeetleBread
Cinnamon Bun CinnamonBun
Sunflower seed Sunflower
Oil Oil
Fuel Fuel
Pollution Pollution
Science Points Research
Silver Currency
Seeds "cropname" min="1" max="1" | Example: "Carrot" min="1" max="1"
Eggs "insectname" min="1" max="1" | Example: "Crickets" min="1" max="1"

Colonists[edit | edit source]

If you wish to add people to your colony as a result of the event, you can use the following format:

Create a list of colonist similar to resource list:

<colonist_list name="EVENT_SURVIVORS_PEOPLELIST">
  <colonist age="8" gender="female" />
  <colonist age="25" gender="male" />
  <colonist age="64" gender="female" conditions="Infected"/>

And use the following line to spawn one random person from that list:

<result type="SpawnColonists" modify_type="add" amount="1" list_name="EVENT_SURVIVORS_PEOPLELIST" />

You can also set give them a condition like Infected, RadiationSickness or Injured.

Conditions[edit | edit source]

Conditions can be given to colonists as an event outcome.

<result type="ModifyColonistsConditions" amount="1" condition="Injured" />

Name and ID used in the XML:

Condition ID
Injured Injured
Radiation sickness RadiationSickness
Infected Infected
Mutated Mutated
Hypothermic Hypothermic
Malnourished PoorlyNourished
Dirty HygieneRed

Illustrations[edit | edit source]

These illustrations listed below are ready to use with just by inputting the ID. Used in the initial setup:

Illustration ID Description Image Thumbnail
Event_Crime_2 One colonist surrounded by others
Quest_Dark Dark area with a veiled structure
Quest_DarkTunnel Narrow dark corridor
Event_Injured Wounded people returning to colony
Event_ Three armed people scouting
Specialist start.png
Event_Environment Group of survivors roaming the wasteland
Event_Driving Car and passengers speeding past a large sign
Quest_Distant_Structure Distant large structure
Event_Bandit Group of menacing bandits with prisoners
Event_Sick A dimly-lit tent full of injured/sick people
Event_Fight Two people fighting, surrounded by others
Event_Feast Food items on a wooden table
Event_Crime One colonist being held against a wall
Event_Crafting Misc. items on a table
Quest_Vault_Ruins A vault ruin
Quest_Battlefield An old battlefield
Quest_Survivors2 Survivors being turned away
Quest_Colony One person looking at a scenery
Event_Scout A single scout using binoculars, looking into the distance
Event_Unrest An angry group of colonists
Event_Trade A trade involving multiple people
Event_Van A closeup of a vehicle
Car image.png
Event_Trade Jolly merchant with a van
Quest_Tower A mast
Event_Survivors1 Guards looking towards nondescript people outside the gate
Survivors image.png
Event_Survivors2 Nondescript people coming towards the gate
Event_Survivors3 A group of worn-down, exhausted people
Event_Survivors_Trouble_Crash Stuck car surrounded by people
Quest_Survivors_Captured Bandits with some captives
Quest_Survivors_Camp Friendly people meeting each other
Quest_Shop Abandoned building
Quest_Stalkers Captives being moved around
Event_Specialists1 Colonists on a hunt
Event_Specialist One person walking away from a society
Event_Society Looking at a structure with binoculars
Quest_Winter People caught in a snowstorm
Event_Scavengers Two people scavenging a car
Event_Scavenge Three people scavenging
Event_Van A red van with a person with a rifle on top with others around him
Quest_Radio A man listening to a message
Event_pollution_clean_up People cleaning up pollution
Event_polluted_soil Scene of pollution
Event_polluted_shelter One person being carried away from a building
Quest_Planecrash Crashed airplane
Event_Outposts Person carrying crates
Collecting resources.png
Quest_Office An abandoned office
Event_Moon People wandering during winter
Quest_Messenger Delivering a message
Event_Meeting People meeting up
Quest_Hut A hut in the woods
Quest_Hospital Ruined hospital
Quest_Hangar Abandoned hangars
Event_Gate2 Person entering or exiting from the gate
Quest_Fortified A ruined structure
Quest_Fog People emerging from the fog
Event_Flare People receiving a signal
Event_Fire Building burning inside the colony
Event_Construction Constructing a building
Event_Catastrophe People traveling during a disaster
Event_Chase Bandits chasing someone
Event_call_group Sending a signal
Quest_Burnedground Smoke rising from the distance
Quest_Bunker A closed bunker door
Quest_Beast A large beast emerging
Quest_Banditbanner A bandit banner
Event_Bandit_camp A structure on top of a hill
Quest_Harvest Dying crops
Quest_Ambush Bandits preparing to attack
Quest_Settlement Village from a disatnce
Event_Combat_Ambush Bandits ambushing a structure
Event_Combat_Infiltration Raging bandits
Event_Combat_Triumph People celebrating a victory
Event_meteors Meteors falling
Event_fallout People in hazmat suits
Event_fire2 A city in the midst of a heat wave
Character_Bandit A single masked bandit
Character_Man_Cultist A male with open arms
Character_Annoyedguard A frustrated guard
Character_Boy Cheeky child
Kid 1.png
Character_Child Crying child
Kid 2.png
Character_Angryworker A stern worker
Character_Adventurer An enthusiastic man
Character_Man A large beaded man holding a gas canister
Character_HazardGuy Masked colonist in a hazmat suit
Character_Carrier_Woman A stern woman next to some crates
Character_Brawler Brawling colonist
Character_Banditwoman Female bandit playing with a grenade
Character_Bandits Two bandits with weapons
Character_Bandit2 Single bandit
Bandit 1.png
Character_Bandit_Leader Single menacing and big bandit
Bandit 2.png
Character_Bandit_Ambusher Bandit in furry clothes
Bandit 3.png
Character_Bandit_Cultist Menacing bandit holding a gun
Character_Bandit_Hazmat Bandit in a hazmat suit
Character_AngryMob Two angry colonists
Character_Packrat Male survivor
Character_BagLady Woman with a trolley
Character_Wounded Injured man carried by another
Character_Hurtwoman A woman holding her arm in pain
Character_Survivors Ill woman and a child
Character_Woman_Unclean Unclean colonist
Character_Woman_Old Older woman
Charactcter_Angrywoman Angry woman
Character_Woman Confident woman
Character_Wanderer A man with a large backpack
Character_Survivor_woman One female survivor
Survivor 1.png
Character_Survivor_raincoat One survivor in a raincoat
Character_Survivor_man One male survivor
Survivor 2.png
Character_Survivor_group2 Two survivors
Survivors 2.png
Character_Survivor_group Two survivors
Survivors 3.png
Character_Scout Colonist with their back turned using binoculars
Scouting image.png
Character_Merchant A jolly merchant
Character_Merc A colorful mercenary with a gun and a crossbow
Character_Medic A grinning, colorful young woman with medic's attire
Character_Unreliableman A peculiar man clapping
Character_Tiredworker A tired worker sweeping off sweat
Character_Man_Injured An injured man
Character_Man_Hungry A thin male colonist feeling hungry
Character_Hazmat A male colonist in a hazmat suit

Event_imagename illustrations are traditional 16:9 pictures. Character_imagename are characters standing on the left side of the text area.

3D models[edit | edit source]

Used in the initial setup. The 3D models' appear position can either be at the campsite(Colony) or Gate.

appear_position_type ="Colony"
Model(s) ID
Merchant's van Default
A colorful van Merchant
Rusty van Apothecary
A single beat-up car drives to the gate RegularCar
A single man Single, Colony_man
A single woman SingleFemale, Colony_woman
One injured man carried by another TwoMenInjured
Two men arguing TwoMen
Woman with a child WomanChild
Child alone ChildAlone
Couple of bandits Bandit
A single bandit SingleBandit
A group of bandits with hostages Slavers
Three people in a circle Group
Five people in a circle MediumGroup
Leader and small group approach the gate LeaderGroup
Two colonists with binoculars Scouting
Armored cars and armed people arrive at the gate Mercs
A deer MutantDeer

Sound assets[edit | edit source]

These sound options can be used with just by inputting the ID. Used in the initial setup:

Sound ID
Event Start Survivors
Event Start Help
Event Start Hunt
Event Start Merchant
Event Start Bandit
Positive Outcome Positive
Negative Outcome Negative
Explosive Outcome buildingonfire
Quest Start QuestOpened
Quest QuestUpdated
Quest Failed QuestFailed
Quest Completed QuestCompleted
Special Quest Start MainQuestOpened
Special Quest MainQuestUpdated

Buildings[edit | edit source]

Used in setting trigger conditions to events (event will spawn only if all trigger conditions are met), for example:

<trigger type="Building" target="Tent" /> 

Buildings can be damaged at the end of an event. Buildings start smoking at 50% health and catch on fire at 25%. Some special buildings such as storages and the gate cannot be damaged this way.

<result type="DamageBuilding" target_name="Tent" min_damage = "0.51" max_damage ="0.51" target_count="1" is_hidden="true" />

Some buildings can also be contaminated as an event result.

<result type="PolluteBuilding" target="Field" target_count="1" pollution_amount="0.85" is_hidden="true" />

Building name and ID used in the XML:

Building ID and syntax Indestructible
The Gate Gate
Reinforced Gate Gate
Fortress Gate Gate
Doomsday Bunker EndgameVault x
Campsite Campsite x
Colony Center MissionControl x
Headquarters CommandCenter x
Scout Tower ScoutTower
Guard Post GuardPost
Outpost Depot OutpostDepot
Engineer Depot OutpostDepotLvl2Name
Trade Center TradeCenter x
Garage Garage
Radar Radar
Tent Tent
Crowded Tent TentLvl2
Emergency Shelter EmergencyShelter
Crowded Emergency Shelter EmergencyShelterLvl2
Shanty Shanty
Improved Shanty ShantyUpgrade
Tenement Tenement
Improved Tenement TenementUpgrade
House House
Heated House HouseLvl2
Two-story House TwoStoryHouse
Heated Two-story House TwoStoryHouseLvl2
Food Storage StorageFood x
Stockpile StorageOutside x
Warehouse StorageInside x
General Storage GeneralStorage x
Waste Dump NuclearStorage
Trapper Trapper
Hunting Cabin TrapperUpgrade
Fishing Pier Fishery
Fishing Hut FisheryLvl2
Small Field Field
Small Irrigated Field Field
Medium Field Field
Medium Irrigated Field Field
Large Field Field
Large Irrigated Field Field
Greenhouse Greenhouse
Insect Farm InsectFarm
Ranch Ranch
Large Ranch Ranch
Aqua Farm AquaFarm
Cookhouse Cookhouse
Mess Hall MessHall
Bakery Bakery
Mill Mill
Water Collector WaterCollector
Water Well Well
Drilled Well WellUpgrade
Clean Water Storage WaterStorageSmall
Large Clean Water Storage WaterStorageLarge
Water Tower WaterTower
Large Water Tower WaterTowerLvl2
Bore Well BoreWell
Water Pump WaterPump
Recycler Recycler
Advanced Recycler RecyclerUpgrade
Scrapper Scavenger
Advanced Scrapper ScavengerUpgrade
Concrete Scavenger ConcreteScavenger
Lumber Yard LumberYard
Forester Forester
Logging Camp LoggingCamp
Sawmill Sawmill
Plastic Extractor PlasticExtractor
Plastic Auto-Extractor PlasticAutoextractor
Metal Extractor MetalExtractor
Metal Auto-Extractor MetalAutoextractor
Concrete Extractor ConcreteMixer
Concrete Auto-Extractor ConcreteAutoExtracor
Maintenance Depot MaintenanceDepot
Tailor Tailor
Grand Tailor TailorUpgrade
Toolshop ToolShop
Grand Toolshop ToolShopUpgrade
Mechanic Shop MechanicShop
Environmental Station EnvironmentalStation
Gunsmith Gunsmith
Grand Gunsmith GunsmithUpgrade
Refinery Refinery
Electronics Factory ElectronicsFactory
Outhouse Outhouse
Toilet OuthouseUpgrade
Sauna Sauna
Steam Sauna SaunaUpgrade
Medical Tent MedicalTent
Field Hospital FieldHospital
Burial Pit ThePit
Cemetery Cemetery
Med Lab MedLab
Burner Heater
Boosted Burner HeaterLvl2
Radiator EnergyHeater
Industrial Radiator EnergyHeaterLvl2
School School
Transfromer Transformer
Large Transfromer TransformerLarge
Solar Panel SolarGeneratorNew
Large Solar Panel LargeSolarPanelNew
Wind Turbine WindGeneratorNew
Large Wind Turbine WindTurbineNew
Battery Rack Battery
Large Battery Rack LargeBattery
Lightning Rod LightningRod
Lightning Tower LightningRodLvl2
Memorial MemorialNew
Shrine ShrineNew
Brawl Pit FightingPitNew
Botanical Garden BotanicalGardenNew
Public House PublicHouseNew
Library LibraryNew
Stromdome StormDomeNew
Movie Theater MovieTheaterNew
Game Arcade GameArcadeNew
Large Green Bush Bush1 x
Large Yellow Bush Bush2 x
Pink Flower Bush Bush3 x
White Flower Bush Bush4 x
Small Green Bush Bush5 x
Tall Green Bush Bush6 x
Red Flowers Bush7 x
Tiny Pink Flowers Bush8 x
Tiny White Flowers Bush9 x
Green Tree Bush10 x
Bottle Tree Decoration1 x
Bottle Cactus Decoration2 x
Plastic Flowers Decoration3 x
Plastic Viola Decoration5 x
Log Flowers Decoration4 x
Paper Windmills Decoration6 x
Torch Simpletorch01 x
Lantern Lanternholder01 x
Brazier Brazier01 x
Small Street Light Electriclampsmall01 x
Medium Street Light Electriclampmedium01 x
Large Street Light Electriclamplarge01 x
Pathfinder Statue Pathfinder x
Colony Banner Stand DecoLunarBanner x

Happiness effects (colonist needs)[edit | edit source]

Colonists' happiness can be temporarily shifted as an event result. Postive outcome example:

<result type="ModifyColonistsNeeds" event_need_id="TRIPSUCCESS" happiness_delta = "0.15" duration ="540" is_hidden="false" />

Negative outcome example:

<result type="ModifyColonistsNeeds" event_need_id="DISAGREE" happiness_delta = "-0.2" duration ="320" is_hidden="false" />

Name and ID used in the XML.

Text in Colony status screen ID and syntax
Ventured outside the Gate TRIPSUCCESS
Successful hunt HUNT
Minor bandit event BANDITS1
Bandit event BANDITS2
Major bandit event BANDITS3
Agreement AGREE
Disagreement DISAGREE
Declined request DECLINE
Nuclear Fallout FALLOUT
Magnetic Storm MAGSTORM
Meteor Shower METEORS

Hope effects[edit | edit source]

You can also add Hope effects, if playing with the Shattered Hope DLC. The Hope effect is referred to in the code as "unrest_delta". The results are inverted however, so "positives" gives a small decrease to hope, and "negativem" a medium increase to hope for example. If an unrest value is not given, a hope reward is automatically calculated based on the amount of happiness_delta, but it might not be optimal.


	        <result type="ModifyColonistsNeeds" event_need_id="DISAGREE" happiness_delta = "-0.2" unrest_delta = "positives" duration ="800" is_hidden="false" />
		<button text_key="Done" />

Note that adding Hope modifiers does not impact the compatibility of your mod when playing without the DLC. If the DLC is not present, these effects will merely be skipped.

Full event example document (Example.event)[edit | edit source]

And this is what it looks like once done. Pay close attention to the syntax, starting/closing tags and the structure.

   <resource_list name="EVENT_EXAMPLE_RESOURCES_01">
       <resource type="Metal" min="3" max="5” /> Which resources and how many are given or taken
       <resource type="Parts" min="2" max="3" />
   <resource_list name="EVENT_EXAMPLE_RESOURCES_02">
       <resource type="Tools" min="1" max="1" />
       <resource type="Medicine" min="1" max="1" />
   <colonist_list name="EVENT_EXAMPLE_01">
       <colonist age="25" gender="male" conditions="Injured"/>
       <colonist age="44" gender="female"/>
   <event_list name="EVENT_EXAMPLE_01_RESULTS">
       <event_id id="EVENT_EXAMPLE_01_POSITIVE" />
       <event_id id="EVENT_EXAMPLE_01_NEGATIVE" />

   <event id="EVENT_EXAMPLE_01" timeout="480" cooldown="9600">  How long the event is available and when can it reappear (in seconds)
   <content   header_key="#EVENT_EXAMPLE_01_NAME" 
              visual_object_type="Group" />
              <trigger type="DaysPassed" min="10" max="999" />   Time period the event can appear	
              <trigger type="TimeOfDay" min="0.2" max="0.5" />   Time of day event can appear. Midday: 0, Dusk: 0.33, Midnight: 0.5, Dawn: 0.66
              <trigger type="Building" target="Trapper" />       Which building must be built before the event can appear, usually the Gate

       <button text_key="#EVENT_EXAMPLE_GO" />
       <result type="LoadEvent" list_name="EVENT_EXAMPLE_01_RESULTS" /> Picks one result from the list at random

       <button text_key="#EVENT_EXAMPLE_STAY" />
       <result type="ModifyColonistsNeeds" event_need_id="DECLINE" happiness_delta = "-0.02" duration ="300" />  Decision leads to 2% Happiness decrease for 300 seconds
       <result type="LoadEvent" target_event_id="EVENT_EXAMPLE_01_STAY" />

<event id="EVENT_EXAMPLE_01_POSITIVE" parent_event_id="EVENT_EXAMPLE_01">
  <content  header_key="#EVENT_EXAMPLE_01_LOOT_NAME" 
       <button text_key="#EVENT_DONE" />
       <result type="ModifyResources" modify_type="add" amount="1" list_name="EVENT_EXAMPLE_RESOURCES_01" /> Choice led to adding 1 resource (example: 2 Parts)  from the first list to the player
       <result type="ModifyResources" modify_type="add" amount="1" list_name="EVENT_EXAMPLE_RESOURCES_02" /> And 1 resource from the second list

<event id="EVENT_EXAMPLE_01_NEGATIVE" parent_event_id="EVENT_EXAMPLE_01">
   <content  header_key="#EVENT_EXAMPLE_01_INJURY_NAME" 
             soundevent_id="Negative" />
       <button text_key="#EVENT_DONE" />
       <result type="ModifyColonistsConditions" amount="1" condition="Injured” /> Choice led to 1 random injured colonist

<event id="EVENT_EXAMPLE_01_STAY" parent_event_id="EVENT_EXAMPLE_01">
   <content  header_key="#EVENT_EXAMPLE_01_STAY_NAME" 
       <button text_key="#EVENT_DONE" />

< /data>

Full event examples[edit | edit source]

Here are examples of full modded event XML files. These template events can be installed from Paradox Mods.

"Cinematic Complications"[edit | edit source]
<data version="0.0.6">


		<resource_list name="STRANGER_01_FUN_BOX">
			<resource type="Entertainment" min="9" max="15" />
				<resource_list name="STRANGER_01_HONOR">
			<resource type="Cabbage" min="10" max="12" />
				<resource_list name="STRANGER_01_GLORY">
			<resource type="Wheat" min="10" max="12" />
				<resource_list name="STRANGER_01_LOOT">
			<resource type="Crickets" min="10" max="12" />


		<event id="EVENT_STRANGER_01" timeout="200" cooldown="6000" priority="3000"> 

			<content header_key="Cinematic Complications"
			         desc_key="When the guards arrive at the gate they find an odd-looking man in a torn and dirty suit shouting at the gate through a rolled-up newspaper, ”I said action! What are you waiting for?! This is your big speech before the battle, put some heart in it!” Clearly he is a few peas short of a pod. What kind of a speech will the guards hold?"
               notification_header_key="A strange man shouting orders at the gate"
               notification_desc_key="The scene reminds you of something..."
               visual_object_type="VanMan" />
			<trigger type="DaysPassed" min="5" max="9999" />
			<trigger type="TimeOfDay" min="0.20" max="0.60" /> 
			<trigger type="Building" target="Gate" />

				<button text_key="Speech filled with honor" />
				<result type="LoadEvent" target_event_id="EVENT_STRANGER_01_HONOR" />
				<button text_key="Speech about glory" />
				<result type="LoadEvent" target_event_id="EVENT_STRANGER_01_GLORY" />
				<button text_key="Speech promising riches" />
				<result type="LoadEvent" target_event_id="EVENT_STRANGER_01_LOOT" />
				<button text_key="Ignore the goofball" />
				<result type="LoadEvent" target_event_id="EVENT_STRANGER_01_REFUSE" />

			<lifetime unique="false" />

		<event id="EVENT_STRANGER_01_HONOR" parent_event_id="EVENT_STRANGER_01"> 

			<content header_key="Cinematic Complications"
			         desc_key="They decide to humor the strange man. ”My brothers and sisters”, you say as you turn towards your Colonists, ”I look at you and see hearts filled with valor, each more precious than the golden rays of the sun itself...” The man listens to the speech intently, holding the rolled-up newspaper in front of his eye while cranking a non-existing lever next to it. ”Fantastic, just fantastic!” he exclaims and reaches into his suitcase and gives the guards something, ”Here, we’re done for the day, but study this for tomorrow's scene—and eat something”, he says and leaves."

				<button text_key="Done" />
				<result type="ModifyResources" modify_type="add" amount="1" list_name="STRANGER_01_FUN_BOX" is_hidden="false" />

			<lifetime unique="false" />

		<event id="EVENT_STRANGER_01_GLORY" parent_event_id="EVENT_STRANGER_01"> 

			<content header_key="Cinematic Complications"
			         desc_key="They decide to humor the strange man. ”My eternal guard”, you say as you turn toward your Colonists, ”I look at you and see no ordinary people. I see beasts—blood-thirsty and greater than death itself, beasts worthy of songs that will be sung of this day and echo through the ages...” The man listens to the speech intently, holding the rolled up newspaper on his eye while cranking an invisible lever next to it. ”Great, a truly classic take!” he exclaims and reaches into his suitcase and gives the guards something, ”Here, we’re done for the day, but study this for tomorrow's scene—and eat something”, he says and leaves."

				<button text_key="Done" />
				<result type="ModifyResources" modify_type="add" amount="1" list_name="STRANGER_01_FUN_BOX" is_hidden="false" />

			<lifetime unique="false" />


		<event id="EVENT_STRANGER_01_LOOT" parent_event_id="EVENT_STRANGER_01"> 

			<content header_key="Cinematic Complications"
			         desc_key="They decide to humor the strange man. ”Alright, you worthless dogs”, you say as you turn toward your Colonists, ”Do you know what awaits us beyond that line of soldiers? Gold, more than you can ever imagine! After this day, you will live like royalty...” The man listens to your speech intently, holding the rolled up newspaper on his eye while cranking a non-existing lever next to it. ”A bit too contemporary, but fine enough I suppose”,he exclaims and reaches into his suitcase and gives the guards something, ”Here, we’re done for the day, but study this for tomorrow's scene—and eat something”, he says and leaves."

				<button text_key="Done" />
				<result type="ModifyResources" modify_type="add" amount="1" list_name="STRANGER_01_FUN_BOX" is_hidden="false" />

			<lifetime unique="false" />

		<event id="EVENT_STRANGER_01_REFUSE" parent_event_id="EVENT_STRANGER_01"> 

			<content header_key="Cinematic Complications"
			         desc_key="They tell the man to leave, which causes him to immediately slam the newspaper down on the ground. ”This is mutiny! You worthless union lackeys, I’ll make sure you never work in this industry again! You will rue the day you decided to betray Sir Manfred Stickblock!” Before you manage to get another word in, the man has already stormed off."

        <result type="ModifyColonistsNeeds" event_need_id="DISAGREE" happiness_delta = "-0.2" unrest_delta = "positives" duration ="800" is_hidden="false" />
				<button text_key="Done" />

			<lifetime unique="false" />


"Much Needed Melodies"[edit | edit source]

<data version="0.0.6">


		<resource_list name="EVENT_FEAST_02_FOOD1">
			<resource type="Venison" min="10" max="20" />
			<resource type="Fish" min="10" max="20" />
		<resource_list name="EVENT_FEAST_02_FOOD2">
			<resource type="Potato" min="10" max="15" />
			<resource type="Corn" min="10" max="15" />
		<resource_list name="EVENT_FEAST_02_MEALS">
			<resource type="MealMixed" min="5" max="7" />



		<event id="EVENT_FEAST_02" timeout="200" cooldown="6000">

			<content header_key="#EVENT_FEAST_02_NAME"
					 appear_position_type ="Colony" />
			<trigger type="DaysPassed" min="20" max="90" />
			<trigger type="TimeOfDay" min="0.20" max="0.60" /> 
				<button text_key="#EVENT_FEAST_02_ALLOW" />
				<result type="ModifyResources" modify_type="removeSame" amount="1" list_name="EVENT_FEAST_02_FOOD1" />
				<result type="ModifyResources" modify_type="removeSame" amount="1" list_name="EVENT_FEAST_02_FOOD2" />
				<result type="ModifyResources" modify_type="add" amount="1" list_name="EVENT_FEAST_02_MEALS" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_ALLOW" />
				<button text_key="#EVENT_FEAST_02_REFUSE" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_REFUSE" />
			<lifetime unique="true" />

		<event id="EVENT_FEAST_02_REFUSE" parent_event_id="EVENT_FEAST_02"> 

			<content header_key="#EVENT_FEAST_02_REFUSE_NAME"

				<result type="ModifyColonistsNeeds" event_need_id="DECLINE" happiness_delta = "-0.15" duration ="800" is_hidden="false" /> 
				<button text_key="#EVENT_DONE" />

			<lifetime unique="true" />

		<event id="EVENT_FEAST_02_ALLOW" parent_event_id="EVENT_FEAST_02"> 

			<content header_key="#EVENT_FEAST_02_ALLOW_NAME"

				<button text_key="#EVENT_FEAST_02_ALLOW_02" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_RESULT_02" />
				<button text_key="#EVENT_FEAST_02_ALLOW_03" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_RESULT_03" />
				<button text_key="#EVENT_FEAST_02_ALLOW_04" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_RESULT_01" />

				<button text_key="#EVENT_FEAST_02_ALLOW_01" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_RESULT_04" />
			<lifetime unique="true" />

		<event id="EVENT_FEAST_02_RESULT_01" parent_event_id="EVENT_FEAST_02"> 

			<content header_key="#EVENT_FEAST_02_RESULT_01_NAME"

				<button text_key="#EVENT_DONE" />
				<result type="ModifyColonistsNeeds" event_need_id="FEAST" happiness_delta = "0.2" duration ="800" is_hidden="false" />

			<lifetime unique="true" />

		<event id="EVENT_FEAST_02_RESULT_02" parent_event_id="EVENT_FEAST_02"> 

			<content header_key="#EVENT_FEAST_02_RESULT_02_NAME"

				<button text_key="#EVENT_DONE" />
				<result type="ModifyColonistsNeeds" event_need_id="FEAST" happiness_delta = "0.1" unrest_delta = "negativexs" duration ="800" is_hidden="false" />

			<lifetime unique="true" />

		<event id="EVENT_FEAST_02_RESULT_03" parent_event_id="EVENT_FEAST_02"> 

			<content header_key="#EVENT_FEAST_02_RESULT_03_NAME"

				<button text_key="#EVENT_DONE" />
				<result type="ModifyColonistsNeeds" event_need_id="FEAST" happiness_delta = "0.25" unrest_delta = "negativem" duration ="800" is_hidden="false" />

			<lifetime unique="true" />

		<event id="EVENT_FEAST_02_RESULT_04" parent_event_id="EVENT_FEAST_02"> 

			<content header_key="#EVENT_FEAST_02_RESULT_04_NAME"

				<button text_key="#EVENT_DONE" />
				<result type="ModifyColonistsNeeds" event_need_id="FEAST" happiness_delta = "0.15" unrest_delta = "negatives" duration ="800" is_hidden="false" />

			<lifetime unique="false" />