aliens

Author Topic: Acid explosion  (Read 7317 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Acid explosion
« on: December 14, 2016, 03:08:23 pm »
Is there a way to create acid explosion in vanilla? Adding "blastradius" to acidic weapon does nothing.

Offline Kjotleik

  • Colonel
  • ****
  • Posts: 100
  • I am Kjotleik
    • View Profile
Re: Acid explosion
« Reply #1 on: December 14, 2016, 05:21:04 pm »
I haven't tried it myself, but it should work as long as you also set battleType: 4 (grenades) or battleType: 5 (proxy grenades).

The easiest way to check would be to change damageType: 3 to damageType: 8 on a Grenade. Damage should be Acid when it explodes.

Hope that works out!    :)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Acid explosion
« Reply #2 on: December 14, 2016, 05:29:14 pm »
I haven't tried it myself, but it should work as long as you also set battleType: 4 (grenades) or battleType: 5 (proxy grenades).

The easiest way to check would be to change damageType: 3 to damageType: 8 on a Grenade. Damage should be Acid when it explodes.

Hope that works out!    :)

IIRC I already tried it and it doesn't work because explosions are hardcoded to be only HE, Incendiary and Smoke

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Acid explosion
« Reply #3 on: December 14, 2016, 05:45:17 pm »
IIRC I already tried it and it doesn't work because explosions are hardcoded to be only HE, Incendiary and Smoke

"Terrain explosions" are limited to HE, INC, SMOKE or STUN.

I don't see any limitation for "item explosions" in the source code though... probably best if someone tries and lets us know.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Acid explosion
« Reply #4 on: December 14, 2016, 05:55:36 pm »
"Terrain explosions" are limited to HE, INC, SMOKE or STUN.

I don't see any limitation for "item explosions" in the source code though... probably best if someone tries and lets us know.

I already tried something similar because I created Acid rounds for the Small Launcher, but I found out that I couldn't use the explosion mechanic for them, only the one used in firearms, which is how the Celatid fires its weapon. But if I'm wrong, I'd love to know :)

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: Acid explosion
« Reply #5 on: December 14, 2016, 06:17:22 pm »
So,
Code: [Select]
  - type: REEF_WEAPON
    bigSprite: -3
    bulletSprite: 8
    fireSound: 40
    hitSound: 41
    power: 40
    damageType: 8
    accuracySnap: 60
    accuracyAimed: 90
    tuSnap: 20
    tuAimed: 40
    battleType: 4
    blastRadius: 5
    hitAnimation: 8
    fixedWeapon: true
    invWidth: 2
    invHeight: 3
    clipSize: -1
    recover: false
    arcingShot: true
    hitAnimation: -1
does not work. Alien dont shoot. Will try xcom grenades.
« Last Edit: December 14, 2016, 06:30:15 pm by Nord »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Acid explosion
« Reply #6 on: December 14, 2016, 08:02:28 pm »
"Terrain explosions" are limited to HE, INC, SMOKE or STUN.

I don't see any limitation for "item explosions" in the source code though... probably best if someone tries and lets us know.
in extended, normal only support selected damage types:
https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/TileEngine.cpp#L1224

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Acid explosion
« Reply #7 on: December 14, 2016, 08:07:30 pm »
in extended, normal only support selected damage types:
https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/TileEngine.cpp#L1224

Thanks for explanation.
I checked vanilla code, not extended... but I didn't dig deep enough.

I checked only:
- for terrain: https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/ExplosionBState.cpp#L252
- for items: https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/ExplosionBState.cpp#L232

I assumed all the filtering would be done already there, but as you correctly pointed out, for items it will be filtered later...

Offline Kjotleik

  • Colonel
  • ****
  • Posts: 100
  • I am Kjotleik
    • View Profile
Re: Acid explosion
« Reply #8 on: December 14, 2016, 10:04:53 pm »
I'm sorry to inform that I can confirm the following (as said by others):

Started up OpenXCom latest nightly with FMP 1.9.4.

Test One:
Changed Small Rocket to damageType: 8

Test Two:
Changed Alien Grenade to damageType: 8

In the Battle Simulator I went up against hybrids.
Small Rockets did kill them on direct hits. But no explosion outside of tile of impact was visible.

Alien Grenades didn't even scratch them. But I think I missed them by one/two tiles all the throws (rookie-stats, ugh). No direct hits.
I did land (with instant grenades on, so that every one should count) at least four grenades one or two tiles away from a Hybrid.
A 90 power strong explosion should've taken out such an enemy. The explosion graphics was there, but not the damage.

Oh, well. There goes my dream of Acid Grenades out the window. Hrmph!   >:( ??? :'(

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Acid explosion
« Reply #9 on: December 14, 2016, 11:22:47 pm »
Oh, well. There goes my dream of Acid Grenades out the window. Hrmph!   >:( ??? :'(
You throw this grenade into wrong window :> OXCE and OXCE+ for long time support all damage type as explosive.

Offline Kjotleik

  • Colonel
  • ****
  • Posts: 100
  • I am Kjotleik
    • View Profile
Re: Acid explosion
« Reply #10 on: December 15, 2016, 12:31:24 pm »
You throw this grenade into wrong window :> OXCE and OXCE+ for long time support all damage type as explosive.

Thank you. I need to check that out then.

I presume it is as easy as taking the OXCE (or OXCE Plus) exe-file and put it in the same place as the OXC nightly exe-file in the installation, and starting the game from the OXCE exe instead of the regular nightly exe.

But one problem I have is that there is no documentation for what is possible to mod in those extended exe-files. And don't ask me to read the readme-file. That is just a mess. See picture below. Can you read that? I don't have time to clean up this mess. A humanly readable format for the rul-file-variables would be nice. Just like the Nightly Reference over at UFOPaedia.com has.

EDIT: Picture taken from the readme-file for XPiratez. I don't have a "clean" OXCE readme-file (yet).

« Last Edit: December 15, 2016, 12:37:08 pm by Kjotleik »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Acid explosion
« Reply #11 on: December 15, 2016, 12:37:04 pm »
Open the readme file in anything else than Notepad, it will be nicely formatted.

Offline Kjotleik

  • Colonel
  • ****
  • Posts: 100
  • I am Kjotleik
    • View Profile
Re: Acid explosion
« Reply #12 on: December 15, 2016, 12:42:54 pm »
Open the readme file in anything else than Notepad, it will be nicely formatted.

Thanks a lot!   :)

I opened it in Notepad++.

It works GREAT!   8)

Spoilerrant:
Stupid f[censored] x£¤$%!'*¤ Microsh!# and their Notepads   >:(
...I should've known that the original Notepad was crap...  :-[

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Acid explosion
« Reply #13 on: December 15, 2016, 08:08:31 pm »
Thanks a lot!   :)

I opened it in Notepad++.

It works GREAT!   8)

Spoilerrant:
Stupid f[censored] x£¤$%!'*¤ Microsh!# and their Notepads   >:(
...I should've known that the original Notepad was crap...  :-[
This problem is because I build exe on VM with linux that use "\n" as line endings instead of "\r\n" default for windows.
Its bit strange that MS never updated notepad even when other tools from them (wordpad, VS) support linux line endings.