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.

<list_data> 

   <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>
</list_data>

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

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

</list_data>

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

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

<content header_key="Name of your Event"
	desc_key="Description of your Event"
	image_name="Character_Man_Hungry" 
	soundevent_id="Help"
	notification_header_key="Notification title for your Event"
	notification_desc_key="Notification description for your Event"
	visual_object_type="MediumGroup" 
	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
       </choice>      
                  
Example of three choices:
<choice>
	<button text_key="First choice button text here" />
	<result type="LoadEvent" target_event_id="EVENT_YOUR_01_RESULTS" />
</choice>
			
<choice>
	<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" />
</choice>

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

<lifetime unique="true" />
</event>

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
       </choice>
</event>

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

Example:
<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"
	image_name="Character_Man_Hungry"
	soundevent_id="Positive" />

	<choice>
                <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" />
	</choice>

	<lifetime unique="false" />
        </event>
	</events>

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" />
</resource_list>

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"/>
</colonist_list>

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:

image_name="Character_Man"
Illustration ID Description Image Thumbnail
Event_Crime_2 One colonist surrounded by others
Accusation.png
Quest_Dark Dark area with a veiled structure
Dark.png
Quest_DarkTunnel Narrow dark corridor
Corridor.png
Event_Injured Wounded people returning to colony
Injured2.png
Event_ Three armed people scouting
Specialist start.png
Event_Environment Group of survivors roaming the wasteland
Roaming.png
Event_Driving Car and passengers speeding past a large sign
Race.png
Quest_Distant_Structure Distant large structure
Distance.png
Event_Bandit Group of menacing bandits with prisoners
Banditgroup.png
Event_Sick A dimly-lit tent full of injured/sick people
Sick.png
Event_Fight Two people fighting, surrounded by others
Fight.png
Event_Feast Food items on a wooden table
Feast.png
Event_Crime One colonist being held against a wall
Roughup.png
Event_Crafting Misc. items on a table
Tinker.png
Quest_Vault_Ruins A vault ruin
Vault.png
Quest_Battlefield An old battlefield
Battlefield.png
Quest_Survivors2 Survivors being turned away
Gatesurvivors.png
Quest_Colony One person looking at a scenery
Scoutlarge.png
Event_Scout A single scout using binoculars, looking into the distance
Scoutsmall.png
Event_Unrest An angry group of colonists
Mob.png
Event_Trade A trade involving multiple people
Trade.png
Event_Van A closeup of a vehicle
Car image.png
Event_Trade Jolly merchant with a van
Merchant2.png
Quest_Tower A mast
Mast.png
Event_Survivors1 Guards looking towards nondescript people outside the gate
Survivors image.png
Event_Survivors2 Nondescript people coming towards the gate
Survivorsatgate.png
Event_Survivors3 A group of worn-down, exhausted people
Pleading.png
Event_Survivors_Trouble_Crash Stuck car surrounded by people
Carstop.png
Quest_Survivors_Captured Bandits with some captives
Captives.png
Quest_Survivors_Camp Friendly people meeting each other
Visitor.png
Quest_Shop Abandoned building
Abandonedstore.png
Quest_Stalkers Captives being moved around
Captives2.png
Event_Specialists1 Colonists on a hunt
Hunters.png
Event_Specialist One person walking away from a society
Wandering.png
Event_Society Looking at a structure with binoculars
Spying.png
Quest_Winter People caught in a snowstorm
Winterstorm.png
Event_Scavengers Two people scavenging a car
Scavenging.png
Event_Scavenge Three people scavenging
Scavenging2.png
Event_Van A red van with a person with a rifle on top with others around him
Redvan.png
Quest_Radio A man listening to a message
Radio.png
Event_pollution_clean_up People cleaning up pollution
Cleanup.png
Event_polluted_soil Scene of pollution
Hazardenvironment.png
Event_polluted_shelter One person being carried away from a building
Pollutedbuildings.png
Quest_Planecrash Crashed airplane
Crashedplane.png
Event_Outposts Person carrying crates
Collecting resources.png
Quest_Office An abandoned office
Office.png
Event_Moon People wandering during winter
Winter.png
Quest_Messenger Delivering a message
Messenger.png
Event_Meeting People meeting up
Meetup.png
Quest_Hut A hut in the woods
Cabin.png
Quest_Hospital Ruined hospital
Highrises.png
Quest_Hangar Abandoned hangars
Hangars.png
Event_Gate2 Person entering or exiting from the gate
Entrance.png
Quest_Fortified A ruined structure
Ruins.png
Quest_Fog People emerging from the fog
Fog.png
Event_Flare People receiving a signal
Signal.png
Event_Fire Building burning inside the colony
Fire.png
Event_Construction Constructing a building
Construct.png
Event_Catastrophe People traveling during a disaster
Disasters.png
Event_Chase Bandits chasing someone
Chase.png
Event_call_group Sending a signal
Flare.png
Quest_Burnedground Smoke rising from the distance
Smoke.png
Quest_Bunker A closed bunker door
Door.png
Quest_Beast A large beast emerging
Beast.png
Quest_Banditbanner A bandit banner
Banditbanner.png
Event_Bandit_camp A structure on top of a hill
Hill.png
Quest_Harvest Dying crops
Dyingplant.png
Quest_Ambush Bandits preparing to attack
Ambush.png
Quest_Settlement Village from a disatnce
Colony.png
Event_Combat_Ambush Bandits ambushing a structure
Attack1.png
Event_Combat_Infiltration Raging bandits
Attack2.png
Event_Combat_Triumph People celebrating a victory
Victory.png
Event_meteors Meteors falling
Meteor.png
Event_fallout People in hazmat suits
Fallout.png
Event_fire2 A city in the midst of a heat wave
Heatwave.png
Character_Bandit A single masked bandit
Bandit.png
Character_Man_Cultist A male with open arms
Cultist.png
Character_Annoyedguard A frustrated guard
Angryguard.png
Character_Boy Cheeky child
Kid 1.png
Character_Child Crying child
Kid 2.png
Character_Angryworker A stern worker
Angryworker.png
Character_Adventurer An enthusiastic man
Adventurer.png
Character_Man A large beaded man holding a gas canister
Man.png
Character_HazardGuy Masked colonist in a hazmat suit
Hazmat.png
Character_Carrier_Woman A stern woman next to some crates
Carrier.png
Character_Brawler Brawling colonist
Brawler.png
Character_Banditwoman Female bandit playing with a grenade
Banditwoman.png
Character_Bandits Two bandits with weapons
Twobandits.png
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
Banditcultist.png
Character_Bandit_Hazmat Bandit in a hazmat suit
Hazmatbandit.png
Character_AngryMob Two angry colonists
AngryMob.png
Character_Packrat Male survivor
Packrat.png
Character_BagLady Woman with a trolley
BagLady.png
Character_Wounded Injured man carried by another
Injuredman.png
Character_Hurtwoman A woman holding her arm in pain
Hurtwoman.png
Character_Survivors Ill woman and a child
Womanchild.png
Character_Woman_Unclean Unclean colonist
Uncleanwoman.png
Character_Woman_Old Older woman
Oldwoman.png
Charactcter_Angrywoman Angry woman
Angrywoman.png
Character_Woman Confident woman
Colonywoman.png
Character_Wanderer A man with a large backpack
Unreliableman.png
Character_Survivor_woman One female survivor
Survivor 1.png
Character_Survivor_raincoat One survivor in a raincoat
SurvivorRaincoat.png
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
Merchant.png
Character_Merc A colorful mercenary with a gun and a crossbow
Merc.png
Character_Medic A grinning, colorful young woman with medic's attire
Apothecary.png
Character_Unreliableman A peculiar man clapping
Colonyman.png
Character_Tiredworker A tired worker sweeping off sweat
Tiredworker.png
Character_Man_Injured An injured man
Injuredcolonist.png
Character_Man_Hungry A thin male colonist feeling hungry
Hungryman.png
Character_Hazmat A male colonist in a hazmat suit
Hazmatworker.png

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.

