Author Topic: Missing turret on enemy tanks.  (Read 2774 times)

wcho035

  • Guest
Missing turret on enemy tanks.
« on: August 29, 2019, 05:23:32 am »
Hi, I want my opposing factions to have Tanks/ cannons as terror weapons. Can any one help me code a unit without missing its turret? 

Offline R1dO

  • Colonel
  • ****
  • Posts: 437
    • View Profile
Re: Missing turret on enemy tanks.
« Reply #1 on: August 29, 2019, 02:51:33 pm »
Since you are not giving me much here to work with i can only assume what goes wrong.

Please check: https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)
Use "CTRL+F" (browser search) to find the section named: Sprites and Particles

My guess is that you are missing:
Code: [Select]
turretType
--
Edit by Meridian: fixed the link above
« Last Edit: August 29, 2019, 03:27:48 pm by Meridian »

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #2 on: August 29, 2019, 06:00:34 pm »
No, it is not as simple as that. I have turrets on my sprite sheets. I am able to have turret on my tank, if purchase from the market. However, if I am to code the unit as a terror weapon, for some strange reason, the turret is always missing.

I have include turret=yes in both the Purchase item code and unit code. It does not make a difference.

Like I have this unit

  - type: STR_TANKDRONE_TERRORUNIT
    race: STR_UAV
    stats:
      tu: 120
      stamina: 180
      health: 50
      bravery: 110
      reactions: 30
      firing: 0
      throwing: 0
      strength: 10
      psiStrength: 110
      psiSkill: 0
      melee: 0
    armor: TANK_ARMOR
    standHeight: 10
    kneelHeight: 10
    floatHeight: 15
    value: 10
    deathSound: 23
    energyRecovery: 50
    moveSound: 1001
    builtInWeapons:
       - TERMINATOR_WEAPON

This uses the Tank/Cannon sprite. However, if you try to spawn it as an opposing unit, the tank is always missing a turret.


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Missing turret on enemy tanks.
« Reply #3 on: August 29, 2019, 07:15:47 pm »
It works for me.
This is all I needed to do to convert a Cyberdic into a Laser Cannon.

Code: [Select]
units:
  - type: STR_CYBERDISC_TERRORIST
    armor: TANK_ARMOR
items:
  - type: CYBERDISC_WEAPON
    turretType: 2

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #4 on: August 29, 2019, 08:48:07 pm »
Wow.. I must have been using the old Openxcom thing which didn't allow it. I will give it a hack tonight. Again thanks meridian.

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #5 on: August 29, 2019, 09:33:32 pm »
It is not working for me. Here is the code for one of my gunship.

Item.
*****
  - type: STR_GUNSHIPDRONERAIDER
    size: 0.0
    recover: false
    liveAlien: true
    turretType: 0

Unit
****
  - type: STR_GUNSHIPDRONERAIDER
    race: STR_UAV
    stats:
      tu: 120
      stamina: 180
      health: 50
      bravery: 110
      reactions: 30
      firing: 0
      throwing: 0
      strength: 10
      psiStrength: 110
      psiSkill: 0
      melee: 0
    #armor: STR_GUNSHIP_ARMOR
    armor: STR_GUNSHIP_HOVERARMOR_UC
    standHeight: 10
    kneelHeight: 10
    floatHeight: 15
    value: 10
    deathSound: 23
    energyRecovery: 50
    moveSound: 1001
    builtInWeapons:
      - TERMINATOR_WEAPON

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Missing turret on enemy tanks.
« Reply #6 on: August 29, 2019, 11:25:50 pm »
Upload the entire mod with everything in it if you want help.
Pasting partial ruleset doesn't help much.

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #7 on: August 30, 2019, 06:48:37 am »
HEre is a mod with screenshot.

Please use Sectoid race + Terror ship and Avenger to test in battle map

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #8 on: August 30, 2019, 07:11:24 am »
Please note in this test mod, I have modified the Cyberdisc, with tank code.  The Skyranger asset is missing, so use the Avenger and Sectoid with Cyberdisc to test.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Missing turret on enemy tanks.
« Reply #9 on: August 30, 2019, 10:15:59 am »
DUDE WTF IS THAT?
Are you changing the xcom1 ruleset in place? That's heresy!

I'm not going to look for a needle in a haystack!!
Package your mod as a REAL mod, without copying entire xcom1 and then we can talk again.
DO NOT TOUCH xcom1!

Also, I can't find any of your changes anywhere. There is no STR_GUNSHIPDRONERAIDER in any of the files... what did you even upload here?
« Last Edit: August 30, 2019, 10:26:02 am by Meridian »

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #10 on: August 30, 2019, 10:33:10 am »
Sorry, I have modified the Cyberdisk for the sectoid in the test mod like you did. Only the item section and unit section was modified.  I can up load the codes later here, but if you want to test the mod, that’s the problem I encounter.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Missing turret on enemy tanks.
« Reply #11 on: August 30, 2019, 10:38:17 am »
Sorry, I have modified the Cyberdisk for the sectoid in the test mod like you did. Only the item section and unit section was modified.  I can up load the codes later here, but if you want to test the mod, that’s the problem I encounter.

I see that at least armors and extraSprites were changed, there are also new resource files, etc.

In any case, I am not doing anything until your mod is packaged as a real mod that I can put into the mods directory and enable in the mods menu.
I refuse to work with hacked xcom1 instead of a proper mod.

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #12 on: August 30, 2019, 12:34:34 pm »
Here is the updated test mod. I am able to put all the codes in one files specific to my own.

Just expand, plug and play.

Please play in test battle using avenger vs Terrorship. Sectoid as main enemy,.

I have replace all Cyberdisk using custom enemy tank.

Check screen shot. Problem remain the same.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Missing turret on enemy tanks.
« Reply #13 on: August 30, 2019, 03:47:52 pm »
Much better.
Attached is the fixed version (Test2.zip).

wcho035

  • Guest
Re: Missing turret on enemy tanks.
« Reply #14 on: August 30, 2019, 05:52:05 pm »
Oh wow.. thanks.. Thanks REALLY.. tanks a lot. I have spend hours trying to crack it. Thank you for making it happen. Finally turreted enemy tanks. I have tested the new Terror weapon in my game. Here is a result with deadly AP rounds.

Here is a screen shot from my actual mod.

Hopefully one day.. I will share it with the world.