aliens

Author Topic: [Documentation] SpecialWeapons per Soldier Type  (Read 6061 times)

Offline memmaker

  • Captain
  • ***
  • Posts: 96
    • View Profile
[Documentation] SpecialWeapons per Soldier Type
« 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

Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #1 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


Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #2 on: February 05, 2020, 12:13:22 am »
I hope it means that I can put my psi weapon directly on hybrid soldiers.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #3 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:

  • The order in which the items are loaded into the unit determine which shows for the icon - for your soldiers the one defined on armor is loaded first, so it will be the one shown on the icon.
  • The order for special weapons accessed by an empty hand are done in order of the battleType for the item: Melee takes priority, next Psi amps, Firearms, Medikits, Motion scanners, then Mind probes last. If the two special weapons are the same battle type, then the load order determines which is used (armor first).

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.

Offline memmaker

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #4 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.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #5 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

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #6 on: February 05, 2020, 10:50:38 am »
Same, many thanks for clearing this up.

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #7 on: February 05, 2020, 11:42:45 am »
Did i misreaded or is it really two special weapons possible now on the same time?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9077
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #8 on: February 05, 2020, 12:09:57 pm »
77 weapons at the same time when?

Offline memmaker

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #9 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


Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #10 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.

Offline Kronos913

  • Colonel
  • ****
  • Posts: 124
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #11 on: December 20, 2022, 08:16:16 pm »
how to add two special weapons?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #12 on: December 20, 2022, 08:52:17 pm »
how to add two special weapons?

You can't.

Offline Kronos913

  • Colonel
  • ****
  • Posts: 124
    • View Profile
Re: [Documentation] SpecialWeapons per Soldier Type
« Reply #13 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