Author Topic: [Graphics]Alternative Explosion Sprites  (Read 3087 times)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
[Graphics]Alternative Explosion Sprites
« on: October 23, 2014, 06:47:54 pm »
Hello!

I am not sure if I remember it from EU or TftD, but I do remember stun explosions looking purplish in some XCom I played and I liked that. Similarly, having big fiery explosions when you throw a smoke grenade seems weird. Since I just managed to get the nightly going and I thought it allowed customization of explosions, I went to work.

Problem is, it crashes my game as soon as the explosion goes off :/ I have attached the sprite I use and this is my test mod ruleset:

Code: [Select]
items:
  - type: STR_STUN_BOMB
    hitAnimation: 8
  - type: STR_STUN_GRENADE
    hitAnimation: 8
extraSprites:
  - type: X1.PCK
    width: 1024
    height: 64
    subX: 128
    subY: 64
    files:
      8: Resources/Stun_Explosion/XStun.png

If I replace all the "8" by "0", it uses the stun sprite for every explosion just fine, which seems to imply that there is nothing wrong with the way I import it. I used index 8, since the normal explosion is 8 frames so should be 0 to 7 (and indeed is called using hitAnimation: 0). Any ideas?

Thanks in advance! Once this one works, I'll do one for smoke as well and combine them into a single mod.

Offline xracer

  • Commander
  • *****
  • Posts: 561
  • X-COM lover, we've gone at it everywhere
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #1 on: October 23, 2014, 08:08:44 pm »
Looks very neat, to differentiate between a regular explosion and a stun.

No idea why it would crash :(

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #2 on: October 23, 2014, 09:27:46 pm »
It prevents some unneeded heart attacks when a medic/engineer fires a stun bomb at you and you think it's a blaster bomb ;) Would be good, if only it worked!

Offline Ran

  • Colonel
  • ****
  • Posts: 191
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #3 on: October 24, 2014, 02:35:23 am »
Are you sure that additional explosion sprites are supported already?

See my thread here, I also made some sprites, but all I could do was replace the original one. I'd be delighted if we could add additional ones but so far I have not heard that it's possible yet.
https://openxcom.org/forum/index.php?topic=2927.0
https://openxcom.org/forum/index.php?topic=2151.0

Offline Falko

  • Commander
  • *****
  • Posts: 810
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #4 on: October 24, 2014, 03:25:24 am »
i have my original ufo-files folder (in ~/documents) separated from the mod folder (=data folder in the exe folder)
to get multiple explosion types i need to replace the original X1.PCK
but thats ugly
i cant get it to run just with adding UFOGRAPH/X1.* in (mod) data folder or adding extrasprites  :(
it seems a lot of special graphic files are not replaceable via extrasprites

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #5 on: October 24, 2014, 03:30:08 am »
Oh, that's weird. After reading the topics you linked, Ran, I was convinced that in the nightly version you could extend X1.PCK to more than 8 frames. I guess I'll have to wait a bit longer for the stuff Warboy is doing for TftD explosions!

Whenever it does happen, I can finally make the mod.

Thanks :)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2312
  • Developer
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #6 on: October 24, 2014, 11:01:17 am »
you CAN, it just isn't getting indexed properly.
try replacing 8 with 80.

i could go into more detail as to why this is the case, but it doesn't really matter as the indexing needs adjustment anyway so any information i give you will soon be rendered inaccurate.
for the time being (and into the forseeable future), though, this should work.
« Last Edit: October 24, 2014, 11:06:53 am by Warboy1982 »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #7 on: October 24, 2014, 05:36:09 pm »
Sweet! Thanks a lot! I'll fix it when it breaks, but for now this works exactly as I hoped :D

A simple mod: Extra Explosion
For when you want smoky and stunny graphics! Already compatible with the Stun Grenade mod, grenade launcher from either XAE_Utility or GunsNGadgets, and Smoke Bombs from XAE_Bombs.

Contains 2 versions of both new explosions, lighter or darker variants. (I prefer the darker ones, but the lighter ones are more in keeping with the original graphics, just adjust the ruleset.)

Note: This mod needs to be loaded AFTER the above mods, since it modifies their graphics.
Note2: This only works with the nightly. On 1.0, it will do absolutely nothing since explosions have hardcoded graphics.

Enjoy!

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2403
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [Graphics]Alternative Explosion Sprites
« Reply #8 on: October 24, 2014, 06:11:55 pm »
Looking gorgeous... <drools>  ...
Unfortunately, I'm not quite read to step into the realm of the nightlies.  XD

Cheers, Ivan :D

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
Re: [Graphics]Alternative Explosion Sprites
« Reply #9 on: October 24, 2014, 06:16:12 pm »
If you're using windows, I think it's pretty straightforward. And the added functionality is awesome! On linux, it was a bit more of a challenge, but with good instructions it's straightforward enough.

Either way, I strongly recommend taking the step.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 8449
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Graphics]Alternative Explosion Sprites
« Reply #10 on: October 24, 2014, 11:49:10 pm »
Looking gorgeous... <drools>  ...
Unfortunately, I'm not quite read to step into the realm of the nightlies.  XD

That's funny, I would be too scared to use the 1.0 myself. :D

But seriously, these are really nice sprites. Just saying.