Repository navigation
Creating Datapacks
Many components that make up the economy of Create: Kontor are defined using datapacks. This page shows how a datapack is built.
1. Creating the folder structure
my_kontor_pack/
├── pack.mcmeta
└── data/
└── mypack/
└── kontor/
└── market_definitions/
└── my_product.json
2. Creating 'pack.mcmeta'
{
"pack": {
"pack_format": 48,
"description": "My Kontor datapack"
}
}See https://minecraft.wiki/w/Pack_format for more info.
3. Loading the pack
Copy the folder (or a zip of it) into '/datapacks/'. Then restart your game or restart your server (/reload is not enough).
All folders live in 'data//kontor/' (see Getting started).
| Folder | What it defines |
|---|---|
raw_materials/ |
Items that have a base price and only randomly move around that base price |
group_definitions/ |
Product groups with characteristics of those products |
market_definitions/ |
Products that can be sold |
process_costs/ |
Costs of one processing step per recipe type |
legal_form_definitions/ |
Legal forms with their limits and upgrade requirements |
license_definitions/ |
Product licenses and license bundles |
bank_loan_offers/ |
Different types of loans |
File names do not matter. Only the content of the files count. To replace an already existing file from the shipped datapack or another datapack, it must have the exact same path as the original (for example data/createkontor/kontor/market_definitions/acacia_door.json).
Items that have a base price and only randomly move around that base price.
Path: raw_materials/<name>.json
{
"item": "minecraft:acacia_log",
"base_value": 1.7,
"daily_volatility": 0.01,
"reference_volume": 7000.0
}-
item: The item id of the raw material -
base_value: The base price of this raw material -
daily_volatility: How much the price moves randomly every day -
reference_volume: The daily amount of bought items above which the price rises
Product groups with characteristics of those products. A market always belongs to exactly one group.
Path: group_definitions/<name>.json
{
"id": "basic_goods",
"price_sensitivity": 3.5,
"reputation_weight": 0.3,
"cycle_sensitivity": 0.3,
"target_margin": 0.1,
"price_response": 0.12,
"capacity_response": 0.06
}-
id: The id of that product group -
price_sensitivity: How strongly customers react to price differences -
reputation_weight: How important the reputation of companies is to customers -
cycle_sensitivity: How strongly demand follows the economic cycle -
target_margin: The profit margin that the simulated competition aims for -
price_response: How fast the competition changes its prices -
capacity_response: How fast competitors enter or exit markets
Create: Kontor ships with 6 product groups:
basic_goodsbuildingfoodluxurymechanicalmetal
Products that can be sold.
Path: 'market_definitions:/.json'
{
"item": "minecraft:acacia_door",
"group": "building",
"base_demand": 3200.0,
"package_size": 6,
"target_utilisation": 0.8
}-
item: The product -
group: The ID of the group definition -
base_demand: The daily demand of the market -
package_size: The number of items in one package. The amount of packages is rolled for each request. -
target_utilisation: The utilisation that the simulated competition aims for.
Costs of one processing step per recipe type.
Path: process_costs/<name>.json
{
"id": "create:compacting",
"cost": 2.4
}-
id: A registered recipe type -
cost: The cost of executing that processing step once
Legal form definitions with their limits and upgrade requirements.
Path: legal_form_definitions/<name>.json
{
"level": 3,
"id": "limited_company",
"max_employees": 6,
"employee_salary_factor": 1.25,
"max_product_licenses": 15,
"max_open_requests_per_product": 5,
"max_open_requests_total": 30,
"max_open_orders": 40,
"max_open_contracts": 6,
"max_order_quantity": 2048,
"deadline_factor": 0.8,
"max_grid_connection": 16384,
"feed_in_license_tier": 2,
"overdraft_limit_in_dollars": 20000,
"bankloan_limit_in_dollars": 100000,
"auto_accept_requests": true,
"logistics_network": true,
"free_storage_value_in_dollars": 20000,
"founder_protection": false,
"max_shipping_exits": 3,
"max_properties": 48,
"max_power_outlets": 4,
"upgrade_requirements": {
"fee_in_dollars": 25000,
"min_net_worth_in_dollars": 20000,
"min_fulfilled_orders": 75,
"min_reputation_stars": 3.5,
"processing_ticks": 24000,
"resting_days": 7
}
}-
level: Rank of the form -
id: The ID of this form -
max_employees: The max amount of employees in this legal form -
employee_salary_factor: The multiplier on all salaries -
max_product_licenses: The max amount of product licenses -
max_open_requests_per_product: The max amount of open requests per product -
max_open_requests_total: The total max amount of open requests -
max_open_orders: The max amount of open orders -
max_open_contracts: The max amount of open contracts. Contracts are not implemented yet. -
max_order_quantity: The highest possible quantity of items in one order -
deadline_factor: The factor applied to the deadline of orders -
max_grid_connection: The max SU grid connection. This is not implemented yet. Has nothing to do with Power Outlets. -
feed_in_license_tier: The max feed in license tier. This is not implemented yet. Has nothing to do with Power Outlets. -
overdraft_limit_in_dollars: The overdraft loan limit in dollars -
bankloan_limit_in_dollars: The bank loan limit in dollars -
auto_accept_requests: Whether it is possible to auto-accept requests. This is not implemented yet. -
logistics_network: Whether the company can connect a logistics network with a logistics manager. -
founder_protection: Whether a founders protection is applied. This will soften the reputation loss for burst orders. -
max_shipping_exits: The max amount of shipping exits that can be bound to the company -
max_properties: The max amount of properties in chunks that a company can hold (rented or owned) -
max_power_outlets: The max amount of power outlets can be bound to the company -
upgrade_requirements: The requirements to upgrade to this legal form. Can be null. -
fee_in_dollars: The upgrade application fee in dollars -
min_net_worth_in_dollars: The minimum net worth required to upgrade in dollars -
min_fulfilled_orders: The minimum amount of orders that need to have been fulfilled -
min_reputation_stars: The minimum reputation of the entire company needed to upgrade (in stars from 1 to 5) -
processing_ticks: The application processing time in ticks -
resting_days: The amount of days that this application will rest before being cancelled.
For "no limit" use 2147483647.
Product licenses and license bundles.
Path: license_definitions/<name>.json
{
"id": "acacia_accessories_bundle",
"markets": [
"acacia_fence_gate",
"acacia_door",
"acacia_trapdoor",
"create:acacia_window"
],
"fee_factor": 0.8,
"daily_fraction": 0.1,
"revenue_share": 0.1,
"min_legal_level": 2
}-
id: The ID of the license -
markets: The markets that this license opens -
fee_factor: (f) Factor on the reference fee of the markets -
daily_fraction: (d) The part of the fee that is charged every day -
revenue_share: (r) The share of the revenue of every fulfilled order that has to be payed -
min_legal_level: The minimum legal level required to obtain this license
The fees are calculated with the following formulas:
daily fee = f × d × (sum of the reference fees of the markets)
application fee = multiplier × f × (sum of the reference fees)
revenue share = r × revenue of each fulfilled order
The multiplier of the application fee is set in the server config. Create: Kontor generates licenses for markets that are not covered by any other license. The translation key for the ingame name is license.createkontor.<id>. You can add translations using a resource pack (see https://minecraft.wiki/w/Resource_pack).
Different types of loans that a company can choose from.
Path: bank_loan_offers/<name>.json
{
"id": "bridging",
"free_days": 14,
"term_days": 3,
"term_surcharge": 0.002
}-
id: The id of the offer -
free_days: The amount of free days without interest and repayment -
term_days: The amount of repayment days after the free days -
term_surcharge: Surcharge on the interest rate.