Skip to content

2. How to create a resource

Jan Bureš edited this page Dec 15, 2023 · 2 revisions
  1. Fork the dev branch of this repo
  2. Place your new resources in one of the patch files located in plugin_template/patches/ : gasses.patch, liquids.patch or solids.patch
  3. Add your new resource following this syntax:
@new("ResourceName") // Resource name; e.g. "Oxygen"
:resources {
    displayNameKey: "Path/of/the/localization/string"; // Resource name localization key; e.g. "Resource/DisplayName/Oxygen"
    abbreviationKey: "Path/of/the/localization/string"; // Resource abbreviation localizaion key; e.g. "Resource/Abbreviation/O2"
    isTweakable: true; // TBD
    isVisible: true; // TBD
    massPerUnit: 1; // The mass per unit of resource
    volumePerUnit: 4; // The volume per unit of resource
    specificHeatCapacityPerUnit: 920; // The specific heat per unit of resource
    flowMode: $FM_STAGE_PRIORITY_FLOW; // The flow behaviour of this resource
    transferMode: $TM_PUMP; // The transfer behaviour of this resource
    costPerUnit: 0.8; // Unused: How much one unit costs
    NonStageable: true; // TBD
    resourceIconAssetAddress: "Addressables/path/for/resource/icon.png"; // The addressables address for the resources icon; e.g. "Assets/CR_ICO_Oxygen.png"
    fxFuelType: "Pressurized"; // TBD
}
  1. Add localizaion keys you defined earlier and their values to the localization file located here: /plugin_template/localizations/. English is mandatory, other languages optional
  2. Submit a PR against the dev branch of this repository
Clone this wiki locally