Overview
This will show you how to mod you’re ECO Server
How to edit stacks
Stack sizes – This is how much you are willing to let everyone carry.
ECOServer > Mods > AutoGen > Block >
Example: We will take the Coal.cs and open it up. (Wordpad, VS, Notepad++)
You will see something like this:
namespace Eco.Mods.TechTree { // [DoNotLocalize] using System; using System.Collections.Generic; using System.ComponentModel; using Eco.Gameplay.Blocks; using Eco.Gameplay.Components; using Eco.Gameplay.DynamicValues; using Eco.Gameplay.Items; using Eco.Gameplay.Objects; using Eco.Gameplay.Players; using Eco.Gameplay.Skills; using Eco.Gameplay.Systems; using Eco.Gameplay.Systems.TextLinks; using Eco.Shared.Localization; using Eco.Shared.Serialization; using Eco.Shared.Utils; using Eco.World; using Eco.World.Blocks; using Eco.Gameplay.Pipes; [Serialized] [Minable(1), Solid,Wall] public partial class CoalBlock : Block , IRepresentsItem { public Type RepresentedItemType { get { return typeof(CoalItem); } } } [Serialized] [MaxStackSize(10)] [Weight(3000)] [Fuel(10000)][Tag(“Fuel”)] [ResourcePile] [Currency] public partial class CoalItem : BlockItem<CoalBlock> { public override LocString DisplayName { get { return Localizer.DoStr(“Coal”); } } public override LocString DisplayNamePlural { get { return Localizer.DoStr(“Coal”); } } public override LocString DisplayDescription { get { return Localizer.DoStr(“A combustible mineral which when used as a fuel provides lots of energy but generates lots of pollution.”); } } public override bool CanStickToWalls { get { return false; } } private static Type[] blockTypes = new Type[] { typeof(CoalStacked1Block), typeof(CoalStacked2Block), typeof(CoalStacked3Block), typeof(CoalStacked4Block) }; public override Type[] BlockTypes { get { return blockTypes; } } } [Serialized, Solid] public class CoalStacked1Block : PickupableBlock { } [Serialized, Solid] public class CoalStacked2Block : PickupableBlock { } [Serialized, Solid] public class CoalStacked3Block : PickupableBlock { } [Serialized, Solid,Wall] public class CoalStacked4Block : PickupableBlock { } //Only a wall if it’s all 4 Coal }
What we are looking for are:
[MaxStackSize(10)] [Weight(3000)] [Fuel(10000)][Tag(“Fuel”)]
MaxStackSize = How much your willing to let someone hold. Say we set to 500. This will work with all just go into all the ones you want to edit and change StackSize.
Weight = Say we had a 500 stack weight changes to 300000.
Fuel = Is how it says, You make it last longer if you like and/or make it less. Up to you.
How to edit start player (This is everyone’s StartPlayer)
When you enter the server, you start out with a tent. Then you place the tent down you get (Stone axe, hammer, shovel, torch, torchstand, and tomatos)
To change this nav to:
ECO Server > Mods > Player > PlayerDefaults.cs
// Copyright (c) Strange Loop Games. All rights reserved. // See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using Eco.Gameplay.DynamicValues; using Eco.Gameplay.Items; using Eco.Gameplay.Players; using Eco.Mods.TechTree; using Eco.Shared.Localization; // default starting player items / skills public static class PlayerDefaults { public static Dictionary<Type, int> GetDefaultToolbar() { return new Dictionary<Type, int> { }; } public static Dictionary<Type, int> GetDefaultInventory() { return new Dictionary<Type, int> { { typeof(StarterCampItem), 1 }, { typeof(PropertyClaimItem), 4 }, }; } public static Dictionary<Type, int> GetDefaultCampsiteInventory() { return new Dictionary<Type, int> { { typeof(PropertyClaimItem), 6 }, { typeof(PropertyToolItem), 1 }, { typeof(StoneAxeItem), 1 }, { typeof(StoneShovelItem), 1 }, { typeof(StoneHammerItem), 1 }, { typeof(StonePickaxeItem), 1 }, { typeof(TorchItem), 1 }, { typeof(TorchStandItem), 1 }, { typeof(TomatoItem), 10 }, }; } public static IEnumerable<Type> GetDefaultSpecialties() { return new Type[] { typeof(SelfImprovementSkill) }; } public static IEnumerable<Type> GetDefaultSkills() { return new Type[] { typeof(CarpenterSkill), typeof(LoggingSkill), typeof(HewingSkill), typeof(MasonSkill), typeof(MiningSkill), typeof(MortaringSkill), typeof(ChefSkill), typeof(FarmerSkill), typeof(GatheringSkill), typeof(AdvancedCampfireCookingSkill), typeof(HunterSkill), typeof(HuntingSkill), typeof(SmithSkill), typeof(EngineerSkill), typeof(SurvivalistSkill), typeof(TailorSkill) }; } static Dictionary<UserStatType, IDynamicValue> dynamicValuesDictionary = new Dictionary<UserStatType, IDynamicValue>() { { UserStatType.MaxCalories, new MultiDynamicValue(MultiDynamicOps.Sum, new MultiDynamicValue(MultiDynamicOps.Multiply, CreateSmv(0f, new BonusUnitsDecoratorStrategy(SelfImprovementSkill.AdditiveStrategy, “cal”, (float val) => val/2f), typeof(SelfImprovementSkill), Localizer.DoStr(“stomach capacity”), typeof(Misc)), new ConstantValue(0.5f)), new ConstantValue(3000)) }, { UserStatType.MaxCarryWeight, new MultiDynamicValue(MultiDynamicOps.Sum, CreateSmv(0f, new BonusUnitsDecoratorStrategy(SelfImprovementSkill.AdditiveStrategy, “kg”, (float val) => val/1000f), typeof(SelfImprovementSkill), Localizer.DoStr(“carry weight”), typeof(Misc)), new ConstantValue(ToolbarBackpackInventory.DefaultWeightLimit)) }, { UserStatType.CalorieRate, new MultiDynamicValue(MultiDynamicOps.Sum, //CreateSmv(1f, SelfImprovementSkill.MultiplicativeStrategy, typeof(SelfImprovementSkill), Localizer.DoStr(“calorie cost”), typeof(Calorie)), new ConstantValue(1)) }, { UserStatType.DetectionRange, new MultiDynamicValue(MultiDynamicOps.Sum, CreateSmv(0f, HuntingSkill.AdditiveStrategy, typeof(HuntingSkill), Localizer.DoStr(“how close you can approach animals”), typeof(Misc)), new ConstantValue(0)) }, { UserStatType.MovementSpeed, new MultiDynamicValue(MultiDynamicOps.Sum, new TalentModifiedValue(typeof(NatureAdventurerTalent), 0), new TalentModifiedValue(typeof(UrbanTravellerTalent), 0)) } }; private static SkillModifiedValue CreateSmv(float startValue, ModificationStrategy strategy, Type skillType, LocString benefitsDescription, Type modifierType) { SkillModifiedValue smv = new SkillModifiedValue(startValue, strategy, skillType, benefitsDescription, modifierType); SkillModifiedValueManager.AddSkillBenefit(skillType, Localizer.DoStr(“You”), smv); return smv; } public static Dictionary<UserStatType, IDynamicValue> GetDefaultDynamicValues() { return dynamicValuesDictionary; } public static IEnumerable<Type> GetDefaultBodyparts() { return new Type[] { typeof(RoundedFaceItem), typeof(BlinkyEyelidsItem), typeof(FitTorsoItem), typeof(HumanLimbsItem), typeof(HipHopHipsItem), }; } public static IEnumerable<Type> GetDefaultClothing() { return new Type[] { typeof(BasicBackpackItem), typeof(TrousersItem), typeof(HenleyItem), typeof(NormalHairItem), typeof(TallBootsItem), typeof(SquareBeltItem), }; } }
Look for:(These are the items you start off with in the tent.)
{ typeof(PropertyClaimItem), 6 }, { typeof(PropertyToolItem), 1 }, { typeof(StoneAxeItem), 1 }, { typeof(StoneShovelItem), 1 }, { typeof(StoneHammerItem), 1 }, { typeof(StonePickaxeItem), 1 }, { typeof(TorchItem), 1 }, { typeof(TorchStandItem), 1 }, { typeof(TomatoItem), 10 },
Say we wanted to up the Claim tickets, upgrade the gear, and give different food. Also adding an item because there is one blank spot.
{ (NameItem), Amount }
You can put anything you want into there I added a 10th item. Default is 9. DO NOT GO OVER 10!
{ typeof(PropertyClaimItem), 12 },
{ typeof(PropertyToolItem), 1 },
{ typeof(SteelAxeItem), 1 },
{ typeof(SteelShovelItem), 1 },
{ typeof(SteelHammerItem), 1 },
{ typeof(SteelPickaxeItem), 1 },
{ typeof(TorchItem), 1 },
{ typeof(TorchStandItem), 1 },
{ typeof(FriedHareHaunchesItem), 20 },
{ typeof(SweetSaladItem), 20 },
Edit StockPile (As much as you carry is one slot)
Nav to:
ECO Server > Mods > Objects > StockpileObject.cs
Open this and you will see:
// Copyright (c) Strange Loop Games. All rights reserved. // See LICENSE file in the project root for full license information. namespace Eco.Mods.TechTree { using Eco.Gameplay.Components; using Eco.Gameplay.Objects; using Gameplay.Components.Auth; using Gameplay.Players; using Shared.Math; using Gameplay.Items; using Shared.Serialization; using System; using Eco.Shared.Localization; public partial class StockpileItem : WorldObjectItem<StockpileObject> { public override bool TryPlaceObject(Player player, Vector3i position, Quaternion rotation) { return TryPlaceObjectOnSolidGround(player, position, rotation); } } [Serialized] [RequireComponent(typeof(PropertyAuthComponent))] [RequireComponent(typeof(PublicStorageComponent))] [RequireComponent(typeof(StockpileComponent))] [RequireComponent(typeof(WorldStockpileComponent))] [RequireComponent(typeof(LinkComponent))] public partial class StockpileObject : WorldObject, IRepresentsItem { public static readonly Vector3i DefaultDim = new Vector3i(5, 5, 5); public override LocString DisplayName { get { return Localizer.DoStr(“Stockpile”); } } public virtual Type RepresentedItemType { get { return typeof(StockpileItem); } } protected override void OnCreate(User creator) { base.OnCreate(creator); StockpileComponent.ClearPlacementArea(creator, this.Position3i, DefaultDim, this.Rotation); } protected override void Initialize() { base.Initialize(); var storage = this.GetComponent<PublicStorageComponent>(); storage.Initialize(DefaultDim.x * DefaultDim.z); storage.Storage.AddInvRestriction(new StockpileStackRestriction(DefaultDim.y)); // limit stack sizes to the y-height of the stockpile this.GetComponent<LinkComponent>().Initialize(7); } } }
All you have to do is delete line and save:
storage.Storage.AddInvRestriction(new StockpileStackRestriction(DefaultDim.y)); // limit stack sizes to the y-height of the stockpile