OpenXcom Forum

Modding => Help => Topic started by: The Offensive Lemon on July 25, 2021, 05:01:22 am

Title: Is it possible to make it so that you can send multiple craft to one mission?
Post by: The Offensive Lemon on July 25, 2021, 05:01:22 am
What the title says: Is it at all possible to make it so that you can have multiple craft in play in a single mission?

I have an idea for a mod where you can, for instance, send a helicopter to provide fire support for soldiers.  I've seen something similar in demo videos for the 40k mod (though I admit I haven't played it myself), but the additional vehicles were either part of a single craft or part of the map.

Is it possible to do this with separate craft?
Title: Re: Is it possible to make it so that you can send multiple craft to one mission?
Post by: Buscher on July 26, 2021, 12:13:13 am
To my knowledge there isn't a way to have multiple player crafts in a battle. In theory you might be able to duplicate your craft by adding multiple 'addCraft' into a mapScript but that doesn't work either.
What you can try is to have a look at the "Chaos outpost" mission in the 40k mod. In this mission you get either Marine Drop Pods or Imperial Guard Chimeras (with no turret though) on the civilian side to reinforce you. You could turn their spawner grenades to spawn on your side as nameless soldiers too if you fancy that. Also there is a reinforcements possibility for alienDeployments (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Reinforcements_Script). Maybe you can spawn friendly troops with that too.
Title: Re: Is it possible to make it so that you can send multiple craft to one mission?
Post by: The Offensive Lemon on July 26, 2021, 03:59:19 am
To my knowledge there isn't a way to have multiple player crafts in a battle. In theory you might be able to duplicate your craft by adding multiple 'addCraft' into a mapScript but that doesn't work either.
What you can try is to have a look at the "Chaos outpost" mission in the 40k mod. In this mission you get either Marine Drop Pods or Imperial Guard Chimeras (with no turret though) on the civilian side to reinforce you. You could turn their spawner grenades to spawn on your side as nameless soldiers too if you fancy that. Also there is a reinforcements possibility for alienDeployments. Maybe you can spawn friendly troops with that too.

Ah.  I see.  :(

The stuff you mentioned isn't really what I'm going for, but thank you anyway for mentioning it.  I want extra craft to be player-deployed and player-controlled, but it looks like I can't do that.  Perhaps I could have several vehicles acting as a single craft, or just have additional vehicles be HWPs.

Though now I have to ask... what the hell is a spawner grenade?
Title: Re: Is it possible to make it so that you can send multiple craft to one mission?
Post by: Buscher on July 26, 2021, 10:27:07 pm
A spawner grenade (https://openxcom.org/forum/index.php/topic,6535.0.html) is a battleItem: 4 item that uses spawnUnit
You can also have different other battleItem types to spawn units. Spawner grenades can also be put on terrain with their fuse set to some value
For example (taken from 40k missions_IG.rul)
  - name: PDF_DEPLOYMENT
    mapDataSets:
      - BLANKS
      - CHIMERAUFO
    mapBlocks:
      - name: CHIMERAPDF
        width: 20
        length: 10
        height: 2
        items:
          STR_GUARDSMAN_FEMALE_SPAWNER:
            - [1, 1, 0]
            - [4, 3, 0]
            - [12, 1, 0]
            - [16, 2, 0]
            - [19, 8, 0]
            - [7, 7, 0]
          STR_GUARDSMAN_MALE_SPAWNER:
            - [3, 3, 0]
            - [6, 1, 0]
            - [15, 2, 0]
            - [18, 1, 0]
            - [12, 8, 0]
            - [0, 9, 0]
        fuseTimers:
          STR_GUARDSMAN_FEMALE_SPAWNER: [0, 0]
          STR_GUARDSMAN_MALE_SPAWNER: [0, 0]

Will create 12 Guardsmen when this map is part of the map generation.
Title: Re: Is it possible to make it so that you can send multiple craft to one mission?
Post by: The Offensive Lemon on July 28, 2021, 05:07:10 am
A spawner grenade (https://openxcom.org/forum/index.php/topic,6535.0.html) is a battleItem: 4 item that uses spawnUnit
You can also have different other battleItem types to spawn units. Spawner grenades can also be put on terrain with their fuse set to some value
For example (taken from 40k missions_IG.rul)
  - name: PDF_DEPLOYMENT
    mapDataSets:
      - BLANKS
      - CHIMERAUFO
    mapBlocks:
      - name: CHIMERAPDF
        width: 20
        length: 10
        height: 2
        items:
          STR_GUARDSMAN_FEMALE_SPAWNER:
            - [1, 1, 0]
            - [4, 3, 0]
            - [12, 1, 0]
            - [16, 2, 0]
            - [19, 8, 0]
            - [7, 7, 0]
          STR_GUARDSMAN_MALE_SPAWNER:
            - [3, 3, 0]
            - [6, 1, 0]
            - [15, 2, 0]
            - [18, 1, 0]
            - [12, 8, 0]
            - [0, 9, 0]
        fuseTimers:
          STR_GUARDSMAN_FEMALE_SPAWNER: [0, 0]
          STR_GUARDSMAN_MALE_SPAWNER: [0, 0]

Will create 12 Guardsmen when this map is part of the map generation.

I see.  Interesting.