OpenXcom Forum
Modding => Help => Topic started by: NastyKhan on July 11, 2021, 04:37:24 am
-
Hi,
How to separate two-stage terror missions into two variants of single-stage terror mission?
This doesn't work:
alienDeployments:
- type: STR_CARGO_SHIP_P1
data:
nextStage: []
- type: STR_CRUISE_SHIP_P1
data:
nextStage: []
I means nextStage: [] doesn't work. Still spawns second stage.
Best regards
-
How to separate two-stage terror missions into two variants of single-stage terror mission?
In alienDeployments.rul
- type: STR_CARGO_SHIP_P1
data:
...
script: SHIP_P1
terrains:
- CARGO
briefing:
title: STR_SHIP_RESCUE_MISSION
desc: STR_SHIP_RESCUE_P1_BRIEFING
palette: 4
music: GMISPOSH
alert: STR_ALIENS_ATTACK_SHIPPING_ROUTE
alertBackground: BACK03.SCR
markerName: STR_TERROR_SITE
duration: [4, 10]
despawnPenalty: 1000
- type: STR_CARGO_SHIP_P2
data:
...
script: SHIP_P2
terrains:
- CARGO
shade: 0
briefing:
title: STR_SHIP_RESCUE_MISSION
desc: STR_SHIP_RESCUE_P2_BRIEFING
palette: 4
music: GMISPOSH
background: BACK01.SCR
markerName: STR_TERROR_SITE
duration: [4, 10]
despawnPenalty: 1000
In globe.rul
- id: -4
deployments:
STR_CARGO_SHIP_P1: 25
STR_CARGO_SHIP_P2: 25
STR_CRUISE_SHIP_P1: 25
STR_CRUISE_SHIP_P2: 25
-
Hey,
Thanks for reply. I check the code you sent in 'alienDeployment' part and it seems that indeed, the only part that was changed was removal of "nextStage" element, as I originally believed.
In that case why:
alienDeployments:
- type: STR_CARGO_SHIP_P1
nextStage: []
doesn't work? Am I missing something?
How do you clear or remove an element? By overwriting it with [] ? or by {}? or by "false"? or by "delete:" command?
Thanks,
Best regards
-
It is necessary to remove "nextStage".
-
There are two ways you could approach it - in your own mod delete the deployment then copy the standard TFTD deployment without the nextStage part:
alienDeployments:
- delete: STR_CARGO_SHIP_P1
- type: STR_CARGO_SHIP_P1
# copy everything from standard/xcom2 ruleset
# but either leave out or comment out nextStage
Or you can use the empty nextStage like this:
alienDeployments:
- type: STR_CARGO_SHIP_P1
nextStage: "" # when something in the ruleset asks for a single string ID, empty quotation marks is the proper syntax for not defined
-
Thanks :)