Anyway to get the core to load an area without players?

I’ve been writing a c++ script for an event that takes place in the mall on my server. I’ve been running it on a local server for testing. When i noticed some strange behavior.

In the event mobs spawned at Part A of the area whilst something else happens at part B they then run to meet in the middle.

When i stood near part A everything looked as it should. Same with part B. Though when i was at part A, part B was acting stangly/not working. And when i followed the NPC’s of part B, Part A acted funny.

It seems the core only ‘runs’ areas near players. Because when i had a Player at part A and Part B it worked as expected. Is there anyway to get the Core to process an area even when no players are around so i can get a World Event to run on a Timed basis?

Yeah, the same thing happens with waypoints. They only load when a player gets near, that’s when they start.

So there is no easy way to overwrite this and have the core load an area anyway?

I think if you turn grid unload to 0 it should work… a dev can answer this

On other hand… if you do that, your core will require a really high amount of RAM.

Grid monster is a monster, blame it.

What Athena said should be true although I am not sure that that area will have to be loaded at least once per server run. grid unload should just stop things from being unloaded.

P.S If someone wants to rewrite our grid system, feel free to do so.

I think Black Morass area was fully loaded to do things like that.

There was an option added long ago to allow an NPC to activate the grid of the area he is in, as if a player was there, but, I don’t know if it still works, or how to accomplish it.

There’s a function called Map::LoadGrid(float x, float y) that will force that positions grid to be loaded. And then there is, as Paradox was talking about WorldObject::setActive(bool).

Here’s an example.

me->setActive(true); // This will make this creature start calling it's updateAI.
me->GetMap()->LoadGrid(me->GetPositionX(), me->GetPositionY()); // This will load the grid for these positions.

If a grid has any active creatures near or inside it it will not unload unless server is shutting down or instance is empty etc.