Multiplayer mission creation

From War Thunder Wiki
Revision as of 20:51, 1 November 2019 by RideR2 (talk | contribs) (Important notes)

Jump to: navigation, search

How to create a basic multiplayer mission

Multiplayer Mission Properties.jpg
1. Run mission editor (missioned.cmd in WarThunderCDK folder).
2. Select a map in Select binary dump file window by pressing ... tab (all map files are stored here: WarThunder\levels)
Note: You can edit a mission without loaded map, location in scene viewer is just a preview.
3. Set basic settings in the Mission Editor.
  • Choose the side toolbar Mission Settings -> mission
  • Choose a name for your mission in name tab
Note: You can't use capital letters and there should be no spaces
  • Choose a name for your mission that will be displayed for other players in locName tab
Note: You can use space there and for example write down [Multiplayer Mission] Test
  • Choose a description for your mission in locDesc tab
  • Set a mission type to domination in type tab
  • Choose a location map in level tab
  • Choose time of a day and weather in Weather params tab
  • If you want to make it a free for all mode (everyone vs everyone without teams) then go to Game type params and enable gt_ffa and gt_ffa_deathmatch options
  • Change the number of tickets in scoreLimit which you can find in Versus params tab
Note: by default it's set to 500
  • Change the number of tickets that are lost after someone dies in deathPenaltyMul which you can find in Versus params tab
Note: by default it's set to 1 so it will remove 100 tickets from one of teams every time someone dies, if for example you set it to 0.1 then the game will remove 10 tickets when someone dies

