Author Topic: Issues with HWPs  (Read 7672 times)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Issues with HWPs
« on: April 15, 2015, 05:12:45 pm »
I've got XComUtil's Improved HWPs added as an improvement to the vanilla ones (you can upgrade them to XComUtil's versions with a manufacturing project). 

However, on tactical missions the Improved HWP appears during the pre-mission loadout screen and during the mission they can't use any weapons. Any idea of what might be wrong? Warboy already gave me a few pointers (adding builtWeapon) but they didn't work.

Here's the relevant code for armors/items:
Code: [Select]
items:
  - type: STR_IMPROVED_TANK_CANNON
    size: 6
    costSell: 360000
    transferTime: 96
    weight: 1
    bigSprite: 43
    floorSprite: 0
    handSprite: 0
    bulletSprite: 4
    fireSound: 12
    compatibleAmmo:
      - STR_HWP_CANNON_SHELLS
    accuracyAuto: 50
    tuAuto: 38
    autoShots: 6
    battleType: 1
    fixedWeapon: true
    invWidth: 2
    invHeight: 3
    turretType: 0
Code: [Select]
armor:
  - type: IMPROVED_TANK_ARMOR
    spriteSheet: TANKS.PCK
    corpseBattle:
      - TANK_CORPSE_1
      - TANK_CORPSE_2
      - TANK_CORPSE_3
      - TANK_CORPSE_4
    frontArmor: 130
    sideArmor: 130
    rearArmor: 130
    underArmor: 100
    drawingRoutine: 2
    hasInventory: false
    size: 2
    damageModifier:
      - 1.0
      - 1.0
      - 0.4
      - 0.75
      - 1.0
      - 1.0
      - 0.0
      - 0.9
      - 0.4
      - 0.0
    loftempsSet: [ 92, 89, 90, 91 ]
Code: [Select]
units:
  - type: STR_IMPROVED_TANK_CANNON
    race: STR_IMPROVED_TANK_CANNON
    stats:
      tu: 70
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
    armor: IMPROVED_TANK_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 20
    deathSound: 23
    moveSound: 14
    energyRecovery: 50

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Issues with HWPs
« Reply #1 on: April 15, 2015, 06:30:32 pm »
builtInWeapons seems to be the only thing missing, at quick glance.

Code: [Select]
    builtInWeapons:
      - STR_IMPROVED_TANK_CANNON
      - STR_HWP_CANNON_SHELLS
« Last Edit: April 15, 2015, 06:32:04 pm by robin »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Issues with HWPs
« Reply #2 on: April 15, 2015, 06:43:29 pm »
builtInWeapons seems to be the only thing missing, at quick glance.

Code: [Select]
    builtInWeapons:
      - STR_IMPROVED_TANK_CANNON
      - STR_HWP_CANNON_SHELLS

Still doesn't work after I had this to either armor or units.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Issues with HWPs
« Reply #3 on: April 15, 2015, 07:11:49 pm »
This is sort of stupid but, try using "armor: TANK_ARMOR" in the entry for the unit definition, instead of "armor: IMPROVED_TANK_ARMOR".
I don't seem to find other differences (other than the already cited builtinweapons) with my tanks.

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Issues with HWPs
« Reply #4 on: April 15, 2015, 07:14:46 pm »
Because your tank without ammo.

items:
  - type: STR_IMPROVED_TANK_CANNON
    clipSize: 30

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Issues with HWPs
« Reply #5 on: April 16, 2015, 01:39:47 am »
This is sort of stupid but, try using "armor: TANK_ARMOR" in the entry for the unit definition, instead of "armor: IMPROVED_TANK_ARMOR".
I don't seem to find other differences (other than the already cited builtinweapons) with my tanks.

Renamed it to TANK_ARMOR2, didn't solve.

Because your tank without ammo.

items:
  - type: STR_IMPROVED_TANK_CANNON
    clipSize: 30

Added to items, didn't solve it either.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Issues with HWPs
« Reply #6 on: April 16, 2015, 01:48:31 am »
Renamed it to TANK_ARMOR2, didn't solve.

Added to items, didn't solve it either.
No, try using exactly "TANK_ARMOR"
« Last Edit: April 16, 2015, 01:58:16 am by robin »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Issues with HWPs
« Reply #7 on: April 16, 2015, 01:53:57 am »
No, try using exactly "TANK_ARMOR"

I did and it works but now the HWPs use the vanilla armor, instead of the improved one.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Issues with HWPs
« Reply #8 on: April 16, 2015, 01:59:27 am »
I did and it works but now the HWPs use the vanilla armor, instead of the improved one.

The IMPROVED_TANK_ARMOR might also be missing this:
Code: [Select]
    corpseGeo: STR_IMPROVED_TANK_CORPSE(you need an item of the same name); dunno though, I think player tanks could be stuck using TANK_ARMOR exclusively. You are using the vanilla armor but you can modify the stats; not ideal but not meaningless.
« Last Edit: April 16, 2015, 02:04:57 am by robin »

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Issues with HWPs
« Reply #9 on: April 16, 2015, 03:51:04 am »
Because your tank without ammo.

items:
  - type: STR_IMPROVED_TANK_CANNON
    clipSize: 30

Sorry for wrong advice. I have my own build, which differs from regular OpenXcom in several aspects.

So, right advice:)
1. use "armors:" instead of "armor:"
2. use "allowInv: false" instead of "hasIventory: false"

Code: [Select]
armors:
  - type: IMPROVED_TANK_ARMOR
    spriteSheet: TANKS.PCK
    allowInv: false
« Last Edit: April 16, 2015, 04:17:13 am by redv »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Issues with HWPs
« Reply #10 on: April 16, 2015, 05:02:46 am »
right, my bad, i gave him the name of the var rather than the string used to set it.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Issues with HWPs
« Reply #11 on: April 16, 2015, 08:44:44 pm »
2. use "allowInv: false" instead of "hasIventory: false"

That fixed it, thanks :)

right, my bad, i gave him the name of the var rather than the string used to set it.

You still pointed the right direction, so thanks :)