About This File
This mod can be used as a template for custom ground tiles for Don't Starve Together. I use it in the Green World. The main logic implemented in two files:
- tileadder.lua — provides two functions: AddTiles() and AddMinimap();
- tiledescription.lua — contains parameteres for new tiles.
Function AddTiles() should be called from the modworldgen.lua, function AddMinimap() should be called from the the modmain.lua. Ground ID is not required, the tile adder calculates it automatically; this provides high compability with any other custom tile mods. Turf prefab is also generated by the tile adder, but you need to set build/icon/anim/any other prefab data with AddPrefabPostInit() function in the modmain file.
Five steps to add new tile:
- Pick the name for you tile;
- Place ground texture (resolution 512x512, name «noise_yourtilename») and minimap texture (resolution 256x256, name «mini_noise_yourtilename») in the «images/textures» folder;
- Add string «yourtilename = { }» to the tiledescription.lua file;
- Add AddPrefabPostInit() function to set inventory images for your tile;
- Test it!
More information you can find in the tiledescription.lua file. As an example, two custom ground tiles (Jungle and Tech) are added.
Recommended Comments
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 accountSign in
Already have an account? Sign in here.
Sign In Now