Hi!
I'm looking for all scripts that control items left in game world - exactly decay control.
Where should I look for it in official distro scripts?
I'm using Pol100 Core.
Thank you, Love Ciechu.
Item decay control script?
Moderators: POL Developer, Distro Developer
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: Item decay control script?
Item decay is handled by the Core. It is more efficient than having eScript programmes scan through all of the facets (realms) for items. But you have some control over it with settings in /config/servespecopt.cfg and in programmes (scripts) by setting the DecayTime and DecaysOnMultis members on an item.
From servspecopt.cfg:
From the POL Documentation one of the links at the bottom of that page is to the configuration files.
From the itemdesc.cfg documentation:
Items normally decay at the default time set in servspecopt.cfg but you can override that time by setting the DecayTime member. Items do not decay on multis such as boats and multi houses but again you can override that by setting the DecaysOnMultis member to 1.
I hope that helps.
From servspecopt.cfg:
Code: Select all
#
# DecayItems - Determines if the decay system is enabled or not.
# Default is 1
#
DecayItems=1
#
# DefaultDecayTime - minimum number of minutes before movable items decay (are destroyed)
# Default is 10
#
DefaultDecayTime=10
From the itemdesc.cfg documentation:
Code: Select all
DecayTime (int minutes {default servspecopt.cfg option})
DecaysOnMultis (0/1 {default 0})
I hope that helps.
Re: Item decay control script?
You also have additional control of the decay system and specifically preventing items from decaying.
With the CanDecay syshook, you can use a myriad of conditions from preventing an item from decaying when the trash collection rolls around. This is handy if for instance you want to have a static housing system and want it to simulate very closely to the multis system, thus making your static package feel a bit more like it is something part of the game and not something slapped on top of it as a simple example.
I would however suggest, if you go this route, be very sure about how you use it as you do not want to have a ton of items that are not able to decay with the standard trash collection. Also I believe you also will want to limit the complexity of code used in the syshook as I recall syshooks are run critical and doing anything that is too complex could lead to unforeseen consequences.
With the CanDecay syshook, you can use a myriad of conditions from preventing an item from decaying when the trash collection rolls around. This is handy if for instance you want to have a static housing system and want it to simulate very closely to the multis system, thus making your static package feel a bit more like it is something part of the game and not something slapped on top of it as a simple example.
I would however suggest, if you go this route, be very sure about how you use it as you do not want to have a ton of items that are not able to decay with the standard trash collection. Also I believe you also will want to limit the complexity of code used in the syshook as I recall syshooks are run critical and doing anything that is too complex could lead to unforeseen consequences.
Re: Item decay control script?
Your answers are very helpful. I will make my script for handle decay items, but first I will block this in config files.
Thank you very much.
My question was from this, that I think there are some control scripts in distro for that.
Thank you very much.
My question was from this, that I think there are some control scripts in distro for that.
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: Item decay control script?
I am happy to help.
It would be nice if decay was performed by the scripts. The problem is that searching the entire map of each facet using eScript programmes (scripts) is slower than the Core doing it. With the sys hook that ThisIsMe mentioned you have a little more control over the decay system. You might look into using that. The Core still does the decay sweep but the sys hook gives you more flexibility.
It would be nice if decay was performed by the scripts. The problem is that searching the entire map of each facet using eScript programmes (scripts) is slower than the Core doing it. With the sys hook that ThisIsMe mentioned you have a little more control over the decay system. You might look into using that. The Core still does the decay sweep but the sys hook gives you more flexibility.