forums | blogs | polls | tutorials | downloads | rules | help

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

Vanish on death

How can I make a monster disappear upon death, the same way summons do?

LoneKnight's picture

Well, the easiest way I know to do this is to edit its properties. This can be done through Siege Editor 2. If it hasn't changed too much from DS1, you are looking for a field in the monsters properties called "sim_duration". This, I believe designates how long the body lasts in game before disappearing. Changing it to a value of "0" would most likely make it dissappear instantly. I haven't tried it myself, so tell me how it turns out.

Templarian Arch Sorcerer's picture

LoneKnight wrote:
Well, the easiest way I know to do this is to edit its properties. This can be done through Siege Editor 2. If it hasn't changed too much from DS1, you are looking for a field in the monsters properties called "sim_duration". This, I believe designates how long the body lasts in game before disappearing. Changing it to a value of "0" would most likely make it dissappear instantly. I haven't tried it myself, so tell me how it turns out.

Something similer is the code for the suicide elementals in DS1.

[physics]
	{
		gib_gore_good = true;
		break_effect = suicide_elemental_die;
		explode_when_killed = true;
		explosion_magnitude = 6;
	}
	[self_destruct] 
	{
		delete_time = 15.0;
		explode = true;
	}
}

Basically, this tells it to explode on death, making it disappear, or explode after 15 seconds. If you do not want a dissappear effect, just leave it blank. If you do not want it to explode after a time, do not include a self_destruct block. Cool

Both methods failed.

Sharkull's picture

Here's a quote from components.gas (common block)... "normal" + "dead" seems promising.

   [t:constraint,n:expiration_class] 
   { 
      // docs: 
      // 
      // delay_seconds - seconds to count down before expiring. 
      // 
      // range_seconds - this is a plus-or-minus modifier on the duration so 
      //                 we can vary the expiration time a little. useful for 
      //                 ammo and death & decay. 

      [choose] 
      { 
         [normal]          {  delay_seconds = 600;                      doc = "Normal delay - non-magic items, monsters";  } 
         [dead]            {  delay_seconds = 15;   range_seconds = 1;  doc = "Object that has died but not started decaying yet";  } 
         [decay_fresh]     {  delay_seconds = 5;    range_seconds = 1;  doc = "Delay for freshly decaying object";  } 
         [decay_bones]     {  delay_seconds = 5;    range_seconds = 1;  doc = "Delay for bones object";  } 
         [decay_dust]      {  delay_seconds = 5;    range_seconds = 1;  doc = "Delay for dust object";  } 
         [decay_thief]     {  delay_seconds = 5;                        doc = "Delay for loot thief";  } 
         [siegefx_target]  {  delay_seconds = 60;                       doc = "Delay for reference points for SiegeFx static targets";  } 
         [magic]           {  delay_seconds = 1800;                     doc = "Long delay - magic items";  } 
         [never]           {  delay_seconds = -1;                       doc = "Permanent object - uniques, heroes, etc.";  } 
         [immediate]       {  delay_seconds = 1;                        doc = "(Mostly) immediate expiration for non-interactive content - give it a couple seconds actually to stabilize though";  } 
         [tombstone]       {  delay_seconds = 60;                       doc = "Delay for tombstone expiration.";  } 
         [shop]            {  delay_seconds = 900;  /* 15 minutes */    doc = "Delay for shop expiration."; } 
      } 
   } 

Hmm, I can understand how it would help, but how would I impliment the code for a specific monster?

Sharkull's picture

I just took a quick peek in templates.gas (to find syntax), and it looks like adding the following into a monster's template might do the trick:

	[common]
	{
		forced_expiration_class = immediate;
		auto_expiration_class = immediate;
	}

Edit: Another option (if this doesn't work) is to always make the monster "gib" on death... I remember seeing a threshold number somewhere (can't remember where right now...).

Thanks Sharkull. The forced expiration worked! Now I won't have a bunch of statues laying around after I kill the enemies. I've been trying to finish my Chicken World II map, but I couldn't really complete it without at least getting the chickens to disappear upon death. And since converting skrits over from DS1 to DS2 is rather difficult, I had to look for another alternative to getting their corpses to disappear. Thanks for all your guys' help.

LoneKnight's picture

No problem. Here at SiegeTheDay, we always lend some advice. Whether it works or not is up to you to find out. I'm getting interested in this project of yours, so by all means post updates, screens, and any more questions you may have.

Actually, it's almost done. The map is about 96% done. The only thing that really needs to be done is on the NPCs (namely the shopkeeps). I actually began the project in February, but the computer I was using only had 256 megs, and it would crash because DS2 and SE2 took up 90% of my memory. But I recently upgraded it to 768 megs, so I'm actually capable of making MUCH more progress. I'm hoping to have it released by tomorrow.