Proof of concept implementation of the Tug/Haul drone tuning rework community idea in the Official Discord Server.
This is a simple WinForms application meant for developers to build and debug. There is no fancy code, unit testing, binaries releases, wiki, etc.
If you find a problem feel free to create an issue or a PR. Don't expect a quick answer.
- Windows
- VS 2022 with .NET desktop develoment workload.
- .NET 7.0
If you are not familiar with the game this repo will have very litte value for you. You can find more about it on GOG and Steam.
For those familiar with the game the UI should be more or less self explanatory. Mouse over the controls to see tooltips with some explanations.
Most of the code is UI stuff. Things to pay attention to:
- Rules/*.cs: the
Evaluate
method contains the actual logic or the rules. - RuleEngine.cs: the
CalculatePriority
method is the entry point for rule evaluation. - Examples/*.json: some premade datasets to ease testing. You can load/save these from the UI. Keep in mind that in some cases it might be simpler to just manually copy and modify the files.
The included rules are different from the ones in the original community idea. This resulted from testing different combinations:
- ChunkPriceRule: Priority based on the market price of the chunk.
- ChunkSpeedRule: Priority base on how fast the chunk is moving relative to the ship.
- OrePriceRule: Priority based on the market price of the ore.
Those rules cover the most relevant scenarios. I tested other rules but the benefits where marginal al best and they didn't add enough value to keep them at the expense of the extra complexity.
Use RuleWeightMultiplier
(the Weight
in the rule UI) to individually change the relevance of the rules.