OpenXcom Forum
Modding => Work In Progress => Topic started by: The Reaver of Darkness on February 17, 2017, 08:14:05 am
-
I'm running into a problem with modding tanks. I want the plasma tanks to cost elerium to fire, so I gave them an ammo type. But it doesn't seem like I can set an amount of ammo on the clip. While the clipSize function on soldier weapon clips determines how much ammo is in the clip, for tank ammo it instead determines how many shots the tank can hold.
Can anyone tell me how to make tank clips that give more than 1 ammo?
-
Another solution would be to manufacture tank ammo, with 1 elerium giving multiple plasma charges.
-
Another solution would be to manufacture tank ammo, with 1 elerium giving multiple plasma charges.
I can accept that, but how do I give a project multiple units of output?
-
Here:
- name: STR_PLASMA_TANK_AMMO_(x50)
space: 1
time: 1
cost: 1
requiredItems:
STR_ELERIUM_115: 1
producedItems:
STR_PLASMA_TANK_AMMO: 50
-
Thanks!!
-
... it doesn't seem like I can set an amount of ammo on the clip. While the clipSize function on soldier weapon clips determines how much ammo is in the clip, for tank ammo it instead determines how many shots the tank can hold.
Can anyone tell me how to make tank clips that give more than 1 ammo?
Thanks to TFTD vanilla behavior this is already supported by oxc, albeit it needs a slightly different thinking compared to normal weapons (it's the nature of the beast called HWPs ;-)).
What is needed is defining the clipsize on both the tank AND the ammunition.
Below is the relevant snippet (edited to only show relevant parts) from TFTD items.rul, to help you get started:
- type: STR_GAUSS_CANNON_AMMO
clipSize: 1
- type: STR_COELACANTH_GAUSS
# special behaviour here: for a HWP with compatible ammo, setting a clipsize
# defines the max ammo for the HWP, and the clipsize on the weapon dictates
# how many rounds it adds.
compatibleAmmo:
- STR_GAUSS_CANNON_AMMO
clipSize: 50
Have fun modding