The building can be created in singleplayer and then copied to a file by using a command.
Lisence: Free !
But don't claim it's yours. Ok ^_^?
What does it let you do?
--Copy tiles
--Copy entities
--Easily changable to have it set certain entities as part of the player's force so the player can use it
How to add this functionality to your mod?
add to your mod
The first step is what i call uploading the building. It is basically when you have created a building you want to have later be spawned in the world. And you now want to turn it into files that can be later read!
uploading building
8. Add this to the beginning of your control.lua file: (PS buildings.lab1 is an example location)
Code: Select all
readNames = require "buildings.lab1.names"
readPosX = require "buildings.lab1.positionsx"
readPosY = require "buildings.lab1.positionsy"
readTileNames = require "buildings.lab1.tileNames"
readTilePosX = require "buildings.lab1.tilePositionsx"
readTilePosY = require "buildings.lab1.tilePositionsy"
downloading
Upcoming--Add in functionality for having more than one building. THough it is very easy to add, but time is running out and i can hint at it being a single extra if statement when downloading !)
--Add in possibility for adding random loot to it. Should be possible with not too much changes though. !
If ent.type == container then create entity, add loot code end
--Soon also i will trye and see if i can register the orientation of an object(i think i've seen that)
--Suggestions !
changelog