Factory Core
On this page
When a FactoryCore factory sits inside a nation's claimed territory, the tax its owner pays in FactoryCore's tax system can be forwarded into that nation's treasury instead of disappearing.
Both plugins must have the integration enabled before any money moves:
# NationCore β config.yml
integration:
factory-tax:
enabled: true# FactoryCore β its own config
integration:
nation-tax:
enabled: trueThis is deliberate: neither server operator can be surprised by money suddenly appearing in a treasury.
integration:
factory-tax:
enabled: true
share-percent: 100.0
max-per-payment: 0.0
log: true| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch for accepting routed factory taxes |
share-percent |
100.0 |
Percentage of each payment banked into the owning nation's treasury (0β100, clamped). The remainder behaves exactly as before β consumed by FactoryCore |
max-per-payment |
0.0 |
Anti-abuse cap: the most a single payment may add to a treasury. 0 disables the cap |
log |
true |
Write every routed payment to the console for auditing |
Every routed payment passes through these gates on the NationCore side:
- Enabled β the operator switch must be on.
- Sane amount β positive, finite, not NaN.
- Valid location β the location exists and its world is loaded.
- Claimed land β the chunk must actually belong to a nation.
Then the amount is computed:
amount = gross Γ (share-percent / 100)
amount = min(amount, max-per-payment) # when the cap is enabled
amount = floor(amount Γ 100) / 100 # strip floating-point dustThe result is deposited into the owning nation's treasury as TAX_INCOME, with
the description Factory tax (<label>) and the payer's UUID recorded in the
ledger.
The method returns how much was actually banked β 0.0 if the integration is off,
the land is unclaimed, or any guard trips. It never throws.
All of it β the enable flag, the revenue share, the per-payment cap, the audit log β lives on the side that owns the treasury. An outdated or misbehaving FactoryCore can never move more money than the server operator has authorised.
With log: true, each routed payment produces a line like:
[FactoryTax] Routed $1,250.00 from factory 'smelter-04' into the treasury of nation 'Avalon' (payer 3f1a...).Failures to deposit are logged as warnings.
FactoryCore also participates in the land-use permit system: before it carves out a new factory region on claimed ground, it asks NationCore whether the player may build there. See Land Permit Integration.
- ApartmentCore Tax Routing β the same design, fully independent settings
- Developer API
- Treasury