ECO

Cost Calculator for ECO

Released (updated ago). Ranked 22 of 159 with 464 (0 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_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

17 comments

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

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.

F
Fletty1623331149 @fletty1623331149

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.

Hex1618354965
Hex1618354965 @hex1618354965

Hey just curious is there a reason why Norton Virus is flagging this mod as a threat? I understand it's modding some .dll file and adding it to my dedicated server but I have done that with at least 20 of them now and none of them have been flagged for a threat besides this one. Can you inform me to what extend and the reason why this one specifically is being flagged? I am really interested in using iit.

CE
ceme @ceme

There shouldn’t be a threat from it. My guess is that because the mod is binding to Ecos web server, Norton might think that could be a threat. That and since the mod is rather new, Norton is not yet familiar with the file, so it might flag it as suspicious until more people use it (if I remember how Norton used to deal with these things correctly. It’s been a while since I used any antivirus.).

All the mod actually does is provide a new endpoint to get the item/recipe/table data and adds the new web page resources to the web server. So ironically, the server itself does less than with my other mod.

Hex1618354965
Hex1618354965 @hex1618354965

Hey thank you for the response I am going to definitely give it a try I just wanted to possibly bring that up so you may know if there was anything you could do on your end so it will help others.

Dave247
Dave247 @dave247

I really like this but I do worry that it may be too complex for some people to use, let alone understand as it's almost crossing into basic programming territory. Though anyone who knows how to use the law system in game shouldn't have any problems with it.

CE
ceme @ceme

That is true. However, this is the way I managed to come up with that simplifies thing as much as possible without leaving out functionality. My hope is that the export/import feature gets used by those who can deal with the complexity and share it to those that just want something that works.

I find that this is mostly also the case with spreadsheets as well, so this is more of an alternative tool instead of a direct replacement. And correct me if I’m wrong (After all I am a programmer so there would be bias), simple single crafts should be easy enough for most people to understand.

GinjuGG
GinjuGG @ginju1

Maybe you should open a discord and build a community around it :) A Discord where you can post those import strings and people getting help. I hardly agree with Dave: If you don't have any programming knowledge you will have a hard time :D