ModUI: Difference between revisions
Jump to navigation
Jump to search
Stlnegril9 (talk | contribs) placeholder for change to globalStorageUISpec |
Stlnegril9 (talk | contribs) |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
The '''ui.json''' file may be used to change the game interface.<br> | The '''ui.json''' file may be used to change the game interface.<br> | ||
==JSON fields== | ==JSON fields== | ||
| Line 7: | Line 6: | ||
|- | |- | ||
! Name !! Entry !!Description | ! Name !! Entry !!Description | ||
|- | |||
| buildingWeightingsSpec | |||
| building [[Building| ID]], Weight | |||
| Defines '''order''', not the [[BuildingCatModIds|'''menu''']], of [[Building|buildings]] within each building category menu (bottom right) | |||
|- | |||
| techCategoryOrderIds | |||
| Tech [[ResearchCatModIds| category]] | |||
| Defines order of [[Construction|Research Category Panels]] in research window. <br> See also [[ResearchCatModIds|Research Cat IDs]] | |||
|- | |||
| globalStorageUISpec | |||
| category<br>entries | |||
| Defines the order and content of [[Resource|resources]] and [[Resource_Categories|'''categories''']] shown in the bottom left menu | |||
|- | |||
| buildCategorySpec | |||
| build<br>category | |||
| Defines the order and content of [[BuildingCatModIds| Build Categories]] shown in the bottom right menu | |||
|- | |||
| '''OBSOLETE''' | |||
| '''OBSOLETE''' | |||
| '''OBSOLETE''' | |||
|- | |- | ||
| constructionGridBuildingIds | | constructionGridBuildingIds | ||
| Line 14: | Line 33: | ||
| resourceCategoriesDict | | resourceCategoriesDict | ||
| id<br>itemTypeId<br>itemCategory | | id<br>itemTypeId<br>itemCategory | ||
| Defines [[ResourceCatModIds|'''grouping''']], [[Resource_Categories|'''categorisation''']], and order of [[Resource|resources]] | | Defines [[ResourceCatModIds|'''grouping''']], [[Resource_Categories|'''categorisation''']], and order of [[Resource|resources]] shown in the bottom left menu<br>id should be unique from other resources in this file<br>itemTypeId matches the value of typeId in resources.json | ||
|- | |- | ||
|} | |} | ||
* note | * note resourceCategoryId is used when resourceId=254 to refer to a [[Resource_Categories|category]] (e.g. "Food", "Luxury Food", "Fuel"), otherwise resourceCategoryId=0.<br> | ||
* note globalStorageUISpec superceded resourceCategoriesDict. Left in for history.<br> | |||
=Example JSON= | =Example JSON= | ||
<pre> | <pre> | ||
{ | { | ||
"buildingWeightingsSpec": { | |||
"buildingWeightings": [ | |||
" | |||
{ | { | ||
" | "buildingTypeId": 41, | ||
" | "weight": 100 | ||
}, | }, | ||
{ | { | ||
" | "buildingTypeId": 38, | ||
" | "weight": 200 | ||
} | } | ||
] | |||
} | |||
{ | |||
"globalStorageUISpec": { | |||
"groupSpecs": [ | |||
" | |||
{ | { | ||
" | "category": 0, | ||
" | "entries": [ | ||
{ | |||
"resourceId": 43, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 45, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 46, | |||
"resourceCategoryId": 0 | |||
} | |||
] | |||
}, | }, | ||
{ | { | ||
" | "category": 2, | ||
" | "entries": [ | ||
{ | |||
"resourceId": 12, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 254, // 254 = use Resource Group | |||
"resourceCategoryId": 2 // Simple Food Group | |||
}, | |||
{ | |||
"resourceId": 0, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 254, // 254 = use Resource Group | |||
"resourceCategoryId": 4 // Alcohol Group | |||
}, | |||
{ | |||
"resourceId": 9, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 10, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 48, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 49, | |||
"resourceCategoryId": 0 | |||
}, | |||
{ | |||
"resourceId": 254, // 254 = use Resource Group | |||
"resourceCategoryId": 3 // Luxury Food Group | |||
} | |||
] | |||
} | } | ||
] | ] | ||
} | } | ||
}, | |||
"techCategoryOrderIds": [ | "techCategoryOrderIds": [ | ||
0, | 0, | ||
| Line 84: | Line 123: | ||
4, | 4, | ||
] | ] | ||
"buildCategorySpec": { | |||
"buildCategoryIds": [ | |||
30, | |||
0, | |||
1, | |||
3, | |||
5, | |||
2, | |||
8, | |||
7, | |||
9, | |||
6, | |||
31 | |||
] | |||
} | |||
} | } | ||
</pre> | </pre> | ||
Latest revision as of 19:56, 6 April 2024
The ui.json file may be used to change the game interface.
JSON fields
| Name | Entry | Description |
|---|---|---|
| buildingWeightingsSpec | building ID, Weight | Defines order, not the menu, of buildings within each building category menu (bottom right) |
| techCategoryOrderIds | Tech category | Defines order of Research Category Panels in research window. See also Research Cat IDs |
| globalStorageUISpec | category entries |
Defines the order and content of resources and categories shown in the bottom left menu |
| buildCategorySpec | build category |
Defines the order and content of Build Categories shown in the bottom right menu |
| OBSOLETE | OBSOLETE | OBSOLETE |
| constructionGridBuildingIds | building ID | Defines order, not the menu, of buildings in the building selection (bottom right) |
| resourceCategoriesDict | id itemTypeId itemCategory |
Defines grouping, categorisation, and order of resources shown in the bottom left menu id should be unique from other resources in this file itemTypeId matches the value of typeId in resources.json |
- note resourceCategoryId is used when resourceId=254 to refer to a category (e.g. "Food", "Luxury Food", "Fuel"), otherwise resourceCategoryId=0.
- note globalStorageUISpec superceded resourceCategoriesDict. Left in for history.
Example JSON
{
"buildingWeightingsSpec": {
"buildingWeightings": [
{
"buildingTypeId": 41,
"weight": 100
},
{
"buildingTypeId": 38,
"weight": 200
}
]
}
{
"globalStorageUISpec": {
"groupSpecs": [
{
"category": 0,
"entries": [
{
"resourceId": 43,
"resourceCategoryId": 0
},
{
"resourceId": 45,
"resourceCategoryId": 0
},
{
"resourceId": 46,
"resourceCategoryId": 0
}
]
},
{
"category": 2,
"entries": [
{
"resourceId": 12,
"resourceCategoryId": 0
},
{
"resourceId": 254, // 254 = use Resource Group
"resourceCategoryId": 2 // Simple Food Group
},
{
"resourceId": 0,
"resourceCategoryId": 0
},
{
"resourceId": 254, // 254 = use Resource Group
"resourceCategoryId": 4 // Alcohol Group
},
{
"resourceId": 9,
"resourceCategoryId": 0
},
{
"resourceId": 10,
"resourceCategoryId": 0
},
{
"resourceId": 48,
"resourceCategoryId": 0
},
{
"resourceId": 49,
"resourceCategoryId": 0
},
{
"resourceId": 254, // 254 = use Resource Group
"resourceCategoryId": 3 // Luxury Food Group
}
]
}
]
}
},
"techCategoryOrderIds": [
0,
6,
4,
]
"buildCategorySpec": {
"buildCategoryIds": [
30,
0,
1,
3,
5,
2,
8,
7,
9,
6,
31
]
}
}