Jump to content

[Request] Alt Resources


falk_

Recommended Posts

I'd like to place a request on a mod that allows us to choose which resource prefabs are used during world gen.

Grass / Grass Gekko

Twigs / Twiggy Tree

Berry Bush / Juicy Berry Bush

 

I would do it myself, but I don't really know how to.

There is a file on the data folder called prefabswaps.lua, which i believe to be the responsible for this. This file has the following code :

 

-- GRASS
PrefabSwaps.AddPrefabSwap({
    category = "grass",
    name = "regular grass",
    prefabs = { "grass" },
    weight = 3,
    primary = true,
})

PrefabSwaps.AddPrefabSwap({
    category = "grass",
    name = "grass gekko",
    prefabs = { "grassgekko" },
    weight = 1,
    exclude_locations = { "cave" },
})

-- TWIGS
PrefabSwaps.AddPrefabSwap({
    category = "twigs",
    name = "regular twigs",
    prefabs = { "sapling" },
    weight = 3,
    primary = true,
})

PrefabSwaps.AddPrefabSwap({
    category = "twigs",
    name = "twiggy trees",
    prefabs = { "twiggytree", "ground_twigs" },
    weight = 1,
})

-- BERRIES
PrefabSwaps.AddPrefabSwap({
    category = "berries",
    name = "regular berries",
    prefabs = { "berrybush" },
    weight = 3,
    primary = true,
})

PrefabSwaps.AddPrefabSwap({
    category = "berries",
    name = "juicy berries",
    prefabs = { "berrybush_juicy" },
    weight = 1,
})

 

It weights the resource variations at 3:1 by default.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...