Source-X icon indicating copy to clipboard operation
Source-X copied to clipboard

Giant Spiders drops i_spider_web in sleeping sector

Open DavideRei opened this issue 1 year ago • 17 comments

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

DavideRei avatar Jun 05 '24 20:06 DavideRei

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 avatar Jul 02 '24 01:07 Jhobean

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.

Jhobean avatar Jul 20 '24 01:07 Jhobean

whats the bug then?

Tolokio avatar Jul 20 '24 17:07 Tolokio

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

Jhobean avatar Jul 20 '24 17:07 Jhobean

nolok confirmed, so there got to b something.

Tolokio avatar Jul 20 '24 18:07 Tolokio

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

cbnolok avatar Jul 30 '24 10:07 cbnolok

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

Soulless-1 avatar Jul 31 '24 05:07 Soulless-1

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.

cbnolok avatar Jul 31 '24 08:07 cbnolok

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

DavideRei avatar Sep 12 '24 10:09 DavideRei

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

DavideRei avatar Sep 13 '24 06:09 DavideRei

The bug is back on Linux

image

image

DavideRei avatar Nov 11 '24 20:11 DavideRei

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.

canerksk avatar Nov 13 '24 12:11 canerksk

I confirm the issue

Image

But at the moment the sector is awake, all item are removed

It's normal the NPC have this method void CChar::NPC_Act_Idle() on them when they are on a sleeping sector?

Jhobean avatar Feb 25 '25 00:02 Jhobean

Try this new PR: https://github.com/Sphereserver/Source-X/pull/1382

cbnolok avatar Mar 05 '25 19:03 cbnolok

Was this solved by last commits?

cbnolok avatar Mar 20 '25 14:03 cbnolok

The issue is back again

Image

DavideRei avatar Sep 20 '25 07:09 DavideRei

The temporary fix, CAN=can_o_nosleep on the spider web itemdef, doesn't work either

DavideRei avatar Oct 20 '25 06:10 DavideRei

Should be fixed in dev.

cbnolok avatar Nov 18 '25 19:11 cbnolok