louis

louis
Initiate
ServUO Version
Publish 57
Ultima Expansion
Endless Journey
hello everybody,

I'm running ServUO 57.4.1 on Windows Server 2022, and I noticed a behavior difference compared to RunUO:

  • In RunUO, when a player drops an item on the floor inside a private house, the item stays permanently (no decay).
  • In ServUO 57.4.1, items dropped on the ground decay ~1 hour later, regardless of whether they are dropped in a public area or inside a private house.
What I want:

Restore the classic RunUO behavior: Items dropped inside a private house should NOT decay automatically.

What I have tried:


  1. Tried using EventSink.MoveToWorld – but MoveToWorldEventArgs type cannot be found.
  2. Tried modifying Item.cs → DropToWorld method to check region and cancel decay, but Server.Regions, Server.Multis namespaces cannot be referenced inside Item.cs .
  3. Created a custom script HouseItemProtection.cs and tried EventSink.ItemDropped – but this event does not exist in ServUO 57.4.1.
  4. Attempted to set item.TimeToDecay = TimeSpan.Zero; or item.DecayTime = TimeSpan.FromHours(24); but couldn't trigger it at the right place.
Core difficulties:
  • Server.Regions, Server.Multis seem inaccessible from both Scripts and Server projects.
  • Cannot find a reliable event that fires exactly when an item is dropped to the ground.
  • I prefer not to modify ServUO core files (Item.cs) if possible, to keep future updates clean.
Environment:
  • ServUO version: 57.4.1
  • OS: Windows Server 2022
  • .NET version: 8.0
Questions:
  1. What is the best practice / cleanest way to achieve "no decay for items dropped inside private houses" in ServUO 57.4.1?
  2. Is there an existing script or configuration change that can restore the classic RunUO behavior?
  3. If core modifications are necessary, exactly which file/method should be modified? A short code example would be very helpful.
Thank you!
 
To implement the requested functionality (not recommended*), you can override Region.OnDecay in HouseRegion;

C#:
Expand Collapse Copy
        public override bool OnDecay(Item item)
        {
            return false;
        }

* If too many items are left in the house, it can cause serious server-wide lag spikes due to the map processing the z-columns.
A player with a crafting macro running, upon filling their backpack, will begin to overflow onto the ground; a few hours and 2,000 daggers later will make it impossible to even visit that location.
 
Thanks Wilson for you reply.
Maybe the different runuo versions, I remember the items dropped in house would never decay(about 2006).

Thanks Voxpire, I have modified the method ondecay(), it works. And thanks for your advice. I ran uo server since 2001(around), this time I re-run it only for the reminiscing and invite only several old players to join, hence, I think the situation will not appear. However, I will try to solve the problem like counting the total items sum in the house to determin the latest-droped item to be decay or not.
 

Donations

Total amount
$10.00
Goal
$500.00

Shards

Back