visual_object_type="TwoMen" 
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:

soundevent_id="Help"
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
Indecision INDECISION
Agreement AGREE
Disagreement DISAGREE
Declined request DECLINE
Feast FEAST
Hostilities HOSTILITIES
Luck LUCK
Nuclear Fallout FALLOUT
Pandemic PANDEMIC
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.

Example:

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

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.


<list_data>
   <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>
   <resource_list name="EVENT_EXAMPLE_RESOURCES_02">
       <resource type="Tools" min="1" max="1" />
       <resource type="Medicine" min="1" max="1" />
 </resource_list>
   <colonist_list name="EVENT_EXAMPLE_01">
       <colonist age="25" gender="male" conditions="Injured"/>
       <colonist age="44" gender="female"/>
 </colonist_list>
   <event_list name="EVENT_EXAMPLE_01_RESULTS">
       <event_id id="EVENT_EXAMPLE_01_POSITIVE" />
       <event_id id="EVENT_EXAMPLE_01_NEGATIVE" />
   </event_list>
</list_data>

<events>
   <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" 
              desc_key="#EVENT_EXAMPLE_01_DESC" 
              image_name="Event_Example" 
              soundevent_id="Example" 
              notification_header_key="#EVENT_EXAMPLE_01_NOTIFICATION_HEADER" 
              notification_desc_key="#EVENT_EXAMPLE_01_NOTIFICATION_DESC" 
              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

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

   <choice>
       <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" />
   </choice>
