aliens

Author Topic: How do I make a soldier type with a different set of armors than the standard?  (Read 4916 times)

Offline Emong

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Hello! I've been poking around with a personal mod to add hybrid soldiers to X-COM and I've hit a bit of a snag. I have a new soldier type with a non-STR_NONE armor set as their basic armor, and I think I have all the armors set to be allowed based on soldier type. The issue is that whenever I get into any situation where the game needs to show what armor one of the hybrids has equipped, it crashes. I suspect that there's an issue with how I'm using the "units:" tag in the armor section, but I'm not 100% sure.

Here's the ruleset for reference:

Code: [Select]
soldiers:
  - type: STR_HYBRID_SOLDIER
    costBuy: 60000
    costSalary: 25000
    requires:
      - STR_HYBRID_BREEDING
    minStats:
      tu: 50
      stamina: 30
      health: 20
      bravery: 10
      reactions: 20
      firing: 30
      throwing: 50
      strength: 20
      psiStrength: 50
      psiSkill: 20
      melee: 20
    maxStats:
      tu: 60
      stamina: 50
      health: 30
      bravery: 60
      reactions: 40
      firing: 50
      throwing: 60
      strength: 25
      psiStrength: 120
      psiSkill: 16
      melee: 40
    statCaps:
      tu: 80
      stamina: 80
      health: 50
      bravery: 100
      reactions: 80
      firing: 100
      throwing: 100
      strength: 70
      psiStrength: 120
      psiSkill: 120
      melee: 80
    armor: STR_HYBRID_NONE_UC
    standHeight: 22
    kneelHeight: 14
    femaleFrequency: 50
    soldierNames:
      - HybridName/
    deathMale: [8]
    deathFemale: [8]
items:
  - type: STR_HYBRID_CORPSE
    weight: 22
    bigSprite: 800
    floorSprite: 800
    invWidth: 2
    invHeight: 3
    recover: false
  - type: STR_HYBRID_PSI_WEAPON
    hitSound: 36
    battleType: 9
    tuUse: 15
    flatRate: true
    recover: false
armor:
  - type: STR_HYBRID_NONE_UC
    spriteSheet: HYBRID.PCK
    spriteInv: inventory_HYBRID
    corpseBattle:
      - STR_HYBRID_CORPSE
    storeItem: STR_NONE
    frontArmor: 12
    sideArmor: 8
    rearArmor: 5
    underArmor: 2
    specialWeapon: STR_HYBRID_PSI_WEAPON
    damageModifier:
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.2
      - 1.6
      - 1.0
    loftempsSet: [ 3 ]
    units:
      - STR_HYBRID_SOLDIER
  - type: STR_NONE_UC
    units:
      - STR_SOLDIER
  - type: STR_PERSONAL_ARMOR_UC
    units:
      - STR_SOLDIER
  - type: STR_POWER_SUIT_UC
    units:
      - STR_SOLDIER
  - type: STR_FLYING_SUIT_UC
    units:
      - STR_SOLDIER
research:
  - name: STR_HYBRID_BREEDING
    cost: 1000
    points: 40
    listOrder: 4101
    dependencies:
      - STR_PSI_LAB
      - STR_ALIEN_REPRODUCTION
ufopaedia:
  - id: STR_HYBRID_BREEDING
    type_id: 8
    section: STR_ALIEN_LIFE_FORMS
    text: STR_HYBRID_BREEDING_UFOPEDIA
    requires:
      - STR_HYBRID_BREEDING
extraSprites:
  - type: BIGOBS.PCK
    files:
      800: Resources/HybridSoldiers/bigobs_HYBRID_CORPSE.gif
  - type: FLOOROB.PCK
    files:
      800: Resources/HybridSoldiers/FloorOb/floorob_HYBRID_CORPSE.gif
  - type: HYBRID.PCK
    subX: 32
    subY: 40
    width: 512
    height: 720
    files:
      0: Resources/HybridSoldiers/HYBRID.png
  - type: inventory_HYBRID
    singleImage: true
    files:
      0: Resources/HybridSoldiers/inventory_HYBRID.gif
extraStrings:
  - type: en-US
    strings:
      STR_HYRBID_SOLDIER: Hybrid Soldier
      STR_HYBRID_BREEDING: Hybrid Breeding Program
      STR_HYBRID_BREEDING_UFOPEDIA: With our knowledge of how the aliens are reproducing...
      STR_HYBRID_NONE: Alien Hybrid
      STR_HYBRID_NONE_UC: ALIEN HYBRID
      STR_HYBRID_PSI_WEAPON: Hybrid Psionics
      STR_HYBRID_CORPSE: Corpse

If anyone can tell me what's going on here I'd highly appreciate it.

Offline Emong

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Ahaha, welp turns out I'm an idiot. The problem is that I have armor: instead of armors:. At least it works now!

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Congratulations. ;)
Will you share your mod when it's done?

Offline Emong

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Congratulations. ;)
Will you share your mod when it's done?

I could, sure. The graphics are entirely poached from other mods, though, seeing as I can't art (these guys are just using the Hybrid graphics that Final Mod Pack uses).

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
I could, sure. The graphics are entirely poached from other mods, though, seeing as I can't art (these guys are just using the Hybrid graphics that Final Mod Pack uses).

Ha! I made them! :D
I think Dioxine's hybrids from Piratez are way better though. I plan to replace mine with his at some point.

Offline Emong

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Hmm.



I think I've mangled Xeno Operations sprites enough now. That helmet wouldn't even fit!

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Maybe he doesn't wear one? Just mirror the arm on the right to replace the one on the left and be done with it! Helmets interfere with psionics, or are too uncomfortable for beings with such big heavy heads on tiny necks ;)

Offline Emong

  • Sergeant
  • **
  • Posts: 18
    • View Profile
I'd love to, but I don't really have the art chops to make the battlescape sprites for it. I almost went mad messing with IrfanView to splice those sprites together to make that.