Courseplay / courseplay

Courseplay for Farming Simulator 2019
http://courseplay.github.io/courseplay
GNU General Public License v3.0
953 stars 528 forks source link

Feature Request - Staggered Release - in conjunction with VEGS (Vehicle Group Switcher). #1139

Closed Yinmeout closed 8 years ago

Yinmeout commented 9 years ago

Preamble - Using many tools requires staggered release points to avoid collisions. This could be automated with some extra code. (No knowledge of the game code or coursplay code here)

UI section. On the UI "drive course" page. Extra line is required to allow the user to set "staggered start" = true. On the course generation tab. Extra line is required to allow the user to set the stagger amount / value (ticks or seconds or distance). Should be written into the xml course when saved. Thereafter loaded with the course.

Setup. Read in the vehicles.xml file and create a hash table of all the instances of "Vehicle number" = vegsGrpPos.value. Identify my group. (Reference first integer of vegsGrpPos.value ) Identify where I am in the group. (Reference "my vehicle" second integer of vegsGrpPos.value.) Take vegsGrpPos.value and subtract 1 which will give me the identity of the vehicle in front of me - Unless my vegsGrpPos.value second integer = 1 in which case skip. Read in from the xml course the distance / time the user set when the course was generated.

Pseudo code. When the user activates "drive course" If the user has enabled 'start at first way point' = true and 'staggered start' = true and I am not number 1 in the group { while (mydistance 'less then or equal to' 'the guy ahead of me / based on where I identified myself in the group') {pause} }

DeckerMMIV commented 9 years ago

First this looked to me, as you were asking for what the 'Follow Me' mod can do. That is; you set up the first vehicle as controlled by Courseplay, then set up the others as followers.

Secondly, my VeGS mod have no 'usable clean API' that allows other mods to query a vehicle's group-and-rank, and reading this information from the vehicles.xml file is not recommended, as those XML-attributes are mod-specific, which could change format in a future version of VeGS.

Thirdly, in what scenarios would you use such a 'staggered release'? - What "many tools" are in effect here?

Yinmeout commented 9 years ago

Thanks for the fast answer. What "many tools" are in effect here? = 8 combines - 8 seed tools for example. Thanks for the tutorial - I'll investigate follow me. -

EDIT: Done investigation:

What I am asking for is not at all the same as what follow me does.

Follow me is not able to allow 8 tools to begin simultaneously seeding a field at the same time. (Or allow 8 harvesters to simultaneously start harvesting.) Due to the need to have a vehicle to 'follow' - unless not seeding the first 250m of the field is acceptable, which it isn't to me. What happens when the lead tool runs out of seeds? All the others follow, carnage.

Follow me seems great to automate sequential field tasks with single tools - which is what I deduce it was written to do.

Satissis commented 8 years ago

1346