Important notes

  • You can't use imports function in multiplayer missions
  • There's a size limit for multiplayer missions and it's set to 512 KB, so if you are planning to add lots of triggers try to optimize them as much as it's possible, using variables for that is a really good idea, also don't forget about useForTriggerFiltered option which makes it possible for actions to select only a few units that meet conditions (it's the best to use squad unit which consist of many units in it), this option is available in many actions
  • If you are planning to change properties of selected player units (for example to repair selected units if they enter one of previously added areas) it's a really good idea to create a squad unit, put there all player units (all t1_player, t2_player units) and call it all_players_squad
  • It's possible to use CSV files in multiplayer missions but every player needs to download them before joining to the custom battle with a custom multiplayer mission which uses them if they want to see objectives, hints and other messages

Creating slots for players

Unit creation icon
1. Create a new unit by pressing Create unit icon and place it somewhere (you can control the map view by pressing SPACE).
Unit properties icon
2. Open it's properties (by for example pressing P).
  • Change the Name: to t1_player01
  • Switch it's type to armada
  • Find a dummy unit in Class tab and select it
Copying Units.jpg
3. Copy t1_player01 unit.
Note: You will need it to create player slots for the mission, so it's preferable to create 16 of them, the game supports up to 32 players per team
  • Select the unit
  • Press W
  • While holding Shift select one of the displayed arrows and then drag it until a new unit appears
  • The CDK will show you a new window, in this window change the Count of clones: amount to the number that you want in your mission
  • Select Auto rename
  • Press Ok, now you should see lots of copies of this unit named t1_player02, t1_player03, t1_player04 etc.
Copying Units 2.jpg
4. Create the same amount of t2_player units by copying t1_player units.
  • In Unit copying window change Name of clone(s): to t2_player01
  • Change the Count of clones: amount to the number that equals amount of t1_player units (set it to 1)
  • Press Ok
  • Now you should see lots of copies of t1_player units named t2_player01, t2_player02, t2_player03 etc.
5. Go back to the side toolbar Mission Settings and add these units to make them usable as slots for players in your multiplayer mission.
  • Select player_teamA
  • Press wing to add new slots and add all t1_player units there one by one
  • Select player_teamB
  • Press wing to add new slots and add all t2_player units there one by one
Note: they can't be added as squads (by putting all units in for example t1 and t2 squad unit) if you do that then the mission will simply not work

Creating respawn zones for players

Setting up a trigger for respawn action

1. Choose the side toolbar Triggers / Missions Obj. Navigat
Trigger properties icon
2. Press the Trigger button to create a new trigger
3. Press the Properties and Trigger/MissionObj info icon which you can find on top toolbar to show the tab with trigger properties.
4. Select your new trigger and change it's Name to for example respawn.
Creating Respawn Zones.jpg
5. Make sure that Enabled is switched on.
6. Change the Events type to initMission.
Note: You need to do it this way because otherwise you will need to wait at least 30 second after launching the mission to be able to select one of available spawn zones
  • In lower part of this toolbar select periodicEvent {time=1.00} in the Elements: window
  • Select Elements button on the bottom and press periodicEvent
Note: (if nothing happens then select one of folders in the Elements: window and then switch back to periodicEvent {time=1.00})
  • A new window should appear, select initMission there and press Ok or double click on initMission

Adding air spawns for aeroplanes and ground spawns for ground units

1. Create areas for respawn action.
Area creation icons
  • Press one of area creation icons on the top toolbar
  • Press the ground on the map view in the place where you want to put your respawn area
  • press only if you selected the first icon (Point)
  • press and drag (you change it's size by doing that) if you selected other icons (Sphere, Cylinder or Box)
2. Change properties of your area.
  • Change Name: to t1_spawnarea_01
  • Make at least 10 areas that are named t1_spawnarea_01, t1_spawnarea_02, t1_spawnarea_03 etc.
  • copy all created t1_spawnarea areas and call them t2_spawnarea_01, t2_spawnarea_01, t2_spawnarea_01 etc (you need them for both teams)
Note: If those spawns are meant to be for airplanes then place them in the air
if for tanks then place them on the ground
if for ships then place them on the sea level
3. Add a respawn action.
  • Press the Action button in the trigger properties toolbar
  • Below Filter: type missionMarkAsRespawnPoint
  • Press Ok or double click on missionMarkAsRespawnPoint
4. Add respawn areas to missionMarkAsRespawnPoint action.
  • Select missionMarkAsRespawnPoint action in Elements: window
  • Add all existing t1_spawnarea areas to the tab next to target, you can create more of them by just pressing a wide target tab below
  • Change the loc_name (name of that spawn zone which will be visible in game, you can use spaces and capital letters) or leave it be if you want the game to set default respawn names (Respawn #1, #2 etc.)
  • Press a wide team tab, a new selectable tab should appear, press it and select A
  • Press a wide tags tab on the bottom of option, it will create an expandable window with tabs of all available tags in the game, select those that you want to use in your mission (air for airplanes, tank for ground units, ship for boats and ships)
5. Copy existing missionMarkAsRespawnPoint action to make respawn zones for the second team.
  • Below the Elements: window, there should be a copy tab, select missionMarkAsRespawnPoint action and then press this copy tab
  • Press Paste ... tab, a new window should appear
  • Select missionMarkAsRespawnPoint action there and press ok
  • Now you should see two the same actions in the Elements: window, select the second one
  • Change all target areas to those that are meant to be for the second team (B / T2)
  • Switch the team tab to B
Note: You can speed up changing targets by creating an area_squad unit and then putting all t2_spawnarea areas there, then selecting this squad in the missionMarkAsRespawnPoint action properties


Adding airfield spawn for airplanes

1. Create an airfield unit.
  • Select Create unit icon on the top toolbar
    Unit creation icon
  • Select created unit
  • Open it's properties (by for example pressing P)
    Unit properties icon
  • Change it's Name: to airfield_01
  • Change it's type to objectGroups
    Airfield Properties.jpg
  • Select one of available airfields in Class tab
Note: all names of airfields start with dynaf_
  • Change it's army to 1
Note: depends for which team you want to make it, remember that 1 = A team, 2 = B team'
2. Add a respawn action.
  • Press the Action button in the trigger properties toolbar
  • Below Filter: type missionMarkAsRespawnPoint
  • Press Ok or double click on missionMarkAsRespawnPoint
3. Add the airfield to missionMarkAsRespawnPoint action.
  • Select missionMarkAsRespawnPoint action in Elements: window
  • Add airfield_01 to the tab next to target
  • Change the loc_name (name of that spawn zone which will be visible in game, you can use spaces and capital letters) or leave it be if you want the game to set default respawn names (Respawn #1, #2 etc.)
  • Select isAirfield
  • Press a wide team tab, a new selectable tab should appear, press it and select A
  • Select Object and set it to airfield_01
  • Press a wide tags tab on the bottom of option, it will create an expandable window with tabs of all available tags in the game, select those that you want to use in your mission (air)


Creating capture zones

1. Create a new area and call it capture_zone_01.
2. Create a new trigger.
3. Add a new action called missionMarkAsCaptureZone.
  • Assign your new area to target (you should be able select capture_zone_01)
  • Set to which army it should be assigned by default (after launching your mission, 0 - neutral, 1 - A, 2 - B)
  • Set canCaptureOnGround if you want to be able to capture it by staying on the ground in the capture zone area (disabled by default)
  • Set canCaptureInAir if you want it to be able to capture it while being in the air (enabled by default)
  • Set canCapturebyGM if you want to make it capturable by ground units
  • Set onlyPlayersCanCapture if you want it to be capturable only by players
  • Set CaptureNoPenalty if you want to disable ticket drain when it's captured by one of teams
  • Add tags to select which unit types are allowed to capture this zone
Note: you can adjust how fast it drains tickets in missionSetProperties action, there are two ctaCaptureZone options which control that


Note: You can find more informations about the Mission Editor here and more informations about triggers here here

Saving your mission

1. On the most top bar select Mission Editor
2. Press Save mission (Ctrl+M)
3. Select where you want to save your mission and set its name, remember to save it as .blk file

That's all, now all you need to do is to upload your mission somewhere or on live.warthunder.com site, but don't forget to add a proper image and description for your mission. You will find more details here.

Note: any hosting service will do as long as the link ends with .blk and don't forget to delete https:// part of that link, otherwise the game won't be able to read it unless it's a live.warthunder.com link

Options and functions available in multiplayer missions

Versus mode parameters

  • scoreLimit: Total amount of tickets in MP mission (by default it's set to 500)
  • timeLimit: Time limit in MP mission (by default it's set to 30 minutes)
  • deathPenaltyMul: Sets the multiplier of removed tickets after someone dies (by default it's set to 1.0 = 100 tickets per death)
  • postfix: Adds a gamemode name before the mission name

Note: There's a missionNamePostfix condition which lets you check the mission postfix

  • ctaCaptureZoneEqualPenaltyMult: Sets the multiplier of tickets drain when both teams have captured the same amount of zones (when each team have at least 1 zone captured, both team will lose tickets with this mul)
  • ctaCaptureZoneDiffPenaltyExp: When one team have on N more captured zones - enemy tickets will decrease faster. Mul calc as (if zones_num_t1 < zones_num_t2): (zones_num_t2 - zones_num_t1) ^ ctaCaptureZoneDiffPenaltyExp
  • useAlternativeMapCoord: If checked will use alternative map coordinates
  • useKillStreaks: Unknown
  • allowedKillStreaks: Unknown
  • nameKillStreaks:t="" : Adds killstreak system from Arcade Battles (spawning in airplanes or helicopters after getting required amount of kills), you need to add this line manually by editing the mission blk file
Available killstreak presets:
  • killStreaksAircraftOrHelicopter
  • killStreaks_survival_event_aircraftOrHelicopter
  • randomSpawnTeams: Unknown
  • remapAiTankModels: Unknown
  • isBotsAllowed: Disables or enables bots
  • battleAreaColorPreset: Select the color type of the battle area
  • ingnoreInvulnerableTimer: Disable or enable a spawn protection (making the player not able to be damaged)
  • allowedUnitTypes: Select which unit types are allowed in your mission
  • useCustomSuperArtillery: Enable or disable custom artillery type for use in tanks and ships
Note: You can also enable or disable it by using missionCustomArtillery action
  • customSuperArtillery: Sets the custom artillery type
Available custom artillery types:
  • structures/streakartillery_203mm_r100m
  • structures/streakartillery_203mm_r150m
  • structures/streakartillery_203mm_r150m
  • structures/streakartillery_203mm_r200m
  • structures/ussr_152mm_d1
  • structures/ussr_122mm_m30_smoke
  • structures/ussr_152mm_ml20
  • structures/ussr_152mm_ml20_large
  • structures/ussr_203mm_b4
  • structures/ussr_quest_large_art
  • structures/germ_3x280mm_sk_c34
  • missionType: Lets you select a mission type which you will be able to select in game (you need to set it up by adding proper actions and conditions)
  • maxRespawns: Set the number of available respawns
  • allowEmptyTeams: Lets you play alone in multiplayer missions
  • missionCostMul: Unknown
  • respawnTimeMultiplier: Sets a multiplier of how long it will take to respawn (respawn counter)
  • useSpawnScore: Enables Spawn Points system (for more details check Enabling Spawn Points system category)
  • country_allies: Set a country for the first team
  • country_axis: Set a country for the second team
  • mission: Makes it possible to set different mission settings like tickets amount for different gamemodes (AB, RB, SB)
  • groundKillWpBudget
  • max_players: Unknown
  • max_total_budget: Unknown
  • min_total_budget: Unknown
  • min_total_budget_multiplier: Unknown
  • supposed_personal_part_of_total_budget_for_one_player:Unknown
  • min_mul_for_personal_price: Unknown

Game type parameters

  • gt_mp_tickets: Enables or disables tickets functionality (can be used in SP missions)
  • gt_mp_capture: Enables or disables capture zones (by using missionMarkAsCaptureZone action, can be used in SP missions)
  • gt_mp_solo: Unknown
  • gt_cooperative: Parameter used for creating cooperative missions
  • gt_reload_explosives: Unknown
  • gt_ffa: If enabled, will change the mission into a free for all mode (everyone vs everyone without teams)
  • gt_race: If enabled, will change the mission into a race mode (it's the best to use it with beginRaceMode action)
  • gt_football: If enabled, will change the mission into a football mode (to make it work you need to use options from the football params tab and copy these two lines under the mission{ block: isPhysPredictionEnabled:b=yes isPreciseCollisionDetectionEnabled:b=yes )
  • gt_last_man_standing: If enabled, will change the mission into a battle royale mode (to make it work you need to use missionSetBattleRoyaleArea action)
  • gt_mp_score: Shows the score on top of screen (killed player units, deaths, your place in team etc.) and hides the tickets bar
  • gt_versus: Disables or enables it's multiplayer functionality


Enabling Spawn Points system

Spawn Points system is a feature that can allow you add an additional spawn requirement, the need of gaining Spawn Points by completing various mission objectives or destroying units controlled by players. In Realistic Battles for Ground Forces they are needed if you want to spawn in another vehicle after you loose your current one, better vehicles require more Spawn Points and every time you die it will increase Spawn Points requirements. In Enduring Confrontation game mode you need Spawn Points to spawn in better airplanes, right after joining to battle you get 200 SP which allows you to spawn in airplanes with the lowest Battle Rating in bracket of that battle (for example 5.0 in 5.0-6.3 battle) and in a vehicle that has higher BR by 0.3. This section will explain how to make this system work in the custom multiplayer missions.
1. Go to Mission Settings:> Versus params and enable useSpawnScore
2. If you haven't saved the mission yet then do it now
3. Open the blk mission file in Notepad
4. Scroll down to the mission{ block
5. Paste all that code below to your .blk file under the mission{ block so it looks like on the screenshot to the right
Screenshot of a Spawn Points system.jpg
customSpawnScore{
 base_respawn_points_coef:i=250
 br_diff_mul_Air:r=0.0
 br_diff_mul_Tank:r=0.0
 max_br_diff:r=0.0
 spawn_pow:r=0.0
 // If you want to add multipliers for specific vehicles units or types then add them here and remove "//"
}
6. Save the file, reload the mission in the Mission Editor
Note: If you save your mission in the Mission Editor after adding this script it won't remove these lines
Explanation of what Spawn Points system lines do:
Note: Setting them to 0.0 will disable selected features (the one with the number set to 0.0)
  • base_respawn_points_coef: Sets a default Spawn Points amount, for example if you set it to 1 then you will need 1 SP to spawn in vehicles
Note: If you set it to 1 you will be give every vehicle an exact Spawn Points value, so if you set it to 700.0 then you will need 700 SP in game to spawn in it
  • br_diff_mul_Air: Sets a multiplier of Spawn Points for airplanes which depends on what BR do they have (the higher BR the higher needed SP amount)
  • br_diff_mul_Tank: Sets a multiplier of Spawn Points for tank which depends on what BR do they have (the higher BR the higher needed SP amount)
  • max_br_diff: Increases a difference of Spawn Points between units with different Battle Rating
  • spawn_pow: Increases Spawn Points requirements after every death


You can also set a multiplier for every single vehicle or group of them (sorting by their type)
Available Spawn Point names for specific unit types:
 exp_fighter:r=0.0
 exp_bomber:r=0.0
 exp_assault:r=0.0
 exp_tank:r=0.0
 exp_heavy_tank:r=0.0
 exp_tank_destroyer:r=0.0
 exp_SPAA:r=0.0
 exp_ship:r=0.0
 exp_torpedo_boat:r=0.0
 exp_gun_boat:r=0.0
 exp_torpedo_gun_boat:r=0.0
 exp_submarine_chaser:r=0.0
 exp_naval_ferry_barge:r=0.0
To add a multiplier for a specific vehicle you need to add it's name and then add :r=0.0 (with any number set by you) to it, you can find the list of all vehicles here.
Example:
bf-109g-14:r=1.5
Here's an example of entire block:
customSpawnScore{
 base_respawn_points_coef:i=1
 br_diff_mul_Air:r=0
 br_diff_mul_Tank:r=0
 max_br_diff:r=0
 spawn_pow:r=0
 us_m4a3e8_76w_sherman:r=700
 us_m4a3e2_76w_sherman_jumbo:r=1100
 p-47d:r=1100
 p-47d-28:r=1100
 p-51d-5:r=1100
 p-51d-10:r=1100
 p-51d-20:r=1100
 p-38l:r=1100
 a-20g:r=1100
 germ_pzkpfw_VI_ausf_b_tiger_IIh:r=2000
 germ_pzkpfw_VI_ausf_h1_tiger:r=1500
 germ_pzkpfw_VI_ausf_e_tiger:r=1600
 germ_pzkpfw_V_ausf_g_panther:r=1200
 germ_panzerjager_nashorn:r=700
 germ_panzerjager_panther:r=1400
 germ_panzerbefelhswagen_jagdpanther:r=1400
 fw-190a-8:r=1100
 bf-109g-6:r=1100
 bf-109g-10:r=1100
 bf-109g-14:r=1100
}

Limiting amount and type of units available for respawn

This script allows you to set a specific number of available respawns for specific vehicles or types of them, you can limit how many times can one team respawn or how many times can players use a specific vehicle.
To make this script work:
1. If you haven't saved the mission yet then do it now
2. Open the blk mission file in Notepad
3. Scroll down to the mission{ block
4. Paste all that code below to your .blk file under the mission{ block so it looks like on the screenshot to the right
Screenshot of a Shared Pool script.jpg
customRules{
 name:t="sharedPool"{
  teams{
   teamA{
    playerMaxSpawns:i=5 // 5 spawns per player
    spawnLimit:i=100 // 100 spawns for team
     limitedUnits{
     }
     unlimitedUnits{
     }
    }
   teamB{
    playerMaxSpawns:i=5
    spawnLimit:i=100
     limitedUnits{
     }
     unlimitedUnits{
     }
   }
  }
 }
}
5. Save the file, reload the mission in the Mission Editor
Note: If you save your mission in the Mission Editor after adding this script it won't remove these lines
Explanation of what Shared Pool script lines do:
  • teamA: Under this block you put all units that you want to restrict for the A or 1 team
  • teamB: Under this block you put all units that you want to restrict for the B or 2 team
  • spawnLimit: Sets a maximum amount of respawn for team
  • playerMaxSpawns: Sets a maximum amount of respawns per player
  • limitedUnits: You put there all vehicles types or specific ones and add :i= with a number, it will set a spawn amount limit for that specific unit
  • unlimitedUnits: You can set if you want to make amount of specific units unlimited
To set amount of respawns for a specific vehicle you need to add it's name and then add :i=1 (with any number set by you) to it, you can find the list of all vehicles here.
Example:
bf-109g-14:i=1
Here's an example block:
customRules{
 name:t="sharedPool"

  teams{
   teamA{
    playerMaxSpawns:i=5
    spawnLimit:i=80
   limitedUnits{
    us_m4a1_76w_sherman:i=10
    us_m4a2_76w_sherman:i=18
    us_m4a3e2_sherman_jumbo:i=12
    us_m4a3e2_sherman_jumbo_cobra_king:i=8
    us_m4a3e2_76w_sherman_jumbo:i=6
    us_m4a3e8_76w_sherman:i=10
    us_m18_hellcat:i=8
    us_m36:i=10
    us_halftrack_m15:i=8
    us_halftrack_m16:i=8
    p-47d:i=4
    p-47d-28:i=4
    p-51d-5:i=4
    p-51d-10:i=4
    p-51d-20:i=4
    p-38l:i=4
    a-20g:i=4
   }
   unlimitedUnits{
    us_m4a2_sherman:b=yes
    us_m24_chaffee:b=yes
    us_m10:b=yes
   }
  }
   teamB{
    playerMaxSpawns:i=5
    spawnLimit:i=80
   limitedUnits{
    germ_pzkpfw_VI_ausf_b_tiger_IIh:i=2
    germ_pzkpfw_VI_ausf_h1_tiger:i=3
    germ_pzkpfw_VI_ausf_e_tiger:i=3
    germ_pzkpfw_V_ausf_a_panther:i=8
    germ_pzkpfw_V_ausf_g_panther:i=10
    germ_panzerjager_nashorn:i=8
    germ_panzerjager_panther:i=4
    germ_panzerbefelhswagen_jagdpanther:i=4
    germ_flakpanzer_IV_Wirbelwind:i=8
    germ_pz_IV_L70:i=10
    fw-190a-8:i=4
    bf-109g-6:i=3
    bf-109g-10:i=3
    bf-109g-14:i=3
   }
   unlimitedUnits{
    germ_pzkpfw_IV_ausf_H:b=yes
    germ_pzkpfw_IV_ausf_J:b=yes
    germ_panzerbefelhswagen_IV_ausf_J:b=yes
    germ_stug_III_ausf_G:b=yes
   }
  }
 }
}