Author Topic: [UFO][OXCE][Graphic(al Violence)] Gibs of Gory  (Read 2436 times)

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
[UFO][OXCE][Graphic(al Violence)] Gibs of Gory
« on: February 14, 2023, 07:07:23 pm »
I wanted to try that for a while now.

Gibs of Gory (word play on Wings of Glory) is a little graphical mod that exchanges the death Animations depending on used damage type and remaining weapon power.

Whenever the damage past setting health to 0 exceeds maxHealth, the target will turn to gibs, scorch marks (Plasma, Incendiary) or goo (Acid).

You can download it here.

Credits go to Brain_322 for sprites and Yankes for showing me the wonderful value of RuleList.current.
« Last Edit: February 14, 2023, 07:27:18 pm by Buscher »

Offline _Brain322

  • Sergeant
  • **
  • Posts: 26
    • View Profile
Re: [UFO][OXCE][Graphic(al Violence)] Gibs of Gory
« Reply #1 on: February 17, 2023, 02:24:41 am »
Neat!

The idea is really cool and worth to be developed further :D


Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: [UFO][OXCE][Graphic(al Violence)] Gibs of Gory
« Reply #2 on: February 17, 2023, 11:56:16 am »
# Small How-To-Integrate Guide

## extraSprites

- The Repo/Script can be found here
- for each spriteSheet you need to extend the PCK with the smaller sheets containing the death Animations. The gib sheets can be 256x48 for 8 frames. Other dimensions are probably also possible.
Code: [Select]
extraSprites:
  - type: XCOM_SOLDIER_0_GOG.PCK
    subX: 32
    subY: 40
    width: 256
    height: 1400
    files:
      0: Resources/Vanilla/XCOM_0.PNG
      320: Resources/Vanilla/XCOM_0_normal.PNG
      328: Resources/Vanilla/XCOM_0_gibs.PNG
      336: Resources/Brain_322/human_to_ash.png
      344: Resources/Brain_322/human_to_goo.png
We will need the Indices 320, 328, 336, 344 later. The indices start at 320 as the biggest TFTD sheet has 304 frames and 320 seems to be a good number. There is a difference of 8 to make sure that one gib sheet isn't drawn into another one. If you want to add more kinds of deaths, you just add another line with an additional +8.

Also we probably want to set up a corpse, so FLOOR.PCK and BIGOBS.PCK need to be set up accordingly

Code: [Select]
extraSprites:
  - type: FLOOROB.PCK
    files:
      200: Resources/floorob_gibs.png
      201: Resources/Brain_322/floorob_Ash.png
      202: Resources/Brain_322/floorob_Goo.png

  - type: BIGOBS.PCK
    files:
      200: Resources/floorob_gibs.png
      201: Resources/Brain_322/floorob_Ash.png
      202: Resources/Brain_322/floorob_Goo.png

We will remember 200, 201 and 202. Similar to the spritesheets additional sprites can be added here.

## armors

Then we will need to modify the armor
Code: [Select]
extended:
  tags:
    RuleArmor:
      NORMAL_SPRITESHEET: int
      GIB_SPRITESHEET: int
      BURNED_SPRITESHEET: int
      GOO_SPRITESHEET: int

armors:
  - &STR_GOG_ARMOR
    type: STR_NONE_UC
    spriteSheet: XCOM_SOLDIER_0_GOG.PCK
    deathFrames: 8 # if you want to use more than the default 3
    tags:
      NORMAL_SPRITESHEET: 320 # Resources/Vanilla/XCOM_0_normal.PNG
      GIB_SPRITESHEET: 328 # Resources/Vanilla/XCOM_0_gibs.PNG
      BURNED_SPRITESHEET: 336 # Resources/Brain_322/human_to_ash.png
      GOO_SPRITESHEET: 344 # Resources/Brain_322/human_to_goo.png

The values for the tags are the numbers we set up in extraSprites for the sprite sheet. A normal death spritesheet should be tacked on if you want to use a higher value than 3 for deathFrames.

## corpses

Similar to the armor we need to set a few tags for the corpses.

Code: [Select]
extended:
  tags:
    RuleItem:
      GIB_BIGOB: int
      GIB_FLOOROB: int
      BURNED_BIGOB: int
      BURNED_FLOOROB: int
      GOO_BIGOB: int
      GOO_FLOOROB: int


items:
  - &STR_HUMAN_CORPSE
    type: STR_CORPSE
    tags:
      GIB_BIGOB: 200 # Resources/floorob_gibs.png
      GIB_FLOOROB: 200 # Resources/floorob_gibs.png
      BURNED_BIGOB: 201 # Resources/Brain_322/floorob_Ash.png
      BURNED_FLOOROB: 201 # Resources/Brain_322/floorob_Ash.png
      GOO_BIGOB: 202 # Resources/Brain_322/floorob_Goo.png
      GOO_FLOOROB: 202 # Resources/Brain_322/floorob_Goo.png

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: [UFO][OXCE][Graphic(al Violence)] Gibs of Gory
« Reply #3 on: February 17, 2023, 12:02:54 pm »
# How to modify which death causes with animation

You will need to edit the scripts_gib.rul at three positions

## GOG_dU_next_hit_gibs (damageUnit)

Add a new gibDamageType and increment the number by one for NEXT_HIT_GIBS and UNIT_IS_GIBBED. The value used in NEXT_HIT_GIBS and UNIT_IS_GIBBED is called "gibMode" in the next parts.
Be aware that you keep the if, else (if), else structure.

## GOG_sIS_display_gibbed (selectItemSprite)

Add a new part below
Code: [Select]
if eq blit_part blit_item_big; # bigobs
and
Code: [Select]
if eq blit_part blit_item_floor; # floorobs

Be aware that you keep the if, else (if), else structure.

## GOG_sUS_display_gibbed (selectUnitSprite)

Add a new part below
Code: [Select]
if and gt gibMode 0 eq collapsing 1 le health 0;

Be aware that you keep the if, else (if), else structure.


# FAQ

If you got further questions, please post below.