OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: memmaker on February 04, 2020, 10:35:12 pm

Title: [Documentation] SpecialWeapons per Soldier Type
Post by: memmaker on February 04, 2020, 10:35:12 pm
Three days ago a new OXCE Feature was merged, allowing for special weapons on soldiers.

A ruleset example would look like this:

Code: [Select]
soldiers:
  - type: STR_HEAVY
    specialWeapon: STR_ROCKET_LAUNCHER
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: efrenespartano on February 04, 2020, 10:56:06 pm
How does it work, mate?

Like the specialWeapons already in the armor? Also, how does it behave when your soldier uses an armor with a specialWeapon already in? Both specialWeapons are used?

Enviado desde mi LG-M400 mediante Tapatalk

Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Solarius Scorch on February 05, 2020, 12:13:22 am
I hope it means that I can put my psi weapon directly on hybrid soldiers.
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: ohartenstein23 on February 05, 2020, 12:25:42 am
Yes, it exactly means you can put the psi weapon directly on hybrid soldiers.

As for having multiple special weapons (one on armor, one on soldier), one will take precedence according to the rules already in place for HWPs/aliens that you mind control:


If you're going to use both in a mod, I'd recommend setting a convention for separating the two special weapons. For example, put the soldiers' one always in both empty hand and special icon, then armor only in special icon.
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: memmaker on February 05, 2020, 02:11:05 am
I see, ohartenstein beat me to the answers.

Adding one minor thing though: Yes, they work exactly as specialWeapons on armors, thus also taking no inventory space.
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: efrenespartano on February 05, 2020, 02:12:30 am
So I can have two specialWeapon at the same time... Thanks a lot, memmaker. You are awesome.

Also, thank you Ohartenstein23 for your answers! Is pretty clear now

Enviado desde mi LG-M400 mediante Tapatalk
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Solarius Scorch on February 05, 2020, 10:50:38 am
Same, many thanks for clearing this up.
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Nord on February 05, 2020, 11:42:45 am
Did i misreaded or is it really two special weapons possible now on the same time?
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Meridian on February 05, 2020, 12:09:57 pm
77 weapons at the same time when?
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: memmaker on February 05, 2020, 12:10:26 pm
Yes, but they won't be using the same UI. You can have one for the special icon and one for the hands, like ohartenstein described.

Gesendet von meinem Pixel 3 mit Tapatalk

Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Nord on February 05, 2020, 12:30:52 pm
Yes, but they won't be using the same UI. You can have one for the special icon and one for the hands, like ohartenstein described.

Gesendet von meinem Pixel 3 mit Tapatalk
Oh, it is just as it is now.
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Kronos913 on December 20, 2022, 08:16:16 pm
how to add two special weapons?
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Solarius Scorch on December 20, 2022, 08:52:17 pm
how to add two special weapons?

You can't.
Title: Re: [Documentation] SpecialWeapons per Soldier Type
Post by: Kronos913 on December 20, 2022, 09:49:26 pm
I have a problem how to make the tank normally spend ammo for the second weapon...
Code: [Select]
units:
  - type: STR_HOVERTANK_STUN
    race: STR_HOVERTANK_STUN
    stats:
      tu: 100
      stamina: 100
      health: 90
      bravery: 110
      reactions: 30
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
    armor: STR_HOVERTANK_ARMOR_ST
    standHeight: 12
    kneelHeight: 12
    floatHeight: 6
    value: 20
    deathSound: 23
    moveSound: 40
    energyRecovery: 50
    builtInWeapons:
      - STR_TANK_STUN
      - STR_HEAVY_LASER_TANK_MODULE
      - STR_HOVERTANK_STUN_BOMB

Code: [Select]
items:
  - type: STR_HOVERTANK_STUN
    listOrder: 123
    size: 6
    costSell: 980000
    transferTime: 96
    weight: 1
    floorSprite: 0
    handSprite: 0
    bulletSprite: 8
    fireSound: 18
    hitSound: 37
    power: 90
    battleType: 8
    hitAnimation: 46
    turretType: 3
   
    bigSprite: 29
    battleType: 7
    tuUse: 10

    flatRate: true
    invWidth: 2
    invHeight: 2
    recover: false
    fixedWeapon: true

  - type: STR_TANK_STUN
    bigSprite: 937
    fireSound: 53
    bulletSprite: 9
    ammo:
      0:
        compatibleAmmo: [ STR_HOVERTANK_STUN_BOMB ]
      1:
        compatibleAmmo: [ STR_HEAVY_LASER_TANK_MODULE ]

    confSnap:
      shots: 1
      name: STR_LASER_SNAP
      ammoSlot: 1
    confAimed:
      shots: 1
      name: STR_LASER_AIMED
      ammoSlot: 1
    confAuto:
      shots: 1
      name: STR_STUN
      ammoSlot: 0

    accuracySnap: 85
    accuracyAimed: 100
    accuracyAuto: 95
    tuSnap: 30
    tuAimed: 60
    tuAuto: 40

    battleType: 1
    invWidth: 2
    invHeight: 3

    fixedWeapon: true
    recover: false

  - type: STR_HEAVY_LASER_TANK_MODULE
    bulletSprite: 7
    fireSound: 11
    hitSound: 19
    hitAnimation: 36
    damageType: 4
    power: 90
    clipSize: -1
    battleType: 2

  - type: STR_HOVERTANK_STUN_BOMB
    listOrder: 124
    size: 0.1
    costSell: 15200
    hitSound: 0
    hitAnimation: 0
    power: 90
    damageType: 6
    clipSize: 8
    battleType: 2

The tank needs to have
1. Scaned movement
2. Psi Scanner
3. Laser weapons
4. Bombs

Trying to combine 3 and 4 into one weapon. Tried different options
Usually, the tank has 8 bombs per battle, but the bombs from the warehouse are not consumed
Either all 8 are consumed, regardless of the amount spent during the battle