Loading...
play.ccnetmc.com
Click to copy IP
Loading...
discord.gg/Xn35DhyPQq
Click to join
Avatar
Welcome to CCNet!
To join our community, please login or register!
Internet Explorer: Internet Explorer is not supported. Please upgrade to a more modern browser.
Experimental Plugin Dev Blog #6: Province Attributes
galacticwarrior9 Admin Member
36 posts
20 topics
7 days ago

Click here to read the previous dev blog (#5) - Seasons and Weather

Welcome to the sixth experimental plugin development blog, where I discuss a suite of custom plugins being developed for their own gamemode, provisionally called the "CampaignWar (CW) gamemode". Today, we discuss the latest plugin in this line, Province Attributes, and cover some changes to TownyBuildings.

Province Attributes

As mentioned in the first dev blog, the map for this gamemode is divided into provinces, each of which can have at most one town.

Attributes are modifiers to a province that can affect:
- the efficiency and output of buildings from TownyBuildings,
- crop growth and death rates,
- and the yield from block drops

Let's take a look at one:

The "Rich Coal Veins" attribute increases the drops from coal ore and the efficiency of Coal Mine buildings within the province. It is a permanent attribute, meaning it will remain with the province forever. Attributes can also be townbound, regenerating if the town inside the province is deleted, and seasonal, lasting only for a season.

Seasonal attributes like these have a chance to generate at the beginning of every season and expire when that season ends.

The types of biomes present inside a province influences which attributes are generated for it. For example, a province that consists mostly of cold biomes could expect a greater chance of generating attributes that increase coal output, while a province that consists primarily of arid biomes should expect fewer seasonal attributes that increase crop output.

Nations can set an economic policy, which is an attribute that applies to all of the provinces that it has settled.

 

Changes to TownyBuildings

Much has changed with TownyBuildings since the previous dev blog. Here is a summary of the changes:

  • Buildings now use quarters; they are no longer chunk-based.
  • Building efficiency has been changed to affect how quickly a building produces output.
  • Houses now use "happiness" instead of efficiency.
  • Buildings can now produce 'intangible' (non-item) output.

Here is a building that illustrates these changes well: the Tavern. The Tavern consumes Brewery drinks to increase the happiness of workers that live in houses within 100 blocks by 5%. This is an example of intangible output.

If we look at one of these houses, we see the Tavern boosting its happiness:

But why should you care if your workers are happy, anyway? Simply put, happiness determines how efficient the workers that live in the house are. For example, if all of the workers in a Coal Mine come from a house with 150% happiness, the mine will operate at 150% efficiency (assuming no other factors are affecting its efficiency).

The happiness of a house can fall if you undersupply it with items. For example, if a house requires 4 bread and 4 steak daily but you only supply the bread, then its base happiness will be 50%, as only 50% of the house's needs are being met.

Changes to Seasons

Winters are no longer just a display of white grass and leaves - snow will also appear where appropriate! This snow is client-sided (it doesn't actually exist on the server), meaning it won't obstruct Movecraft vehicles or disrupt the dynamic map.

 

And that’s all for this post! If you have any thoughts, feedback or concerns, feel free to reply.



Last edited: 7 days ago x 3
Francis60 Member
23 posts
11 topics
7 days ago

man this is so nice and revolutionary!



greymesa Member
20 posts
3 topics
7 days ago

3a010fe225a717e27d3bdb1e0fa7d315.png

THE CHILDREN YEARN FOR THE MINES!!!!



“The True North Strong and Free!”

Perpltxed Moderator
17 posts
3 topics
6 days ago

another banger blog post



Unexplained_ Member
1 posts
0 topics
6 days ago

Nahh who let zaify cook