@fufsgfen has been helping me with making custom automatic transmission modes, but i just don't understand at the moment. Requirements: Mode "5" Will go through all gears except 6th Mode "W" will go through ONLY 2, no shifting into 1. But with the two files, it instead has the modes.. PRNDS21M. I have no idea why. You can see my lua file and my transmission file have no mention of those.
Sorry, didn't had time to peek file, but did you remember to add extra IF clauses to cover those extra modes?
yeah did. But the modes aren't showing up, and other random modes are there. Like S, M, 2 and 1. And the ones i have made aren't showing up.
Does it work if you have full contents of Lua in your controller.lua? I'm thinking maybe it is not able to take part from one controller and part from another, but you need to give it full controller?
thanks, I looked in the code and the behaviour i am seeing is a precoded fall back when it's not specified.
I did remember now also one thing, in my files there probably is transmission logic that is quite bit different than what is in 0.12 game files, probably much worse because it was one experiment, just so that you are aware of that. jbeamdata means that you should be able to override that in your engine or transmission jbeam by just giving available modes, but there needs to be all those modes in lua, which for you need to have that custom controller and modified lua, but that needs to be full logic, if my head is getting around this right way. So long since did play with those and I'm so much middle of other things that my poor brain is confused Anyway in lua there was place called automatic modes where modes have to be presented and then in logic section those modes need to exist and as long as main jbeam points out to valid lua logic of your own, it really should start working, unless there is some bit I'm forgetting again. It was fairly simple to do after figuring out all bits!
thanks, i'll wait for more info in this thread, but don't get too bogged down with this experiment too. I see what you mean, the lua file has to contain ALL the tranmission modes. Otherwise it falls back.
I'd also be great to return manual mode back to how it was before the "revamp". I can't shift up when at a stop now. IRL manual mode lets you shift up to a selected gear (that the PCM deems appropriate) while at a complete stand still. For example, my truck allows you to shift up to 3rd and start off (its a 6 speed).
There's quite a simple way actually. Something around "auto downshift in M". It's on a thread somewhere
Ok, I figured it out, you need to have this in your transmission file (change to fit your mod naming): "vehicleController": { "shiftLogicName":"FufsgfenTDrifter", "automaticModes":"RND54321W", Then filename that contains shift logic module has to have prefix in name, for me that is shiftLogic-FufsgfenTDrifter.lua and that has to be in yourmodname/controller/ folder Also copy shiftLogic-automaticGearbox.lua and modify that file to have your custom modes, which for me are: Code: availableModes = {"R", "N", "D", "S", "1", "2", "3", "4", "5", "M", "W"}, ---------snip---------------- if automaticHandling.mode == "1" then maxGearIndex = 1 minGearIndex = 1 elseif automaticHandling.mode == "2" then maxGearIndex = 2 minGearIndex = 1 elseif automaticHandling.mode == "3" then maxGearIndex = 3 minGearIndex = 1 elseif automaticHandling.mode == "4" then maxGearIndex = 4 minGearIndex = 1 elseif automaticHandling.mode == "5" then maxGearIndex = 5 minGearIndex = 1 elseif automaticHandling.mode == "W" then minGearIndex = 2 This I found from line 833 of vehicleController.lua which tells that game is excepting that shiftLogic- prefix and also that in jbeam keyword excepted is shiftLogicName : local shiftLogicModuleName = "controller/shiftLogic-"..(jbeamData.shiftLogicName or gearboxType) Not sure if you have already figured it out by yourself, but if anyone needs to do custom logics, that is how you do it in 0.12.3 version of BeamNG.
Nice to see you guys getting your hands dirty with lua Just set "autoDownShiftInM" to false in the vehicleController section in jbeam.
Sorry that it is so slow to learn these things, I always feel bad when you make these changes that add incredible new possibilities and it takes so long from me to figure them out, but at least I hope eventually to be able to do more and more of lua as it really is huge possibility in creative zone, all the crazy and mad inventions of mine require learning these wonderful possibilities so piece by piece, little by little more possibilities are opening.