This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Make AIDriveStrategy hard-coded values editable via XML tags. #3346
Closed
FlexibleGames
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
They are hard coded for reasons. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been trying and trying to make this work but I hate LUA and have no idea how to do it elegantly.
Two values are hard coded in AIDriveStrategy objects (Check out AIDriveStrategyBaler):
self.slowDownFillLevel = 200
self.slowDownStartSpeed= 20
These REALLY should be exposed and overloadable via XML. A harvester like the Colossus tries to solve the issue by making the brakes REALLY GOOD, but it doesn't solve it. When the tanks are almost full the faster a vehicle is able to harvest the sooner it should start to slow down, but there's no way to edit these values via XML. 200 liters of a buffer is not nearly enough when harvesting at 40 MPH and the harvester AI usually over-runs and misses a sizable block of crops as it tries to stop.
I don't know enough about the DOM of the AIDriveStrategy objects, or how to access various settings (like vehicle/tool harvest speed) or how to augment the getDriveData function that actually uses it. I just copied and tweaked AIDriveStrategyBaler and AIDriveStrategyCombine getDriveData functions and used Utils.overwrittenFunction() to get it to work.
You and the team obviously know LUA and the DOM of the game VERY well and could probably hammer this out in a day. Please consider it.
A couple of options of how to do it, one easy, one far more complex.
The easy way, applies to entire vehicle regardless of FillUnit or configuration values:
The harder way, add multiple options, allowing a configurationset to pick and choose the setting based on the other factors of the vehcile.
IMHO this should be part of the base game to give the most tweakable options to the vehicle. Thanks for all your hard work!
Beta Was this translation helpful? Give feedback.
All reactions