How to edit stack sizes for items with and without a MaxStackSize and all 3 ramps Dirt/Stone/Asphalt

Due to human (non-bot) spam the first contribution of a user has to be reviewed and activated manually, all further contributions do not require this.
As long as a user does not have at least one reviewed and activated contribution, the user is unable to edit his profile, set a avatar, title picture or a signature.
  • So I just wanted to put this out there for people making stack size mods or simply adjusting stack sizes on your personal server. If you have an item that does not have [MaxStackSize(xxx)] you can add it to the item to create bigger stack sizes. I.E.

    THIS ALSO WORKS FOR DIRT/STONE/ASPHALT RAMPS

    you just have to edit the correct file

    This is what a normal PlantFiber.cs looks like:

    PlantFiber.cs

    // Copyright (c) Strange Loop Games. All rights reserved.

    // See LICENSE file in the project root for full license information.

    // <auto-generated />

    namespace Eco.Mods.TechTree

    {

    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.Core.Items;

    using Eco.World;

    using Eco.World.Blocks;

    using Eco.Gameplay.Pipes;


    [Serialized]

    [LocDisplayName("Plant Fibers")]

    [Compostable]

    [Weight(10)]

    [Fuel(100)][Tag("Fuel")]

    [Yield(typeof(PlantFibersItem), typeof(GatheringSkill), new float[] { 1f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f })]

    [Currency]

    [Ecopedia("Items", "Products", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]

    [Tag("NaturalFiber", 1)]

    [Tag("Burnable Fuel", 1)]

    public partial class PlantFibersItem :

    Item

    {

    public override LocString DisplayDescription { get { return Localizer.DoStr("Harvested from a number of plants, these fibers are useful for a suprising number of things."); } }

    }

    }

    And what a modded PlantFiber.cs would look like:

    Modded PlantFiber.cs

    // Copyright (c) Strange Loop Games. All rights reserved.

    // See LICENSE file in the project root for full license information.

    // <auto-generated />

    namespace Eco.Mods.TechTree

    {

    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.Core.Items;

    using Eco.World;

    using Eco.World.Blocks;

    using Eco.Gameplay.Pipes;


    [Serialized]

    [LocDisplayName("Plant Fibers")]

    [Compostable]

    [MaxStackSize(100)] <----------------------------------- [THIS IS WHAT HAS BEEN ADDED]

    [Weight(10)]

    [Fuel(100)][Tag("Fuel")]

    [Yield(typeof(PlantFibersItem), typeof(GatheringSkill), new float[] { 1f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f })]

    [Currency]

    [Ecopedia("Items", "Products", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]

    [Tag("NaturalFiber", 1)]

    [Tag("Burnable Fuel", 1)]

    public partial class PlantFibersItem :

    Item

    {

    public override LocString DisplayDescription { get { return Localizer.DoStr("Harvested from a number of plants, these fibers are useful for a suprising number of things."); } }

    }

    }

    Some .cs files have two sections with this area

    Main Area You Edit

    [Serialized]

    [LocDisplayName("Plant Fibers")]

    [Compostable]

    [MaxStackSize(100)]

    [Weight(10)]

    [Fuel(100)][Tag("Fuel")]

    [Yield(typeof(PlantFibersItem), typeof(GatheringSkill), new float[] { 1f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f })]

    [Currency]

    [Ecopedia("Items", "Products", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]

    [Tag("NaturalFiber", 1)]

    [Tag("Burnable Fuel", 1)]

    public partial class PlantFibersItem :

    Item

    {

    One example being CornSeed.cs

    CornSeed.cs

    // Copyright (c) Strange Loop Games. All rights reserved.

    // See LICENSE file in the project root for full license information.

    // <auto-generated />

    namespace Eco.Mods.TechTree

    {

    using System.Collections.Generic;

    using Eco.Gameplay.Blocks;

    using Eco.Core.Items;

    using Eco.Gameplay.Components;

    using Eco.Gameplay.DynamicValues;

    using Eco.Gameplay.Items;

    using Eco.Gameplay.Items.SearchAndSelect;

    using Eco.Gameplay.Skills;

    using Eco.Gameplay.Systems;

    using Eco.Gameplay.Systems.TextLinks;

    using Eco.Mods.TechTree;

    using Eco.Shared.Localization;

    using Eco.Shared.Serialization;

    using Eco.Shared.Utils;

    using Eco.World;

    using Eco.World.Blocks;

    using Gameplay.Players;

    using System.ComponentModel;

    [Serialized]

    [LocDisplayName("Corn Seed")]

    [Weight(50)]

    [StartsDiscovered]

    [Tag("Crop Seed", 1)]

    public partial class CornSeedItem : SeedItem

    {

    static CornSeedItem() { }

    private static Nutrients nutrition = new Nutrients() { Carbs = 0, Fat = 0, Protein = 0, Vitamins = 0 };

    public override LocString DisplayDescription { get { return Localizer.DoStr("Plant to grow corn."); } }

    public override LocString SpeciesName { get { return Localizer.DoStr("Corn"); } }

    public override float Calories { get { return 0; } }

    public override Nutrients Nutrition { get { return nutrition; } }

    }


    [Serialized]

    [LocDisplayName("Corn Seed Pack")]

    [Category("Hidden")]

    [Weight(50)]

    public partial class CornSeedPackItem : SeedPackItem

    {

    static CornSeedPackItem() { }

    public override LocString DisplayDescription { get { return Localizer.DoStr("Plant to grow corn."); } }

    public override LocString SpeciesName { get { return Localizer.DoStr("Corn"); } }

    }

    [RequiresSkill(typeof(FarmingSkill), 1)]

    public class CornSeedRecipe : RecipeFamily

    {

    public CornSeedRecipe()

    {

    this.Initialize(Localizer.DoStr("Corn Seed"), typeof(CornSeedRecipe));

    this.Recipes = new List<Recipe>

    {

    new Recipe(

    "CornSeed",

    Localizer.DoStr("Corn Seed"),

    new IngredientElement[]

    {

    new IngredientElement(typeof(CornItem), 1, typeof(FarmingSkill), typeof(FarmingLavishResourcesTalent)),

    },

    new CraftingElement<CornSeedItem>()

    )

    };

    this.LaborInCalories = CreateLaborInCaloriesValue(20, typeof(FarmingSkill), typeof(CornSeedRecipe), this.UILink());

    this.CraftMinutes = CreateCraftTimeValue(typeof(CornSeedRecipe), this.UILink(), 1, typeof(FarmingSkill), typeof(FarmingFocusedSpeedTalent), typeof(FarmingParallelSpeedTalent));

    this.Initialize(Localizer.DoStr("Corn Seed"), typeof(CornSeedRecipe));

    CraftingComponent.AddRecipe(typeof(FarmersTableObject), this);

    }

    }

    }

    2 Mal editiert, zuletzt von dadycupcakes (19. September 2020 um 23:15)

  • I'm pretty sure you only need to add the max stack size under the first one but if that doesn't work try putting it under both which is what I have done.

    Modded CornSeed.cs

    // Copyright (c) Strange Loop Games. All rights reserved.

    // See LICENSE file in the project root for full license information.

    // <auto-generated />

    namespace Eco.Mods.TechTree

    {

    using System.Collections.Generic;

    using Eco.Gameplay.Blocks;

    using Eco.Core.Items;

    using Eco.Gameplay.Components;

    using Eco.Gameplay.DynamicValues;

    using Eco.Gameplay.Items;

    using Eco.Gameplay.Items.SearchAndSelect;

    using Eco.Gameplay.Skills;

    using Eco.Gameplay.Systems;

    using Eco.Gameplay.Systems.TextLinks;

    using Eco.Mods.TechTree;

    using Eco.Shared.Localization;

    using Eco.Shared.Serialization;

    using Eco.Shared.Utils;

    using Eco.World;

    using Eco.World.Blocks;

    using Gameplay.Players;

    using System.ComponentModel;

    [Serialized]

    [LocDisplayName("Corn Seed")]

    [MaxStackSize(100)] <----------------------------------- [THIS IS WHAT HAS BEEN ADDED]

    [Weight(50)]

    [StartsDiscovered]

    [Tag("Crop Seed", 1)]

    public partial class CornSeedItem : SeedItem

    {

    static CornSeedItem() { }

    private static Nutrients nutrition = new Nutrients() { Carbs = 0, Fat = 0, Protein = 0, Vitamins = 0 };

    public override LocString DisplayDescription { get { return Localizer.DoStr("Plant to grow corn."); } }

    public override LocString SpeciesName { get { return Localizer.DoStr("Corn"); } }

    public override float Calories { get { return 0; } }

    public override Nutrients Nutrition { get { return nutrition; } }

    }


    [Serialized]

    [LocDisplayName("Corn Seed Pack")]

    [Category("Hidden")]

    [MaxStackSize(100)] <----------------------------------- [THIS IS WHAT HAS BEEN ADDED]

    [Weight(50)]

    public partial class CornSeedPackItem : SeedPackItem

    {

    static CornSeedPackItem() { }

    public override LocString DisplayDescription { get { return Localizer.DoStr("Plant to grow corn."); } }

    public override LocString SpeciesName { get { return Localizer.DoStr("Corn"); } }

    }

    [RequiresSkill(typeof(FarmingSkill), 1)]

    public class CornSeedRecipe : RecipeFamily

    {

    public CornSeedRecipe()

    {

    this.Initialize(Localizer.DoStr("Corn Seed"), typeof(CornSeedRecipe));

    this.Recipes = new List<Recipe>

    {

    new Recipe(

    "CornSeed",

    Localizer.DoStr("Corn Seed"),

    new IngredientElement[]

    {

    new IngredientElement(typeof(CornItem), 1, typeof(FarmingSkill), typeof(FarmingLavishResourcesTalent)),

    },

    new CraftingElement<CornSeedItem>()

    )

    };

    this.LaborInCalories = CreateLaborInCaloriesValue(20, typeof(FarmingSkill), typeof(CornSeedRecipe), this.UILink());

    this.CraftMinutes = CreateCraftTimeValue(typeof(CornSeedRecipe), this.UILink(), 1, typeof(FarmingSkill), typeof(FarmingFocusedSpeedTalent), typeof(FarmingParallelSpeedTalent));

    this.Initialize(Localizer.DoStr("Corn Seed"), typeof(CornSeedRecipe));

    CraftingComponent.AddRecipe(typeof(FarmersTableObject), this);

    }

    }

    }

    2 Mal editiert, zuletzt von dadycupcakes (19. September 2020 um 23:16)

  • Now for the ramps, You need to edit a file called Roads.cs Which can be found in this location: C:\Program Files (x86)\Steam\steamapps\common\Eco Server\Mods\Items

    There are 3 sections you need to edit 1 for each type of ramp as seen below

    Modded Roads.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 System.ComponentModel;

    using Eco.Core.Items;

    using Eco.Gameplay.GameActions;

    using Eco.Gameplay.Interactions;

    using Eco.Gameplay.Items;

    using Eco.Gameplay.Objects;

    using Eco.Mods.TechTree;

    using Eco.Shared.Localization;

    using Eco.Shared.Math;

    using Eco.Shared.Serialization;

    using Eco.World;

    using Eco.World.Blocks;

    namespace Eco.Mods.TechTree

    {

    [Road(1.2f)]

    public partial class StoneRoadItem { }

    [Road(1.4f), ConstructWithoutTool(false)] //Asphalt, unlike stone road and dirt road, DOES need a hammer to place, so undo the [ConstructWithoutTool] value set by parents.

    public partial class AsphaltConcreteItem { }

    }

    [Serialized]

    public abstract class BaseRampObject : WorldObject

    {

    // No UI

    public override InteractResult OnActInteract(InteractionContext context)

    {

    return InteractResult.NoOp;

    }

    }

    [Serialized]

    public class DirtRampObject : BaseRampObject

    {

    public override LocString DisplayName { get { return Localizer.DoStr("Dirt Ramp"); } }

    private DirtRampObject() { }

    }

    [Serialized]

    [LocDisplayName("Dirt Ramp")]

    [ItemGroup("Road Items")]

    [Tag("Road")]

    [Tag("Constructable")]

    [Ecopedia("Blocks", "Roads", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]

    [MaxStackSize(100)] <----------------------------------- [THIS IS WHAT HAS BEEN ADDED]

    [Weight(60000)]

    public class DirtRampItem : RampItem<DirtRampObject>

    {

    public override LocString DisplayDescription { get { return Localizer.DoStr("4 x 1 Dirt Ramp."); } }

    public override Dictionary<Vector3i, Type[]> BlockTypes { get { return new Dictionary<Vector3i, Type[]>

    {

    {Vector3i.Left, new[] { typeof(DirtRampABlock), typeof(DirtRampBBlock), typeof(DirtRampCBlock), typeof(DirtRampDBlock) }},

    {Vector3i.Forward, new[] { typeof(DirtRampA90Block), typeof(DirtRampB90Block), typeof(DirtRampC90Block), typeof(DirtRampD90Block) }},

    {Vector3i.Right, new[] { typeof(DirtRampA180Block), typeof(DirtRampB180Block), typeof(DirtRampC180Block), typeof(DirtRampD180Block) }},

    {Vector3i.Back, new[] { typeof(DirtRampA270Block), typeof(DirtRampB270Block), typeof(DirtRampC270Block), typeof(DirtRampD270Block) }},

    };}}

    }

    [Serialized]

    public class StoneRampObject : BaseRampObject

    {

    public override LocString DisplayName { get { return Localizer.DoStr("Stone Ramp"); } }

    private StoneRampObject() { }

    }

    [Serialized]

    [LocDisplayName("Stone Ramp")]

    [ItemGroup("Road Items")]

    [Tag("Road")]

    [Tag("Constructable")]

    [Ecopedia("Blocks", "Roads", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]

    [MaxStackSize(100)] <----------------------------------- [THIS IS WHAT HAS BEEN ADDED]

    [Weight(60000)]

    public class StoneRampItem : RampItem<StoneRampObject>

    {

    public override LocString DisplayDescription { get { return Localizer.DoStr("4 x 1 Stone Ramp."); } }

    public override Dictionary<Vector3i, Type[]> BlockTypes { get { return new Dictionary<Vector3i, Type[]>

    {

    {Vector3i.Left, new[] { typeof(StoneRampABlock), typeof(StoneRampBBlock), typeof(StoneRampCBlock), typeof(StoneRampDBlock) }},

    {Vector3i.Forward, new[] { typeof(StoneRampA90Block), typeof(StoneRampB90Block), typeof(StoneRampC90Block), typeof(StoneRampD90Block) }},

    {Vector3i.Right, new[] { typeof(StoneRampA180Block), typeof(StoneRampB180Block), typeof(StoneRampC180Block), typeof(StoneRampD180Block) }},

    {Vector3i.Back, new[] { typeof(StoneRampA270Block), typeof(StoneRampB270Block), typeof(StoneRampC270Block), typeof(StoneRampD270Block) }},

    };}}

    }

    [Serialized]

    public class AsphaltConcreteRampObject : BaseRampObject

    {

    public override LocString DisplayName => Localizer.DoStr("Asphalt Concrete Ramp");

    private AsphaltConcreteRampObject() { }

    }

    [Serialized]

    [LocDisplayName("Asphalt Concrete Ramp")]

    [ItemGroup("Road Items")]

    [Tag("Road")]

    [Tag("Constructable")]

    [Category("Hidden")]

    [MaxStackSize(100)] <----------------------------------- [THIS IS WHAT HAS BEEN ADDED]

    [Weight(60000)]

    public class AsphaltConcreteRampItem : RampItem<AsphaltConcreteRampObject>

    {

    public override LocString DisplayDescription => Localizer.DoStr("4 x 1 Asphalt Concrete Ramp.");

    public override Dictionary<Vector3i, Type[]> BlockTypes { get { return new Dictionary<Vector3i, Type[]>

    {

    {Vector3i.Left, new[] { typeof(AsphaltConcreteRampABlock), typeof(AsphaltConcreteRampBBlock), typeof(AsphaltConcreteRampCBlock), typeof(AsphaltConcreteRampDBlock) }},

    {Vector3i.Forward, new[] { typeof(AsphaltConcreteRampA90Block), typeof(AsphaltConcreteRampB90Block), typeof(AsphaltConcreteRampC90Block), typeof(AsphaltConcreteRampD90Block) }},

    {Vector3i.Right, new[] { typeof(AsphaltConcreteRampA180Block), typeof(AsphaltConcreteRampB180Block), typeof(AsphaltConcreteRampC180Block), typeof(AsphaltConcreteRampD180Block) }},

    {Vector3i.Back, new[] { typeof(AsphaltConcreteRampA270Block), typeof(AsphaltConcreteRampB270Block), typeof(AsphaltConcreteRampC270Block), typeof(AsphaltConcreteRampD270Block) }},

    };}}

    }

    *FILE IS TOO BIG TO POST BUT WHAT YOU NEED IS ABOVE*

    I'm not sure why i've never seen this in a stack size mod even for the latest 9.0 update but now you know how to do it yourself;)

    Einmal editiert, zuletzt von dadycupcakes (19. September 2020 um 23:17)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!