ModResources: Difference between revisions

From The Colonists
Jump to navigation Jump to search
No edit summary
resize image and notes on typical resource 3D model size
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Mod Resources Translation.csv'''
'''Mod Resources Translation.csv'''
== List of fields used in translation.csv for Resources==
== List of fields used in translation.csv for Resources==
[[ModTranslation.Csv|Resources Translation]]<br>
[[ModTranslation.Csv#List_of_fields_used_for_Resources|Resources Translation]]<br>
placeholder for now - note common fields used in translation.csv for Resources<br>
placeholder for now - note common fields used in translation.csv for Resources<br>
Should this section be in each individual mod item type's page OR
Should this section be in each individual mod item type's page OR
a separate translation.csv [age that lists value/tables for each mod item type - and link to that mod item type??
a separate translation.csv [age that lists value/tables for each mod item type - and link to that mod item type??


'''Mod Resources'''
=JSON=
=JSON=
Allows you to change, remove, and create resources available in the game.
Resource entries in '''resources.json''' will add or replace the base codex resources. To disable a base codex resource, change the 'isAvailable' property to false.
==Base Codex File==
Generate default files using the button in the Mod Manager window.
=Resource Spec=
==JSON fields==


{| class="wikitable sortable" style="text-align: center"  
{| class="wikitable sortable" style="text-align: center"  
Line 30: Line 15:
| Resource Unique ID
| Resource Unique ID
| 2 ([[Logs]])
| 2 ([[Logs]])
| For customIDs us a value between 200-250
| For customIDs use a value between 200-250
|-
|-
| category
| category
| Resource Category
| Resource Category
| 1  
| 1  
|  
| See [[Resource_Categories|Resource Categories ]]
|-
| isAvailable
| Available In Game
| true
| set to false to remove from game
|}
|}


==Assets==
=Icon=
 
===Icon===


image file naming convention: ''resource_200.png''
image file naming convention: ''resource_200.png''<br>
image file should be 128x128 pixel size with transparent background<br>
Example file: [[File:Resource_Logs.png|64px|Logs]]


===3D Models===
=3D Models=


[https://github.com/codebyfire/mod-content-creator Github3DModels]
[https://github.com/codebyfire/mod-content-creator Github3DModels]<br>
See [[ModsUnityAssetBundles]] for general information.<br>


==New Resources==
== Collider ==
For resource selection, a collider should be added and placed on Layer 9 (Content) and sized appropriately<br>
A typical size collider would be a ~50x50x50 cube centered at X=0,Y=25,Z=0<br>
See Examples: [[File:CodeByFire Unity Resource HitBox-Collider ExampleR2.png |128px|ExampleResourceCollider]]  and [[File:CodeByFire Unity Resource HitBox-Collider Layer9.png |128px|ExampleResourceColliderLayer]] <br>
== Model Size ==
A tile is 100 x 100, and 4 resources may be stored side-by-side in a tile.<br>
Because some buildings also use slight offsets to prevent the resource model from showing through walls, most resources are in the range of 35 x 35 to 40 x 40. <br>
=New Resources=


When creating a new resource there is an extra step to get it to appear in all the right UI locations.
When creating a new resource there is an extra step to get it to appear in all the right UI locations.


To appear in the resource panels (bottom left) amend the ''resourceCategoriesDict'' value for it in '''ui.json'''.  
To appear in the resource panels (bottom left) amend the ''globalStorageUISpec'' value for it in '''[[ModUI|ui.json]]'''.


==Notes==
=Notes=


Please note that in the codex or codebase "resources" are sometimes referred to as "items". Consider these terms interchangeable.
Please note that in the codex or codebase "resources" are sometimes referred to as "items". Consider these terms interchangeable.

Latest revision as of 14:20, 30 January 2023

Mod Resources Translation.csv

List of fields used in translation.csv for Resources

Resources Translation
placeholder for now - note common fields used in translation.csv for Resources
Should this section be in each individual mod item type's page OR a separate translation.csv [age that lists value/tables for each mod item type - and link to that mod item type??

JSON

Field Description Example Notes
typeId Resource Unique ID 2 (Logs) For customIDs use a value between 200-250
category Resource Category 1 See Resource Categories
isAvailable Available In Game true set to false to remove from game

Icon

image file naming convention: resource_200.png
image file should be 128x128 pixel size with transparent background
Example file: Logs

3D Models

Github3DModels
See ModsUnityAssetBundles for general information.

Collider

For resource selection, a collider should be added and placed on Layer 9 (Content) and sized appropriately
A typical size collider would be a ~50x50x50 cube centered at X=0,Y=25,Z=0
See Examples: ExampleResourceCollider and ExampleResourceColliderLayer

Model Size

A tile is 100 x 100, and 4 resources may be stored side-by-side in a tile.
Because some buildings also use slight offsets to prevent the resource model from showing through walls, most resources are in the range of 35 x 35 to 40 x 40.

New Resources

When creating a new resource there is an extra step to get it to appear in all the right UI locations.

To appear in the resource panels (bottom left) amend the globalStorageUISpec value for it in ui.json.

Notes

Please note that in the codex or codebase "resources" are sometimes referred to as "items". Consider these terms interchangeable.