JakobTischler / MoreRealisticDLCs

A lua/xml project that adds MoreRealistic to the Farming Simulator DLCs
8 stars 0 forks source link

ai worker wanted speed #34

Closed quadural closed 10 years ago

quadural commented 10 years ago

I need the new "realAiWorkingSpeed" parameter to set a "wanted" speed of 12km/h for the AI driver => only useful for "realisticTool" implements.

JakobTischler commented 10 years ago

So it only needs to be in the <workTool /> section? I already have it in the script, but in the <combine /> section (<combine baseSpeed="" minSpeed="" maxSpeed="" />).

I have to admit, I'm getting a bit confused by all the different speed parameters. Could you maybe explain quickly?

quadural commented 10 years ago

yes, only for "workTool" in our case. realMaxVehicleSpeed = for brake capabilities and gearbox top speed realAiManeuverSpeed = combine specific (AICombine) realWorkingSpeedLimit = implement "break down" speed ("too fast warning") realCutterSpeedLimit = "too fast warning" for headers realBalerWorkingSpeedLimit = "too fast warning" for balers realAiWorkingSpeed baseSpeed + minSpeed + maxSpeed = combine specific (AIcombine)

JakobTischler commented 10 years ago

Alright. But if realAiWorkingSpeed is combine specific, why do you want it in <workTool /> instead of <combine />?

quadural commented 10 years ago

the realAiWorkingSpeed for a combine is not the same as the one for a "tool".

combine = use by "AICombine.lua" tool = use by "AITractor.lua"

a combine can't be a tool and so, if you want to keep the same variable for both, you have to create a new "AI section" in the xml (or place this parameter in the "general" section)

PS : if I had to redo the "mr engine", I would definitely not do the same as the current one. But at the current level, I can't "crash everything" and change all the parameters again.

JakobTischler commented 10 years ago

Ok, I added for the <workTool /> section. So now it can be either in <combine /> or in <workTool />. Parameters are:

realAiWorkingBaseSpeed="7.2" realAiWorkingMinSpeed="4" realAiWorkingMaxSpeed="15"

I already changed it for the existing combines.

JakobTischler commented 10 years ago

@quadural: Are the parameters ok and working?

quadural commented 10 years ago

i don't think : didn't try it, but there are no "basespeed, minspeed or maxSpeed" for a tool in the "mr engine".

combines can feature "losses". And so, if the AI driver goes too fast, the losses could be quite large. This is why there are 3 values here for "AI Combines". The AI driver take into account the engine load and the losses when combining.

Regarding tools, the AI Driver doesn't take care about anything except the "target speed". Before => target speed = 60% of the max allowed speed of the tool. Now => defautl target speed = 60% of the max speed, but we can specify a "target speed" by setting the "vehicle.realAiWorkingSpeed" parameter value.

JakobTischler commented 10 years ago

This gets more confusing by the minute...

In which section do you need these three values? <combine> (for combines only), <workTool> (for implements) or <general> (for all vehicles)?

quadural commented 10 years ago

"combine" : I need 3 parameters (basespeed, minspeed and maxspeed) => this was ok, and this is still ok with the new syntax

"workTool" : I need only one parameter = "realAiWorkingSpeed"

sorry for not being clear

quadural commented 10 years ago

works.