ATTENTION! The process of updating WiKi to version Eco 10.x has begun. Those wishing to participate can find out more Information on our ECO Contribution Wiki Discord.

Home Décor Modding

From Eco - English Wiki

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)
        }
    }
}