Configurable Player::generateFarAwayChunks

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
zhuyifei1999
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 06, 2026 9:52 am
Contact:

Configurable Player::generateFarAwayChunks

Post by zhuyifei1999 »

Currently, it is set to generate chunks about 1 chunk per second in a 20-radius around the player, result in a minimum of 41x41 = 1681 chunks per surface when a player stays on it for sufficient time. I play on a modded server with around two dozen planets, and the resulting map size quickly inflates just from the number of chunks existing. Some players have to download the map for multiple minutes each time they join. Yes, I could trim the map size with commands, but that's not a permanent solution; the 41x41 will be generated just from a player existing on a planet without any exploration / radar scanning.

I looked into if there's a way to disable the far chunk generation or reduce the radius, but the disassembly suggests that the radius is hardcoded and CharacterController::shouldGenerateFarAwayChunks is set as whenever the update is not paused, leaving no room for modding or anything to configure it.

My suggestion is make it a prototype option for the surface, so each planet mod could opt in/out of far away chunk gen, and could be overridden if needed. Although, I'm not sure why it's needed in the first place, since one can play on a remotely-controlled spidertron and explore the map just fine, without far chunk generation (which I believe is due to RemoteController::shouldGenerateFarAwayChunks always returning false)
User avatar
Thremtopod
Inserter
Inserter
Posts: 31
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Re: Configurable Player::generateFarAwayChunks

Post by Thremtopod »

Another option would be to put the radius of generated chunks into utility constants, which would allow it to be changed in the data stage.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16790
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Configurable Player::generateFarAwayChunks

Post by Rseding91 »

zhuyifei1999 wrote: Wed May 06, 2026 10:50 am Although, I'm not sure why it's needed in the first place ...
"far away" chunk generation was implemented in 0.9.0 so enemies would generate around the player regardless of them having explored away from the spawn location or not. It's a counter to "I never leave spawn and so no chunks with nests ever generate and I never get attacked".
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16790
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Configurable Player::generateFarAwayChunks

Post by Rseding91 »

I'll add it to utility constants for 2.1.
If you want to get ahold of me I'm almost always on Discord.
zhuyifei1999
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 06, 2026 9:52 am
Contact:

Re: Configurable Player::generateFarAwayChunks

Post by zhuyifei1999 »

Ah I see. I was thinking of a per-surface override because a lot of modded planets have no enemies, but I don't mind a global constant :) I think pollution will cause attacks sooner or later anyways until one gets late game cheeses, since pollution generate chunks too.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16790
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Configurable Player::generateFarAwayChunks

Post by Rseding91 »

Both can be done. The utility constant was simply quick and easy. If I - or someone else - doesn't get around to anything else.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”