UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[SVN] [Copern] Deleting pre-tamed pets after some time

Status
Not open for further replies.
[SVN] [Copern] Deleting pre-tamed pets after some time

Many tamers tame and release creatures. These creatures are detached from the spawner and serialized, thus making the world save time longer.

The proposal is to make pets, when tamed and released, to be automatically deleted after some time from the last release (psz suggests 1 week).

OSI: In OSI spawners work in a different way, and this report is meant for RunUO maintenance.

Would this need to add a new timer on creatures, or could we use an existant timer, like the one to let dead bonded pets disappear?
 

Lucifall

Knight
Re: Deleting pre-tamed pets after some time

Probably would need a new timer. I believe 1 week is too long, though. I'd say 3 days, that should be enough for tamers to look for a lost pet and even re-tame them.
 
Re: Deleting pre-tamed pets after some time

Hmmm...

the timer I was looking on is "OwnerAbandonTimer"... if it would be possible to use it, it would be better: another timer would need another thing to serialize, then the good effect of deleting creatures would be nullified...
 

Lucifall

Knight
Re: Deleting pre-tamed pets after some time

osd_daedalus;667156 said:
Hmmm...

the timer I was looking on is "OwnerAbandonTimer"... if it would be possible to use it, it would be better: another timer would need another thing to serialize, then the good effect of deleting creatures would be nullified...

Hmm, I ran into an idea now but I am not sure if it would work.

If the mob is controlled, the timer is the normal 8 hours and the mob abandons the owner by then.
if the mob is released and controlled is then set as false, the timer is now 3 days and it gets deleted by then.
 

psz

Administrator
Re: Deleting pre-tamed pets after some time

That is for Bonded Ghosts

(As I said in IRC)


THere are no timers currently to see how long since a pet was released (Though you can see previous owners)

And yes, 3 days was the timer I'd suggested in the end as well.
 

Copern

Sorceror
Re: Deleting pre-tamed pets after some time

Here is something. Any current uncontrolled and unstabled creatures not belonging to a spawner are given a three day timer to delete. This is for ALL uncontrolled and spawnerless creatures upon first load! Let me know if this not desired.

Any time the controller is changed the timer is removed or restarted with 3 days. Releasing a pet will start the timer and taming it again will stop it. BaseEscortables and Summons are an exception to this (they have their own timers).

EDIT: Oh, there's a GM property to view the DeleteTimeLeft too.
 

Attachments

  • UncontrolledDelete.patch
    2.8 KB · Views: 7

psz

Administrator
Re: [TESTING] Deleting pre-tamed pets after some time

Don't think this will work: What if there are non-spawned mobiles used for events that last more than 3 days? Those would be removed as well.

Then there are monsters linked to controllers, monsters that are spawned by Champs, monsters spawned by the Brazier, monsters spawned by Linked Spawners, etc etc etc.


I think a better method would be "Is there a Previous Owner? If yes, then check how long since it's been released". No need to check for whether it's linked to a spawner (or anything else, for that matter). Once it's tamed, it's no longer linked to a spawner, afterall ;->
 

Copern

Sorceror
Re: [TESTING] Deleting pre-tamed pets after some time

psz;669347 said:
Don't think this will work: What if there are non-spawned mobiles used for events that last more than 3 days? Those would be removed as well.

Then there are monsters linked to controllers, monsters that are spawned by Champs, monsters spawned by the Brazier, monsters spawned by Linked Spawners, etc etc etc.


I think a better method would be "Is there a Previous Owner? If yes, then check how long since it's been released". No need to check for whether it's linked to a spawner (or anything else, for that matter). Once it's tamed, it's no longer linked to a spawner, afterall ;->

Alright, will do that tomorrow. Looks like there's already a Last Owner and abandon date too so that makes it easy. This was only for deserializing from a previous version by the way.

The only checks when the control master is set to start the timer is whether it's a summon, stabled, or whether it's a BaseEscortable. So the only thing that should cause creatures to be deleted post-update is if the creature is released.
 

