OpenXcom Forum
Modding => Work In Progress => Topic started by: Hobbes 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:
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
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 ]
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
-
builtInWeapons seems to be the only thing missing, at quick glance.
builtInWeapons:
- STR_IMPROVED_TANK_CANNON
- STR_HWP_CANNON_SHELLS
-
builtInWeapons seems to be the only thing missing, at quick glance.
builtInWeapons:
- STR_IMPROVED_TANK_CANNON
- STR_HWP_CANNON_SHELLS
Still doesn't work after I had this to either armor or units.
-
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.
-
Because your tank without ammo.
items:
- type: STR_IMPROVED_TANK_CANNON
clipSize: 30
-
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.
-
Renamed it to TANK_ARMOR2, didn't solve.
Added to items, didn't solve it either.
No, try using exactly "TANK_ARMOR"
-
No, try using exactly "TANK_ARMOR"
I did and it works but now the HWPs use the vanilla armor, instead of the improved one.
-
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:
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.
-
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"
armors:
- type: IMPROVED_TANK_ARMOR
spriteSheet: TANKS.PCK
allowInv: false
-
right, my bad, i gave him the name of the var rather than the string used to set it.
-
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 :)