Resource Spawner Overhaul

by orzelek

Makes resources more sparse than base game. You will need to use trains much earlier to get resources. Game will be more difficult especially with higher enemy settings.

Tweaks
a day ago
0.14 - 2.0
143K
Environment

i I do believe there's an old deficiency in the starting area size check code

8 years ago
(updated 8 years ago)

E.g. in roll_region function:

<pre>if ((abs(c_x/REGION_TILE_SIZE)+abs(c_y/REGION_TILE_SIZE))<=starting_area_size) then return false end </pre>

This describes a diamond-shaped area though (not a circle or a rectangle), which may seem pretty strange to the player. It's not very noticeable when starting area is quite small, but if you use larger settings, it's quite apparent (for instance, biter nests can appear much closer to your starting position on diagonals).

I suggest changing this (and the similar block in roll_chunk function) to

<pre>if (((c_x/REGION_TILE_SIZE)^2+(c_y/REGION_TILE_SIZE)^2)<=starting_area_size^2) then return false end </pre>

which will describe a proper circular area.

8 years ago
(updated 8 years ago)

I admit I haven't looked at it closely really. Current implementation seems to use manhattan distance.
Thanks for looking into it - if it's that visible I will upgrade it to proper circular distance.
Alternatively I could use starting distance as a square definition from center. This might be more of what user would expect from starting area definition.

New response