aliens

Author Topic: Adding additional explosion graphics?  (Read 2097 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Adding additional explosion graphics?
« on: January 19, 2018, 01:45:37 am »
Version of OpenXcom being used is: 1.0.803ca40a6 (2017-11-09 14:37) (Nightlies)

(Question) Is it currently possible to add additional explosion sprite sets to the X1.PCK?



I tried to add two additional explosion animation sprite sheets using this code:

Code: [Select]
extraSprites:
  - type: X1.PCK
    files:
      8: Resources/TEST/Explosions/Explosion_Version_One.png
      16: Resources/TEST/Explosions/Explosion_Version_Two.png
    width: 512
    height: 128
    subX: 128
    subY: 64

However when I call the new resource with the hitAnimation: variable the game freezes when it should display the images.

(Example weapon derived from a standard Laser Rifle using the new hitAnimation: index and explosive damage type.)
Code: [Select]
items:
  - type: TEST_EXPLOSIVE_RIFLE
    size: 0.2
    costSell: 36900
    weight: 8
    bigSprite: 0
    floorSprite: 0
    handSprite: 8
    bulletSprite: 6
    fireSound: 11
    hitSound: 19
    power: 60
    damageType: 3
    accuracyAuto: 46
    accuracySnap: 65
    accuracyAimed: 100
    tuAuto: 34
    tuSnap: 25
    tuAimed: 50
    clipSize: -1
    battleType: 1
    twoHanded: true
    invWidth: 1
    invHeight: 3
    hitAnimation: 8
    blastRadius: 5


However if I overwrite the standard explosion sprites with this code instead:

Code: [Select]
  - type: X1.PCK
    files:
      0: Resources/TEST/Explosions/Explosion_Version_One.png
    width: 512
    height: 128
    subX: 128
    subY: 64

The new explosion image sequence functions without freezing, but the ability to use the original explosion images are lost.

Am I doing this the wrong way by trying to add the additional graphics to the X1.PCK?
« Last Edit: January 30, 2018, 06:58:57 am by The Martian »

Offline Amiga

  • Colonel
  • ****
  • Posts: 128
  • Amiga4ever....
    • View Profile
    • White Wolf Untold Story PL (my rpg game based on Witcher saga)
Re: Adding additional explosion graphics?
« Reply #1 on: March 03, 2018, 10:51:34 am »
Hi
I've been modding explosion yesterday and try to change files number to higher.  For example 80. Rest code looks fine.