In the previous dev blogs (#1 and #2), I introduced CampaignWar, a custom war plugin in development that is designed for its own gamemode. But this gamemode is not only about testing changes to conflict. Whereas CampaignWar overhauls how wars are fought, another custom plugin – TownyBuildings – seeks to give a purpose to building inside towns.
Overview
At the highest level of abstraction, TownyBuildings could be thought of as “Movecraft but for buildings”. This comparison is not entirely accurate, but neatly captures the general concept: player-built structures - given some time, and so long as they satisfy certain (generous) block requirements¹ - can be converted into functional structures that have some utility.
Fundamentally, buildings take input items and transform them into some form of output. This output could be other items, the unlocking of mechanics for the town, or modifiers for nearby buildings. Most buildings can be upgraded to a higher level, improving their output. Naturally, higher level buildings require more blocks and time to build.
Some buildings can choose from different production methods, which change their input and output. For example, a higher-tier production method might increase output at the cost of more expensive input.
Production Buildings
Production buildings produce items from input items. Several production buildings require a resource to be ‘discovered’ in the town. Resources are surveyed on a chunk-by-chunk basis, and the building must be created on the chunk the resource was discovered on. Of course, the type of resource discovered is influenced by the biome of the chunk, e.g. oil is found most frequently in desert chunks.
Each discovered resource also has a random ‘size’, which determines the maximum level that the building can reach. For example, a Coal Mine building built on a size 10 Coal Deposit can be upgraded up to level 10.
This Coal Mine does not have enough workers, so its efficiency will suffer.
‘Efficiency’ determines how much of the production building’s capacity is utilised. A building running at 50% efficiency consumes half the input items and produces half the output items compared to one operating at 100% efficiency. Efficiency has two main determinants: modifiers from nearby buildings, and how many virtual ‘workers’ it has employed. For instance, if a building has only half the required workers, it will operate at 50% efficiency.
House Buildings
Buildings need workers, but where do they come from? The answer is houses, and their production methods determine how many and what class of workers live inside them. There are three classes of workers, divided by wealth. Low wealth workers will be content with basic foodstuffs such as bread, whereas higher wealth workers will demand more ‘’luxuries” such as sugar. Under-supplied houses can still hold workers, although their maximum capacity will suffer.
Utility Buildings
Not all buildings produce items - utility buildings instead unlock a mechanic for the town or have some other function. Several probable implementations include:
- A “Watchtower”, which detects nearby hostile players
- A “Tavern”, which consumes Brewery drinks to increase the capacity of nearby houses
- A “Bastion”, which strengthens a town’s citadel plots
- A “Naval Base”, which a town requires before warships can be piloted inside its province
- A “Barracks”, which allows defenders to teleport to the town if its province is under attack (similar to a CampaignWar FOB). Capturing this building may be a strategic objective for attackers.
Interfaces
We get it - commands are clunky. So we’ve created an extensive network of GUIs to help you navigate the plugin, some of which you have seen in this post. Moreover, every building has an NPC which you can right-click to open its management menu.
Conclusion
What you have seen here is an early preview of the plugin. The list of buildings that will be available has not been finalised, and the plugin’s progression aspect is still being designed. Regarding the latter, it is probable that buildings will be involved in levelling up a town.
If you have any feedback or concerns about the plugin so far, don’t hesitate to reply to this thread with them. Feel free to share building suggestions in the replies too.
¹ When initially constructing a building on a plot, the plugin will scan and count all blocks that are above a certain height inside it. Afterwards, you can assign more plots to the building. Blocks in these plots will also be counted when the plugin decides whether a building meets the requirements to upgrade.
Last edited: 4 months ago x 3