Giter Club home page Giter Club logo

Comments (45)

Oarcinae avatar Oarcinae commented on July 18, 2024 1

Excellent. There is probably something about the process of saving the zip in windows and then using it on Linux that is breaking with 0.16. I'll see if there's anything I can do in my code but that sounds like a real game bug.

Here is my process and it's probably reason I have no problems. I don't save the zip from my pc, I start the game and map from the command line and have the scenario located in the scenarios folder.

THIS IS MY "start-server.sh" linux script:

#!/bin/bash

factorio_exe="/mnt/ssd/factorio_0.16/bin/x64/factorio"
settings_files="--server-settings my-server-settings.json --server-banlist banlist.json"
log_file="--console-log my-server.log"

start_scenario_cmd="--start-server-load-scenario FactorioScenarioMultiplayerSpawn"

$factorio_exe $start_scenario_cmd $settings_files $rcon_settings $log_file

My scenario code is located in ../factorio_0.16/scenarios/FactorioScenarioMultiplayerSpawn.

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024 1

Phew... Got it to work. It was a combination of starting a new map with the scenario and coping the level.dat + level-init.dat + script.dat from my current server map to this new map zip file.
I also completely wiped the server directory. There must be some hidden files or something. But the scenario and all the GUI work with the converted map from 0.15.40 to 0.16.5

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024 1

OK, that was the issue. I use git clone ALL the time but I'm not a developer so I forgot to pick up the branch (I was git cloning the original after copy/paste from the tool on the page).

Great scenario, will continue testing it.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

Hey, I have a 0.16 dev branch, give that a try. I fixed all the issues you listed except I don't know what might cause the GUI bug where sometimes people can't interact with the menu... that one I haven't seen yet.

Try it here: https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn/tree/dev_0.16

It has a LOT of changes to the config settings, so you may want to tweak them. It also has no RSO soft mod just yet.

Were you able to get the RSO portion of it working at all by the way?

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

Any other 0.16 issues can be posted here as well.

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

Hi, yeah i literately just saw the dev branch and facepalmed.
Ive actually always had RSO disabled as the latest iterations in 0.15 have implemented a better ore spawning for vanilla and the ores did indeed get richer the further you traveled.

I'll keep testing.. I have enabled the RSO option in your config but im unsure if its loading or not. Is it just as simple to re-add Enable_rso = true to the config or is there more involved.

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

Might as well post it in here.
For a feature request could you change how open spawns work. Instead of allowing anyone to join an open spawn they request an invite on a 30sec timer. This way it will stop random people joining a team if the owner of the team is not online, had this a couple of times where the team host crashed and he's spawn was left open after inviting a friend to join him, he then came back to find a random player had also joined his spawn.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

I'm working on RSO. The latest dev branch should have my RSO soft mod in it and possibly working :)

Regarding the open spawns, I'll add that as a separate request. It's a good idea, but takes time to make sure the GUI options work correctly and without bugs.

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

Can still confirm with the dev build the GUI does not work at all now. The buttons will display, but nothing happens if you click on them. New players are unable to join.
This is on a Headless Server Linux running 0.16.4
The scenario files run fine on a client hosted game in Windows.
Do you have a debug function in the config file to enable some kind of verbose logging of gui interaction.
Nothing turns up in the server logs so it will be hard to track down why its not working.

from factorioscenariomultiplayerspawn.

Cyberzoid1 avatar Cyberzoid1 commented on July 18, 2024

I'm running this on 16.2 and its working for me. Try downgrading and give it a shot

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

I'm running on 16.4 headless Linux. Friend and I had no problems joining but I have tested all the spawn menu options

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

have not tested all options

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

Are you running any other mods?

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

Nope vanilla only.
It might be because im repacking the zip file of a save with the 0.16 scenario inside, deleting the server created /factorio/scenario folder and the /factorio/temp folder before booting the server back up.

from factorioscenariomultiplayerspawn.

Noa3 avatar Noa3 commented on July 18, 2024

0.16.4 i have the same problem with the gui, and if anyone want to join, the server shelf crashes and shoutdown.

My way to create a Server: Download Scenario > Start Factorio > Load Scenario Oarc_0.16 > generate a map > save(without clicking on GUI) > place save on server > let server start and load the save > join > GUI and crash bug

i have even no mods besides running

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

I'll try --start-server-load-scenario.
When the server loads a zip map it automatically extracts the scenario files. But maybe forcing the scenario to start first before the server loads the map could work. I'll check it out. The only other possibility is that its possible factorio bakes some part of the scenario into the level.dat.

I cant get the scenario to load for a new map or the existing one.
I use the Linux service.

[Unit]
Description=Factorio Server

