OpenXcom Forum
Modding => Work In Progress => Topic started by: robin on December 10, 2015, 12:19:42 am
-
items:
- type: STR_ROBOTURRET_XCOM_CANNON
size: 3
costBuy: 80000
costSell: 60000
transferTime: 96
weight: 1
bigSprite: 130
floorSprite: 0
handSprite: 0
bulletSprite: 3
fireSound: 520
fixedWeapon: true # true/false doesn't seem to change anything
invWidth: 2
invHeight: 3
- type: AUX_TANK_CANNON
weight: 1
bigSprite: 130
bulletSprite: 3
fireSound: 520
compatibleAmmo:
- AUX_TANK_CANNON_ROUNDS
accuracyAuto: 35
tuAuto: 25
battleType: 1
fixedWeapon: true
invWidth: 2
invHeight: 3
bulletSpeed: 2
recover: false
autoShots: 3
- type: AUX_TANK_CANNON_ROUNDS
size: 0.0
costBuy: 30
costSell: 20
transferTime: 48
weight: 8
bigSprite: -1
floorSprite: 12
hitSound: 13
hitAnimation: 26
power: 50
damageType: 1
clipSize: 60
battleType: 2
invWidth: 2
invHeight: 1
units:
- type: STR_ROBOTURRET_XCOM_CANNON
race: STR_ROBOTURRET_XCOM
stats: &statsRoboturret
tu: 50
stamina: 5
health: 75
bravery: 110
reactions: 50
firing: 60
throwing: 0
strength: 50
psiStrength: 100
psiSkill: 0
melee: 50
armor: ROBOTURRET_XCOM_CANNON_ARMOR
standHeight: 19
value: 10
deathSound: 23
moveSound: 14
intelligence: 2
aggression: 0
energyRecovery: 50
#livingWeapon: true
builtInWeapons:
- AUX_TANK_CANNON
- AUX_TANK_CANNON_ROUNDS
an 1x1 szie hwp unit
- the unit works perfectly in quick battle;
- (campaign) i can buy both the unit-item and the ammo-item, but the unit doesn't appear at all in the "equip craft" list of items, so i can't put it on crafts;
- (campaign) the units is actually spawned an works correctly on base defense mission, which is super-cool! because it is intended to be defense-only unit (see screen);
still, i don't like thing happening randomly, i'd like to understand why it works correctly in some scenarios and not at all in others.
halp
-
I think you forgot to define:
item:
...
battleType: 1
...
For your HWP. When not defined it defaults to 0 (=BT_NONE).
The craftEquipment code hides all BT_NONE (and some others).
Hope it helps.
-
I think you forgot to define:
item:
...
battleType: 1
...
For your HWP. When not defined it defaults to 0 (=BT_NONE).
The craftEquipment code hides all BT_NONE (and some others).
Hope it helps.
that fixes the "not appearing on equip-craft list", bur rises a whole new deal of problems:
i'm using bultInWeapons for the unit because otherwise only ammo-less weapons are allowed on a unit (livingWeapon); unless the item for the unit has turretType, which can't be this case since it is not a turret of a tank, but a whole unit.
so "battleType: 1" adds a main weapon to the unit, which occupies the right slot, pushing the builtInWeapon into the left slot.
the right main weapon can, as said above, only work ammo-less (unless turret); if try to add ammo, in battle it only has 1 ammo (and also it freezes my game when i click to use it).
i'm starting to think 1x1 size hwps *with ammo* are impossible to do.
(btw i'm actually cool with it being a base-defense-only unit; just want to understand want can/can't be done).
-
There are some mods out there with 1x1 HWPs apparently working, you might look to them for tips, compare with what you have and see what they did differently. I haven't tested any but I see decent ratings so I assume they work.
HWP Drones - Power suit HWPs:
https://www.openxcom.com/mod/hwp-drones-power-suit-hwps (https://www.openxcom.com/mod/hwp-drones-power-suit-hwps)
Tanks, Drones, Sectopods? Oh My!:
https://www.openxcom.com/mod/tanks-drones-sectopods-oh-my (https://www.openxcom.com/mod/tanks-drones-sectopods-oh-my)
And if those don't work, someone made one using soldier code...
X-COM Enforcer:
https://www.openxcom.com/mod/x-com-enforcer (https://www.openxcom.com/mod/x-com-enforcer)
-
thanks. will look into them when i have time, but reading the descriptions they seem to suffer the limitations i'm already experiencing (specifically: they use ammo-less weapons to work).
-
i'm starting to think 1x1 size hwps *with ammo* are impossible to do.
I have a 1x1 HWP that uses an ammo based weapon
- type: STR_UAV_ROCKET_LAUNCHER
size: 5
costSell: 350000
bigSprite: 960
floorSprite: 960
handSprite: 0
bulletSprite: 0
fireSound: 1001
compatibleAmmo:
- STR_UAV_ROCKETS
accuracySnap: 40
accuracyAimed: 115
tuSnap: 25
tuAimed: 70
battleType: 1
fixedWeapon: true
invWidth: 2
invHeight: 3
listOrder: 1510
- type: STR_UAV_ROCKETS
size: 0.6
costSell: 2250
weight: 1
bigSprite: -1
floorSprite: 16
hitSound: 0
hitAnimation: 0
power: 70
damageType: 3
clipSize: 4
battleType: 2
invWidth: 2
invHeight: 3
listOrder: 1511
- type: STR_UAV_ROCKET_LAUNCHER
race: STR_UAV
stats:
tu: 140
stamina: 110
health: 20
bravery: 110
reactions: 20
firing: 70
throwing: 0
strength: 10
psiStrength: 110
psiSkill: 0
melee: 0
armor: UAV_ARMOR2
standHeight: 10
kneelHeight: 10
floatHeight: 15
value: 15
deathSound: 12
energyRecovery: 50
moveSound: 1000
However, I don't use any aux weapons, just the main weapon. Perhaps that's the problem? I've never tried giving an HWP more than one of weapon.
Edit: BTW, nice robot :)
-
interesting, will copypaste!
(on my end i also noticed that the weapon listed under builtInWeapons *with ammo*, has its ammo filled --in battle-- even if you don't have ammo for it in store.)
moar testing incoming i guess, when i can.
-
so yeah, it appears that HWP builtInWeapon ammo are fully loaded regardless that you actually have the ammo-item or not in store. the clipSize set for the ammo-item will only work as a "limiter" for how many times you can shoot in a single battle.
this "limiter" behavior can be reproduced also for not-builtInWeapons (weapons that use fixedWeapon: true that is, like XOp's UAV), by removing the weapon ammo dependency and adding a finite "clipSize" to the weapon.
example XOps' UAV: if you remove the rocket ammo and add, say, "clipSize: 4" to the launcher item, it will work like that, meaning that ech time you go into battle, it will have 4 rocket.
in battle, once ammo are depleted (0 ammo), the weapon icon will disappear from the unit hand; but the hwp itself won't be removed from your possessions and in the next battle everything will be restored.
XOps you should be aware (and you probably are, but better be sure) that your STR_UAV_ROCKETS item only counts as 1 rocket ingame, despite "clipSize: 4"; so you have to buy 4 of them to fully equip your uav launcher.
-
Regarding clipsize and weapon ammo .. your statement is only true when the vehicle itself has no clipsize defined
If the vehicle has a defined clipsize .. the game will regard that as the amount of projectiles a vehicle can carry. The clipsize of the corresponding ammo in that case is seen as number of projectiles added per clip.
-
Regarding clipsize and weapon ammo .. your statement is only true when the vehicle itself has no clipsize defined
If the vehicle has a defined clipsize .. the game will regard that as the amount of projectiles a vehicle can carry. The clipsize of the corresponding ammo in that case is seen as number of projectiles added per clip.
hum from my testing, the number of projectiles added per clip is always only 1, regardless of clipSize. even discussing it on irc with warboy and supsuper seemed to confirm this.
will check again...
-
hum from my testing, the number of projectiles added per clip is always only 1, regardless of clipSize. even discussing it on irc with warboy and supsuper seemed to confirm this.
will check again...
I'm not sure when you had that discussion, but there were some changes in this part on 16-11 (commit a78d79).
So perhaps it has changed in your favor, or i might just be interpretate you wrong and you only want to define clipsize on one entity.
-
XOps you should be aware (and you probably are, but better be sure) that your STR_UAV_ROCKETS item only counts as 1 rocket ingame, despite "clipSize: 4"; so you have to buy 4 of them to fully equip your uav launcher.
I am aware. It's just that none of you appreciate the haphazard and hastily thrown together genius of my naming systems. :)