</event>

<event id="EVENT_EXAMPLE_01_POSITIVE" parent_event_id="EVENT_EXAMPLE_01">
  <content  header_key="#EVENT_EXAMPLE_01_LOOT_NAME" 
            desc_key="#EVENT_EXAMPLE_01_LOOT_DESC" 
            image_name="Event_Scout" 
            soundevent_id="Positive"/>
  <choice>
       <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
  </choice>
</event>

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

<event id="EVENT_EXAMPLE_01_STAY" parent_event_id="EVENT_EXAMPLE_01">
   <content  header_key="#EVENT_EXAMPLE_01_STAY_NAME" 
             desc_key="#EVENT_EXAMPLE_01_STAY_DESC" 
             image_name="Event_Scout" 
             soundevent_id="Negative"/>
   <choice>
       <button text_key="#EVENT_DONE" />
   </choice>
</event>

</events>
< /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">

	<list_data>

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

	<events>

    
		<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?"
			         image_name="Event_Van"
               soundevent_id="Help"
               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" />

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

			<lifetime unique="false" />

		</event>
			
		<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."
			         image_name="Event_Van"
               soundevent_id="Positive"
					 />

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

			<lifetime unique="false" />

		</event>
		
		<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."
			         image_name="Event_Van"
               soundevent_id="Positive"
					 />

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

			<lifetime unique="false" />

		</event>

		<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."
			         image_name="Event_Van"
					 soundevent_id="Positive"
					 />

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

			<lifetime unique="false" />
			
		</event>

		<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."
			         image_name="Event_Van"
				 soundevent_id="Negative"
					 />

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

			<lifetime unique="false" />
			
		</event>
	</events>

</data>

"Much Needed Melodies"[edit | edit source]

<data version="0.0.6">

	<list_data>

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

	</list_data>

	<events>

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

			<content header_key="#EVENT_FEAST_02_NAME"
			         desc_key="#EVENT_FEAST_02_DESC"
			         image_name="Event_Feast" 
					 soundevent_id="Help"
					 notification_header_key="#EVENT_FEAST_02_NOTIFICATION_HEADER"
					 notification_desc_key="#EVENT_FEAST_02_NOTIFICATION_DESC"
					 visual_object_type="MediumGroup" 
					 appear_position_type ="Colony" />
					 
			<trigger type="DaysPassed" min="20" max="90" />
			<trigger type="TimeOfDay" min="0.20" max="0.60" /> 
	
			<choice>
				<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" />
			</choice>
			
			<choice>
				<button text_key="#EVENT_FEAST_02_REFUSE" />
				<result type="LoadEvent" target_event_id="EVENT_FEAST_02_REFUSE" />
			</choice>
			
			<lifetime unique="true" />

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

			<content header_key="#EVENT_FEAST_02_REFUSE_NAME"
			         desc_key="#EVENT_FEAST_02_REFUSE_DESC"
			         image_name="Event_Feast"
					 soundevent_id="Negative"
					 />

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

			<lifetime unique="true" />

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

			<content header_key="#EVENT_FEAST_02_ALLOW_NAME"
			         desc_key="#EVENT_FEAST_02_ALLOW_DESC"
			         image_name="Event_Feast"
					 soundevent_id="Positive"
					 />

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

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

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

			<content header_key="#EVENT_FEAST_02_RESULT_01_NAME"
			         desc_key="#EVENT_FEAST_02_RESULT_01_DESC"
			         image_name="Event_Feast"
					 soundevent_id="Positive"
					 />

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

			<lifetime unique="true" />

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

			<content header_key="#EVENT_FEAST_02_RESULT_02_NAME"
			         desc_key="#EVENT_FEAST_02_RESULT_02_DESC"
			         image_name="Event_Feast"
					 soundevent_id="Positive"
					 />

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

			<lifetime unique="true" />

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

			<content header_key="#EVENT_FEAST_02_RESULT_03_NAME"
			         desc_key="#EVENT_FEAST_02_RESULT_03_DESC"
			         image_name="Event_Feast"
					 soundevent_id="Positive"
					 />

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

			<lifetime unique="true" />

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

			<content header_key="#EVENT_FEAST_02_RESULT_04_NAME"
			         desc_key="#EVENT_FEAST_02_RESULT_04_DESC"
			         image_name="Event_Feast"
					 soundevent_id="Positive"
					 />

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

			<lifetime unique="false" />

		</event>
	</events>

</data>