[1.0.0] Different interaction distance with buildings depending on step execution

Place to get help with not working mods / modding interface.
Post Reply
DunRaider
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Oct 07, 2020 7:45 am
Contact:

[1.0.0] Different interaction distance with buildings depending on step execution

Post by DunRaider »

What I try to do:
Make a function which will find the furthest distance the character can be when placing a building, interacting with a building or mining a resource.

My problem:
The rule for when the character is 10 or 2.7 units away from something seems to be irregular, which is pretty frustrating, but while I were trying different things to figure out if my function worked as intended I (once again) stumbled upon some rather odd behavior. The interaction distance seem to be different depending on the order I execute steps.

Reproduce the issue:
This issue unfortunately requires a save file. I tried to reproduce the problem in a new map, but the issue did not manifest, which is even more strange - all the steps are programmed so it should be entirely the same in both maps.

The attached sample has two "tasks" files. One works - the other doesn't.

The "tasks" file with the issue works without a problem on this map:

>>>eNpjZICC1au07BgYGuw5WJLzE3MYGA44wDBXcn5BQWqRbn5RK
rIwZ3JRaUqqbn5mDkgbDHOl5qXmVuomJRanIgtzZBbl56GbwFpck
p+HKlJSlJpaDHIKzDncpUWJeZmluRC9CAMZGM0YJFgmMDIwgPD/e
gaF//9BGMh6APQNCDMwNkBUAsVggDU5JzMtjYFBwRGInUDSjIyM1
SLr3B9WTbFnhKjRc4AyPkBFDiTBRDxhDD8HnFIqMIYJkjnGYPAZi
QGxtARoBVQVhwOCAZFsAUkyMva+3brg+7ELdox/Vn685JuUYM9o6
Cry7oPROjugJDvIn0xwYtZMENgJ8woDzMwH9lCpm/aMZ8+AwBt7R
laQDhEQ4WABJA54MzMwCvABWQt6gISCDAPMaXYwY0QcGNPA4BvMJ
49hjMv26P4ABoQNyHA5EHECRIAthLuMEcJ06HdgdJCHyUoilAD1G
zEguyEF4cOTMGsPI9mP5hDMiED2B5qIigOWaOACWZgCJ14ww10DD
M8L7DCew3wHRmYQA6TqC1AMwgPJwIyC0AIOzAwIAEwWC9dmmgIAY
PqkRw==<<<

Discord for these types of issues?
It seems like I might run into a good amount of issues like this in my development of the tool I have in mind and it might be easier to solve with e.g. screen share. Are there a specific channel on the Factorio discord server where I can raise these issues?

Best regards
Attachments
Interaction_distance_bug.zip
(3.75 KiB) Downloaded 37 times
Test map.zip
(5.21 MiB) Downloaded 35 times

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [1.0.0] Different interaction distance with buildings depending on step execution

Post by Bilka »

The player is in different positions.
Working:
Image

Not working:
Image

Moving to modding help.

(values obtained with https://marketplace.visualstudio.com/it ... omod-debug)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

DunRaider
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Oct 07, 2020 7:45 am
Contact:

Re: [1.0.0] Different interaction distance with buildings depending on step execution

Post by DunRaider »

So it has something to do with the lua script, which will not reproduce the same results even though the commands are the same.

Thanks for your help. :)

Post Reply

Return to “Modding help”