Author Topic: The new "dual-wielding" HWPs and OXC closing up  (Read 8499 times)

Offline robin

  • Commander
  • *****
  • Posts: 1213
  • ULTIMATE ROOKIE
    • View Profile
The new "dual-wielding" HWPs and OXC closing up
« on: September 21, 2014, 12:21:03 pm »
Trying to make a tank featuring the new option to give it a secondary weapon.

But when I try to load it on the craft (equip craft>equipment screen) for a quick battle, the game closes up.
Nothing on the log.

Here's my stuff:

  - type: STR_VEHICLE_CANNON_ROUNDS    # auxiliary cannon ammo
    size: 0.1
    costBuy: 300
    costSell: 200
    transferTime: 48
    weight: 1
    bigSprite: -1
    floorSprite: 12
    hitSound: 13
    hitAnimation: 26
    power: 56
    damageType: 1
    clipSize: 100
    battleType: 2
    invWidth: 2
    invHeight: 1

  - type: STR_VEHICLE_ROCKETS    # primary rocket ammo
    size: 0.4
    costBuy: 24000
    costSell: 18000
    transferTime: 48
    weight: 1
    bigSprite: -1
    floorSprite: 16
    hitSound: 0
    hitAnimation: 0
    power: 100
    damageType: 3
    clipSize: 8
    battleType: 2
    invWidth: 1
    invHeight: 3

  - type: STR_XROBOTANK_ROCKET    # main entry/turret
    size: 6
    costBuy: 380000
    costSell: 360000
    transferTime: 96
    weight: 1
    bigSprite: 132
    floorSprite: 0
    handSprite: 0
    bulletSprite: 0
    fireSound: 52
    compatibleAmmo:
      - STR_VEHICLE_ROCKETS
    accuracySnap: 55
    accuracyAimed: 115
    tuSnap: 45
    tuAimed: 75
    battleType: 1
    fixedWeapon: true
    invWidth: 2
    invHeight: 3
    turretType: 1

  - type: AUX_XROBOTANK_CANNON    # aux cannon
    weight: 3
    bigSprite: 131
    floorSprite: 31
    handSprite: 104
    bulletSprite: 3
    fireSound: 12
    compatibleAmmo:
      - STR_VEHICLE_CANNON_ROUNDS
    accuracyAuto: 30
    accuracySnap: 60
    accuracyAimed: 90
    tuAuto: 45
    tuSnap: 30
    tuAimed: 60
    battleType: 1
    fixedWeapon: true
    invWidth: 2
    invHeight: 3
    recover: false
    autoShots: 3

  - type: XROBOTANK_ARMOR
    spriteSheet: XROBOTANKS.PCK
    corpseBattle:
      - TANK_CORPSE_1
      - TANK_CORPSE_2
      - TANK_CORPSE_3
      - TANK_CORPSE_4
    frontArmor: 90
    sideArmor: 75
    rearArmor: 60
    underArmor: 60
    drawingRoutine: 2
    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 ]

  - type: STR_XROBOTANK_ROCKET
    race: STR_XROBOTANK_ROCKET
    stats:
      tu: 70
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
    armor: ROBOTANK_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 20
    energyRecovery: 50
    deathSound: 23
    moveSound: 14
    builtInWeapons:
      - STR_XROBOTANK_ROCKET
      - AUX_XROBOTANK_CANNON
      - STR_VEHICLE_ROCKETS
      - STR_VEHICLE_CANNON_ROUNDS

  - type: XROBOTANKS.PCK
    width: 32
    height: 40
    files:
      0: Resources/apoc/UNITS_XCOM/XROBOTANKS/


..hints?
« Last Edit: September 21, 2014, 12:25:04 pm by robin »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #1 on: September 21, 2014, 12:26:12 pm »
I'm not good at spotting minute errors, so try to use my aux weapon, if it works, the mistake is in your aux weapon, if not, it is elsewhere:

Code: [Select]
  - type: AUX_TANK_MG
    weight: 1
    bigSprite: 378
    bulletSprite: 2
    fireSound: 96
    hitSound: 22
    hitAnimation: 26
    power: 36
    damageType: 1
    accuracyAuto: 50
    tuAuto: 25
    clipSize: -1
    battleType: 1
    fixedWeapon: true
    invWidth: 1
    invHeight: 3
    autoShots: 4
    autoRange: 24

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #2 on: September 21, 2014, 03:32:06 pm »
Just comparing the two... maybe one of them needs to be a fixed weapon with infinite ammo?

