Skip to content

A lightweight library for calculating the best and cheapest path for crafting an item.

Notifications You must be signed in to change notification settings

P90Ez/P90s-MMO-CraftProfitCalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P90's MMO CraftProfitCalc

A lightweight library for calculating the best and cheapest path for crafting an item.

Features

  • Selects the best recipe for the cheapest crafting path
  • Option to buy an item if crafting is more expensive
  • Profit margins
  • Uses caching of calculated items for better performance

Usage

Build a wrapper around the CraftProfitCalc and provide it with recipes and items which can be bought. The implementation is as easy as that:

ItemStack ItemsToCraft = new ItemStack("NameOfItem", 15);
List<BuyableItem> BuyableItems = new List<BuyableItem>();
List<Recipe> Recipes = new List<Recipe>();

//Todo: fill lists with items

Calculator calc = new Calculator(BuyableItems, Recipes);
CraftTree Tree = calc.Craft(ItemsToCraft);

//Todo: visualize tree

Diagrams

Here is a class diagram containing all public function and properties for better visualization:

Contribution & Support

Feel free to contact me on Discord: @P90Ez

About

A lightweight library for calculating the best and cheapest path for crafting an item.

Topics

Resources

Stars

Watchers

Forks

Languages