[Service]
Type=simple
User=factorio
ExecStart=/home/Factorio/bin/x64/factorio --start-server-load-latest --server-settings server-settings.json --server-banlist banlist.json

from factorioscenariomultiplayerspawn.

Noa3 avatar Noa3 commented on July 18, 2024

THX, i will try it later.

one more thing if i join a server with oark and just save(in windows) the map on my pc, upload this again on the server, the same problems come up.

EDIT:
I tryd the souluton from Oarcinae and its now working. now i only need to know how to load the save XD

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

So I'm currently hosting a game on my linux server so I can't test this out right now, but it really does sound like a game issue since it works one way and not the other.

@AusKarlos I'm not familiar with the Linux service, but you could edit the ExecStart line right? I assume that's just a file somewhere you can edit? Since the service looks like it loads the latest save, you should just "manually" start a game without the service by running --start-server-load-scenario first. You should then be able to stop the game and resume it with the service I think?

And yes, I believe there IS a level.dat file when you save the zip. A save is different than just the "pure" scenario because it includes the generated level and the map settings. However, I did implement the scenario in a way that makes it convenient to start from the command line hopefully.

from factorioscenariomultiplayerspawn.

Noa3 avatar Noa3 commented on July 18, 2024

sometimes if someone join, i get a server crash with this error message:

2017-12-17 19:41:54 [JOIN] APKAXEH joined the game
3331.014 Error MainLoop.cpp:1013: Exception at tick 197033: Error while running event level::on_gui_click (ID 1)
...verfiles/temp/currently-playing/separate_spawns_guis.lua:528: attempt to index local 'player' (a nil value)
3331.015 Error ServerMultiplayerManager.cpp:95: MultiplayerManager failed: "Error while running event level::on_gui_click (ID 1)
...verfiles/temp/currently-playing/separate_spawns_guis.lua:528: attempt to index local 'player' (a nil value)"
3331.015 Info ServerMultiplayerManager.cpp:693: mapTick(197033) changing state from(InGame) to(Failed)
3331.015 Info GlobalContext.cpp:660: Waiting for child processes to exit: 

maybe it can help to fix some things

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@Noa3 I pushed a tentative patch for that error. I'm not sure how that function is receiving an invalid player parameter though so I don't know the root cause.

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

@Oarcinae The service is similar to how a bash script runs, but you can assign a user (that doesn't have the ability to log in and restricts executions) to exec the server. This can reduce the risk of someone attempting to run a bash script through the factorio server.

Ive edited the ExecStart line as followed
ExecStart=/home/Factorio/bin/x64/factorio --start-server-load-scenario FactorioMPSpawn --server-settings server-settings.json --server-banlist banlist.json
(The server loads a new map but the scenario does not start, files are in the correct location, but also creates a save file with the scenario files inside which indicates it did find the scenario folder)

ExecStart=/home/Factorio/bin/x64/factorio --start-server-load-scenario /home/Factorio/Scenarios/FactorioMPSpawn/ --server-settings server-settings.json --server-banlist banlist.json
(Throws an error at startup about an incorrect path.)

from factorioscenariomultiplayerspawn.

Noa3 avatar Noa3 commented on July 18, 2024

@AusKarlos try /home/Factorio/bin/x64/factorio --start-server-load-scenario FactorioMPSpawn --server-settings server-settings.json --server-banlist banlist.json

from factorioscenariomultiplayerspawn.

AusKarlos avatar AusKarlos commented on July 18, 2024

After some more testing and hex editing I have found that Factorio does indeed store part of the scenario in the level-init.dat and the level.dat. I have no clue how to edit it so im not going to attempt it.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

Are you using some hosted server where you don't have full access? I would try not using the Linux service method and trying to just launch the executable directly like how Noa3 recommended. Depending how that goes, we can then better help debug.

from factorioscenariomultiplayerspawn.

Noa3 avatar Noa3 commented on July 18, 2024

i got a crash again after a player joined:

`2017-12-18 08:32:34 [JOIN] theogil joined the game
5985.928 Error MainLoop.cpp:1013: Exception at tick 2904711: Error while running event level::on_gui_click (ID 1)
...r/serverfiles/temp/currently-playing/separate_spawns.lua:227: attempt to index local 'player' (a nil value)
5985.928 Error ServerMultiplayerManager.cpp:95: MultiplayerManager failed: "Error while running event level::on_gui_click (ID 1)
...r/serverfiles/temp/currently-playing/separate_spawns.lua:227: attempt to index local 'player' (a nil value)"
5985.928 Info ServerMultiplayerManager.cpp:693: mapTick(2904711) changing state from(InGame) to(Failed)
5985.929 Info GlobalContext.cpp:661: Waiting for child processes to exit: 
5986.584 Info ServerMultiplayerManager.cpp:141: Quitting multiplayer connection.
5986.584 Info ServerMultiplayerManager.cpp:693: mapTick(4294967295) changing state from(Failed) to(Closed)
5986.586 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/remove-game/509794
5986.692 Info HttpSharedState.cpp:127: Status code: 200
5986.726 Info UDPSocket.cpp:206: Closing socket
5986.727 Info UDPSocket.cpp:236: Socket closed`

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

It feels like somehow some GUI click events are receiving an invalid player index... I'm adding in catches for invalid "players" in all the gui related functions.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@AusKarlos I was confused as to what you were trying to do. I missed the part where you said you were repacking the zip file of an older save. Yeah, I'm not surprised you ran into so many issues. I highly recommend starting a new save since there could be potential for bugs later down the road. But I understand wanting to save your progress on a map :) I'm glad you got it working!

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@Noa3 I just pushed another attempt at catching all cases where a gui event doesn't have a valid player.

