Search found 67 matches

by Hornwitser
Thu Jan 16, 2020 8:48 am
Forum: Technical Help
Topic: [0.17.79]Can not be listed in the server list[centos7 headless](solved)
Replies: 2
Views: 102

Re: [0.17.79]Can not be listed in the server list[centos7 headless]

You need to configure the server for it to be listed, copy /opt/factorio/data/server-settings.example.json to /opt/factorio/server-settings.json and edit it. At minimum the username and password/token entries must changed.
by Hornwitser
Tue Jan 14, 2020 4:04 am
Forum: Minor issues
Topic: [0.17.79] game.table_to_json uses excessively many digits for numbers
Replies: 19
Views: 530

Re: [0.17.79] game.table_to_json uses excessively many digits for numbers

It doesn't matter how many digits you use when the float to decimal conversion function you use is broken. How many times does this need to be said? The float to decimal conversion function you use does not round trip because it's missing the 80-bit extended precision floats it was designed to work ...
by Hornwitser
Mon Jan 13, 2020 10:57 pm
Forum: Minor issues
Topic: [0.17.79] game.table_to_json uses excessively many digits for numbers
Replies: 19
Views: 530

Re: [0.17.79] game.table_to_json uses excessively many digits for numbers

That's the root issue of why it's currently using so many digits: because the conversion just doesn't work correctly when going binary -> string -> binary. I kept upping the number of digits until I gave up on it and just changed the mod-settings.json file to mod-settings.dat at which point the iss...
by Hornwitser
Sun Jan 05, 2020 5:58 am
Forum: Minor issues
Topic: [0.17.79] game.table_to_json uses excessively many digits for numbers
Replies: 19
Views: 530

Re: [0.17.79] game.table_to_json uses excessively many digits for numbers

On an unrelated note the trio regression suite shows that the modifications you've made causes the following test case to fail string.format("%#11.5g", 10e5) It produces the output 1.00000e+05 (which has 6 significant digits) instead of the expected output of (space)1.0000e+05 (with has 5 significan...
by Hornwitser
Sat Jan 04, 2020 9:08 pm
Forum: Minor issues
Topic: [0.17.79] game.table_to_json uses excessively many digits for numbers
Replies: 19
Views: 530

Re: [0.17.79] game.table_to_json uses excessively many digits for numbers

Code: Select all

typedef double trio_long_double_t;
That ain't no long double. This change breaks the formatting of doubles which rely on having more precision than a double to work.
by Hornwitser
Sat Jan 04, 2020 5:40 pm
Forum: Minor issues
Topic: [0.17.79] game.table_to_json uses excessively many digits for numbers
Replies: 19
Views: 530

Re: [0.17.79] game.table_to_json uses excessively many digits for numbers

There are two issues caused by this. The first is that the JSON is longer, in Clusterio for example the JSON is passed on to other instances and this being sent over commands causes the operation to take longer and more bandwidth. The second is that there's floating point values for which the encodi...
by Hornwitser
Sat Jan 04, 2020 4:02 am
Forum: Minor issues
Topic: [0.17.79] game.table_to_json uses excessively many digits for numbers
Replies: 19
Views: 530

[0.17.79] game.table_to_json uses excessively many digits for numbers

The command /c game.print(game.table_to_json{v=1/3}) Prints out {"v":0.333333333333333303727386009995825588703155517578125}, which is excessively many digits for a number with no more than 16 significant digits. The output looks like the exact form of a double precision number, but it's not. It's a ...
by Hornwitser
Fri Nov 29, 2019 11:15 pm
Forum: 1 / 0 magic
Topic: [0.17.74] Hang on SIGTERM during startup.
Replies: 6
Views: 408

Re: [0.17.74] Hang on SIGTERM during startup.

Still happens on a semi regular basis on 0.17.79. It would be easy to add code that for example dumps a back trace of all threads when this is detected to happen.
by Hornwitser
Wed Nov 20, 2019 4:06 pm
Forum: Not a bug
Topic: [0.17.79] LuaCustomTable cannot be serialized error occures even when stored in a local
Replies: 4
Views: 239

Re: [0.17.79] LuaCustomTable cannot be serialized error occures even when stored in a local

These rules don't seem to be written down anywhere. Where do I go to learn about rules like this one about the use of the API?
by Hornwitser
Tue Nov 19, 2019 10:39 pm
Forum: Not a bug
Topic: [0.17.79] LuaCustomTable cannot be serialized error occures even when stored in a local
Replies: 4
Views: 239

[0.17.79] LuaCustomTable cannot be serialized error occures even when stored in a local

The following code cases the game to be un-savable even though script local variables are not saved:

Code: Select all

