cem3cem3 / CostCalculatorIssues

A node based production cost calculation tool for the game Eco.
0 stars 1 forks source link

Open source #3

Closed quequiere closed 3 years ago

quequiere commented 3 years ago

Hi cem3cem3, could you open your repository code ? I would like to work on a project who will need to use the eco webserver. I would like to know how you injected custom html ;)

cem3cem3 commented 3 years ago

I am considering making some of my mods open source if I decide not to work on them any more, however they will not be open sourced as of right now. However, I do give permission to de-compile the mod dlls if you want to see what it does and since this mod is written in C# and javascript, it's fairly easy to see what the code actually does. Of course, if you de-compile an use code in any mods (note not every mod author allows you to do that), then please make sure to give credit.

As for your goal, unless you are quite familiar with C#, Injections and harmony, I would not recommend trying to make web-server based mods (besides changing the files in the WebClient folder). In fact, my mod isn't very other-mod friendly right now because of how I do these injections (I literally replace the sidebar html with my own copy with the cost calculator link). On the harmony side of things, the version I was using was broken on windows, so I load a custom version that won't break Eco, but all that comes with huge caveats.

However, if you still want to go ahead and try your hand in this, my mod-kit that implements the web-injections is available under releases at: https://github.com/cem3cem3/ModUtils The wiki also documents how to use it. You can, of course, de-compile it as well, but the modkit is meant to allow for better compatibility between mods that use it. This means an independent implementation could mean incompatibilities between those mods.