Page 4 of 4

Re: [MOD 0.15] VehicleSnap

Posted: Wed Oct 11, 2017 2:44 am
by Zaflis
Tested 0.15.34 and experimental 0.15.36, worked in both cases. Both with a save where the mod existed before and where it didn't, and only tried car.

How did it break? If it's not snapping, maybe you accidentally pressed the key combination which should be Shift+V.

Re: [MOD 0.16] VehicleSnap

Posted: Sun Aug 05, 2018 7:50 pm
by groovybluedog
This mod appears to be broken.

The core functionality exists, but this isn't removable from a save game, the control to toggle it doesn't do anything, even if changed to another key. Very annoying as it conflicts with the assisted driving mod and now I'll have to start a new save.

Re: [MOD 0.16] VehicleSnap

Posted: Sun Aug 05, 2018 8:00 pm
by Zaflis
You can't use 2 driving mods at the same time. I use this mod all the time, after all i made it for own purposes first. Tried it again just now to be sure, with Factorio 0.16.51.

I also just enabled email notifications to mod portal, should be easier to track discussions there too. They only just added the feature.

And i don't understand why deleting mod would still leave any traces of it?

Re: [MOD 0.15] VehicleSnap

Posted: Sat Nov 17, 2018 7:14 pm
by Zaflis
widders wrote:
Fri Jul 21, 2017 10:54 pm
I thought I'd have a look and I found the problem. Line 51 of control.lua:

Code: Select all

if player.vehicle.speed > 0.1 then
needs a math.abs(player.vehicle.speed) to cover backwards as well, I tried it seems to work fine :p
Hey, new update (0.16.1) is out if you guys want to test. It allows snapping when driving backwards, but it's a big update and i wrote some more in the mod portal's description. I patched all the bugs i could find myself and it feels very nice. Should work if added to an old save with or without the mod.

Re: [MOD 0.16] VehicleSnap

Posted: Sat Nov 17, 2018 10:57 pm
by BlueTemplar
Well...
factorio_2018-11-17_23-56-53.png
factorio_2018-11-17_23-56-53.png (104.36 KiB) Viewed 7420 times
factorio-current.log
(27.31 KiB) Downloaded 170 times
P.S.: Context :
viewtopic.php?p=387000#p387000

Re: [MOD 0.16] VehicleSnap

Posted: Sun Nov 18, 2018 2:22 am
by Zaflis
mod-VehicleSnap was not registered for the following events when the map was saved but has registered them as a result of loading: on_tick (ID 0) and on_player_changed_position (ID 81)
That's curious, and yes i had not tested the new one on dedicated server. I don't yet know why the events are not saved properly, i do have to manually enable them every time game is loaded. But i don't specifically disable them before saving nor actually handle saving at all as i never thought such would be necessary.

I hope you made sure the server has right version of the mod? Also was it a save that had old version of VehicleSnap?

edit: Some hint may be found there: viewtopic.php?t=48051

edit2: Hmm.. I connected to my dedicated server fine, and also hosted multiplayer game from client itself. How do you replicate it?
... Now i see it, it's when client connects a second time.

Re: [MOD 0.16] VehicleSnap

Posted: Sun Nov 18, 2018 3:24 am
by Zaflis

Code: Select all

script.on_load(function()
  if global.RegisterEvents then
    ToggleEvents(true)
  end
end)
I hope it's fixed with that. At least my server was ok on 1.16.2. I reconnected to it a couple times, wether i was driving or not.

Re: [MOD 0.16] VehicleSnap

Posted: Sun Nov 18, 2018 6:21 pm
by BlueTemplar
Thanks, we'll try it on occasion !

Re: [MOD 0.16] VehicleSnap

Posted: Fri Nov 30, 2018 8:47 am
by PsyhoBelka
hi. your mod can break game when use with Ribbon Maze viewtopic.php?p=388398#p388398
Безымянный.png
Безымянный.png (88.2 KiB) Viewed 7334 times

Re: [MOD 0.16] VehicleSnap

