Closed winex closed 8 months ago
Right! That's an error. Will fix it soon :) Thank you for pointing that out!
As for updating where fisheries spawn, I recently tested https://mods.factorio.com/mod/railroad-tycoon and they seem to have a way to place entities before the chunks are discovered. That would be my preferred way (i.e. as part of map generation). I'll keep this issue open to inform that development, but might not update it too soon.
found another thing with map_gen_settings.water
percentage. tested few coverage values with corrected water_ratio
and 1.0 probability (instead of 0.25 at line:17) on 4096x4096 map:
so min_distance = 200*6 ...
looks bad to me. more water, but way less fisheries - really strange! maybe sqrt()
or log()
of something in that expression would do better, because it's related to area... or just clamp to 200-300 max, not multiply by 6
also, there is big downside having fisheries inside global probability (0.25 currently) condition - if it's going to be more types of primary industries in future - fisheries would be smashed down to about 0, because they already have very strict condition (water) and resulting chance of (even trying to place) each one is divided by total number of industries. will try to separate them and see how it behaves... counting water tiles almost each charted chunk will cause lags, though
using autoplace could solve everything, but idk how to use it for entities together with special conditions like water tiles count
p.s. railroad-tycoon looks really cool - i like the blueprint idea. previously was looking at whistle-stop factories and that's how i found Tycoon :)
looks like they're forcing chunk generation - we could try it, too:
surface.request_to_generate_chunks(ore_position, 2);
surface.force_generate_chunk_requests();
I dug into the docs of the map generation and auto placement a bit more, and it might be possible to let that place entities, too. So we wouldn't have to wait for chunk generation maybe. Much more efficient to let Factorio's map generator handle that instead of the Tycoon code running its own checks as people explore the map.
I plan on testing that some time soon to get more data.
i'm currently working on "region based generator" #269 similar what rso-mod
has, though i didn't check their code, yet.
created that issue to share the progress, then we'd probably can test that in multiplayer - i'm planning to run a FFA Tycoon server soon, but i'm using some mods, which i just can't play without anymore + patched actual-craft-times-remade
(PR already sent)
we probably need some pre-release alpha/dev branch, so it won't affect current release version
p.s. Factorio has great --mod-directory
command-line option, so you can keep all your mod-packs in different directories
Wow! That's amazing! Thank you so much for tackling this :) I'll be happy to join you on the multiplayer server
i'm closing this because it was fixed partially and i hope rbgen
will soon be merged, which does this differently.
if that be happening again -- i'll reopen it, but against rbgen
next time
fishery spawns way less in v0.4.x and this looks like logical error (wasn't it supposed to be
0.25 < water_ratio < 0.9
?): https://github.com/bahrmichael/factorio-tycoon/blob/44186e0467d2447447e864b0f68efc6d806643d2/chunk-charted-handler.lua#L27using top-left corner (instead of center) of a newly generated chunk with a radius to place entity makes this depend on direction of map generation. current radius is 100 (>3 chunks outwards) and it will work mostly towards player only (as it probably meant to work). i think 3x3 chunks from center is enough, testing it...
i expected at least 4 or more fisheries around the bottom lake. starting area at the top is 512x512, so this crop is like 1024 top-to-bottom:
p.s. looking for a chunk full of water (water_ratio = 1.0) would be better: