Factorio World


Mod that changes the world generation to be a real-world map.

Content
8 days ago
0.14 - 2.0
8.10K
Environment

i Populate fish in the water

6 years ago
(updated 6 years ago)

There doesn't seem to be any fish in most of the water. Can the LuaSurface.regenerate_entities specifying fish be called on chunks post tile change to do this?

6 years ago

some areas do generate fish and others don't this may be due to the way the mod alters tiles. i would guess that only tiles who were originally water (or connected to water) will contain fish?

6 years ago

Correct, but calling regenerate_entities should update the trees and fish to account for the new tiles.

4 years ago
(updated 4 years ago)

A bit late, but I'll try this out! If it's really that easy it should be done tomorrow (because I'm going to sleep first now) :D Less than 2 years after asking! xD

4 years ago

I just checked this out, there are two calls, one for decoratives (which seems to add more each time you run it?) and one for entities. So for now I run both each time a chunk is generated:

local positions = {event.position}
surface.destroy_decoratives({area = event.area})
surface.regenerate_decorative(nil, positions)
surface.regenerate_entity(nil, positions)

I'm making more changes today probably, so I'll release this later today.

4 years ago

Cool, yea I'd completely forgotten about this also.

4 years ago

I honestly didn't know there were discussion on here, so yesterday was the first time I saw any of the messages here. I turned on email notifications now, so I won't miss everything again.

4 years ago

It has been released ;) I created a script that automatically makes the zip, so I can more easily release often now :P

New response