Copern

Sorceror
Re: [IN DEVELOPMENT] Deleting pre-tamed pets after some time

Looks like the abandon time had to do with leaving a tamed pet alone. So there's no date/time recorded for when a pet was released. Anyway, on deserialization any creatures that previously had an owner and aren't currently controlled will be given a new 3 day timer or a timer based on the time left. This should leave alone anything that wasn't tamed. Only released/abandoned creatures should get the timer which is reset each time it is tamed and released.
 

Attachments

  • UncontrolledDelete.patch
    2.8 KB · Views: 7
Re: [TESTING-TC] Deleting pre-tamed pets after some time

To test this, I have created a fence outside boundaries of the TC headquarters (near the lava pit) and I have put in there:
- tamed and released horse, dog, giant beetle
- a untamed horse (by [add horse)

I wanted also to add an abandoned creature there: tamed, then the guy logs out and the pet loses loyalty until it becomes wild... but I realize in TC pets do autostable even if not bonded (or I haven't understood fully autostable).

For now, I can say all of pre-tamed creatures have a value DeleteTime that indicates about 3 days, while on the spawned horse the DeleteTime value is 0.
 
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Something strange happened :(

At 1 day of the countdown, the dog disappeared, and the horse went DeleteTime = 0 but it's there.
Instead, the beetle value is correct, while the non-tamed horse reports 0 and it's there correctly.

Or a GM messed up with them, or there is something not correct with the patch... but what?
 

Lucifall

Knight
Re: [TESTING-TC] Deleting pre-tamed pets after some time

osd_daedalus;672911 said:
Something strange happened :(

At 1 day of the countdown, the dog disappeared, and the horse went DeleteTime = 0 but it's there.
Instead, the beetle value is correct, while the non-tamed horse reports 0 and it's there correctly.

Or a GM messed up with them, or there is something not correct with the patch... but what?

Does it calls a command upon achieving 00.00.00 time or does it deletes like once every three days?
 

Copern

Sorceror
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Did that horse have a previous owner (should be on the GM list somewhere). If it did, after TC restarted, did it end up with a 3 day timer again?

Did the dog disappear before the counter reached 0?

Also, when the counter reaches 0, it may take a little bit of time before it actually deletes. This is because the TimerPriority is OneMinute so it may take a little while (even more than a minute sometimes). Check back on it later.
 
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Did that horse have a previous owner (should be on the GM list somewhere). If it did, after TC restarted, did it end up with a 3 day timer again?

It had, but now the LastOwner is null. That's weird...

Did the dog disappear before the counter reached 0?
Exactly, 2 days before the plan.

Also, when the counter reaches 0, it may take a little bit of time before it actually deletes. This is because the TimerPriority is OneMinute so it may take a little while (even more than a minute sometimes). Check back on it later.


In 6 hours the beetle should disappear. Let's see...
 

Copern

Sorceror
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Keep me posted, I'm not sure what's going wrong except maybe the TimerPriority.
 
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Copern;673742 said:
Keep me posted, I'm not sure what's going wrong except maybe the TimerPriority.

What to say, the beetle (the only creature left) disappeared correctly after the 3 days timer.
I don't know for the truth what happened to the dog, disappeared very early, and to the horse that lost the "last owner" and became like a never tamed creature.

Maybe the test must be repeated.
 

Copern

Sorceror
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Want to reduce the timer for the next tryout? 1 day? 2 days?
 

Copern

Sorceror
Re: [TESTING-TC] Deleting pre-tamed pets after some time

I think I might see the problem, OnDelete calls SetControlMaster( null ). I don't think I accounted for that.
 

Copern

Sorceror
Re: [TESTING-TC] Deleting pre-tamed pets after some time

Ok, let's try this one.
 

Attachments

  • UncontrolledDelete2.patch
    3 KB · Views: 10
Status
Not open for further replies.
Top