Adding an asset to foilage

I’ve been trying to get a mod to have the Ore nodes to the foliage on the foliage list

Did you forget to create a foliage asset file? For an example, see Metal_1_Foliage.asset:


ok I phrased that wrong I’m trying to fix a a ore mod and I managed to find a .unity3d file and the purpose is to get the mod to actually function if you want to look at the mod I’m looking at its not mine I’m looking at
Robokasts More mineral mod

Foliage assets from old mods (e.g., pre-2022) aren’t properly compatible with the latest version of the game. They’re most definitely missing a foliage asset file.

If it’s an old mod, this still applies:

Thank is the foliage. Asset file documentation in the github?
Just to be fully clear I need the .dat and the .asset file for each Ore

Yes, but I’d recommend using a vanilla file for reference as well. (Such as Metal_1_Foliage.asset.)

Yes. These files do two entirely different things. The .dat file contains information about how the resource should act in-game (e.g., what it drops). The .asset file contains information regarding things like how it should bake or be painted in the editor.

You can only have one .dat file for your resource. You can have an infinite number of .asset files describing how something should bake.

As a visual example—here’s an image of the same Metal resource, painted using with two different foliage asset files. The custom foliage asset has a variation in scale, and is allowed to be much more dense:

Last question sorry I’ve formed as I went.
What folder do I put in for the mod or new folder?
I have 3 folders: Items, Ores, Spawns,

Thank you so much for your help it has been so helpful!

It can be helpful to follow a similar-ish hierarchy to vanilla files. For example, foliage .asset files for vanilla resources can be found at Bundles\Assets\Landscapes\Foliage\Resources\ExampleFoliageAsset.asset.

And then resource .dat files for vanilla resources can be found at Bundles\Trees\ExampleResourceAsset.dat.

does it have to be anywhere special lor as long as the guids are link?
The guid is the one I take from its .dat file in the resource section of the .assert file?

I’m in the discord as Cheems in the modding support\ to make this faster cause ive got loads of follow up questions and clarifications

  1. It just needs to be in along the \Bundles\Assets\… path.
  2. Yes.

I think you’re pretty far along the right track and have enough intuition to figure out how to get it working at this stage, if you go ahead and set everything up.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.