Remember Lobstermen are the model that made this possible.  (Fixed melee, and the ability to use normal weapons).

Cheers, Ivan :D

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #3 on: September 21, 2014, 03:33:54 pm »
No, infinite ammo is not a requirement. My prototype dual-weapon tank "combined" cannon & rocket turrets.

Offline robin

  • Commander
  • *****
  • Posts: 1213
  • ULTIMATE ROOKIE
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #4 on: September 21, 2014, 07:16:07 pm »
Did a (very) quick check and seems the problem is elsewhere. Usually when the game closes up it's about graphics, but there shouldn't be anything wrong with my assets.
I'll resume fighting with it next saturday, my free time is non-existent now :'(

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #5 on: September 22, 2014, 02:20:26 am »
Spotted something, a recover: false weapon won't equip for XCom, maybe that's the problem.

Offline harry

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #6 on: September 22, 2014, 03:18:14 pm »
Did a (very) quick check and seems the problem is elsewhere. Usually when the game closes up it's about graphics, but there shouldn't be anything wrong with my assets.

Maybe, but check the sprites you're using.
bigSprite, floorSprite, handSprite.


I'm having problems with the secondary weapon for HWP as well, so test your HWP with unlimited ammo first.

For me, if I put a weapon with infinite ammo as primary and secondary then everything works.

But if I put a weapon with finite ammo as secondary, the ammo is never loaded.
And if I put it as primary, the weapon is reloaded but the stock in store never goes down.

Offline robin

  • Commander
  • *****
  • Posts: 1213
  • ULTIMATE ROOKIE
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #7 on: September 27, 2014, 12:30:05 pm »


ittt woorkssss
prroofitttssssssss

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #8 on: September 27, 2014, 03:50:51 pm »
Good work!! And excellent graphics also!! When and in what mod are the graphics and working code be available to the community?

Thanks for sharing!

Offline robin

  • Commander
  • *****
  • Posts: 1213
  • ULTIMATE ROOKIE
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #9 on: September 27, 2014, 09:16:27 pm »
I made another 2-weapons  tank, with a ammo-less Laser (instead of rocket launcher) as main-turret weapon, but this one doesn't load the ammo for the aux cannon.
At least in quick battle mode.

Could it be that there some kind of issue in using an ammo-less main weapon (turret) with aux weapon that has ammo?


Good work!! And excellent graphics also!! When and in what mod are the graphics and working code be available to the community?

Thanks for sharing!
Mod is still too WIP to be published. As soon as I have something that's not a total mess of stuff, I'll do it.
« Last Edit: September 27, 2014, 09:19:05 pm by robin »

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #10 on: September 27, 2014, 09:45:19 pm »
It's a bug. If weapon in right "hand" hasn't ammo, then weapon in left "hand" cannot be loaded also.
https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/BattlescapeGenerator.cpp#L1055

Actually, there are still a few bugs:)

For example, possible memory leak in this place: https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/BattlescapeGenerator.cpp#L594

Another example: "fixedWeapon" can be placed in "backpack" instead of "hands".
« Last Edit: September 27, 2014, 09:55:12 pm by redv »

Offline robin

  • Commander
  • *****
  • Posts: 1213
  • ULTIMATE ROOKIE
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #11 on: September 27, 2014, 10:45:50 pm »
It's a bug. If weapon in right "hand" hasn't ammo, then weapon in left "hand" cannot be loaded also.
https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/BattlescapeGenerator.cpp#L1055

Actually, there are still a few bugs:)

For example, possible memory leak in this place: https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/BattlescapeGenerator.cpp#L594

Another example: "fixedWeapon" can be placed in "backpack" instead of "hands".
I see thanks.

Offline smexyvami

  • Captain
  • ***
  • Posts: 82
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #12 on: September 27, 2014, 11:05:26 pm »


ittt woorkssss
prroofitttssssssss

 shit son thats hot :D

Offline shadychrctr

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #13 on: September 28, 2014, 01:37:49 am »
Diggin those rockets. Did you make those AUX weapons yourself or did you just make the sprites?

Offline KingMob4313

  • Commander
  • *****
  • Posts: 543
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: The new "dual-wielding" HWPs and OXC closing up
« Reply #14 on: October 04, 2014, 08:31:26 pm »


ittt woorkssss
prroofitttssssssss

How did you fix it, mang?