Jump to content

Sleep mode for NPCs when no players are nearby

Pending 3.2.2

0xBADF00D
0xBADF00D

Posted

Hello,

Could you add a sleep mode for NPCs when no players are nearby? For example, if there's no player within X meters, they could just stop thinking and do nothing.

Also, for purchased or PvE bases, it would be awesome if they only wake up for players who are actually allowed to enter the event, so random players passing by don't trigger them.
Waking them up only when authorized players come close would really help with server performance, especially when several bases are active.

Thank you!

nivex

Posted (edited)

heya, these options control this behavior already aside from sleeping. I can look into that one.

Allow Npcs To Shoot Players Outside Of The Dome
Block Damage Outside Of The Dome To Npcs Inside
Allow Npcs To Leave Dome When Attacking
Block Damage Inside From Npcs To Players Outside
Block Damage Outside To Npcs When Not Allowed To Leave Dome

Edited by nivex
0xBADF00D

Posted (edited)

Just to clarify, my request isn't about damage or combat rules around the dome, but purely about server performance (CPU tick optimization).

Currently, even with those settings, NPCs are still fully active/thinking. What I was proposing is disabling NPC AI/think ticks entirely when nobody is around, so dormant bases don't eat up server resources

Also, on PvE/purchased bases, having them only wake up for authorized/participating players (ignoring random players walking past) would maximize this performance gain.

Edited by 0xBADF00D
nivex

Posted

hi, I understand and I've looked into it and added a couple options in the next update

this is the primary option:

  • "Npcs Remain Dormant Without Intruders": false,

this requires the first option to be enabled:

  • "Npcs Become Dormant X Seconds After All Intruders Leave": 30.0

this triggers when someone enters an event. so long as players are not allowed to enter another players raids then the npcs will remain dormant. for the second option, when a player leaves the event the npcs will become dormant after the configured amount of time so long as the npc has no target.

  • Love 1

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.2m
Total downloads
Customers
12.3k
Customers served
Files Sold
173.7k
Total sales
Payments
3.8m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.