Search found 23 matches

by Valansch
Wed Feb 27, 2019 11:25 pm
Forum: Resolved Problems and Bugs
Topic: [0.17.02] /help does not print help text
Replies: 1
Views: 2331

[0.17.02] /help does not print help text

in 0.16.51
"/help promote"
printed this:
/promote <player> - Promotes the player to admin.

in 0.17.02
"/help promote"
printes this:
/promote 20
Same deal for all other commands.
by Valansch
Fri Jan 04, 2019 3:34 pm
Forum: Modding interface requests
Topic: Remove or override vanilla commands
Replies: 1
Views: 1165

Remove or override vanilla commands

Please let us remove or override vanilla commands.

If people exand the functionality of certain commands, choosing another name than the vanilla name isn't a desired outcome, if/because:

People already know of the vanilla names and will intuitively use the vanilla commands, missing the new ...
by Valansch
Thu Sep 27, 2018 12:33 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: [Rseding91] Desync on game.print of small number

If you read the thread backwards it doesnt make sense^^.
But at the time i mentioned it we (or I) didnt know it was math.sin(). I was just noticing that the calculation rounded it down on windows. But this was false, as the input for the addidion was already different on both OS's, so the floating ...
by Valansch
Thu Sep 27, 2018 12:41 am
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: [Rseding91] Desync on game.print of small number

You fundamentally misunderstood how floats work. Floating point meaning the position of the point floats according to your exponent.
Your machine precision is 2^-52 yes. However this neither means that this is the smallest number nor does it mean that this is the smallest number that can be added to ...
by Valansch
Wed Sep 26, 2018 4:53 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number


It's that 472.5+2^-44 == 472.5 on windows part that scares me most. DP addition can't be needing a mathlib, right? wtf's up with dropping bits in simple addition? 472's 9 bits, so the addition's only preserving 52 of the 53 bit's it's supposed to have, is there some integer-unit manipulation going ...
by Valansch
Wed Sep 26, 2018 4:35 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number

other angles that cause this (which may be more common):
math.sin(18)
math.sin(89)
by Valansch
Wed Sep 26, 2018 3:46 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number

After further testing i got it down to math.sin giving different answers.

game.print(math.sin(0.7853981) % 0.1)


Result on windows: 0.0071067363577805
Result on linux: 0.0071067363577804


The difference comes after the 15th significant digit. Therefor the % 0.1


Showing more digits:

game ...
by Valansch
Wed Sep 26, 2018 1:40 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number

maybe if the lua backend on windoes/linux has different rounding errors for such very small numbers?
Exactly (See my original comment)
472.5 + 2^-44 incorrectly rounds down to 472.5 on windows. You can even repeat this in single player and get 0 on windows and 5.68e^-14 on linux....
by Valansch
Wed Sep 26, 2018 1:32 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number

Huh. The doc only says "map crc", which usually doesn't include lua. But if you say so, i'll believe you as i can't test right now. :(
Nono dont believe me please i was wrong. I updated my comment.
by Valansch
Wed Sep 26, 2018 1:25 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number

Just to clarify your misconception about desyncs: You can do whatever you want inside the lua vm and it will never cause any desyncs.

This is not true. game.force_crc is specifically there to check the state of the lua vm.

Edit: You are right. I dont understand what game.force_crc does ...
by Valansch
Wed Sep 26, 2018 9:36 am
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Desync on game.print of small number

We did some additional testing and I just want to share my obvservation.

If you first serialize the resulting variable, you also desync when printing the string.
So that would negate my statement that its an issue with game.print doing something different on linux vs windows.
But this means resStr ...
by Valansch
Tue Sep 25, 2018 10:08 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Arithmetic causes desync

On a "Headless" version of Factroio running on Windows Server 2016 with a Windows 10 Client the command does not cause a desync.
While you will desync with a linux client on a windows server...
by Valansch
Tue Sep 25, 2018 10:07 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] Desync on game.print of small number
Replies: 20
Views: 9125

Re: Arithmetic causes desync

I found it to be game.print causing the desync as opposed to the actual arithmetic. Floats seem to behave nicely, if you force crc after the calculation you dont get a desync. However if you print the variable it outputs different values for windows and linux.

Windows will output is 0
Linux will ...
by Valansch
Tue Jun 05, 2018 10:19 am
Forum: Ideas and Suggestions
Topic: Cross-version server browser
Replies: 6
Views: 3608

Re: Cross-version server browser

I second the suggestion. Its a great i idea. I think there are many people stuck on stable that don't know what crazy cool stuff is going on on experimental servers!
by Valansch
Mon Mar 19, 2018 7:53 pm
Forum: Resolved Problems and Bugs
Topic: [Klonan] [0.16.31] PVP Crash when Defcon Timer <= 1/60
Replies: 1
Views: 2782

[Klonan] [0.16.31] PVP Crash when Defcon Timer <= 1/60

When i set the defcon timer below or equal to 1/60 the scenario crashes.
0.0166667 works fine 0.01666 breaks

Error message:
Image
by Valansch
Fri Mar 16, 2018 4:30 pm
Forum: Resolved Problems and Bugs
Topic: [Rseding91] [0.16.30] Character Corpse Position Issue
Replies: 2
Views: 2949

Re: [0.16.30] Character Corpse Position Issue

I found that find_entity doesnt work for any entity that doesnt have a hitbox. I tested it with:

defender
destroyer
distractor
construction-robot
acid-splash-purple
behemoth-biter-corpse
big-biter-corpse
big-worm-corpse
medium-biter-corpse
medium-remnants
medium-spitter-corpse
medium-worm-corpse ...
by Valansch
Sun Dec 17, 2017 12:21 am
Forum: Resolved Problems and Bugs
Topic: [16.4] Crash on under. belt ghost revive "TransportBeltConnectable::disconnectGroundConnections" MR
Replies: 2
Views: 1625

[16.4] Crash on under. belt ghost revive "TransportBeltConnectable::disconnectGroundConnections" MR

Hello,

our server just crashed.
Unfortunately i cannot give you any detail on how it happend other than the log, as i was not online at the time.
I hope the server log helps. The save is from about 3 minutes before the crash happend.
We do not run any mods, but the RedMew scenario.

Valansch
by Valansch
Sun Jul 30, 2017 12:05 am
Forum: Modding discussion
Topic: Shooting state is not writeable
Replies: 5
Views: 2767

Re: Shooting state is not writeable

The code you are linking works. You can stop a player from attacking something.

But i didn't have any luck setting the shooting state to anything else than 0.

So the shooting state is writable. But only 0 is a legal value?
by Valansch
Sat Jul 29, 2017 9:52 am
Forum: Modding discussion
Topic: Shooting state is not writeable
Replies: 5
Views: 2767

Re: Shooting state is not writeable

I thought someone might say that. Sry I didn't clarify, but this was the first thing I tried. I does not work.
by Valansch
Fri Jul 28, 2017 8:19 pm
Forum: Modding discussion
Topic: Shooting state is not writeable
Replies: 5
Views: 2767

Shooting state is not writeable

The API states:
shooting_state [Read-Write]
http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.shooting_state


yet


game.players[1].shooting_state.state = defines.shooting.shooting_enemies
game.print(game.players[1].shooting_state.state)


Will always return the shooting state ...

Go to advanced search