PenUltima Online

It is currently Fri Sep 05, 2008 11:30 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: NPC Corpses do not decay
PostPosted: Sun Mar 04, 2007 5:20 pm 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
I only did some light digging, and what I found was in corpseControl.

Code:
program control_Corpse(corpse)
   if ( corpse.NPCTemplate() ) // If it's an NPC, this just returns 0
      return 0;
   endif

   var settings := CP_GetSettingsCfgElem("Corpse");
   var decay_wait := CInt(settings.CorpseDecay);
   if ( !decay_wait )
      return 0;
   endif

   Sleep(decay_wait);
   corpse.SetDestroyable(1);
   corpse.MakeRemains();

   return 1;
endprogram


Is this intentional? I'm thinking maybe Austin wanted different NPC corpses to decay at different speeds. I didn't want to spend lots of time digging into this if someone that already knows could give me an answer in a few seconds :).

[edit]Added the word "corpses" after NPC, for clarification.[/edit]


Last edited by tekproxy on Sun Mar 04, 2007 7:59 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 7:17 pm 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 545
I use that decay system on my live 097 shard and it works with only minor mods related to my owner's mark items not decaying. There's a minor bug in the corpse methods somewhere that I reported, but it's just console spam to do with the call depth.

The corpse is created by the core. By the time this script runs you are looking at the corpse, not the npc. The settings file contains the decay value of the corpse, after which the corpse is turned into random bones (remains). The contents of the corpse are transferred to the remains.

If you want to see my scripts, let me know.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl