F1: economia headless, dati validati, generatore di mappa e salvataggi

- Base deterministica: Money, id tipizzati, DMath, XxHash64, calendario
- 12 file dati con schemi, validatore di schema interno, validazione semantica
  e hash dei dati; viaferrea-tools validate-data
- Generatore di mappa (rilievo, mare, priority-flood, fiumi, laghi, copertura,
  giacimenti, città, hub, industrie) e viaferrea-tools genmap
- Economia: città, industrie, hub, mercato con componente mondiale, prezzi
  locali, tariffe, lavoro in sede e a piedi, trasporto locale, registro a
  partita doppia, prestiti, rating, difficoltà
- Salvataggi Brotli con rimappatura per id e hash di stato giornaliero
- viaferrea-tools simulate con KPI CSV; 45 test verdi; ADR 0002-0006

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0191R7vXgtbAvSV4V8tj8uzL
This commit is contained in:
Claude committed 2026-10-01 22:38:17 +00:00
1 parent 290a1d886c
commit 7cb98fa206
113 files changed
+12553 -23

No files matched your search

+103
View File
@@ -0,0 +1,103 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Concorrenti IA (ai.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"planning": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"personalities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"roiThreshold": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"loanShareOfCredit": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"targetsPlayer": {
"type": "boolean"
},
"buysShares": {
"type": "boolean"
},
"maintenancePolicy": {
"type": "string",
"enum": [
"economy",
"standard",
"thorough"
]
}
},
"required": [
"id",
"name_it",
"roiThreshold",
"loanShareOfCredit",
"targetsPlayer",
"buysShares",
"maintenancePolicy"
],
"additionalProperties": false
},
"minItems": 3
},
"companyNames": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 4,
"uniqueItems": true
},
"colors": {
"type": "array",
"items": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
},
"minItems": 1
}
},
"required": [
"version",
"planning",
"personalities",
"companyNames",
"colors"
],
"additionalProperties": false
}
+462
View File
@@ -0,0 +1,462 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Bilanciamento (balance.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"time": {
"type": "object",
"properties": {
"tickMs": {
"type": "integer",
"minimum": 1
},
"ticksPerDay": {
"type": "integer",
"minimum": 1
},
"daysPerMonth": {
"type": "integer",
"minimum": 1
},
"monthsPerYear": {
"type": "integer",
"minimum": 1
},
"trainClockFactor": {
"type": "number",
"minimum": 1
},
"speeds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 64
},
"minItems": 1
},
"defaultStartYear": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"tickMs",
"ticksPerDay",
"daysPerMonth",
"monthsPerYear",
"trainClockFactor",
"speeds",
"defaultStartYear"
],
"additionalProperties": false
},
"map": {
"type": "object",
"properties": {
"cellSizeM": {
"type": "number",
"minimum": 1
},
"sizesKm": {
"type": "array",
"items": {
"type": "integer",
"minimum": 8,
"maximum": 1024
},
"minItems": 1
},
"chunkCells": {
"type": "integer",
"minimum": 8,
"maximum": 256
},
"maxElevationM": {
"type": "number",
"minimum": 100
},
"noise": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"relief": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"hydrology": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"cover": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"deposits": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"towns": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"industries": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"hubs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
}
},
"required": [
"cellSizeM",
"sizesKm",
"chunkCells",
"maxElevationM",
"noise",
"relief",
"hydrology",
"cover",
"deposits",
"towns",
"industries",
"hubs"
],
"additionalProperties": false
},
"market": {
"type": "object",
"properties": {
"k": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"alpha": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"windowDays": {
"type": "integer",
"minimum": 1
},
"minPriceFactor": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxPriceFactor": {
"type": "number",
"minimum": 1
},
"ratioMin": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"ratioMax": {
"type": "number",
"minimum": 1
},
"world": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"historyDays": {
"type": "integer",
"minimum": 1
}
},
"required": [
"k",
"alpha",
"windowDays",
"minPriceFactor",
"maxPriceFactor",
"ratioMin",
"ratioMax",
"world",
"historyDays"
],
"additionalProperties": false
},
"localPrice": {
"type": "object",
"properties": {
"lambda": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxDeviation": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"epsilon": {
"type": "number",
"minimum": 0
}
},
"required": [
"lambda",
"maxDeviation",
"epsilon"
],
"additionalProperties": false
},
"industry": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"growth": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"town": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"migration": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"employment": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"localTransport": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"hubs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"tariffs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"finance": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"stockMarket": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"industryMaintenance": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
}
},
"required": [
"version",
"time",
"map",
"market",
"localPrice",
"industry",
"growth",
"town",
"migration",
"employment",
"localTransport",
"hubs",
"tariffs",
"finance",
"stockMarket",
"industryMaintenance"
],
"additionalProperties": false
}
+183
View File
@@ -0,0 +1,183 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Costruzione (construction.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"profile": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"maxGradientByTraction": {
"type": "object",
"properties": {
"steam": {
"type": "number",
"minimum": 0.001,
"maximum": 0.2
},
"diesel": {
"type": "number",
"minimum": 0.001,
"maximum": 0.2
},
"electric": {
"type": "number",
"minimum": 0.001,
"maximum": 0.2
},
"highspeed": {
"type": "number",
"minimum": 0.001,
"maximum": 0.2
}
},
"required": [
"steam",
"diesel",
"electric",
"highspeed"
],
"additionalProperties": false
},
"speedClasses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"trackClass": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"minRadiusM": {
"type": "number",
"minimum": 1
},
"costMultiplier": {
"type": "number",
"minimum": 0.1
}
},
"required": [
"trackClass",
"minRadiusM",
"costMultiplier"
],
"additionalProperties": false
},
"minItems": 1
},
"curveSpeedFactor": {
"type": "number",
"minimum": 0,
"maximum": 2
},
"costs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"crews": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"rules": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"trackWear": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"structures": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"physics": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
}
},
"required": [
"version",
"profile",
"maxGradientByTraction",
"speedClasses",
"curveSpeedFactor",
"costs",
"crews",
"rules",
"trackWear",
"structures",
"physics"
],
"additionalProperties": false
}
+161
View File
@@ -0,0 +1,161 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Contratti e grandi opere (contracts.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"generation": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"templates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"kind": {
"type": "string",
"enum": [
"connect",
"deliver",
"greatWork",
"service"
]
},
"name_it": {
"type": "string",
"minLength": 1
},
"text_it": {
"type": "string",
"minLength": 1
},
"durationYears": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1
},
"minItems": 2,
"maxItems": 2
},
"maxMinutes": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1
},
"minItems": 2,
"maxItems": 2
},
"quantity": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1
},
"minItems": 2,
"maxItems": 2
},
"lengthKm": {
"type": "array",
"items": {
"type": "number",
"minimum": 0
},
"minItems": 2,
"maxItems": 2
},
"reward": {
"type": "integer",
"minimum": 0
},
"prestige": {
"type": "integer",
"minimum": 0
},
"penalty": {
"type": "integer",
"minimum": 0
},
"minYear": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"id",
"kind",
"name_it",
"text_it",
"durationYears",
"reward",
"prestige",
"penalty",
"minYear"
],
"additionalProperties": false
},
"minItems": 1
},
"expositions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"reward": {
"type": "integer",
"minimum": 0
},
"prestige": {
"type": "integer",
"minimum": 0
}
},
"required": [
"id",
"name_it",
"reward",
"prestige"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"version",
"generation",
"templates",
"expositions"
],
"additionalProperties": false
}
+182
View File
@@ -0,0 +1,182 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Difficoltà (difficulty.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"default": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"depletionMultipliers": {
"type": "object",
"properties": {
"slow": {
"type": "number",
"minimum": 0
},
"normal": {
"type": "number",
"minimum": 0
},
"fast": {
"type": "number",
"minimum": 0
}
},
"required": [
"slow",
"normal",
"fast"
],
"additionalProperties": false
},
"presets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"initialCapital": {
"type": "integer",
"minimum": 0
},
"initialCredit": {
"type": "integer",
"minimum": 0
},
"baseInterestRate": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"constructionCostMultiplier": {
"type": "number",
"minimum": 0.1,
"maximum": 10
},
"tariffMultiplier": {
"type": "number",
"minimum": 0.1,
"maximum": 10
},
"wearMultiplier": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"marketVolatilityMultiplier": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"aiCompetitors": {
"type": "integer",
"minimum": 0,
"maximum": 16
},
"aiCapitalMultiplier": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"aiCostDiscount": {
"type": "number",
"minimum": 0,
"maximum": 0.9
},
"playerTakeover": {
"type": "string",
"enum": [
"disabled",
"ransom",
"immediate"
]
},
"takeoverRansomYears": {
"type": "integer",
"minimum": 0,
"maximum": 50
},
"bankruptcyDays": {
"type": "integer",
"minimum": 1,
"maximum": 3650
},
"publicFromStart": {
"type": "boolean"
},
"playerShareAtStart": {
"type": "number",
"minimum": 0.5,
"maximum": 1
},
"ironman": {
"type": "string",
"enum": [
"no",
"optional",
"yes"
]
},
"depletion": {
"type": "string",
"enum": [
"slow",
"normal",
"fast"
]
}
},
"required": [
"id",
"name_it",
"name_en",
"initialCapital",
"initialCredit",
"baseInterestRate",
"constructionCostMultiplier",
"tariffMultiplier",
"wearMultiplier",
"marketVolatilityMultiplier",
"aiCompetitors",
"aiCapitalMultiplier",
"aiCostDiscount",
"playerTakeover",
"takeoverRansomYears",
"bankruptcyDays",
"publicFromStart",
"playerShareAtStart",
"ironman",
"depletion"
],
"additionalProperties": false
},
"minItems": 4
}
},
"required": [
"version",
"default",
"depletionMultipliers",
"presets"
],
"additionalProperties": false
}
+233
View File
@@ -0,0 +1,233 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Ere (eras.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"eras": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"from": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"id",
"name_it",
"name_en",
"from"
],
"additionalProperties": false
},
"minItems": 4
},
"tractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"enum": [
"steam",
"diesel",
"electric",
"highspeed"
]
},
"name_it": {
"type": "string",
"minLength": 1
},
"from": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"needsElectrification": {
"type": "boolean"
}
},
"required": [
"id",
"name_it",
"from",
"needsElectrification"
],
"additionalProperties": false
},
"minItems": 1
},
"bridgeTypes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"from": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"maxSpanM": {
"type": "number",
"minimum": 1
},
"costMultiplier": {
"type": "number",
"minimum": 0.1
},
"lifeYears": {
"type": "integer",
"minimum": 1
}
},
"required": [
"id",
"name_it",
"from",
"maxSpanM",
"costMultiplier",
"lifeYears"
],
"additionalProperties": false
},
"minItems": 1
},
"tunnelLimits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"maxLengthM": {
"type": "number",
"minimum": 0
}
},
"required": [
"from",
"maxLengthM"
],
"additionalProperties": false
},
"minItems": 1
},
"trackClasses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"speedKmh": {
"type": "number",
"minimum": 10,
"maximum": 600
},
"from": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"id",
"name_it",
"speedKmh",
"from"
],
"additionalProperties": false
},
"minItems": 1
},
"signals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"from": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"price": {
"type": "integer",
"minimum": 0
}
},
"required": [
"id",
"name_it",
"from",
"price"
],
"additionalProperties": false
},
"minItems": 1
},
"electrificationFrom": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"version",
"eras",
"tractions",
"bridgeTypes",
"tunnelLimits",
"trackClasses",
"signals",
"electrificationFrom"
],
"additionalProperties": false
}
+125
View File
@@ -0,0 +1,125 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Beni (goods.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"goods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"category": {
"type": "string",
"enum": [
"bulk",
"general",
"liquid",
"perishable"
]
},
"unit": {
"type": "string",
"minLength": 1
},
"wagon": {
"type": "string",
"enum": [
"hopper",
"flat",
"tank",
"box"
]
},
"basePrice": {
"type": "integer",
"minimum": 1
},
"elasticity": {
"type": "number",
"minimum": 0,
"maximum": 3
},
"decayDaysAtStation": {
"type": "integer",
"minimum": 1
},
"era": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"town": {
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": [
"food",
"goods",
"fuel",
"construction"
]
},
"demandPerThousand": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"untilYear": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"category",
"demandPerThousand"
],
"additionalProperties": false
},
"service": {
"type": "boolean"
}
},
"required": [
"id",
"name_it",
"name_en",
"category",
"unit",
"wagon",
"basePrice",
"elasticity",
"decayDaysAtStation",
"era"
],
"additionalProperties": false
},
"minItems": 12
}
},
"required": [
"version",
"goods"
],
"additionalProperties": false
}
+241
View File
@@ -0,0 +1,241 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Industrie (industries.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"industries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"enum": [
"primary",
"processing",
"manufacturing"
]
},
"recipe": {
"type": "object",
"properties": {
"inputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"good": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"perCycle": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"good",
"perCycle"
],
"additionalProperties": false
},
"minItems": 0,
"maxItems": 4
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"good": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"perCycle": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"good",
"perCycle"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 3
}
},
"required": [
"inputs",
"outputs"
],
"additionalProperties": false
},
"cycleDays": {
"type": "integer",
"minimum": 1,
"maximum": 30
},
"capacityPerLevel": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 5,
"maxItems": 5
},
"workersPerLevel": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 5,
"maxItems": 5
},
"staffPerLevel": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 5,
"maxItems": 5
},
"storageDays": {
"type": "integer",
"minimum": 1,
"maximum": 365
},
"wearIntensity": {
"type": "number",
"minimum": 0,
"maximum": 5
},
"footprint": {
"type": "string",
"enum": [
"small",
"medium",
"large"
]
},
"placement": {
"type": "object",
"properties": {
"needs": {
"type": "string",
"enum": [
"deposit",
"forest",
"plain",
"coast",
"town",
"any"
]
},
"resource": {
"type": "string",
"enum": [
"coal",
"iron",
"stone",
"oil"
]
},
"minTownDistanceKm": {
"type": "number",
"minimum": 0,
"maximum": 50
},
"maxTownDistanceKm": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"maxInputDistanceKm": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"minTownPopulation": {
"type": "integer",
"minimum": 0
}
},
"required": [
"needs"
],
"additionalProperties": false
},
"depletable": {
"type": "boolean"
},
"era": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"upgradeCost": {
"type": "integer",
"minimum": 0
},
"spawnWeight": {
"type": "number",
"minimum": 0,
"maximum": 10
}
},
"required": [
"id",
"name_it",
"name_en",
"kind",
"recipe",
"cycleDays",
"capacityPerLevel",
"workersPerLevel",
"staffPerLevel",
"storageDays",
"wearIntensity",
"footprint",
"placement",
"depletable",
"era",
"upgradeCost",
"spawnWeight"
],
"additionalProperties": false
},
"minItems": 14
}
},
"required": [
"version",
"industries"
],
"additionalProperties": false
}
+321
View File
@@ -0,0 +1,321 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Manutenzione dei treni (maintenance.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"components": {
"type": "object",
"properties": {
"locomotive": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"failureWeight": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"wearPer100Km": {
"type": "number",
"minimum": 0,
"maximum": 10
}
},
"required": [
"id",
"name_it",
"failureWeight",
"wearPer100Km"
],
"additionalProperties": false
},
"minItems": 1
},
"car": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"failureWeight": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"wearPer100Km": {
"type": "number",
"minimum": 0,
"maximum": 10
}
},
"required": [
"id",
"name_it",
"failureWeight",
"wearPer100Km"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"locomotive",
"car"
],
"additionalProperties": false
},
"wear": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"failure": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"effects": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"interventions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"days": {
"type": "integer",
"minimum": 1
},
"costShare": {
"type": "number",
"minimum": 0,
"maximum": 2
},
"spareParts": {
"type": "integer",
"minimum": 0
},
"effect": {
"type": "string",
"enum": [
"inspection",
"service",
"overhaul",
"repair",
"replace"
]
},
"restoreTo": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"id",
"name_it",
"days",
"costShare",
"spareParts",
"effect"
],
"additionalProperties": false
},
"minItems": 6
},
"inspection": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"service": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"overhaul": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"depots": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"policies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"enum": [
"economy",
"standard",
"thorough"
]
},
"name_it": {
"type": "string",
"minLength": 1
},
"intervalFactor": {
"type": "number",
"minimum": 0.1
},
"effectFactor": {
"type": "number",
"minimum": 0.1
},
"costFactor": {
"type": "number",
"minimum": 0.1
}
},
"required": [
"id",
"name_it",
"intervalFactor",
"effectFactor",
"costFactor"
],
"additionalProperties": false
},
"minItems": 3,
"maxItems": 3
},
"intervals": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"planner": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
}
},
"required": [
"version",
"components",
"wear",
"failure",
"effects",
"interventions",
"inspection",
"service",
"overhaul",
"depots",
"policies",
"intervals",
"planner"
],
"additionalProperties": false
}
+205
View File
@@ -0,0 +1,205 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Regioni e nomi (regions.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"concessions": {
"type": "object",
"properties": {
"unlockTier": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"basePrice": {
"type": "integer",
"minimum": 0
},
"priceGrowth": {
"type": "number",
"minimum": 1
},
"maxRegions": {
"type": "integer",
"minimum": 1,
"maximum": 64
}
},
"required": [
"unlockTier",
"basePrice",
"priceGrowth",
"maxRegions"
],
"additionalProperties": false
},
"regions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"climate": {
"type": "string",
"enum": [
"temperate",
"alpine",
"coastal",
"dry"
]
},
"terrainDifficulty": {
"type": "number",
"minimum": 0.1,
"maximum": 5
},
"resources": {
"type": "object",
"properties": {
"coal": {
"type": "number",
"minimum": 0
},
"iron": {
"type": "number",
"minimum": 0
},
"stone": {
"type": "number",
"minimum": 0
},
"oil": {
"type": "number",
"minimum": 0
}
},
"required": [
"coal",
"iron",
"stone",
"oil"
],
"additionalProperties": false
},
"hubs": {
"type": "array",
"items": {
"type": "string",
"enum": [
"port",
"border"
]
},
"minItems": 0
},
"namePool": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
}
},
"required": [
"id",
"name_it",
"climate",
"terrainDifficulty",
"resources",
"hubs",
"namePool"
],
"additionalProperties": false
},
"minItems": 1
},
"namePools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"prefixes": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"roots": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 4
},
"suffixes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 2
},
"saints": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
}
},
"required": [
"id",
"prefixes",
"roots",
"suffixes",
"saints"
],
"additionalProperties": false
},
"minItems": 1
},
"industryNameTemplates": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"featureNames": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
}
},
"required": [
"version",
"concessions",
"regions",
"namePools",
"industryNameTemplates",
"featureNames"
],
"additionalProperties": false
}
+158
View File
@@ -0,0 +1,158 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Livelli della compagnia (tiers.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"ratingScale": {
"type": "array",
"items": {
"type": "string",
"enum": [
"AAA",
"AA",
"A",
"BBB",
"BB",
"B",
"CCC",
"CC",
"C",
"D"
]
},
"minItems": 10,
"maxItems": 10,
"uniqueItems": true
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"level": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"requirements": {
"type": "object",
"properties": {
"netWorth": {
"type": "integer",
"minimum": 0
},
"connectedTownsOver": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 0
},
"population": {
"type": "integer",
"minimum": 0
}
},
"required": [
"count",
"population"
],
"additionalProperties": false
},
"creditRating": {
"type": "string",
"enum": [
"AAA",
"AA",
"A",
"BBB",
"BB",
"B",
"CCC",
"CC",
"C",
"D"
]
}
},
"required": [
"netWorth",
"connectedTownsOver",
"creditRating"
],
"additionalProperties": false
},
"unlocks": {
"type": "object",
"properties": {
"maxLoanFactor": {
"type": "number",
"minimum": 0
},
"crews": {
"type": "integer",
"minimum": 1
},
"trading": {
"type": "boolean"
},
"buyIndustry": {
"type": "boolean"
},
"ipo": {
"type": "boolean"
},
"hostileTakeover": {
"type": "boolean"
},
"concessions": {
"type": "boolean"
}
},
"required": [
"maxLoanFactor",
"crews",
"trading",
"buyIndustry",
"ipo",
"hostileTakeover",
"concessions"
],
"additionalProperties": false
}
},
"required": [
"level",
"name_it",
"name_en",
"requirements",
"unlocks"
],
"additionalProperties": false
},
"minItems": 5,
"maxItems": 5
}
},
"required": [
"version",
"ratingScale",
"tiers"
],
"additionalProperties": false
}
+158
View File
@@ -0,0 +1,158 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Veicoli (vehicles.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"vehicles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"kind": {
"type": "string",
"enum": [
"locomotive",
"wagon",
"coach"
]
},
"name_it": {
"type": "string",
"minLength": 1
},
"name_en": {
"type": "string",
"minLength": 1
},
"eraFrom": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"eraTo": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
},
"powerKw": {
"type": "number",
"minimum": 0
},
"tractiveEffortKn": {
"type": "number",
"minimum": 0
},
"maxSpeedKmh": {
"type": "number",
"minimum": 1,
"maximum": 600
},
"massT": {
"type": "number",
"minimum": 0.1
},
"lengthM": {
"type": "number",
"minimum": 1,
"maximum": 60
},
"price": {
"type": "integer",
"minimum": 0
},
"runningCostPerYear": {
"type": "integer",
"minimum": 0
},
"lifeYears": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"traction": {
"type": "string",
"enum": [
"steam",
"diesel",
"electric",
"highspeed"
]
},
"components": {
"type": "object",
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 5
}
},
"capacity": {
"type": "integer",
"minimum": 1
},
"wagonType": {
"type": "string",
"enum": [
"hopper",
"flat",
"tank",
"box"
]
},
"goods": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"minItems": 1,
"uniqueItems": true
},
"paxCapacity": {
"type": "integer",
"minimum": 1
},
"class": {
"type": "string",
"enum": [
"worker",
"staff"
]
}
},
"required": [
"id",
"kind",
"name_it",
"name_en",
"eraFrom",
"maxSpeedKmh",
"massT",
"lengthM",
"price",
"runningCostPerYear",
"lifeYears",
"components"
],
"additionalProperties": false
},
"minItems": 8
}
},
"required": [
"version",
"vehicles"
],
"additionalProperties": false
}