Let me know if you are able to update to the latest scenario code and if you still see the same crash. Thanks so much for the help testing and reporting these issues!

from factorioscenariomultiplayerspawn.

Spencer-Dawson avatar Spencer-Dawson commented on July 18, 2024

oarc_player_list_crash
Any idea why clicking on the Player List is triggering crashes in 0.16.7 ?

from factorioscenariomultiplayerspawn.

Noa3 avatar Noa3 commented on July 18, 2024

i think you use a old version. update the mod and try again

from factorioscenariomultiplayerspawn.

Spencer-Dawson avatar Spencer-Dawson commented on July 18, 2024

Doh! That was the issue. (I had that commit from a few days ago that Oarcinae reverted)

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

@Oarcinae Thanks for providing this scenario as open source.

I was trying to get dev_0.16 working with 16.16 and am running into issues, both with GUI (macOS) as well as headless Linux.

GUI MacOS:
I cloned the repo into the scenarios directory, and then edited config.lua to change only the text of the first server message and also to set "SERVER_OWNER_IS_OARC = false" and REM out the next two lines.

On startup, I choose the scenario. At the Map Generator screen I change nothing and hit "Generate"
Multiplayer Lobby comes up, changed the name (no special character) and hit Play.

Then I get a Notice box with the error (also in factorio-current.log):
Error while running event level::on_chunk_generated (ID 12) Unknown tile name: grass stack traceback: ...rt/factorio/temp/currently-playing/locale/oarc_utils.lua:1065: in function 'CreateHoldingPen' ...rt/factorio/temp/currently-playing/locale/oarc_utils.lua:1071: in function 'CreateHoldingPenGenerateChunk' ...tion Support/factorio/temp/currently-playing/control.lua:177: in function <...tion Support/factorio/temp/currently-playing/control.lua:155>

Similar results using Linux headless:

