Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Initial Source Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thetestgame committed Mar 3, 2021
1 parent f0ad142 commit 46ce3c0
Show file tree
Hide file tree
Showing 44 changed files with 4,978 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.formatOnType": true
}
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# Eco-No-More-Books-Mod
Eco server mod for replacing the books mechanic with crafting recipes for the individual skill papers
<img src="docs/eco-icon.png" align="right" width="150"/>

No More Books Mod for ECO
=========================

Tired of players getting a book from the research table just to hand scrolls out to everyone? Want to make your server more challenging? This mod will not allow books to be made on the research table, only scrolls, thus stopping players from making too many scrolls and giving them away.

This is an updated version of the No More Books Mod available <a href="https://eco.mod.io/no-more-books-mod">here</a>

<img src="docs/nomorebookspreview.1.png">

## Installation

Place and overwrite the files in ``Mods\AutoGen\Tech\`` with the files found in the ``source`` folder of this repository.

<b>Be sure and backup the files before you overwrite them.</b>

## License

The No More Books Mod for Eco is available under the MIT license. A copy of this license can be found in the repository root or <a href="https://github.com/thetestgame/Eco-No-More-Books-Mod/blob/master/LICENSE">here</a>
Binary file added docs/eco-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/nomorebookspreview.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions source/AdvancedBaking.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
// 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 System.Linq;
using Eco.Core.Items;
using Eco.Core.Utils;
using Eco.Core.Utils.AtomicAction;
using Eco.Gameplay.Blocks;
using Eco.Gameplay.Components;
using Eco.Gameplay.DynamicValues;
using Eco.Gameplay.Items;
using Eco.Gameplay.Players;
using Eco.Gameplay.Property;
using Eco.Gameplay.Skills;
using Eco.Gameplay.Systems;
using Eco.Gameplay.Systems.TextLinks;
using Eco.Shared.Localization;
using Eco.Shared.Serialization;
using Eco.Shared.Services;
using Eco.Shared.Utils;
using Gameplay.Systems.Tooltip;

[Serialized]
[LocDisplayName("Advanced Baking")]
[Ecopedia("Professions", "Chef", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]
[RequiresSkill(typeof(ChefSkill), 0), Tag("Chef Specialty"), Tier(4)]
[Tag("Specialty")]
public partial class AdvancedBakingSkill : Skill
{
public override LocString DisplayDescription { get { return Localizer.DoStr("Advanced baking mostly improves recipes that involve a leavening agent. Level by crafting advanced baking recipes."); } }

public override void OnLevelUp(User user)
{
user.Skillset.AddExperience(typeof(SelfImprovementSkill), 20, Localizer.DoStr("for leveling up another specialization."));
}


public static MultiplicativeStrategy MultiplicativeStrategy =
new MultiplicativeStrategy(new float[] { 1,

1 - 0.5f,

1 - 0.55f,

1 - 0.6f,

1 - 0.65f,

1 - 0.7f,

1 - 0.75f,

1 - 0.8f,

});
public override MultiplicativeStrategy MultiStrategy => MultiplicativeStrategy;
public static AdditiveStrategy AdditiveStrategy =
new AdditiveStrategy(new float[] { 0,

0.5f,

0.55f,

0.6f,

0.65f,

0.7f,

0.75f,

0.8f,

});
public override AdditiveStrategy AddStrategy => AdditiveStrategy;
public static int[] SkillPointCost = {

1,

1,

1,

1,

1,

1,

1,
};
public override int RequiredPoint { get { return this.Level < SkillPointCost.Length ? SkillPointCost[this.Level] : 0; } }
public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < SkillPointCost.Length ? SkillPointCost[this.Level - 1] : 0; } }
public override int MaxLevel { get { return 7; } }
public override int Tier { get { return 4; } }
}

