Sign in to follow this  
falk_

[Request] Alt Resources

Recommended Posts

falk_    1

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.

 

Edited by falk_
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this