Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

Giant Spiders drops i_spider_web in sleeping sector #1249

Open DavideRei opened 5 months ago

DavideRei commented 5 months ago

Sphere console gives warnings about too many items in different sleeping sectors. When you go there in game the problem disappear. I found out that the issue is related to spider's webs, giant spiders are able to drop webs in sleeping sector but the timer on the spider web doesnt work because of the sleeping sector. The problem is solved setting can_o_nosleep on i_spider_web item

Jhobean commented 4 months ago

Ok the item are added here: https://github.com/Sphereserver/Source-X/blob/8e444840f7e916126f5f4c1a56b4049e34b20fbd/src/game/chars/CCharNPCAct.cpp#L1918-L1949

A check for sector sleep should be add on spider and fire elemental

Jhobean commented 4 months ago

This bug is weird because: 1- In sleeping sector NPC sleep and dont do special action (Just tested and it work) 2- Item with decay flag suppose to always continue timer and decay on sleeping sector (Just tested and it work)

I was about to add some check on the core to prevent a: prevent npc to spawn item id sector sleep b: Add can_o_nosleep flag on item.

But both are useless because 1 and 2 work.....

I try to reproduce but i'm not able... I spawn 250 spider on britain and they make spider web everywhere.. I leave for 10 mins, (Sector sleep after 1 min) When I come back there no web.

Tolokio commented 4 months ago

whats the bug then?

Jhobean commented 4 months ago

whats the bug then?

Don't know... was not able to reproduce.. Maybe David was using an old build before we added the "decay" don't sleep

Tolokio commented 4 months ago

nolok confirmed, so there got to b something.

cbnolok commented 3 months ago

Well it was confirmed back then, i didn't check with latest builds

Soulless-1 commented 3 months ago

it seems to be along the edge of sleeping sectors. from what i recall. i did the same fix as david can_o_nosleep

cbnolok commented 3 months ago

Is that still happening with a recent build, such latest dev one? This bug sounds weird to me since i recall we fixed a similar (if not identical) issue.

DavideRei commented 2 months ago

I removed can_o_nosleep from the web script, so I'll see if the problem persists

DavideRei commented 2 months ago

It seems solved, web spider not increased in 20 hours.

DavideRei commented 1 week ago

The bug is back on Linux

image

image

canerksk commented 6 days ago

This may be the same problem as Issue #1229, since the time between wander and idle actions of the npc is very short, it is constantly switching between wander and idle very quickly and thus wants to add spiderweb every time.

I think _SetTimeoutS under NPC_Act_Idle can be tied to motivation. so I think most of the npc bugs will be solved with this or the time can be set as it was before. it's too fast right now

I solved it temporarily with the script

under t_web.

[typedef t_web]
on@create
timer={ 5 10} 

on=@timer
remove
return 1 

This way, there is no accumulation of cobwebs as they are quickly removed after they have formed.