I've had to set it on individual mobs IIRC

This specifically was tested by me a few years ago and confirmed to allow mobs AI to continue to function when no players were online or on the same map
...

The relevant line of code is
C#:
public override bool PlayerRangeSensitive { get { return false; } }
You can see the link above if you're not sure how to use it in the mobile's script
 
My bad, just noticed you were asking in the XML Spawner board

For that you want to click on the Props button then enable SmartSpawning as shown below.
That will make it so it only spawns when a player is in range and despawn after a while if there are no players.

1707118267241.png
 
thank you, you got it right at the first shot. So I understand each script must have the override command, I guess I can just change the basecreature.cs, it would be worldwide. By the way that caravan script is amazing, and that's exactly what I was doing, I'll test that script as well, I'm just trying to setup a living world for a bounch of friends. I just want creatures to live on their own.
 
thank you, you got it right at the first shot. So I understand each script must have the override command, I guess I can just change the basecreature.cs, it would be worldwide. By the way that caravan script is amazing, and that's exactly what I was doing, I'll test that script as well, I'm just trying to setup a living world for a bounch of friends. I just want creatures to live on their own.
Yeah, adding it to BaseCreature should do the trick. It's a good idea so you stumble upon mobs fighting each other. Make sure your spawners aren't set to despawn if no players are around as well. That will mess up the feel
 
I put the code in the basecreature.cs commenting out the original line
C#:
//public virtual bool PlayerRangeSensitive { get { return CurrentWayPoint == null && (_NavPoints == null || _NavPoints.Count == 0); } }
        //If they are following a waypoint, they'll continue to follow it even if players aren't around

        /* until we are sure about who should be getting deleted, move them instead */
        /* On OSI, they despawn */

        public virtual bool PlayerRangeSensitive { get { return false; } }
but the cpu load is too much and the server gets too laggy, but sure it works. I'll find out the right balance, maybe using some caravan code like you did. The problem with the caravan script is it doesn't get attacked by mobs because idle.
 
I put the code in the basecreature.cs commenting out the original line
C#:
//public virtual bool PlayerRangeSensitive { get { return CurrentWayPoint == null && (_NavPoints == null || _NavPoints.Count == 0); } }
        //If they are following a waypoint, they'll continue to follow it even if players aren't around

        /* until we are sure about who should be getting deleted, move them instead */
        /* On OSI, they despawn */

        public virtual bool PlayerRangeSensitive { get { return false; } }
but the cpu load is too much and the server gets too laggy, but sure it works. I'll find out the right balance, maybe using some caravan code like you did. The problem with the caravan script is it doesn't get attacked by mobs because idle.
Yeah, it's going to be pretty rough on the cpu because all of the AI and timers will run continuously.

Might have better luck with just one map
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back