Page:
Modders_Infrastructures
3
Modders_Infrastructures
Arthur Poulet edited this page 2022-07-08 00:18:11 +02:00
Table of Contents
Infrastructures
Infrastructures are defined in blueprints/infrastructures/
.
Files are named <anything>.yaml
.
They validate have the following format:
items:
[infrastructurename]: (uniq)
title: <string>
description: <string>
build:
start: <Float>
duration: <Function>
costs: <Functions
prods: <Functions>
wastes: <Functions>
stores: <Functions>
consumes: <Function>
manpower:
min: <Function>
optimal: <Function>
field | type | usage |
---|---|---|
infrastructurename | an uniq identifier among all other item used internaly by the game | |
title | string | shown on the interface |
description | string | shown on the interface when needed |
build | object | used to define requirements and how to build it |
build.start | how much % of the cost must be paid upfront starting the first day of the construction | |
build.duration | Function | how much time it takes to have the infrastructure working at 100% depending on the tier |
build.costs | Functions | how much resources the construction costs on total if everything goes as planned. One Function by resource. |
consumes | Functions | required resources each tick. actually it is an accumulator, each tier adding it. it will be changed to a total value. same for the next fields. One Function by resource. |
prods | Functions | how much resources will be outputed if there is enough storage available. One Function by resource. |
wastes | Functions | how much resources will be outputed depending on the actual prods rate. One Function by resource. |
stores | Functions | how much resources can be stored. this is summed and shared on the whole planet. One Function by resource. |
manpower.min | Function | how much manpower is required to produce something and store something. |
manpower.optimal | Function | how much manpower is optimal to produce something and store something. |
manpower.max | Function | how much manpower maximum can be attributed to this infrastructure. |
Function
Functions is an object defined by:
id1: <Function>
id2: <Function>
...
One Function is defined as such:
function: <linear, polynome, square, log, standard_manpower>
coefs:
[id1]: <Float>
[id2]: <Float>
[id3]: <Float>
Linear
- coefs:
a, b
- equation:
f(x) = ax + b
Polynome
- coefs:
a, b, c, d, ...
- equation:
f(x) = ax^0 + bx^1 + cx^2 + ...
- note: coefs are not limited, they are alphabeticaly sorted. you can put any polynom whatever the power (until you break the proc).
Square
- coefs:
a, base, b
- equation:
f(x) = a * (x + b)**base + c
Log
- coefs:
a, base, b, c
- equation:
f(x) = a * log(base, x + b) + c
standard_manpower
not implemented yet, probably a simple log(1, 2, optimal, 1)