Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix steamcmd to properly use STEAMBETAFLAG #93

Merged
merged 2 commits into from
Nov 26, 2021

Conversation

PetePriority
Copy link
Contributor

It seems the STEAMBETAFLAG is not properly passed to steamcmd. This fixes issues with server being out of date when using the experimental branch.

@wolveix
Copy link
Owner

wolveix commented Nov 26, 2021

Thanks for opening the PR.

Have you tested this? I remember this was done intentionally as it wouldn't work otherwise. Though that was 8 months ago, and this repo has gone through a lot of changes in that time, so there's certainly a chance that it's no longer functioning as expected :) If it does work, does it also work when the flag is not provided?

@PetePriority
Copy link
Contributor Author

Yes, I tested it locally, it worked for me. I cloned the repository in my docker-compose folder and changed the file as in the PR. Then I issued docker-compose build to build the modified image, and my server updated when I recreated it using docker-compose up -d to the experimental branch.

Here's my docker-compose.yml

version: '3'
services:
    satisfactory-server:
        container_name: 'satisfactory-server'
        hostname: 'satisfactory-server'
        image: 'wolveix/satisfactory-server:latest'
        build: satisfactory-server/
        ports:
            - '7777:7777/udp'
            - '15000:15000/udp'
            - '15777:15777/udp'
              #        user: '1000'
        volumes:
            - /opt/satisfactory/config:/config
        environment:
            - PGID=1000
            - PUID=1000
            - STEAMBETA=true
        restart: unless-stopped

@PetePriority
Copy link
Contributor Author

I'm gonna check if this also works with STEAMBETA=false.

@PetePriority
Copy link
Contributor Author

Unfortunately the container seems to crash when STEAMBETA=false. I suspect that's because of the empty set of quotation marks? It starts fine when I remove the quotation marks around $STEAMBETA

@wolveix
Copy link
Owner

wolveix commented Nov 26, 2021

Yeah, I assumed as much. One way to do it is to load the variable into an array along with the previous command args, then pass the array to steamcmd. That way, it doesn't matter whether it exists or not.

Does it work without the quotation marks for both true and false? I feel like it won't work when true, if my memory serves me right.

@PetePriority
Copy link
Contributor Author

Alright, I just booted back into linux to test this properly! :)

I changed the line in run.sh to

    /home/steam/steamcmd/steamcmd.sh +login anonymous +force_install_dir /config/gamefiles +app_update "$STEAMAPPID" $STEAMBETAFLAG +quit

And tested it with STEAMBETA=true:

satisfactory-server  | Success! App '1690800' fully installed.
satisfactory-server  | Project file not found: /config/gamefiles/FactoryGame/FactoryGame.uproject
satisfactory-server  | sh: 1: xdg-user-dir: not found
satisfactory-server  | 4.26.1-174005+++FactoryGame+dev-experimental 522 3

and with STEAMBETA=false:

satisfactory-server  | Success! App '1690800' fully installed.
satisfactory-server  | Project file not found: /config/gamefiles/FactoryGame/FactoryGame.uproject
satisfactory-server  | sh: 1: xdg-user-dir: not found
satisfactory-server  | 4.26.1-173879+++FactoryGame+rel-main-0.5.0 522 3

In both cases I deleted the config folder to make sure it would re-download the game files. The server continued in both cases to

satisfactory-server  | [2021.11.26-18.39.35:250][  0]LogInit: Display: Starting Game.
satisfactory-server  | [2021.11.26-18.39.35:250][  0]LogNet: Browse: /Game/FactoryGame/Map/DedicatedserverEntry?name=Host?sessionName=SatisfactoryServer?Visibility=SV_FriendsOnly?loadgame=savefile?listen?bUseIpSockets

@wolveix
Copy link
Owner

wolveix commented Nov 26, 2021

Ayy, good stuff! Just to verify, did you confirm that the flag being true actually pulled experimental, and the the flag being false actually pulled early access?

@PetePriority
Copy link
Contributor Author

PetePriority commented Nov 26, 2021

Yes, STEAMBETA=true pulled 4.26.1-174005+++FactoryGame+dev-experimental 522 3 and STEAMBETA=false pulled 4.26.1-173879+++FactoryGame+rel-main-0.5.0 522 3.

(I did not try to connect to the server, that's what I got from the logs.)

@wolveix
Copy link
Owner

wolveix commented Nov 26, 2021

Sweet, thanks for your hard work! It's really appreciated :)

@wolveix wolveix merged commit 51b8162 into wolveix:main Nov 26, 2021
@tsugliani
Copy link

tested this fix, and it works :-)

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants