Batch Mode

by cakem

A remixed way to play though the game. Start with all research unlocked, but items must be crafted in large batches with the help of science packs.

Overhaul
1 year, 3 months ago
1.1
179
Logistics

b Every playe that joins on multiplayer increases research

1 year, 3 months ago

Currently in control.lua the code is the following which brings issues on a muiltiplayer server as whenever a player joins the game it increases the research by 1. After just a day on a server infinite research is at 80 for all techs. Could this be changed to not research_all when player joins a dedicated server?

local n = settings.startup["multiplier"].value

local function initPlayer(player)
-- player.get_main_inventory().resize(3)
-- player.force.manual_crafting_speed_modifier = -1.0 + 1.0/n
-- player.force.technologies['mining-productivity-4'].level = 10
-- give all recipes
player.force.research_all_technologies()
end

-- local function onPlayerRespawned(event)
-- local player = game.get_player(event.player_index)
-- player.force.manual_crafting_speed_modifier = -0.8
-- player.clear_items_inside()
-- end

function onPlayerJoined(event)
local player = game.get_player(event.player_index)
initPlayer(player)
end

script.on_event({defines.events.on_player_joined_game, defines.events.on_player_created}, onPlayerJoined)

1 year, 3 months ago

Should be fixed now, sorry about that.

1 year, 3 months ago

This fix seems to desync players whenever they mine anything(just tested rocks)

Player log:
https://pastebin.com/VSHs6GL1

Server Log:
96.977 ConnectionRequestReplyConfirm (type(ConnectionRequestReplyConfirm) ) from(IP ADDR:({Client-IP:61103}))
96.977 Info ServerRouter.cpp:465: Replying to connectionRequest for address(IP ADDR:({Client-IP:61103})).
96.977 Info ServerSynchronizer.cpp:604: nextHeartbeatSequenceNumber(5542) adding peer(2)
96.994 Info ServerMultiplayerManager.cpp:813: updateTick(6969414) changing state from(InGame) to(InGameSavingMap)
97.076 Info ServerMultiplayerManager.cpp:962: updateTick(6969414) received stateChanged peerID(2) oldState(Ready) newState(ConnectedWaitingForMap)
97.547 Info ServerMultiplayerManager.cpp:1023: UpdateTick(6969414) Serving map(/root/factorio/temp/mp-save-2.zip) for peer(2) size(29417624) auxiliary(1150) crc(1162149599)
97.547 Info ServerMultiplayerManager.cpp:813: updateTick(6969414) changing state from(InGameSavingMap) to(InGame)
97.643 Info ServerMultiplayerManager.cpp:962: updateTick(6969414) received stateChanged peerID(2) oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap)
101.093 Info ServerMultiplayerManager.cpp:962: updateTick(6969414) received stateChanged peerID(2) oldState(ConnectedDownloadingMap) newState(ConnectedLoadingMap)
103.960 Info ServerMultiplayerManager.cpp:962: updateTick(6969585) received stateChanged peerID(2) oldState(ConnectedLoadingMap) newState(TryingToCatchUp)
105.393 Info ServerMultiplayerManager.cpp:962: updateTick(6969671) received stateChanged peerID(2) oldState(TryingToCatchUp) newState(WaitingForCommandToStartSendingTickClosures)
105.393 Info GameActionHandler.cpp:5078: UpdateTick (6969671) processed PlayerJoinGame peerID(2) playerIndex(0) mode(connect)
105.476 Info ServerMultiplayerManager.cpp:962: updateTick(6969676) received stateChanged peerID(2) oldState(WaitingForCommandToStartSendingTickClosures) newState(InGame)
107.993 Info ServerMultiplayerManager.cpp:962: updateTick(6969827) received stateChanged peerID(2) oldState(InGame) newState(DesyncedWaitingForMap)
107.993 Info ServerMultiplayerManager.cpp:1047: updateTick(6969827) received playerDesynced peer (2)
107.994 Info ServerMultiplayerManager.cpp:813: updateTick(6969827) changing state from(InGame) to(InGameSavingMapForDesyncReport)
109.193 Info ServerMultiplayerManager.cpp:1076: Disconnect notification for peer (2)
109.193 Info ServerMultiplayerManager.cpp:962: updateTick(6969827) received stateChanged peerID(2) oldState(DesyncedWaitingForMap) newState(DisconnectScheduled)
109.195 Info ServerSynchronizer.cpp:623: nextHeartbeatSequenceNumber(6276) removing peer(2).
115.485 Info ServerMultiplayerManager.cpp:813: updateTick(6969827) changing state from(InGameSavingMapForDesyncReport) to(InGame)

New response