User Tools

Site Tools


world_setup:buildings_interactions

Buildings & Interactions

Many game features are implemented through interactions with static objects added to the world map. The game code refers to these as 'Buildings' (because initially, most of the time, that's what they were) but they can be any interactable thing. (e.g. You could have a 'building' set to use a tree model, and when the user interacts with the tree 'building' they're given some coconuts).

Standard Building behaviours

The game provides a range of different building types to perform standard functions ; most commonly this means interactions with the building open up a UI window listing items for sale and items that the building will purchase from the player. In addition, the building will run timed update cycles allowing it to regularly generate new items or manufacture them from others that have been supplied to it. The types of items available in standard buildings are controlled in the Buildings Editor.

Another common function of standard buildings is to allow them to be owned by players and sold to others. Commonly only the owner of the building will have the ability to directly remove items and set prices. The owner also has access to the building's 'Investment' - money that has been added to the building and which can be used to buy items from other players when the owner is not present.

There are specific building types that act differently, these are listed in the Building Types reference section.

Scripted Buildings

You can also partially or entirely script both the interaction and regular update behaviour of buildings. (You could write a script that - for instance - doesn't bring up a UI window when the player interacts with the 'building' but instead plays a sound. Or you could make a script that means on each regular update cycle, instead of producing new items, the 'building' launches fireworks.)

Building Construction

Depending on your game type, the range of buildings on your world might be fixed - a particular layout that you've specified while creating your world - or you may allow players on your world to construct new buildings and add them to your map. There are lots of options to control what and when players can build stuff - settings to control the cost of building (in both materials and wealth), limits to the number of buildings each player can own and limits to where in the world certain buildings can be made.

Building Interiors

Buildings can have 'interiors' which are effectively submaps within the game world. These submaps are created using a separate tool which has never had much work done on it, and the interior system needs to have more stuff done to it to allow it be controllable and useful. See the Interiors Reference for more info.

world_setup/buildings_interactions.txt · Last modified: 2020/03/10 12:45 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki