Settlement Concept
This is a settlement concept as I (PeterW) currently would like to see it implemented. It already contains a lot of ideas from other people, and I fully expect it to see a lot of updates when people think up better solutions. There even are sections marked as "ideas!" where I feel substantial improvements will be necessary in order to reach a good solution.
Feedback is therefore obviously highly welcome. But please put it into the forum, so this document can stay consistent. I will try to update it whenever I feel that we have reached consensus on an issue.
Buildings
Buildings are the main strategic game element of Clonk. This means they shape how the game will shake out in the long run. Buildings should be designed so they are static until destruction, which should typically take considerable effort.
Construction
Constructing a building requires the Clonk to use a construction hammer. When the hammer gets activated where it is possible to perform a construction, it shows a menu above the Clonk, showing the building categories (production, structural, repair)
When a category gets selected, it takes the menu to the building list. When the mouse is over a building, it automatically shows a preview of the building. If the construction is possible at the current location, the preview will be a picture of the building as it would look like after construction, with a green color. Otherwise, it is shown at the Clonk's location, using a red color.
Some buildings might have construction aids that are shown alongside the preview (say, a preview of the shaft for the elevator, so you tell whether you will hit granite).
Each building requires free space in order to build it, meaning that its face should not be covered be "too many" solid pixels or another building of the same plane. Additionally, some buildings might add further constraints (structural buildings, see below). When it is not possible to construct a building at the Clonk's current location, a best effort should be made to find a close location where the structure can indeed be built. Where no special rules apply, this could be implemented as simply trying out construction sites in a given radius (say, 5 pixels). This should be visible in the preview.
Construction Material (ideas!)
Ideas:
- Get from lorry
- Scratch the idea, just make player buy all buildings
Construction Process (ideas!)
Ideas:
- Construction works automatically (magic!)
- Have NPC Clonks build it :x
- Enemies should be able to cancel it, though.
Destruction
A building gets "damaged" by:
- explosions
- lightning
- sparks from burning objects (TODO: we need a fire concept!)
After a certain threshold damage is reached, the building starts burning. Whenever a building receives damage, a message is shown detailing how much more damage the building will be able to absorb (in relation to the building's total health).
When a building burns, it changes definition to a "ruin" building variant. While it burns, it itself damages buildings that are close to it, by emitting sparks. Therefore a fire might "spread". (Not sure on this one)
A ruin will automatically stop burning after it has burnt down to half its health. At this point, it won't catch fire anymore, but lightening or explosions will cause the ruin to be destroyed instantly.
Once a ruin has been extinguished, it can be rebuild for half the price required to build the complete structure. This applies even if the construction was extinguished before burning down to half its health.
Production Buildings
Production buildings are about giving the settlement access to certain types of items or vehicles. Each production building should cover one class of items or vehicles.
They are not defensive buildings, and therefore do nothing to protect Clonks or themselves. They might burn down quickly, have no fundament and don't provide an interior for Clonks to hide.
They also don't act as storages or transport, as it is the function of vehicles. Production buildings will only ever contain a bounded amount of items for the sole purpose of performing
Function
There are two ways to produce an item or a vehicle: Either by providing the raw materials required, or by buying it for an amount of gold. The latter requires the building to be currently owned by the player's team.
Both the amount of gold required for buying as well as the amount of raw materials required for building may depend on the item/vehicle to be produced. Note however that the variety of raw materials used in each production building should be kept low. For example, the chemical lab should only accept sulphur and coal (just skip the intermediate steps from CR). Some production buildings might actually require material classes like "fuel" (coal/wood/oil).
There are two ways to provide a building with the raw materials required for a production:
- Throw the material into a collection zone.
- Drag & drop from the inventory or a lorry
Both methods should ignore any material that is not a raw material used by the building. Each building should be able to store up to 20 items of each material. Surplus material doesn't get accepted. It should be visible from the outside how much raw material of each type a production building currently has.
As long as a product is select, production will start automatically whenever there is enough raw material. The production building then enters a production state that might take some time to finish. The time may depend on the type of item being produced.
After production, a produced item or vehicle is either:
- Placed into a container in front of the production building (preferred)
- Dropped in front of the building
User Interface
Each production building has a production menu that is shown as an overlay above the building once a Clonk approaches it.
Most prominently, the production menu should show a list of the available product types as well as an "idle" setting. This should take the form of a menu. If there is a currently selected product, it should be app appropriately highlighted in the menu. If no product is selected, the "idle" icon should be highlighted. Clicking on a product type that is not currently selected makes it the new selection. Clicking on a currently selected product again attempts to buy it. Clicking on the "idle" icon deactivates any production.
Furthermore, the menu must show the raw materials required for the production. This should take the form of a separate row in the production menu, showing all raw material types the building can consume. Each one should be annotated with a caption in the form of "X/Y" where X is the number of raw objects currently present and Y is the number of raw objects required to start production. Note that Y might be 0, in which case the object in question is not required for the selected product, but for other possible products of the building.
Lastly, the menu should show the cost of the object in gold. This could be hidden when the player's does not currently own the production building.
Ideas & Notes
- Exploration: Need a way to find out about stuff *before* you produce it. Mousing over unselected product types could semi-highlight them, show production cost and maybe some info text. Not much a fan of tooltips, need to think about where to place them.
- Automatically getting stuff out of lorries might be a bit too much. We don't really want production buildings to empty lorries while they are pushed through. Two fixes that don't kill the system:
- Ignore lorries that aren't currently standing
- Allow to "unselect" product by clicking somewhere neutral in the production menu
- Take over the traditional diagonal item exits? I find them cumbersome.
Structural Buildings
The objective of structural buildings is to give the owner a passive advantage where they were built.
Walls
The basis structural building is a wall. Most other structural buildings require an existing wall, and are removed once the wall burns down.
When a wall gets built close to another wall, its construction site will automatically be aligned with the existing wall. If the new construction site is invalid (e.g. not enough space) it is not possible to construct a wall at the given location. The construction preview should reflect this appropriately.
When a wall finishes construction, it might automatically gain a number of additional features:
- A solid roof
- A fundament, if there is no wall below it
- If there is no wall on either side: Two doors left and right
- If there is one wall on either side: The feature of the existing wall is moved. No additional feature is added.
Fundaments
Fundaments are what is created under a wall when there is no other wall
Side Features
These features can be added to the left and right sides of walls. When there is a wall right next to another wall, the left feature of one wall counts as the right feature of the other.
- Wall: Solid wall
- Door: Solid wall with an opening that is normally blocked by a "door" object. It will open automatically when a friendly Clonk gets close, and will close automatically when an enemy Clonk is close. The door object can be destroyed separately.
- Drawbridge: Solid wall that can be rotated as a whole.
... to be continued ...