OpenXcom Forum

Modding => Help => Topic started by: The Martian on January 19, 2018, 01:45:37 am

Title: Adding additional explosion graphics?
Post by: The Martian 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?
Title: Re: Adding additional explosion graphics?
Post by: Amiga 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.