Making your own campaign
- Duplicate a base campaign asset (
QzCompanyDataAsset) into your mod. Give it its own TagCompany.<Prefix>.<Name>and declare it in your tags ini. Never useCompany.Main.*: it is reserved for official campaigns. Fill in Title, Campaign Psevdonim (the name shown in the main menu), Description, Logo (the campaign card), Supported Sections (symptom sections), Supported Blocks (base buildings), Days and Priority. Make sure Debug is off, otherwise the campaign shows in Play In Editor but not in the game. Endless Repeat Day is editable only when Endless is on. - Duplicate the day assets (
QzDayDataAsset) you need and edit their day modifiers, for example Give Tools, Add available symptom, Open symptoms, OpenFeatures, Set Symptom Weight, Weather, Override profiles and Add Money. List the days in the campaign's Days. - Pick the level. Set Level Tag to a base level (for example
Level.Chicago), or ship your own map plus aQzLevelDataAsset(see Maps). - Optional: your own
LossConditionsDataAsset(see custom loss rules); visitor profiles (QzNPCProfileDataAsset) tagged with your campaign; your own Blueprint actors placed in your map (see Running your own logic). - Test it. The campaign appears in the campaign list automatically. Test it in a new save.
- Saves. A save made in a mod campaign needs that mod. Without it the game does not load the save and names the missing mod (from the next game update). See Mods and save games.
Recipe: weather per day
A day can carry the day modifier Weather (QzDayModifier_Weather). Add it to the QzDayDataAsset of the day. It replaces the weather of that day with what you describe in its Environment field:
- Start Time and End Time: the in-game time range of the day (defaults 900 and 1700).
- Animate Time: whether the time of day moves during the day.
- Presets: a list of weather presets. Each entry has a Preset asset, a Weight (higher means it is picked more often), a Duration Range (min and max, default 5 to 20: how long that weather lasts) and a Change Time (how long the transition takes).
Without this modifier the day uses the usual weather. The presets are assets of the game's sky system; the kit has them in UltraDynamicSky/Blueprints/Weather_Effects/Weather_Presets (for example Clear_Skies, Cloudy, Foggy, Rain).
Recipe: custom loss rules
A campaign can use its own LossConditionsDataAsset: a list of loss conditions. Create one in your mod, add conditions, and assign it to the Loss Conditions Asset field (category QZ Settings | Data) of the Game Flow actor in your map. This works with your own map (see Maps); a base level uses the base asset. The easiest start is to duplicate a base asset: Data/DA_LossGameV2 or Data/DA_LossGame_Miami.
Built-in conditions:
- Money (
LossConditionMoney): you lose when money drops below Min Money. Check Reward Next Day currently has no effect. - NPC Kill (
LossConditionNPCKill): you lose after Kill Condition Count killed visitors. Every check of this condition counts one kill. - NPC Dead Resource (
LossConditionNPCDeadResource): not implemented yet; it never triggers, whatever Min Alive In Block Condition Count says. - Kill Quest NPC (
LossConditionKillQuestNPC): you lose when a quest NPC is killed in the way set by Kill Reason.
Every condition also has Enabled, Defeat Widget Class, a defeat name and messages, a defeat picture, and the game speed used on the defeat screen. A condition without a Defeat Widget Class never ends the game. Remove or disable the conditions you do not want.
The Loss Subsystem has the Blueprint nodes Check All Conditions, Check Specific Condition and Get Specific Condition. The two Check nodes evaluate the conditions and end the game if one is met; checking the NPC Kill condition also counts a kill. Do not call them just to read state. Return value true = not lost.