Removing the disintegration animation

DForge

Look, Ma! Two Heads!
The death animation caused by electric weapons pisses me off with the loot landing on the ground... too much fuss picking everything up...

I like the charring animation, but the disintegration one is so annoying... is it possible to apply some simple mod to make the game pick the charring animation every time?

Since I have no clue how to do this, perhaps there is a kind soul here who would do this :roll:
 
yes this code in hs_deathanim2.int will force specific death anims(i wrote a couple perks that do it)

Code:
procedure start
begin
	variable LVar0 := 0;
	variable LVar1 := 0;
	variable LVar2 := 0;
	variable LVar3 := 0;
	variable LVar4 := 0;
	if (init_hook) then begin
		set_sfall_global("MM_00012", get_ini_setting("On_Death.ini|SETTINGS|Spefic_Fallout_2_Instalation"));
	end
	else begin
		LVar0 := get_sfall_arg;
		LVar1 := get_sfall_arg;
		LVar2 := get_sfall_arg;
		LVar3 := get_sfall_arg;
		LVar4 := get_sfall_arg;
		if ((obj_name(LVar2) == "Metzger") and get_sfall_global_int("MM_00001")) then begin
			set_sfall_return(28);
		end
		else
		if (get_sfall_global_int("MM_00012") == 0) then begin
			if (has_fake_perk(MeltYourFace) and CheckMeltVanilla(LVar2)) then begin
				set_sfall_return(32);
			end
			else
			if (has_fake_perk(ExplosiveEnding) and CheckExplosionVanilla(LVar2)) then begin
				set_sfall_return(31);
			end
		end
		else
		if (get_sfall_global_int("MM_00012") == 1) then begin
			if (has_fake_perk(MeltYourFace) and CheckMeltMegamod(LVar2)) then begin
				set_sfall_return(32);
			end
			else
			if (has_fake_perk(ExplosiveEnding) and CheckExplosionMegamod(LVar2)) then begin
				set_sfall_return(31);
			end
		end
		else
		if (get_sfall_global_int("MM_00012") == 2) then begin
			if (has_fake_perk(MeltYourFace) and (CheckMeltVanilla(LVar2) or CheckMeltFRP(LVar2))) then begin
				set_sfall_return(32);
			end
			else
			if (has_fake_perk(ExplosiveEnding) and (CheckExplosionVanilla(LVar2) or CheckExplosionFRP(LVar2))) then begin
				set_sfall_return(31);
			end
		end
	end
end

those are not the right numbers,but that is what has be done,keep in mind that all critters may or may not have the animation,if they dont and it is forced anyway,the engine wont fire the killing blow,causing a stuck game

Nirran
 
Ah, thanks.. I see this can be done by forcing a charring animation, but as you said, it can lock the game (robots most certainly don't have one so it would lock them I guess...)

Is it possible the other way? Banning the "disintegration" animation instead of forcing the "charring" one?
 
not that i know of these are the hook script entries that are relevant

Code:
-------------------------------------------

hs_deathanim1.int

Runs before fallout tries to calculate the death animation. Lets you switch out which weapon fallout sees

int     arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
critter arg2 - The attacker
critter arg3 - The target
int     arg4 - The amount of damage

int     ret1 - The pid of an object to override the attacking weapon with

-------------------------------------------

hs_deathanim2.int

Runs after fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation.

item    arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
critter arg2 - The attacker
critter arg3 - The target
int     arg4 - The amount of damage
int     arg5 - The death anim id calculated by fallout

int     ret1 - The death anim id to override with

-------------------------------------------

maybe could check if the engine one in death2 is the charred,the randomly pick one,but youm would still have to list the ones that either have or dont have the anim art,otherwise the same problem,i wrote a batch file that lists all corresponging art file into a text file,making much easier,rather then manualy looking,that way you wont miss any

bat file
Code:
for %%X in (*BM.fr0) do (
   echo %%X >> "C:\Game Files\Fallout 2\Scripting\Megamod Critter Art.txt"
)
for %%X in (*BM.frm) do (
   echo %%X >> "C:\Game Files\Fallout 2\Scripting\Megamod Critter Art.txt"
)
that will list all the critters that have the melted_to_death anim,assumining vanilla critters are extracted in a folder and then w/e mod you have installed that adds or changes the critter art on top of it

Nirran
 
An easy solution would be to set the violence level one step before "Maximun blood", so that the death-by-electricity desintegration won't be displayed (although that would also prevent some of the other best death animations from being displayed).

But since we are in the modding forum, I'd like to throw an idea that would be a good solution for this issue:

-As you already know, both the desintegration and explosion death animations make the critter's inventory (if it has one) to be dropped in the ground; but it happens that the critter's remains (ashes from desintegration or severed pieces from explosion) are still lootable (without anything in them, of course). A good solution for the problem derivated from the items being dropped on the ground would be to fix things (read: mod things) so that the critter's inventory stays within its remains after those two special death animation just like it does in the rest of them.

Given my almost null knowledge about modding I don't know if it'd be hard to implement, but the concept is very simple, don't you think?
 
yea would be the best solution,donno if it is possible tho

edit : looked at trying to swap inven to temp box in deathanim2 then swap back in ondeath,it carshes the game when swapping in deathanim2,dont think it is possible

edit : after messing with it for a while,i have it working,if the death anim is 30(electricuted to nothing) then swap to temp /*done in hs_deathanim2.int*/

then in hs_ondeath.int swap from temp box to critter,heh tested by forcing the death anim and killing sulik over and over :)

