ModComponent
ModComponent is an infrastructure library for modding The Long Dark by Hinterland Studio Inc.
This library itself does not provide or change any game items or game mechanics, but rather provides a framework for mods to make it easier to create new items and mechanics and integrate them properly into the game.
Why Is This Even Required?
Any new game item must be configured in a specific way or it won’t work with the already existing logic in the game. E.g. any consumable food item is expected to define its number of calories in a specific Component carrying a specific field. If that component is not present or does not have that field, the game will not recognize the item as consumable food.
There are also numerous functions that operate on the game’s items and some of them would simply ignore any new item, because of the way they were written. Using Harmony those methods can be “patched” to make them aware of new items and allow proper results.
This must be done for food, tools, weapons, etc. and each of those types of items needs different patches and different components. Figuring this out is often not easy and can take a lot of time and trial-and-error. Instead of having every modder doing this, I decided to create ModComponent to do the integration only once and then provide a (rather simple) API for others to use.
Ideally this will also decouple mods that use ModComponent from the internal working of TLD, so that changes in Hinterland’s code would only need to be addressed in ModComponent and not in the actual mods themselves (repair one, fix all)
Contents
Feature Explanations
Lists
Developer Pages
Component JSON Documentation
Basic Information about Components
Generic Component Documentation
Body Harvest Component Documentation
Charcoal Component Documentation
Clothing Component Documentation
Cookable Component Documentation
Cooking Pot Component Documentation
Collectible Component Documentation
Explosive Component Documentation
First Aid Component Documentation
Generic Equippable Component Documentation
Liquid Component Documentation
Powder Component Documentation
Purification Component Documentation
Random Item Component Documentation
Random Weighted Item Component Documentation
Research Component Documentation
Behaviour JSON Documentation
Basic Information about Behaviours
Accelerant Behaviour Documentation
Burnable Behaviour Documentation
Carrying Capacity Behaviour Documentation
Evolve Behaviour Documentation
Firestarter Behaviour Documentation
Harvestable Behaviour Domentation
Millable Behaviour Documentation
Repairable Behaviour Documentation
Sharpenable Behaviour Documentation