Far Reach

by Fexx

Build, interact and mine on the entire screen. Distances are customizable. Substitute for non-maintained mods like Long Reach.

Utilities
28 days ago
0.16 - 2.0
192K

g does it work with v1.0?

4 years ago

I am using Far Reach and it doesn't seem to work with v1.0, both on a 0.18 map and a new one. Has anyone else seen this?

4 years ago

Ye doesn't work with v1.0

4 years ago

If you go to the mod settings and change the values there, then it will work again. So it looks like the settings are not read properly at first.

4 years ago

This works! Thanks, vladu!

4 years ago

change which settings ? I tryed some but didn't work.
will there be a regular update for this mod too ?

4 years ago

I tried tweaking some of the values for this mod in the settings as well, and also didn't have any luck.

4 years ago

You have to load your game first (or start a new game first) and then change the values

4 years ago
(updated 4 years ago)

It refuses to work o the Mac

4 years ago
(updated 4 years ago)

I tried tweaking some of the values for this mod in the settings as well, and also didn't have any luck.

It loads if you tweak the settings without reloading the game.
Not ideal but works until a fix comes from the mod dev.

4 years ago

The factorio team tried to have all mods that work with 0.18 also work with 1.0, and I just tested, this mod works fine in 1.0.

However, I will release a version that explicitly states to be compatible with 1.0.

The issue you are describing (that you need to change the mod settings to have the reach work again) most likely comes from incompatibility with other mods and is separate from the 1.0 release. What other mods are you using?

4 years ago

The factorio team tried to have all mods that work with 0.18 also work with 1.0, and I just tested, this mod works fine in 1.0.

However, I will release a version that explicitly states to be compatible with 1.0.

The issue you are describing (that you need to change the mod settings to have the reach work again) most likely comes from incompatibility with other mods and is separate from the 1.0 release. What other mods are you using?

  • squeak trough
  • Base Mod
  • Factorio Standard lib - (don't know whats this for and if I need it - I installed anyway)
  • TinyStart
    -Thicker Power Lines
4 years ago

Huh, weird, don't look like mods that coul break Far Reach.

After you touched the settings, everything is back to normal I assume?

4 years ago

I did as mentioned (changed the values) and it worked for me as well. No other mods to speak of that would impact far reach.

4 years ago

I've got this weird bug report for minime. Trying to find what's wrong, I've added some debugging code to Far reach. You can find logging output of starting the game with minime/Far reach and just Far reach there, if you care to take a look. What it boils down to is, on starting a new game, the characters won't be initialized because the player doesn't have a character while the cut scene is playing. Later, if a setting is changed or a mod is added/removed, the respective event triggers and will initialize all players because now they do have a character.

So the obvious solution is to wait until the cutscene has run and initialize players after that. I just haven't figured out yet how to do that, though. :-D

4 years ago

Found it! You should react to defines.events.on_cutscene_cancelled and defines.events.on_cutscene_waypoint_reached. On starting a new game, on_cutscene _cancelled would always be called, whether I pressed TAB to cancel the cutscene or whether I let it come to a finish of its own. However, I don't know if the message popping up at the end of the cutscene would count as something that cancels it. This may be crucial with mods that replace the cut scene but don't end with a dialog window you've to close. So I'd also check for on_cutscene_waypoint_reached. You should make sure to act only when the final waypoint has been reached. Also, this is an event that's triggered for each player. So you should add a function (or adjust your existing one) that allows changing the settings for just one player, not all of them. (Otherwise all settings of all players would be reset each time the event fires for any player.)

4 years ago
(updated 4 years ago)

Thanks for your report. I am fixing far reach by applying my settings after on_cutscene_cancelled

Edit Seems we both found the solution ;)
I didn't think about applying the settings only to the player that ended the cutscene. I also reapply the settings for all players if e.g. a player joined. Probably doesn't matter for far reach, as the setting is global. Thnaks anyway ;)

I think there should be an event "on_character_created".

4 years ago
(updated 4 years ago)

I didn't think about applying the settings only to the player that ended the cutscene.

I'm not sure how the event works. on_cutscene_cancelled only triggers for one player (the one who pressed TAB). Would there ever be the possibility that two or more players can see the cutscene? In this case, the event would trigger for each player.

I also reapply the settings for all players if e.g. a player joined. Probably doesn't matter for far reach, as the setting is global. Thnaks anyway ;)

Not a good idea! Polling settings is expensive. Using

global.player_data[player.index].build_distance = global.player_data[player.index].build_distance or settings["far-reach-build-distance-bonus"].value
player.character_build_distance_bonus = global.player_data[player.index].build_distance

would be cheaper because the data are polled from the game only once. However, if you initialize all players each time a player joins, and there are x players, the function will still be called x^2 times -- that seems quite wasteful. :-)

I think there should be an event "on_character_created".

I bet you don't know how Autodrive works! We put a dummy character into vehicles each time they are needed for opening gates or shooting, and we destroy them again when they are not needed so the vehicle can be mined. Let me tell you, we go through a lot of characters, and the event would fire more often than you can imagine! :-)

This thread has been locked.