OpenXcom Forum
Modding => Help => Topic started by: wcho035 on September 29, 2019, 02:14:43 pm
-
Hi, I am trying to fit a rocket launcher that fire 3 Rockets in a tank. The ammo in the launcher can also be the same or different types. Here is the coding.
- type: STR_ROCKET_LAUNCHER_TANK
size: 0.4
weight: 10
bigSprite: 15
bulletSprite: 0
fireSound: 52
fixedWeapon: true
# compatibleAmmo:
# - STR_SMALL_ROCKET
# - STR_LARGE_ROCKET
# - STR_INCENDIARY_ROCKET
# - STR_NUKE_ROCKET
# - STR_SMOKESCREEN_ROCKET
# - STR_CHEMROCKET
accuracySnap: 55
accuracyAimed: 115
tuSnap: 45
tuAimed: 75
accuracyAuto: 60
tuAuto: 35
battleType: 1
invWidth: 2
invHeight: 3
# I want all 3 ammo slot to be able to fire all 6 same type rockets. So can be 3 small rockets, or a mixed.
ammo:
0:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
1:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
2:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
confAimed:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 1
confSnap:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 1
I am able see two ammo slot, not three. Again, not familiar with this section of the coding. How can this be properly coded? For
confAimed, can you have.
confAimed:
0:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 0
1:
shots: 1
name: STR_ROCKETFIRE2
ammoSlot: 1
2:
shots: 1
name: STR_ROCKETFIRE3
ammoSlot: 2
Two aim for two different type of ammo slots? I don't think it is possible.
-
Hi, I am trying to fit a rocket launcher that fire 3 Rockets in a tank. The ammo in the launcher can also be the same or different types. Here is the coding.
Hi, Precentor Apollyon!
# I want all 3 ammo slot to be able to fire all 6 same type rockets. So can be 3 small rockets, or a mixed.
ammo:
0:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
1:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
2:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
This part is well defined. 
confAimed:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 1
confSnap:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 1
I am able see two ammo slot, not three. Again, not familiar with this section of the coding. How can this be properly coded? For
confAimed, can you have.
confAimed:
0:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 0
1:
shots: 1
name: STR_ROCKETFIRE2
ammoSlot: 1
2:
shots: 1
name: STR_ROCKETFIRE3
ammoSlot: 2
Two aim for two different type of ammo slots? I don't think it is possible.
But you can't have three conf fire modes on the same slot. I mean, you need to define it using different fire modes, not just Aimed.
confAimed:
0:
shots: 1
name: STR_ROCKETFIRE1
ammoSlot: 0
confSnap:
1:
shots: 1
name: STR_ROCKETFIRE2
ammoSlot: 1
confAuto:
2:
shots: 1
name: STR_ROCKETFIRE3
ammoSlot: 2
Now you can use all of the three fire modes and fill it with all of your new rockets!
Remember that the Snap shot is used for reactions.
Enviado desde mi LG-M400 mediante Tapatalk
-
Hi efrenespartano, I encounter 1 problem with the code so far.
With the ammo I have define.
(The first part)
0:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
1:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
2:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET, STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET, STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
The three slot above wouldn't accept the same type of ammo 3 times. For example, it will not load 3 different small rockets.
This code will work if I declare it like this,
(Second Part)
0:
compatibleAmmo: [ STR_SMALL_ROCKET, STR_LARGE_ROCKET]
tuLoad: 10
tuUnload: 4
1:
compatibleAmmo: [ STR_INCENDIARY_ROCKET, STR_NUKE_ROCKET]
tuLoad: 10
tuUnload: 4
2:
compatibleAmmo: [ STR_SMOKESCREEN_ROCKET, STR_CHEMROCKET]
tuLoad: 10
tuUnload: 4
I have split the ammo type into three firing group. Is there a way to do the first part? I can load any ammo type aka 3 small rockets.
Problem 2
With the solution you gave me, you are using confAimed, confSnap and confAuto: to split the launcher to have 3 firing mode. Why can't 3 firing mod exist for each confAimed, confSnap and confAuto?
I mean say I have 3 different type of rockets. One Small, Large and INCENDIARY. I want to aim for all 3, snap for all 3 and auto fire for all 3 types. Can't I do this at all?
-
Any update on this? Or it is just not possible with the setup I asked?
-
Each ammo slot must have unique ammo types; one type of ammo cannot be loaded into two different ammo slots.
So, for example, you cannot have a double-barreled shotgun in OXCE where each barrel is modeled as a separate ammo slot.
-
Thanks ohartenstein23 I will manage something out from this, thank you for the kind reply.