Create campaign
From UFO:AI
Please see the talk page.
Contents |
[edit]
General
UFO:AI has built-in support for several campaigns in singleplayer mode. You can choose the campaign you want to play for every new game.
[edit]
Syntax and semantic
If you want to add your own campaign you should be aware of the syntax and the semantic of each variable in UFO-Scripts/campaign.ufo.
[edit]
Campaign definition
- name: V_TRANSLATION_STRING
- name of the campaign - mark via _ as first char for being translateable.
- text: V_TRANSLATION2_STRING
- campaign description - mark via _ as first char for being translateable.
- team: V_STRING
- which team? alien or human
- equipment: V_STRING
- this is an equipment definition that defines which weapons are available at the beginning of this campaign
- soldiers: V_INT
- how many soldiers at beginning of the campaign
- scientists: V_INT
- how many scientists at beginning of the campaign
- workers: V_INT
- how many workers at beginning of the campaign
- medics: V_INT
- how many medics at beginning of the campaign
- ugvs: V_INT
- how many ugvs at beginning of the campaign
- market: V_STRING
- which market should be used - the market is an equipment definition that defines which weapons are buyable via market
- credits: V_INT
- how many credits the player has at the beginning
- map: V_STRING
- which map should be used?
- visible: V_BOOL
- Is this campaign visible in campaign-menu?
- date: V_DATE
- Campaign date
- firststage: V_STRING
- initial stage - see #Stages
[edit]
Example
campaign main
{
name "_Standard Campaign"
text "_txt_standard_campaign"
team human
soldiers 12
difficulty 0
equipment campaign_player
market campaign_market
credits 4000000
map map_earth
visible true
date "2048 0 7"
firststage intro
}
[edit]
Stages
You can define a stage by several stagesets - see #Stagesets for more information about this.
- set [setname]: Stageset name (see below)
- setname is the name or id for the firststage var at #Campaign definition
[edit]
Example
stage intro
{
set first
{
seq intro
delay "0 1 0"
frame "0 3 0"
missions "farm"
number 1
expire "0 3 0"
quota 0
}
set terror_only
{
needed first
delay "0 0 1"
frame "0 10 0"
expire "0 3 0"
missions "africa_excavation bunker mine mart italy japan oriental"
quota 6
nextstage ufos_are_coming
}
set stop
{
needed terror_only
delay "0 20 0"
endstage intro
}
}
[edit]
Stagesets
Each stage can contain several stage sets.
- the missions strings - seperated with white space
- quota: V_INT
- number of missions that needs to be played to deactivate the stage set and, perhaps, start another set and/or stage
- seq: V_STRING
- the sequence id to play at stageset activation
- nextstage: V_STRING
- the whole stageset to activate after the current set is done
- commands that are executed at stageset activation
- number: V_INT
- works like quota, except that the missions only needs to appear on geoscape (no need to play them)
[edit]
Example
set terror_only
{
needed first
delay "0 0 1"
frame "0 10 0"
expire "0 3 0"
missions "africa_excavation bunker mine mart italy japan oriental"
quota 6
nextstage ufos_are_coming
}
[edit]
Missions
As mentioned in the Stagesets section of this howto you can add missions to each set. The syntax is already described in: Adding a new mission
[edit]

