Test tranlate request (disconnect in MP)

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Test tranlate request (disconnect in MP)

Post by Helfima »

I have do a test if a mod tranlate request for item and fluid in a one tick (Bob & Angel pack)
that can explain disconnect in MP? 9ms only for requests if we add UI and another runtime >16ms

log:

Code: Select all

 751.568 Script @__test__/control.lua:7: ------------------------
 751.568 Script @__test__/control.lua:8: Test translation request
 751.568 Script @__test__/control.lua:9: Elapsed: 0.043500ms
 751.568 Script @__test__/control.lua:12: Count items: 1514
 751.577 Script @__test__/control.lua:17: Count fluids: 171
 751.578 Script @__test__/control.lua:21: Elapsed: 9.998000ms
control.lua for the test:

Code: Select all

local test = {}

function test.run(event)
  local profiler = game.create_profiler()
  profiler.reset()
  log("------------------------")
  log("Test translation request")
  log(profiler)
  local player = game.players[event.player_index]
  local items = game.item_prototypes
  log("Count items: "..#items)
  for _,item in pairs(items) do
    player.request_translation(item.localised_name)
  end
  local fluids = game.fluid_prototypes
  log("Count fluids: "..#fluids)
  for _,fluid in pairs(fluids) do
    player.request_translation(fluid.localised_name)
  end
  log(profiler)
end
commands.add_command("test","request", test.run)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Test tranlate request (disconnect in MP)

Post by Klonan »

The MP won't disconnect after only 16 ms of script update, the default timeout is 10 seconds, so 100,000 ms

Post Reply

Return to “Technical Help”