put this in hs_deathanim2 and compile
Code:
procedure start;

procedure start
begin
	variable weapon_pid := 0;
	variable attacker := 0;
	variable target := 0;
	variable damage := 0;
	variable engine_calc_death_anim := 0;
                variable temp_box := 0;
	if (init_hook) then begin
	end
	else begin
		weapon_pid := get_sfall_arg;
		attacker := get_sfall_arg;
		target := get_sfall_arg;
		damage := get_sfall_arg;
		engine_calc_death_anim := get_sfall_arg;
		if (engine_calc_death_anim == 30) then begin 
		   temp_box := create_object_sid(128, 0, 0, -1);
		   set_sfall_global("elec_box", temp_box);
		   move_obj_inven_to_obj(target, temp_box);
		   set_sfall_global("eleccrit", target);
		end 
	end
end

and put this in hs_ondeath and compile
Code:
procedure start;

procedure start
begin
   variable critter := 0;
	if (init_hook) then begin
	end
	else begin
		critter := get_sfall_arg;
		if (get_sfall_global_int("eleccrit") == critter) then begin
		   move_obj_inven_to_obj(get_sfall_global_int("elec_box"), critter);
		   destroy_object(get_sfall_global_int("elec_box"));
		   set_sfall_global("elec_box", 0);
		   set_sfall_global("eleccrit", 0);
		end 
	end
end

it worked for me in testing,adding this to my mods,excellent idea

edit : @DForge download custom perks from my site and use only hs_ondeath.int and hs_deathanim2.int,should work,let me know if you have any problems

edit : added explode to death to the code

edit :
LionXavier said:
-As you already know, both the desintegration and explosion death animations make the critter's inventory

actualy i didnt know that,when i made the perk "Explosive Ending"
(causes every critter that has explode art,to explode on death) i did all the testing on a critter that had no inven(ants in temple i believe tho it has been months),and i always play as an unarmed dude,thank you,i can see that no one would use that perk without the code i wrote today,wish id seen it back when i did the testing

thank you again

Nirran
 
There is a problem for the animation - if there is no ash left, the gear goes to the atmosphere along the body :p

Enclave soldiers and super mutants leave no ash meaning the loot is lost when they disintegrate.

Correction: the enclave soliders DO leave ash. But it's 1 pixel of a size - extremely hard to click on it.
 
I think it's a good idea since if they die facing certain direction, it's not possible to loot them at all.


So, super mutants and enclave soldiers have to be excluded.
 
Oh man this is the next good news after the stripping episode fix in Modoc !
(it used to be that after you strip down to your jumpsuit, everything that was in your inventory would be dropped to the ground - crazy-annoying when you happened to carry tons of ammo and meds and loot) :) asspats all around
 
electrocuted. He vanishes and leaves no body nor ash. I think this applies to critters wearing all power armor variants.
 
yea that one i am thinking of removing a few frms,leaving the head part of the shoulders

ment the mutant tho,my mistake,i looked at all of the death anim frms and couldnt find it

Nirran
 
Well I lost Marcus that way. He vanished. Perhaps you should look at "nightkin" instead? :) since they share the model.
 
yea,i altered the mutant frms to leave the head and shoulders,hanpwr doesnt have a electricuted anim tho,at least vanilla

Nirran
 
Back
Top