[MOD 0.17] VehicleSnap

Topics and discussion about specific mods
Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.15] VehicleSnap

Post 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.

groovybluedog
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Jul 22, 2018 4:18 pm
Contact:

Re: [MOD 0.16] VehicleSnap

Post 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.

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.16] VehicleSnap

Post 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?

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.15] VehicleSnap

Post 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.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2340
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [MOD 0.16] VehicleSnap

Post by BlueTemplar »

Well...
factorio_2018-11-17_23-56-53.png
factorio_2018-11-17_23-56-53.png (104.36 KiB) Viewed 3826 times
factorio-current.log
(27.31 KiB) Downloaded 86 times
P.S.: Context :
viewtopic.php?p=387000#p387000
BobDiggity (mod-scenario-pack)

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.16] VehicleSnap

Post 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.

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.16] VehicleSnap

Post 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.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2340
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [MOD 0.16] VehicleSnap

Post by BlueTemplar »

Thanks, we'll try it on occasion !
BobDiggity (mod-scenario-pack)

PsyhoBelka
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Nov 30, 2018 7:47 am
Contact:

Re: [MOD 0.16] VehicleSnap

Post by PsyhoBelka »

hi. your mod can break game when use with Ribbon Maze viewtopic.php?p=388398#p388398
Безымянный.png
Безымянный.png (88.2 KiB) Viewed 3740 times

User avatar
H8UL
Fast Inserter
Fast Inserter
Posts: 114
Joined: Mon May 15, 2017 4:02 pm
Contact:

Re: [MOD 0.16] VehicleSnap

Post 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
Shameless mod plugging: Ribbon Maze

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.16] VehicleSnap

Post 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.

VrozaX
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Mar 28, 2020 4:41 pm
Contact:

Re: [MOD 0.17] VehicleSnap

Post by VrozaX »

Polish Translation:
https://drive.google.com/open?id=1RW1VI ... NXZnN0pQ1X

Please add to your mod <3

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.17] VehicleSnap

Post 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

VrozaX
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Mar 28, 2020 4:41 pm
Contact:

Re: [MOD 0.17] VehicleSnap

Post 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

angel79135
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Sep 15, 2020 4:45 pm
Contact:

Re: [MOD 0.17] VehicleSnap

Post by angel79135 »

Hey ! First thank you very much for this mod.
Are you planning to make it work in 1.0?

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.17] VehicleSnap

Post 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.

Scottathew
Burner Inserter
Burner Inserter
Posts: 11
Joined: Tue May 07, 2019 4:41 pm
Contact:

Re: [MOD 0.17] VehicleSnap

Post 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.

Khatharr
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Oct 06, 2021 5:28 pm
Contact:

Re: [MOD 0.17] VehicleSnap

Post 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?

Zaflis
Filter Inserter
Filter Inserter
Posts: 364
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.17] VehicleSnap

Post 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.

Post Reply

Return to “Mods”