Author Topic: [Halp!]Any Tank Experts Around Here?  (Read 4094 times)

Offline XCOMFan419

  • Colonel
  • ****
  • Posts: 183
  • Wait I'm still here I swear
    • View Profile
[Halp!]Any Tank Experts Around Here?
« on: July 23, 2014, 03:29:13 pm »
As the tag suggests, I need help.

I figured out how to mod after downloading Notepad ++. After increasing the size of a building's capacity, I decided to make the tanks a little more better. What I planned to do was add auto-shot to the Tank/Cannon (Since the gun is 20mm-30mm afterall. Kinda thought it'd work like a Bushmaster 25), the Tank/Laser Cannon and the Hovertank/Plasma.

After about an hour of attempts...I kinda gave up. I tried everything. Looking at other mods for reference, taking the Unit and Corpse codes into my document and everything. But I still couldn't give them autoshot (and increase their TU's to 100.)

I also tried to make the regular and laser Cannons to be useful and make the Interceptor a little better, but that's a whole thread on it's own.

Anyways, here's my code that I tried to get to work.

SpoilerTank/Cannon:
Code: [Select]
items:
 - type: STR_TANK_CANNON
    size: 6
    costBuy: 420000
    costSell: 340000
    transferTime: 96
    weight: 1
    bigSprite: 43
    floorSprite: 0
    handSprite: 0
    bulletSprite: 4
    fireSound: 12
    compatibleAmmo:
      - STR_HWP_CANNON_SHELLS
    accuracySnap: 60
accuracyAuto: 50
    accuracyAimed: 90   
    tuSnap: 33
tuAuto: 40
    tuAimed: 80
    battleType: 1
    fixedWeapon: true
    invWidth: 2
    invHeight: 3
    turretType: 0
units:
  - type: STR_TANK_CANNON
    race: STR_TANK_CANNON
    stats:
      tu: 100
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
armors:
    armor: TANK_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 20
    deathSound: 23
    moveSound: 14
    energyRecovery: 50
 - type: TANK_ARMOR
    spriteSheet: TANKS.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 ]
SpoilerTank/Laser Cannon:
Code: [Select]
items:
  - type: STR_TANK_LASER_CANNON
    size: 6
    costSell: 594000
    transferTime: 96
    weight: 1
    bigSprite: 54
    floorSprite: 0
    handSprite: 0
    bulletSprite: 5
    fireSound: 11
    hitSound: 19
    hitAnimation: 36
    power: 110
    damageType: 4
    accuracySnap: 50
accuracyAuto: 50
    accuracyAimed: 85
    tuSnap: 33
tuAuto: 40
    tuAimed: 75
    battleType: 1
    fixedWeapon: true
    clipSize: -1
    invWidth: 2
    invHeight: 3
    turretType: 2
units:
- type: STR_TANK_LASER_CANNON
    race: STR_TANK_LASER_CANNON
    stats:
      tu: 100
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 7
    armor: TANK_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 20
    deathSound: 23
    moveSound: 14
    energyRecovery: 50
armors:
    armor: TANK_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 20
    deathSound: 23
    moveSound: 14
    energyRecovery: 50
 - type: TANK_ARMOR
    spriteSheet: TANKS.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 ]
SpoilerHovertank/Plasma(Note: Missing Units section):
Code: [Select]
items:
 - type: STR_HOVERTANK_PLASMA
    size: 6
    costSell: 980000
    transferTime: 96
    weight: 1
    bigSprite: 40
    floorSprite: 0
    handSprite: 0
    bulletSprite: 8
    fireSound: 18
    hitSound: 19
    power: 110
    damageType: 5
    hitAnimation: 46
    accuracySnap: 85
accuracyAuto: 50
    accuracyAimed: 100
    tuSnap: 30
tuAuto: 40
    tuAimed: 60
    battleType: 1
    fixedWeapon: true
    clipSize: -1
    invWidth: 2
    invHeight: 3
    turretType: 3
armors:
- type: HOVERTANK_ARMOR
    spriteSheet: NEWTANKS.PCK
    corpseBattle:
      - HOVERTANK_CORPSE_1
      - HOVERTANK_CORPSE_2
      - HOVERTANK_CORPSE_3
      - HOVERTANK_CORPSE_4
    frontArmor: 130
    sideArmor: 130
    rearArmor: 130
    underArmor: 100
    drawingRoutine: 2
    movementType: 1
    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 ]