Posted: Fri Nov 30, 2018 8:53 am
by H8UL
PsyhoBelka wrote:
Fri Nov 30, 2018 8:47 am
hi. your mod can break game when use with Ribbon Maze viewtopic.php?p=388398#p388398
Безымянный.png
Details reported here:

https://mods.factorio.com/mod/VehicleSn ... 000c1f4f28

Looks like VehicleSnap is handling player position change events before it had run its on_player_created event

Re: [MOD 0.16] VehicleSnap

Posted: Fri Nov 30, 2018 10:01 am
by Zaflis
I can check validity of pdata by adding this, but i don't know if more errors will follow:

Code: Select all

if pdata and pdata.driving then
There was other relatively harmless bug i think, that game was carrying over the per-player snapping amount even if it was set in different save. Mod however was assuming it doesn't and just set default value 16 at start. Right now you would have had to change the snap value to something else first and then the real one, because game doesn't seem to trigger on_runtime_mod_setting_changed when hit apply and value isn't changed.

I'll put up new version once i test a little bit.

Re: [MOD 0.17] VehicleSnap

Posted: Sat Mar 28, 2020 4:44 pm
by VrozaX
Polish Translation:
https://drive.google.com/open?id=1RW1VI ... NXZnN0pQ1X

Please add to your mod <3

Re: [MOD 0.17] VehicleSnap

Posted: Sat Mar 28, 2020 5:04 pm
by Zaflis
VrozaX wrote:
Sat Mar 28, 2020 4:44 pm
Polish Translation:
https://drive.google.com/open?id=1RW1VI ... NXZnN0pQ1X

Please add to your mod <3
Uploaded to mod portal :) I hope you can test it works.
https://mods.factorio.com/mod/VehicleSnap

Re: [MOD 0.17] VehicleSnap

Posted: Sat Mar 28, 2020 5:17 pm
by VrozaX
Zaflis wrote:
Sat Mar 28, 2020 5:04 pm
VrozaX wrote:
Sat Mar 28, 2020 4:44 pm
Polish Translation:
https://drive.google.com/open?id=1RW1VI ... NXZnN0pQ1X

Please add to your mod <3
Uploaded to mod portal :) I hope you can test it works.
https://mods.factorio.com/mod/VehicleSnap
Yep works :) Thanks

Re: [MOD 0.17] VehicleSnap

Posted: Tue Sep 15, 2020 4:48 pm
by angel79135
Hey ! First thank you very much for this mod.
Are you planning to make it work in 1.0?

Re: [MOD 0.17] VehicleSnap

Posted: Tue Sep 15, 2020 4:54 pm
by Zaflis
angel79135 wrote:
Tue Sep 15, 2020 4:48 pm
Hey ! First thank you very much for this mod.
Are you planning to make it work in 1.0?
The 0.18 version is 1.0 compatible, you only need to install it.

Re: [MOD 0.17] VehicleSnap

Posted: Wed May 05, 2021 1:30 pm
by Scottathew
I deleted a post where I said the mod wasn't working after the last update. The mod still works with 1.1.33. The issue is that I'm a moron and accidentally hit SHIFT+V, which enables\disables the mod.

The mod still works great, and I love it. Thanks for making it.

Re: [MOD 0.17] VehicleSnap

Posted: Wed Oct 06, 2021 5:30 pm
by Khatharr
Thank you for this mod. It's saved me a lot of walls.

Any chance we could get a mode where it snaps on demand? Like when you press a specific key it snaps to the nearest 8/16/whatever, but otherwise does nothing?

Re: [MOD 0.17] VehicleSnap

Posted: Thu Oct 07, 2021 10:35 pm
by Zaflis
Khatharr wrote:
Wed Oct 06, 2021 5:30 pm
Any chance we could get a mode where it snaps on demand? Like when you press a specific key it snaps to the nearest 8/16/whatever, but otherwise does nothing?
The toggle key Shift-V should be enough? You can change it in controls if you want. It has also the button right side of quickbar.