ModBuildings: Difference between revisions

From The Colonists
Jump to navigation Jump to search
Created page with "placeholder for now - note common fields used in translation.csv Should this section be in each individual mod item type's page OR a separate translation.csv [age that lists..."
 
→JSON: add monuments to building limit entry
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
placeholder for now - note common fields used in translation.csv  
=Mod Buildings Translation.csv=
Should this section be in each individual mod item type's page OR
List of fields used in translation.csv for Buildings
a separate translation.csv [age that lists value/tables for each mod item type - and link to that mod item type??
[[ModTranslation.Csv#List_of_fields_used_for_Buildings|Buildings Translation]]<br>


== List of fields used in translation.csv for Buildings==
=Mod Buildings ui.json=
{| class="wikitable sortable"  
Note buildings need an entry in ui.json to determine the order shown. <br>
see details in [[BuildingCatModIds|Building Categories]] and [[ModUI|ui.json]] <br>
 
=JSON=
Table of main building.json entries:
{| class="wikitable sortable" style="text-align: center"
|-
! Value !! Type !! Description
|-
| typeId
| integer 
| building ID
|-
| ageComponentsDict
| array
| by level 1 to 3, see [[ModageComponentsDicts|ageComponentsDict]]
|-
| baseOffsets
| array
| building tile information - see [[ModbaseOffsets|baseOffsets]]
|-
| doesHeightRequireModulus2
| boolean
| some type of height adjustment? see [[Mods#Codex|Codex]] for Train Station
|-
| customEntranceDirections
| array
| entrance(s), alternate  to x=0,y=-1 tile
|-
|-
! ExampleEntry !!  Description
| maxAmount
| integer
| number of building limiter (used by Trading Ships, Monuments)
|-
|-
| Building_200_Name
| unitPositions
| Building Name
| array
| worker, repair, and stackbots - see [[ModUnitPositions|UnitPositions]]
|-
|-
| Building_200_Description
| requirements
| Full description of Building
| array
| unused/always empty?
|-
|-
| Building_200_Plural
| isAvailable
| Plural Building Name
| boolean
|  <font color="red"> 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 [[ModcomponentInfos|componentInfos]]
|-
| category
| integer
| Menu category for the building - see [[BuildingCatModIds]]
|-
|-
| Building_200_Worker
| Building bot/worker Name
|}
|}
=Icon=
The image file shown for the building in the game interface. <br>
image file naming convention: ''building_200_L1.png'', ''building_200_L2.png''<br>
image file should be 128x128 pixel size with transparent background<br>
Example file: [[File:Building_Bakery.png|64px|Bakery]]
=3D Models=
See [[ModsUnityAssetBundles]] for general information.<br>
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: [[File:Code Example BuildingUnitCollider.png|64px|ExampleBuildingCollider]]  <br>
<br>
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: [[File:ColliderWatchtower_Unity.png|64px|ExampleFloorCollider]]  and [[File:Unity_ColliderForUnits_Layers_R1.PNG|64px|ExampleFloorColliderLayer]] <br>
The unit will path to the top of the collider.<br>
Specific Units to use Floor Colliders can be defined in [[FloorColliderUnitIdHash]] within [[ModRender|render.json]]

Latest revision as of 15:58, 13 September 2024

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? see Codex for Train Station
customEntranceDirections array entrance(s), alternate to x=0,y=-1 tile
maxAmount integer number of building limiter (used by Trading Ships, Monuments)
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: Bakery

3D Models

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: ExampleBuildingCollider

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: ExampleFloorCollider and ExampleFloorColliderLayer
The unit will path to the top of the collider.
Specific Units to use Floor Colliders can be defined in FloorColliderUnitIdHash within render.json