Am I using regenerate_entity wrong? It appears broken in 2.0.

Place to get help with not working mods / modding interface.
PyroGamer666
Inserter
Inserter
Posts: 21
Joined: Fri Aug 28, 2020 5:37 am
Contact:

Am I using regenerate_entity wrong? It appears broken in 2.0.

Post by PyroGamer666 »

Following instructions for the regenerate_entity function https://lua-api.factorio.com/latest/cla ... ate_entity, while it is able to generate resources that already existed, it can not be used to write a migration script that adds a new resource to an existing world.

To show this, open the world "space boiler test." Download all mods required by the world.

Enter the following command.

Code: Select all

/c game.surfaces["muluna"].regenerate_entity("anorthite-chunk")
This command will fail to generate any Anorthite chunk entities. This world was made before an update to Muluna that added the Anorthite chunk resource.

If you load the same mods to generate a new world, Anorthite chunks will generate as expected, but it will not generate on any worlds created before Muluna version 1.10.

This feels like a straightforward thing to do with a simple command, but it does not work as the documentation suggests it does. Looking at other planet mods and in Space Age itself, there are no uses of this command anywhere, and there are no posts about this function on the forum post 2.0, so for all I know, this command is currently unable to retroactively add new resources to a world.
Attachments
space boiler test.zip
(12.09 MiB) Downloaded 10 times
Post Reply

Return to “Modding help”