ModBuildings: Difference between revisions
Stlnegril9 (talk | contribs) No edit summary |
Stlnegril9 (talk | contribs) →JSON: clarify top level requirements vs baseOffsets requirements |
||
| Line 43: | Line 43: | ||
| requirements | | requirements | ||
| array | | array | ||
| | | unused/always empty? | ||
|- | |- | ||
| isAvailable | | isAvailable | ||
| Line 70: | Line 70: | ||
|- | |- | ||
|} | |} | ||
=Icon= | =Icon= | ||
Revision as of 18:58, 28 January 2023
Mod Buildings Translation.csv
List of fields used in translation.csv for Buildings
Buildings Translation
Mod Buildings ui.json
Note buildings need an entry in ui.json to determine the order shown.
see details in Building Categories and ui.json
JSON
Table of main building.json entries:
| Value | Type | Description |
|---|---|---|
| typeId | integer | building ID |
| ageComponentsDict | array | by level 1 to 3, see ageComponentsDict |
| baseOffsets | array | building tile information - see baseOffsets |
| doesHeightRequireModulus2 | boolean | some type of height adjustment Train Station |
| customEntranceDirections | array | entrance(s), alternate to x=0,y=-1 tile |
| maxAmount | integer | number of building limiter (used by Trading Ships) |
| unitPositions | array | worker, repair, and stackbots - see UnitPositions |
| requirements | array | unused/always empty? |
| isAvailable | boolean | deprecated? used to hide buildings |
| constructionSiteIdleLoc | array | location of BuilderBot when idle |
| constructionSiteWorkerSubLocs | array | location(s) of BuilderBot when building |
| doesRequireLandOwnership | boolean | within existing player territory, always TRUE? |
| componentInfos | array | building components - see componentInfos |
| category | integer | Menu category for the building - see BuildingCatModIds |
Icon
The image file shown for the building in the game interface.
image file naming convention: building_200_L1.png, building_200_L2.png
image file should be 128x128 pixel size with transparent background
Example file:
3D Models
Github3DModels
See ModsUnityAssetBundles for general information.
For building selection. a collider should be sized appropriately, placed on Layer 9 (Content), and placed on the building top level (usually) to allow selection but not cover any resources inside the building that may need selection. See Chocolate Factory example:
For buildings that adjust unit vertical location (such as Watchtowers), a collider should be added within a sub-game object (e.g. "FloorColliderHolder_L1") for the building level and placed on Layer 8 (Floor). See:
and
The unit will path to the top of the collider.
Specific Units to use Floor Colliders can be defined in FloorColliderUnitIdHash within render.json