I need help with my first mod. Mod idea are - add only desert biome and remove some trees.
I figure out, how can remove trees, who I don't wont, but I stuck on removing terrain biomes.
I don't understand, how can remove all biomes except sand biome.
I found code, who can remove biomes:
viewtopic.php?p=144563#p144563
Code: Select all
for _, name in pairs({"dirt", "dirt-dark", "sand", "sand-dark", "grass-dry"}) do
data.raw.tile[name] = nil
end
Can someone help me - where or what is wrong in my code ?
Here is my code from the data-updates.lua file:
Code: Select all
for _, name in pairs({"dirt", "dirt-dark", "grass", "sand-dark", "grass-medium", "grass-dry"}) do
data.raw.tile[name] = nil
end
data.raw.decorative = nil
for _, tree in pairs(data.raw.tree) do
for _, badword in pairs({"green-coral", "tree%-01", "tree%-02", "tree%-03", "tree%-04", "tree%-05", "tree%-06", "tree%-07", "tree%-08", "tree%-09"}) do
if string.match(tree.name, badword) then
data.raw.tree[tree.name] = nil
end
end
end