-
Notifications
You must be signed in to change notification settings - Fork 4
Home
ModComponent is an infrastructure mod for The Long Dark by Hinterland Games Studio, Inc.
This mod itself does not provide or change any game items or game mechanics, but rather provides a framework for other mods to make it easier to create new items and mechanics and integrate them properly into the game.
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 games 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 everyone 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 providing 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 be needed to be addressed in ModComponent and not in the actual mods themselves.