Author Topic: Multirocket launcher coding..  (Read 1775 times)

wcho035

  • Guest
Multirocket launcher coding..
« 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.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 748
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: Multirocket launcher coding..
« Reply #1 on: September 29, 2019, 05:23:41 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.

Hi, Precentor Apollyon!

Quote
# 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.

Quote
    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.

Code: [Select]
    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


wcho035

  • Guest
Re: Multirocket launcher coding..
« Reply #2 on: September 29, 2019, 06:21:49 pm »
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?

wcho035

  • Guest
Re: Multirocket launcher coding..
« Reply #3 on: September 30, 2019, 03:55:06 pm »
Any update on this? Or it is just not possible with the setup I asked?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Multirocket launcher coding..
« Reply #4 on: September 30, 2019, 06:12:09 pm »
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.

wcho035

  • Guest
Re: Multirocket launcher coding..
« Reply #5 on: September 30, 2019, 06:38:11 pm »
Thanks ohartenstein23 I will manage something out from this, thank you for the kind reply.