I hope someone experienced can see where I went wrong.
(It was probably something stupid, wasn't it?)

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: [Halp!]Any Tank Experts Around Here?
« Reply #1 on: July 23, 2014, 03:39:14 pm »
works just fine autoshoot+100TU
Code: [Select]
units:
  - type: STR_TANK_CANNON
    stats:
      tu: 100
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
items:
  - type: STR_TANK_CANNON
    tuAuto: 49
    accuracyAuto: 35

Code: [Select]
    accuracySnap: 60
accuracyAuto: 50
    accuracyAimed: 90   
    tuSnap: 33
tuAuto: 40
    tuAimed: 80
you should have tuSnap and tuAuto on the same level there is no need to make a indention there

Offline XCOMFan419

  • Colonel
  • ****
  • Posts: 183
  • Wait I'm still here I swear
    • View Profile
Re: [Halp!]Any Tank Experts Around Here?
« Reply #2 on: July 23, 2014, 03:44:12 pm »
works just fine autoshoot+100TU
Code: [Select]
units:
  - type: STR_TANK_CANNON
    stats:
      tu: 100
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
items:
  - type: STR_TANK_CANNON
    tuAuto: 49
    accuracyAuto: 35

Code: [Select]
    accuracySnap: 60
accuracyAuto: 50
    accuracyAimed: 90   
    tuSnap: 33
tuAuto: 40
    tuAimed: 80
you should have tuSnap and tuAuto on the same level there is no need to make a indention there

Huh. I didn't notice that. It didn't appear in Notepad++.

Weird. Well I'll see what I can do and I'll make threads for the cannons and the interceptor later. I'll just focus on one thing rather than all at once.

Thank you.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: [Halp!]Any Tank Experts Around Here?
« Reply #3 on: July 23, 2014, 03:53:49 pm »
my guess is you uses TAB there
dont ever use TAB in yaml it just makes problems
use this button to see your tabs

Offline XCOMFan419

  • Colonel
  • ****
  • Posts: 183
  • Wait I'm still here I swear
    • View Profile
Re: [Halp!]Any Tank Experts Around Here?
« Reply #4 on: July 23, 2014, 04:48:53 pm »
Despite my best efforts, I still can't get autofire. I've gotten the 100 TU's and I got the mod to semi-work, but no autofire. As shown below:

https://i.imgur.com/F2XBXqy.png

Here is my code again...

Spoilersemi-fixed code (No clue what's going on):
Code: [Select]
items:
 - type: STR_TANK_CANNON
    size:6
    costBuy:420000
    costSell:340000
    transferTime:96
    weight:1
    bigSprite:43
    floorSprite:0
    handSprite:0
    bulletSprite:4
    fireSound:12
    compatibleAmmo:STR_HWP_CANNON_SHELLS
    accuracySnap:60
    accuracyAimed:115
    accuracyAuto:50
    tuAuto:45
    tuSnap:25
    tuAimed:50
    battleType:1
    fixedWeapon:true
    invWidth:2
    invHeight:3
    turretType:0
units:
  - type: STR_TANK_CANNON
    race: STR_TANK_CANNON
    stats:
      tu: 100
      stamina: 100
      health: 90
      bravery: 110
      reactions: 20
      firing: 60
      throwing: 0
      strength: 60
      psiStrength: 100
      psiSkill: 0
      melee: 70
    armor: TANK_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 20
    deathSound: 23
    moveSound: 14
    energyRecovery: 50
armors:
  - type: TANK_ARMOR
    spriteSheet: TANKS.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 ]

I feel like I have my tail between my legs...

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: [Halp!]Any Tank Experts Around Here?
« Reply #5 on: July 23, 2014, 04:54:42 pm »
i did not try your mod but the ruleset i posted works
the next error i see here is you changed your code
from
Code: [Select]
    compatibleAmmo:
      - STR_HWP_CANNON_SHELLS
to
Code: [Select]
    compatibleAmmo:STR_HWP_CANNON_SHELLSfor no obvious reason .. the ammo is a list - not sure if that is your problem

Offline XCOMFan419

  • Colonel
  • ****
  • Posts: 183
  • Wait I'm still here I swear
    • View Profile
Re: [Halp!]Any Tank Experts Around Here?
« Reply #6 on: July 23, 2014, 04:57:15 pm »
i did not try your mod but the ruleset i posted works
the next error i see here is you changed your code
from
Code: [Select]
    compatibleAmmo:
      - STR_HWP_CANNON_SHELLS
to
Code: [Select]
    compatibleAmmo:STR_HWP_CANNON_SHELLSfor no obvious reason .. the ammo is a list - not sure if that is your problem

Tried that already

It just says that it's an illegal map value.

I'll copy-paste your code from the forum and see if that works.

EDIT: Hm. It appears yours works and mine does not. I guess I didn't need that extra fluff afterall. Maybe it was something in there.
« Last Edit: July 23, 2014, 05:00:21 pm by XCOMFan419 »