Planet Foliax

by Crethor

A mysterious planet, void of mineable resources. Combine botany and the arcane to produce materials that are strangely familiar. Craft powerful machines and discover biolabs with a never ending thirst.

Content
7 days ago
2.0
8.65K
Factorio: Space Age Icon Space Age Mod
Planets Enemies Environment Manufacturing

b enemy_autoplace_base Override

a month ago

Hi! I found what looks like a compatibility issue between Foliax and other planet mods, specifically my mod Velora.

When foliax-enemies is enabled, Foliax loads prototypes/enemies-map-gen.lua, and in that file it defines a noise function named enemy_autoplace_base. This appears to override the global vanilla noise-function instead of using a Foliax-specific name.

File:
prototypes/enemies-map-gen.lua (line 60)

Relevant part:

name = "enemy_autoplace_base"
its expression uses foliax_enemy_base_probability
that in turn depends on control:foliax-enemy-base:*
Because of that, enemy autoplace logic from other planets can end up depending on Foliax’s enemy control instead of their own or vanilla one. In my case, this causes enemies on my custom planet to stop generating when Foliax is active.

It looks like the fix should be to avoid overriding the global enemy_autoplace_base name and instead use a Foliax-specific function name such as foliax_enemy_autoplace_base, then reference that explicitly only from Foliax enemy spawners / map gen expressions.

A simple confirmation test on my side is:

with foliax-enemies = true, enemies on Velora do not generate
with foliax-enemies = false, they generate again
So the issue seems tied specifically to the enemy map gen definitions from Foliax.

If helpful, I can also provide a minimal repro setup.

a month ago

Wow, that is embarrassing. An artifact when I copied over enemy logic from my Space is Fake mod. I removed my definition of enemy_autoplace_base and modified foliax_enemy_base_probability with its intention.

Thanks for the report!

New response