Start the headless with your recommended startup for automatic map generation. When I connect to it (public server), I get "server not responding" and the following is in the server logs:
77.186 ConnectionRequestReplyConfirm (type(ConnectionRequestReplyConfirm) ) from(104.14.158.108:6888)   77.186 Info ServerRouter.cpp:393: Replying to connectionRequest for address(104.14.158.108:6888).   77.186 Info ServerSynchronizer.cpp:557: nextHeartbeatSequenceNumber(2030) adding peer(1)   77.204 Info ServerMultiplayerManager.cpp:696: mapTick(0) changing state from(InGame) to(InGameSavingMap)   77.259 Info ServerMultiplayerManager.cpp:792: mapTick(0) received stateChanged peerID(1) oldState(Ready) newState(ConnectedWaitingForMap)   77.369 Info ServerMultiplayerManager.cpp:852: MapTick(0) Serving map(/opt/factorio/temp/mp-save-0.zip) for peer(1) size(728863) crc(1302040617)   77.370 Info ServerMultiplayerManager.cpp:696: mapTick(0) changing state from(InGameSavingMap) to(InGame)   77.477 Info ServerMultiplayerManager.cpp:792: mapTick(0) received stateChanged peerID(1) oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap)   77.494 Warning TransmissionControlHelper.cpp:172: Fragment 0001 failed too many times   77.529 Warning TransmissionControlHelper.cpp:172: Fragment 0002 failed too many times   77.529 Warning TransmissionControlHelper.cpp:172: Fragment 10002 failed too many times   77.529 Warning TransmissionControlHelper.cpp:172: Fragment 20002 failed too many times   77.529 Warning TransmissionControlHelper.cpp:172: Fragment 30002 failed too many times   77.867 Info ServerMultiplayerManager.cpp:792: mapTick(0) received stateChanged peerID(1) oldState(ConnectedDownloadingMap) newState(ConnectedLoadingMap)   77.891 Error MainLoop.cpp:1013: Exception at tick 0: Error while running event level::on_chunk_generated (ID 12) The result of this function must be used. stack traceback: /opt/factorio/temp/currently-playing/locale/rso/drand.lua:244: in function 'random' ...ctorio/temp/currently-playing/locale/rso/rso_control.lua:1146: in function 'roll_region' ...ctorio/temp/currently-playing/locale/rso/rso_control.lua:1404: in function 'RSO_ChunkGenerated' /opt/factorio/temp/currently-playing/control.lua:165: in function </opt/factorio/temp/currently-playing/control.lua:155   77.891 Error ServerMultiplayerManager.cpp:95: MultiplayerManager failed: "Error while running event level::on_chunk_generated (ID 12) The result of this function must be used. stack traceback: /opt/factorio/temp/currently-playing/locale/rso/drand.lua:244: in function 'random' ...ctorio/temp/currently-playing/locale/rso/rso_control.lua:1146: in function 'roll_region' ...ctorio/temp/currently-playing/locale/rso/rso_control.lua:1404: in function 'RSO_ChunkGenerated' /opt/factorio/temp/currently-playing/control.lua:165: in function </opt/factorio/temp/currently-playing/control.lua:155>"   77.891 Info ServerMultiplayerManager.cpp:696: mapTick(0) changing state from(InGame) to(Failed)   77.891 Info GlobalContext.cpp:671: Waiting for child processes to exit:    78.175 Info ServerMultiplayerManager.cpp:141: Quitting multiplayer connection.   78.175 Info ServerMultiplayerManager.cpp:696: mapTick(4294967295) changing state from(Failed) to(Closed)   78.175 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/remove-game/807956   78.212 Info HttpSharedState.cpp:127: Status code: 200   78.212 Info UDPSocket.cpp:206: Closing socket   78.212 Info UDPSocket.cpp:236: Socket closed

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@bplein It looks like you are using an older version of the scenario? Did you just download it now or awhile ago? The issue with the "grass tile" was fixed awhile ago (I'm currently running my scenario on 16.16 as well). The errors being printed out don't match the line numbers of the scenario code in the latest version I think Can you please confirm?

Also, how are you generating the map to host on the headless server? I have heard the generating on another PC using the game menu and then copying that save to the server results in failures. On linux you should create a new map from the command line as explained above.

Check and let me know, I can help get it working!

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

Thanks for the quick response.

I did a git clone of the dev_0.16 today. But let me retry it just so I don't send you on a wild goose chase.

On the headless, I was using using the "Option 3" to generate, i.e. running:
./factorio --start-server-load-scenario FactorioScenarioMultiplayerSpawn --server-settings my-server-settings.json

from factorioscenariomultiplayerspawn.

Spencer-Dawson avatar Spencer-Dawson commented on July 18, 2024

"how are you generating the map to host on the headless server" Obviously I am not bplein, but I've had no issues copying over a map saved from windows onto my Linux server. I have been doing just that on roughly a bi weekly basis for the past two weeks, but that is just my experience on that issue.

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

Doh! I just cloned it, didn't update to the dev_01.16 branch. Will do it right and report back.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@Spencer-Dawson Thanks for that info! That's good to know.
@bplein No worries, give it a go and let me know. dev 16 is still kind of dev so I wouldn't be surprised if you run into different issues.

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

Something seems to have changed where when you join the server, the GUI text is all smashed up. Since you didn't change the code, it must be something that's changed in Factorio in the last 2 months or so? I haven't used OARC scenarios since January. I am running your dev_0.16 with 0.16.28 (most current Factorio)

screenshot 2018-03-10 17 58 01

screenshot 2018-03-10 17 58 14

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@bplein This should now be fixed in the latest version, but now all the text is spread far apart :(

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

Thanks I'll check it out. Still dev_0.16 correct?

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

Still bad message graphics, and fails with error.

I did a clean git clone. Then git checkout dev_0.16. Then fired up factorio with this scenario:

screenshot 2018-03-16 18 24 00

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@bplein If you look at the current source, there is no /locale/rso/drand.lua file in the dev_0.16 branch. So I suspect you didn't checkout or clone correctly. Or pull maybe if you have an old version?

Also, just pushed another updated to improve text stuff.

from factorioscenariomultiplayerspawn.

bplein avatar bplein commented on July 18, 2024

Thanks, my mistake. I was renaming directories (mv) and was testing the wrong one. I'm good to go for now! Thank you for all the hard work.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

@bplein No problem, keep me updated if you find any issues or have any suggestions.

from factorioscenariomultiplayerspawn.

Oarcinae avatar Oarcinae commented on July 18, 2024

Closing this since 0.16 is stable and I haven't had any major issues while playing my scenario for the past 100+ hours. Any new issues should be created as specific issues now.

from factorioscenariomultiplayerspawn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.