[Serialized]
[LocDisplayName("Advanced Baking Skill Book")]
[Ecopedia("Items", "Skill Books", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]
public partial class AdvancedBakingSkillBook : SkillBook<AdvancedBakingSkill, AdvancedBakingSkillScroll>
{
}

[Serialized]
[LocDisplayName("Advanced Baking Skill Scroll")]
public partial class AdvancedBakingSkillScroll : SkillScroll<AdvancedBakingSkill, AdvancedBakingSkillBook>
{
}

[RequiresSkill(typeof(BakingSkill), 1)]
public partial class AdvancedBakingSkillBookRecipe : RecipeFamily
{
public AdvancedBakingSkillBookRecipe()
{
this.Recipes = new List<Recipe>
{
new Recipe(
"AdvancedBaking",
Localizer.DoStr("Advanced Baking"),
new IngredientElement[]
{
new IngredientElement(typeof(CulinaryResearchPaperAdvancedItem), 20),
new IngredientElement(typeof(DendrologyResearchPaperModernItem), 10),
new IngredientElement(typeof(GeologyResearchPaperModernItem), 10),
new IngredientElement("Basic Research", 30),
new IngredientElement("Advanced Research", 10),
new IngredientElement("Modern Research", 10),
},
new CraftingElement<AdvancedBakingSkillScroll>()
)
};
this.LaborInCalories = CreateLaborInCaloriesValue(10000);
this.CraftMinutes = CreateCraftTimeValue(30);

this.Initialize(Localizer.DoStr("Advanced Baking Skill Scroll"), typeof(AdvancedBakingSkillBookRecipe));
CraftingComponent.AddRecipe(typeof(ResearchTableObject), this);
}
}
}
147 changes: 147 additions & 0 deletions source/AdvancedCooking.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
// 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 System.Linq;
using Eco.Core.Items;
using Eco.Core.Utils;
using Eco.Core.Utils.AtomicAction;
using Eco.Gameplay.Blocks;
using Eco.Gameplay.Components;
using Eco.Gameplay.DynamicValues;
using Eco.Gameplay.Items;
using Eco.Gameplay.Players;
using Eco.Gameplay.Property;
using Eco.Gameplay.Skills;
using Eco.Gameplay.Systems;
using Eco.Gameplay.Systems.TextLinks;
using Eco.Shared.Localization;
using Eco.Shared.Serialization;
using Eco.Shared.Services;
using Eco.Shared.Utils;
using Gameplay.Systems.Tooltip;

[Serialized]
[LocDisplayName("Advanced Cooking")]
[Ecopedia("Professions", "Chef", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]
[RequiresSkill(typeof(ChefSkill), 0), Tag("Chef Specialty"), Tier(4)]
[Tag("Specialty")]
public partial class AdvancedCookingSkill : Skill
{
public override LocString DisplayDescription { get { return Localizer.DoStr("Advanced cooking techniques for producing more complex foods. Level by crafting advanced cooking recipes."); } }

public override void OnLevelUp(User user)
{
user.Skillset.AddExperience(typeof(SelfImprovementSkill), 20, Localizer.DoStr("for leveling up another specialization."));
}


public static MultiplicativeStrategy MultiplicativeStrategy =
new MultiplicativeStrategy(new float[] { 1,

1 - 0.5f,

1 - 0.55f,

1 - 0.6f,

1 - 0.65f,

1 - 0.7f,

1 - 0.75f,

1 - 0.8f,

});
public override MultiplicativeStrategy MultiStrategy => MultiplicativeStrategy;
public static AdditiveStrategy AdditiveStrategy =
new AdditiveStrategy(new float[] { 0,

0.5f,

0.55f,

0.6f,

0.65f,

0.7f,

0.75f,

0.8f,

});
public override AdditiveStrategy AddStrategy => AdditiveStrategy;
public static int[] SkillPointCost = {

1,

1,

1,

1,

1,

1,

1,

};
public override int RequiredPoint { get { return this.Level < SkillPointCost.Length ? SkillPointCost[this.Level] : 0; } }
public override int PrevRequiredPoint { get { return this.Level - 1 >= 0 && this.Level - 1 < SkillPointCost.Length ? SkillPointCost[this.Level - 1] : 0; } }
public override int MaxLevel { get { return 7; } }
public override int Tier { get { return 4; } }
}

[Serialized]
[LocDisplayName("Advanced Cooking Skill Book")]
[Ecopedia("Items", "Skill Books", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)]
public partial class AdvancedCookingSkillBook : SkillBook<AdvancedCookingSkill, AdvancedCookingSkillScroll>
{
}

[Serialized]
[LocDisplayName("Advanced Cooking Skill Scroll")]
public partial class AdvancedCookingSkillScroll : SkillScroll<AdvancedCookingSkill, AdvancedCookingSkillBook>
{
}

[RequiresSkill(typeof(CookingSkill), 1)]
public partial class AdvancedCookingSkillBookRecipe : RecipeFamily
{
public AdvancedCookingSkillBookRecipe()
{
this.Recipes = new List<Recipe>
{
new Recipe(
"AdvancedCooking",
Localizer.DoStr("Advanced Cooking"),
new IngredientElement[]
{
new IngredientElement(typeof(CulinaryResearchPaperAdvancedItem), 20),
new IngredientElement(typeof(DendrologyResearchPaperModernItem), 10),
new IngredientElement(typeof(GeologyResearchPaperModernItem), 10),
new IngredientElement("Basic Research", 30),
new IngredientElement("Advanced Research", 10),
new IngredientElement("Modern Research", 10),
},
new CraftingElement<AdvancedCookingSkillScroll>()
)
};
this.LaborInCalories = CreateLaborInCaloriesValue(10000);
this.CraftMinutes = CreateCraftTimeValue(30);

this.Initialize(Localizer.DoStr("Advanced Cooking Skill Scroll"), typeof(AdvancedCookingSkillBookRecipe));
CraftingComponent.AddRecipe(typeof(ResearchTableObject), this);
}
}
}
Loading

0 comments on commit 46ce3c0

Please sign in to comment.