local foo
script.on_init(function()
    foo = game.players
end)
by Hornwitser
Thu Nov 14, 2019 10:39 am
Forum: Assigned
Topic: [Rseding91] [0.17.76] Crash on running /c game.reload_script()
Replies: 3
Views: 290

Re: [Rseding91] [0.17.76] Crash on running /c game.reload_script()

If I put them in the wrong folder please tell me what folder I'm supposed to put them in. These are the steps I've done on Linux: # In the factorio headless folder. mkdir -p scenarios/broken/ echo "print('======== original')" > scenarios/broken/control.lua bin/x64/factorio --start-server-load-scenar...
by Hornwitser
Wed Nov 13, 2019 1:14 am
Forum: Won't implement
Topic: API returning index of the player the code is running on
Replies: 12
Views: 380

Re: API returning index of the player the code is running on

That is one way to view what is a desync. I have a more pragmatic view where I consider the game desynced when the state between the server and the client is uncontrollably diverging. If you were to take the "data on one client is different to data on another client" to its logical extreme you will ...
by Hornwitser
Tue Nov 12, 2019 7:01 pm
Forum: Won't implement
Topic: API returning index of the player the code is running on
Replies: 12
Views: 380

Re: API returning index of the player the code is running on

Well, here's a Proof of Concept Scenario Script that does exactly what I'm suggesting and guess what it doesn't instantly desync. Is this wrong? Maybe, but this definitively demonstrates that what I'm suggesting not only is possible , it works just fine (even with heavy mode on!). (Please note that ...
by Hornwitser
Tue Nov 12, 2019 5:43 pm
Forum: Won't implement
Topic: API returning index of the player the code is running on
Replies: 12
Views: 380

API returning index of the player the code is running on

Yes, I know very well that doing any action that affects the vast majority of the game state from a value returned by such an API will desync the game, but as clarified in this bug report GUI state is too expensive to CRC check and can therefore differ between client and server without desyncing the...
by Hornwitser
Tue Nov 12, 2019 5:23 pm
Forum: Minor issues
Topic: [0.17.76] Admin requirement for certain script actions make no sense
Replies: 4
Views: 157

Re: [0.17.76] Admin requirement for certain script actions make no sense

There's nothing wrong with run time subscription of events so long as you keep track of which events you have subscribed to and make sure the same events are subscribed to in on_load. You would be removing a useful feature if you prevented this. As for the admin check I really, really don't understa...
by Hornwitser
Tue Nov 12, 2019 5:06 pm
Forum: Minor issues
Topic: [0.17.76] Admin requirement for certain script actions make no sense
Replies: 4
Views: 157

Re: [0.17.76] Admin requirement for certain script actions make no sense

Are you saying you can't make game.kick_player kick the player regardless of how it's run? That seems strange. Having the option to let everyone run commands also seems a little strange if you consider it above admin.
by Hornwitser
Tue Nov 12, 2019 3:23 pm
Forum: Minor issues
Topic: [0.17.76] Admin requirement for certain script actions make no sense
Replies: 4
Views: 157

[0.17.76] Admin requirement for certain script actions make no sense

Certain script action like game.kick_player requires the execution context to be a player that is promoted to admin. This makes absolutely no sense as the only way you can execute game.kick_player() is if you have permission to run commands, or if you clicked on a custom script GUI which does it for...
by Hornwitser
Tue Nov 12, 2019 2:47 pm
Forum: Not a bug
Topic: [0.17.76] GUI element state is not CRC checked
Replies: 1
Views: 116

[0.17.76] GUI element state is not CRC checked

Not sure if this is strictly speaking a bug, but if you create GUI elements with properties that are different on the server and the client the game does not desync, (see example script below.) Not even the type matters. If you as in the example script below create a flow on the server and a button ...
by Hornwitser
Tue Nov 12, 2019 12:32 am
Forum: Assigned
Topic: [Rseding91] [0.17.76] Crash on running /c game.reload_script()
Replies: 3
Views: 290

[Rseding91] [0.17.76] Crash on running /c game.reload_script()

Running /c game.reload_script() on a dedicated server started with --start-server-load-scenario with no players online and auto_pause configured to false causes the server to crash. See the attached log. The documentation for reload_script is also incredibly vague stating only "Forces a reload of th...
by Hornwitser
Mon Nov 11, 2019 8:37 pm
Forum: Modding interface requests
Topic: Fire on_configuration_changed when a save's lua scripts are modified
Replies: 7
Views: 223

Re: Fire on_configuration_changed when a save's lua scripts are modified

An alternative to this proposal would be having an on_start event that is triggered when the server (or single player game) is started, and happens after on_load/on_init/on_configuraiton_changed but before any other event. My patched in scenario code could then use that event to initialize variables...

Go to advanced search