Home Décor Modding
NOTE: The modding system is under heavy development. APIs are expected to change, which may break existing mods! Feel free to update any information on this wiki that is out of date.
Ecko Statue Modding Tutorial[edit | edit source]
Starting in version 9.4 you can adjust the values of housing décor items from the new UserCode overrides and partial hook systems. This introductory is an tutorial into the new WorldObject housing item mod features and will help teach through modding a core object using partials to reduce the SkillValue of the Ecko statue by half.
Tools required for this tutorial
- A text editor/IDE
Adjusting the default Housing Décor values[edit | edit source]
Starting in version 9.4 the mods directory is split up into two parts a __core__ folder and a UserCode folder. __core__ contains the base objects and files created by the Eco team. For this tutorial we will be working out of the new UserCode directory. This folder is guaranteed to not change across server updates.
To start we will create a EckoStatue.cs file in our UserCode directory and populate it with a base partial class for the game's Ecko Statue with our ModsPreInitialize hook to access the HomeValue object.
namespace Eco.Mods.TechTree
{
// Partial class extending the built in __core__ mod EckoStatue class
public partial class EckoStatueObject
{
partial void ModsPreInitialize()
{
EckoStatueItem.HomeValue.SkillValue = 50; // Accesses the SkillValue of the Ecko Statue and reduces it by half its normal value (Default: 100)
}
}
}