ECO

Cost Calculator for ECO

Released (updated ago). Ranked 27 of 176 with 718 (2 today) downloads

Published by ceme (mod ID: 868598)

full_page.png
graph_only.1.png

Making sure you set the price of your products is an important part of turning a profit. Often this means using a community made spreadsheet that ends up useless on modified servers as now you would need to edit all the recipes to make it work. Modded items may even need to be added laboriously by hand. Or maybe you have a complex chain of production and manually working that out ends up way too tedious and even spreadsheets can easily meet their limits.

How about instead you could use something more streamlined and easier to understand? Well, this mod may be the solution to that problem!

This is a webpage mod that adds a new section to your Eco server: the Cost Calculator. The cost calculator page provides a node based interface for you to design your particular production flow for cost and ingredients calculations.


The Cost Calculator supports the following main features:

  • Items, tables and recipes get pulled directly from the server. No need for custom entries to use modded items or modified recipes.

  • Multiple currency support. No global currency that everyone uses? No problem! Set values to the currency it actually is instead of having to convert.

  • Fuel costs are taken into account. Crafting a bunch of stuff in the kiln but don’t know how much wood you need to burn? Not here, set your fuel and it gets added to the bill of materials.

  • Labor costs can be included. Need to charge for the food you're chowing through? You can easily apply a value your labor, which changes depending on your skill reductions.
  • Bill Of Materials. A node that gives you all the ingredients you will need to craft something, spanning as many crafts as you like.

  • Saving. This is an obvious feature, but logging into the server webpage from Eco allows you to save your graph to the server under your character.

  • Import and Export graphs. The server keeps your graph in its own storage, but you can also export your setup and save it to your own computer. That way you can easily transfer your graph to a new server or share it with your friends!

Additional considerations:

This mod overrides the sidebar html file with its own internal copy with the Cost Calculator option included. This means that if you plan to modify the sidebar to add your own things, this will not work. This also goes with the Cost Calculator page itself and any other webpage files it overrides. This may change in the future, but currently there isn’t a plan to change this.

As this mod pulls all item, recipe and table information from the server and uses the localized names, however the interface itself does not have localizations itself.

Installation:

To install, simply place the included .dll file anywhere into your Mods directory.
If the server starts up correctly and you don't see the new tab, you may have to clear your cache or try incognito mode.

Uninstalling:

Uninstalling is just as simple as deleting the mod .dll from your Mods directory.

Bug reporting:

If you don't mind using github, then please report bugs here.
Otherwise, you can mention "cemeceme" on the Eco discord, and I'll see what I can do.

Please include any stack traces or errors that get printed into your browsers console.

Development will most likely be slow however.

Donations:

Like the mod and want to show your support? Consider buying me a coffee.



Releases

FilenameSizeVersionAddedOptions
cost_calculator_1_03_0_9_4_1r.zip694.74kb1.03.0.9.4.1R

cost_calculator_1_03_0_9_3_6r.zip1.13mb1.03.0.9.3.6R

cost_calculator_1_02_0_9_3_4r.zip1.16mb1.02.0.9.3.4R

cost_calculator_1_01_0_9_3_3r.zip1.16mb1.01.0.9.3.3R

cost_calculator_1_0_0_9_3_1r.zip609.6kb1.0.0.9.3.1R

26 comments

Join the community or sign in with your gaming account to join the conversation:

LeCapuchino
LeCapuchino @lecapuchino

It gives an error when incorporating the Artist Skill MOD, which indicates that there is no reference to that profession. It would be nice to add it and add your tables and products.

XL
XLilCasper @xlilcasper

There seems to be a bug. Collapse some nodes, reload. You can no longer expand nodes and it acts as if they are expanded (you can change properties by clicking somewhere below the node). Fix is to export, replace in the json collapsed from true to false, re-import.

Great work on this. It's very helpful.

CU
curleyc @curleyc

Hello, do you plan on updating this mod to 9.4? It installs fine, but the cost calc will not save.

CE
ceme @ceme

This should be fixed now.

CU
curleyc @curleyc

Thank you~, from our entire server~.

CU
curleyc @curleyc

I recommend something like a basic mode. where you can set raw resources price globally. maybe be able to set labor without a line as well.

MF
MistryFireNL @mistryfirenl

I love playing with this calculator. it is useful for small scale cost calculations of a hand full crafting recipes. But by the time i got half way the cooking recipes for our restaurant it started to tear down . (had to revert back to old school excel)
it would also be nice to have a function to save the files to the server. so everyone on the server can use what you have created by just clicking on for example
a drop down menu. (because ppl are lazy or doint understand how to use it)

D
Dredzy66 @dredzy1628015167

Noob question... is there a way to reset the calculator or do we have to manually delete each node?

CE
ceme @ceme

You can use ctrl+a to select all nodes and then press del to remove them.

Smudgius
Smudgius @smudgius

Doesn't work. :( Installed according to instructions, saw it load during server startup but... when I load up the server info... no new tab.

Smudgius
Smudgius @smudgius

Cool - seems to be working now! Thanks for the quick response!

CE
ceme @ceme

You may need to clear your cache or use incognito mode to get the page to properly refresh and show the new tab if you had ever opened the web-interface before installing the mod. I have updated the installation instructions to mention this as well now.

CE
ceme @ceme

For those having the /api/v1/costcalculator/players issue, the new version should now skip mods with improper skill definitions instead of crashing. It will now also print a warning message to the console about which mod had issues.

FlettyMod
FlettyMod @flettymod

Page doesn't load for us: Only "Loading..."

G
Gysse @gysse

I get this when somone try to open Cost Calculator ?

fail: Eco.WebServer.Web.Filters.ExceptionFilter[0]
Error during execution of /api/v1/costcalculator/players
System.NullReferenceException: Object reference not set to an instance of an object.
at CostCalculator.CostCalculatorController.players()
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

TheDukeOfRockford
TheDukeOfRockford @thedukeofrockford

Having same issue. Unsure what might be causing this issue. Anyone have suggestions in diagnosing this, assuming this is not a bug?

TheDukeOfRockford
TheDukeOfRockford @thedukeofrockford

Nevermind. Found this in log console:

fail: Eco.WebServer.Web.Filters.ExceptionFilter[0]
Error during execution of /api/v1/costcalculator/players
System.NullReferenceException: Object reference not set to an instance of an object.
at CostCalculator.CostCalculatorController.players()
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
fail: Eco.WebServer.Web.Filters.ExceptionFilter[0]
Error during execution of /api/v1/costcalculator/players
System.NullReferenceException: Object reference not set to an instance of an object.
at CostCalculator.CostCalculatorController.players()
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

G
Gysse @gysse

What did you do to sort it ?

D
Dontruidin @dontruidin

how do i unistall the mod?

CE
ceme @ceme

Just delete the mod dll again. This mod doesn't create or modify any additional files.