PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
NPC Corpses do not decay

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion
Display posts from previous:   

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Sun Mar 04, 2007 9:20 pm    Post subject: NPC Corpses do not decay Reply with quote

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 Smile.

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


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

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 500

PostPosted: Sun Mar 04, 2007 11:17 pm    Post subject: Reply with quote

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.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty