Page 1 of 4

[MOD 0.17] VehicleSnap

Posted: Thu May 19, 2016 4:31 pm
by Zaflis
Type: Mod
Name: VehicleSnap
Description: Snaps vehicle's driving angle
License: MIT License
Version: 1.17.0
Updated: 2019-2-26
Tested-With-Factorio-Version: 0.17.0+
Category: Helper
Tags: Car, Driving, Drive assist
Download-Url: https://mods.factorio.com/mods/Zaflis/VehicleSnap
Old downloads
License
Description
Versions

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Thu May 19, 2016 7:30 pm
by devilwarriors
There also this mod who does the same as yours I believe

viewtopic.php?f=92&t=17942

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Thu May 19, 2016 7:39 pm
by Zaflis
devilwarriors wrote:There also this mod who does the same as yours I believe

viewtopic.php?f=92&t=17942
It may sound the same but is not. His mod is much heavier, snaps to only 8 axis and is also teleporting the car, as seen there:
https://github.com/YPetremann/better-ve ... ontrol.lua

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 2:12 am
by devilwarriors
Zaflis wrote:
devilwarriors wrote:There also this mod who does the same as yours I believe

viewtopic.php?f=92&t=17942
It may sound the same but is not. His mod is much heavier, snaps to only 8 axis and is also teleporting the car, as seen there:
https://github.com/YPetremann/better-ve ... ontrol.lua
Ah nice to hear, those are precisely the reason I don't use his mod anymore.

I'm gonna give your version a try.

thanks

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 1:41 pm
by NoriSilverrage
Look excellent.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 3:17 pm
by orzelek
Take a look at Straight Cars mod - it's functionality is very similar. Yours alsigns to 16 direction - Straight Cars to 8 :)

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 3:26 pm
by Zaflis
orzelek wrote:Take a look at Straight Cars mod - it's functionality is very similar. Yours alsigns to 16 direction - Straight Cars to 8 :)
That would be 4th mod in the category then, :lol: (edit: Can't find a mod by that name.) But yeah changing mine to 8 is simple too; opening control.lua in text editor and change
vehiclesnap_amount = 16.0 into vehiclesnap_amount = 8.0.
If it's what people would like, i can add an alternate download link.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 4:35 pm
by orzelek
I'd say this simply shows that it should be a base functionality of game :D

I found one main difference betwen StraightCars and this one - StraightCars will adjust your direction a bit when you are close to cardinal.
This one will force you to one of 16 directions thats closest to your current direction. It makes driving a bit strange for me tbh.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 10:28 pm
by devilwarriors
orzelek wrote:StraightCars will adjust your direction a bit when you are close to cardinal.
This one will force you to one of 16 directions thats closest to your current direction. It makes driving a bit strange for me tbh.
feel weird to me too, and even worse is the car is shaking when I'm in between those 45 angles and then I crashed into something and the car was stuck there..

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Fri May 20, 2016 10:52 pm
by Zaflis
Please be clear on which mod do you mean. I too did encounter the vehicle getting stuck bug just once so far. I dig the wall off to get car unstuck. Afterwards tried to ram it again and again from different angles but it never happened. Maybe you have to press turning key just before collision, when it's not in an aligned angle?

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Sat May 21, 2016 12:00 am
by orzelek
The stuck in wall bug is side offect of artifical direction changes and it can't be prevented now I think. You simply end up with your collision box inside walls collision box.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Sat May 21, 2016 12:09 am
by devilwarriors
seem like the pavement drive assist mod was the cause of the shaking I had at weird angle. Removed it and it stopped even tho I wasn't driving on pavement.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Sun May 22, 2016 5:50 pm
by NoriSilverrage
Love this mod!

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Sun May 22, 2016 6:02 pm
by sillyfly
devilwarriors wrote:seem like the pavement drive assist mod was the cause of the shaking I had at weird angle. Removed it and it stopped even tho I wasn't driving on pavement.
That's weird. Pavement Drive Assist shouldn't change your steering if you are out in the wild (no paved tiles in ~5 tile radius). Would you mind sharing a save game and pointing me to the place where it happened? You could also PM me the game, if you don't want to share it publicly. Thanks!

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Tue May 24, 2016 4:13 am
by y.petremann
devilwarriors wrote:
Zaflis wrote:
devilwarriors wrote:There also this mod who does the same as yours I believe

viewtopic.php?f=92&t=17942
It may sound the same but is not. His mod is much heavier, snaps to only 8 axis and is also teleporting the car, as seen there:
https://github.com/YPetremann/better-ve ... ontrol.lua
Ah nice to hear, those are precisely the reason I don't use his mod anymore.

I'm gonna give your version a try.

thanks
For my part, I never had the problem of my mod ... but maybe because I know how it worked and so I ended to only align wall to rails ...

I also was updating the mod locally to make it never crash into wall but I was never satisfied, so I never updated it publicly.

Now I made a release with the align functionnality stripped down.
orzelek wrote:I'd say this simply shows that it should be a base functionality of game :D

I found one main difference betwen StraightCars and this one - StraightCars will adjust your direction a bit when you are close to cardinal.
This one will force you to one of 16 directions thats closest to your current direction. It makes driving a bit strange for me tbh.
I've exactly the same sensation about this mod, and so for my part, as for the rotation I found that my way (and StraightCars way) were much better.

Also finally, DriveAssist is for me far in front of us because It could handle so much in term of driving. For now I've not tested it but I will test how it handle T-junctions and Cross junctions.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Tue May 24, 2016 4:33 am
by devilwarriors
y.petremann wrote:Also finally, DriveAssist is for me far in front of us because It could handle so much in term of driving. For now I've not tested it but I will test how it handle T-junctions and Cross junctions.
The problem with DriveAssist is that it also work when it should not.. like trying to drive out of your base where the concrete end make it think its a road and it try to correct you to follow it but end up just being annoying. It should only work with patch of concrete that are road width or something.
y.petremann wrote: For my part, I never had the problem of my mod ... but maybe because I know how it worked and so I ended to only align wall to rails ...
In retrospect I have pretty much the same problem with this mod than I had with yours.. getting stuck in stuff, etc.., especially on the side of water with this mod. The mod work great for some situation and bad for others. Maybe an on/off button would be nice.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Tue May 24, 2016 1:20 pm
by Zaflis
Or that it wouldn't activate the snapping in low speed? I guess i'd have to do that either different limits for tank and car, or design generally with tank.

Re: [MOD 0.12.x] VehicleSnap 1.0.2

Posted: Tue May 24, 2016 5:11 pm
by Zaflis
New version out if you want to test. I can't reproduce the getting stuck bug at all anymore.

Re: [MOD 0.12.x] VehicleSnap 1.0.1

Posted: Tue May 24, 2016 6:10 pm
by devilwarriors
sillyfly wrote:
devilwarriors wrote:seem like the pavement drive assist mod was the cause of the shaking I had at weird angle. Removed it and it stopped even tho I wasn't driving on pavement.
That's weird. Pavement Drive Assist shouldn't change your steering if you are out in the wild (no paved tiles in ~5 tile radius). Would you mind sharing a save game and pointing me to the place where it happened? You could also PM me the game, if you don't want to share it publicly. Thanks!
I just tried with a new game and only your mod and the Pavement Drive Assist mod and test mode so I can spawn a car and the shaking occur so you wont need my save to test, just create a new game with those mod and drive around a bit. It's easy to reproduce.

Re: [MOD 0.12.x] VehicleSnap 1.0.2

Posted: Tue May 24, 2016 6:11 pm
by devilwarriors
Zaflis wrote:New version out if you want to test. I can't reproduce the getting stuck bug at all anymore.
tried for a whole 5 mins to get stuck near the water and couldn't get stuck, and yesterday it was super easy to reproduce. So I think you fixed it.

nice job!