sfall-team / sfall

sfall - Engine modifications for Fallout 2
https://sfall-team.github.io/sfall/
GNU General Public License v3.0
342 stars 40 forks source link

A new weapon like the Molotov Cocktail? #515

Closed blackpaulillyria closed 6 months ago

blackpaulillyria commented 6 months ago

Is it possible to create a new weapon like the Molotov Cocktail? A weapon that would explode upon impact but do a special Dancing Flames death animation if the victim dies? I tried but couldn't get the desired behavior. My targets explode upon death even when the weapon has perk "Weapon Flameboy". It seems that there are some aspects of Molotov Cocktail which are hardcoded into the exe.

Lexx2k commented 6 months ago

There's already a mod that changes the molotov cocktail to deal fire damage (for years by now, in fact, probably one of the oldest). You can just copy that.

NovaRain commented 6 months ago

See this for an example: https://github.com/sfall-team/sfall/commit/9bd9837a7dc9867b104a89afd91150b20bb267e0 Or you can check EcCo for more advanced examples (incendiary weapons/ammo).

The "Weapon Flameboy" perk does not guarantee the fire dance death anim. It only lowers the damage threshold for more violent death anims. If the damage type is not fire, obviously you won't get the fire dance anim.

blackpaulillyria commented 6 months ago

Thanks for your help, guys! So basically that mod does something similar to what is happening here at this line and I can apply that behaviour to some other weapon PID?

https://github.com/alexbatalov/fallout2-re/blob/b135fc46ef40c4aecd156f3cebcf88ec531bb8ac/src/game/actions.c#L189