Author Topic: Single stage terror mission  (Read 2732 times)

Offline NastyKhan

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Single stage terror mission
« 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:

Quote
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

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: Single stage terror mission
« Reply #1 on: July 11, 2021, 10:29:46 am »
How to separate two-stage terror missions into two variants of single-stage terror mission?

In alienDeployments.rul

Code: [Select]
  - 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

Code: [Select]
    - id: -4
      deployments:
        STR_CARGO_SHIP_P1: 25
        STR_CARGO_SHIP_P2: 25
        STR_CRUISE_SHIP_P1: 25
        STR_CRUISE_SHIP_P2: 25

Offline NastyKhan

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Single stage terror mission
« Reply #2 on: July 11, 2021, 02:49:13 pm »
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:

Quote
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
« Last Edit: July 11, 2021, 04:54:36 pm by NastyKhan »

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: Single stage terror mission
« Reply #3 on: July 11, 2021, 08:03:06 pm »
It is necessary to remove "nextStage".

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Single stage terror mission
« Reply #4 on: July 12, 2021, 02:35:19 am »
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:

Code: [Select]
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:

Code: [Select]
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

Offline NastyKhan

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: Single stage terror mission
« Reply #5 on: July 15, 2021, 08:19:00 pm »
Thanks :)