aliens

Author Topic: [FIXED] Soldier torso and head is invisible in battlescape  (Read 4297 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[FIXED] Soldier torso and head is invisible in battlescape
« on: February 08, 2018, 06:32:29 am »
Error: spritesheets were 256 pixels, or 8 pieces wide.
Solution: ensure soldier spritesheets are 512 pixels or 16 pieces wide. Falko's sprite combiner defaults to 8 columns but you can set it to 16.






Code: [Select]
extraSprites:
  - type: AlloyArmor.PCK
    width: 512
    height: 720
    subX: 32
    subY: 40
    files:
      0: Resources/ReaversArmors/AlloyArmor.png
  - type: DarkSuit.PCK
    width: 512
    height: 720
    subX: 32
    subY: 40
    files:
      0: Resources/ReaversArmors/DarkSuit.png
armors:
  - type: STR_PERSONAL_ARMOR_HEAVY_UC
    spriteSheet: AlloyArmor.PCK
    spriteInv: MAN_5
    spriteFaceGroup: 6
    spriteFaceColor: [96, 96, 96, 96, 160, 160, 163, 163, 96, 96, 96, 96, 160, 160, 163, 163] #M0 F0 M1 F1 M2 F2 M3 F3 M4 F4 M5 F5 M6 F6 M7 F7
    spriteHairGroup: 9
    spriteHairColor: [144, 144, 102, 164, 245, 245, 166, 166, 96, 245, 245, 102, 245, 245, 163, 245] #M0 F0 M1 F1 M2 F2 M3 F3 M4 F4 M5 F5 M6 F6 M7 F7
    corpseBattle:
      - STR_CORPSE_ARMOR_ALLOY
    storeItem: STR_PERSONAL_ARMOR
    weight: 10
    stats:
      tu: -8
    frontArmor: 70
    sideArmor: 55
    rearArmor: 40
    underArmor: 40
    damageModifier:
      - 1.0
      - 1.0
      - 0.5
      - 1.0
      - 1.0
      - 1.0
      - 0.9
      - 1.0
      - 1.1
      - 1.0
    loftempsSet: [ 3 ]
  - type: STR_POWER_SUIT_UC
    spriteSheet: DarkSuit.PCK
    spriteInv: MAN_2_1
    stats:
      tu: 10
      strength: 20
    frontArmor: 110
    sideArmor: 90
    rearArmor: 80
    underArmor: 70
    damageModifier:
      - 1.0
      - 1.0
      - 0.2
      - 1.0
      - 1.0
      - 1.0
      - 0.8
      - 1.0
      - 1.0
      - 0.0


I can't figure out what I've done wrong. All I did was recolor the armor spritesheets using Falko's tools. It has worked fine with everything else so far, including tank spritesheets.
« Last Edit: March 07, 2018, 06:36:11 am by The Reaver of Darkness »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Soldier torso and head is invisible in battlescape
« Reply #1 on: February 12, 2018, 10:54:07 am »
Please help? I'm at a loss here, I don't see what I'm doing wrong and I don't know what else to try.

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: Soldier torso and head is invisible in battlescape
« Reply #2 on: February 12, 2018, 05:10:05 pm »
Not looking into it with deep(vacations no pc near me) Check the drawimg routing to correapond to spritsheet , also can be the dimension of the image , meaning its fetching the girl torso , but is reading the wrong dimension  geting blank.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Soldier torso and head is invisible in battlescape
« Reply #3 on: February 18, 2018, 06:00:53 pm »
Not looking into it with deep(vacations no pc near me) Check the drawimg routing to correapond to spritsheet , also can be the dimension of the image , meaning its fetching the girl torso , but is reading the wrong dimension  geting blank.

As bulletdesigner said, check extraSprites.rul to see if the dimensions assigned to the unit spritesheet correspond to its actual dimensions

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Soldier torso and head is invisible in battlescape
« Reply #4 on: March 07, 2018, 05:53:26 am »
That was it!! I took a peek at the armored_vest mod and noticed that the spritesheets were 512 (16 pieces) wide. After changing to 16-wide sheets, it works perfectly!

In retrospect, it might have worked if I had listed my original image dimensions correctly in the extraSprites ruleset.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

It could be something with the spritesheet or drawing routine. I copied the code directly from the original armors and made only the relevant changes. There is nothing listed for drawing routine in the original ruleset, which I assume is because it defaults to 0 which is the correct one for soldiers. I haven't set a drawing routine either. Also, I think it is using the correct drawing routine because it has more than half of the soldier drawn correctly and no parts drawn in the wrong place.

I'm using a 256x1400 and 256x1440 spritesheet (8x35 and 8x36 pieces) which is what Falko's tool generated for me when I told it to combine the images given to me by XCOM Extractor. Is that the wrong dimensions? And if so, what are the correct dimensions?
« Last Edit: March 07, 2018, 10:05:14 am by The Reaver of Darkness »