CubeCoders / AMPTemplates

For the AMP community to share Generic Module templates.
MIT License
93 stars 293 forks source link

V-Rising LAN Setting is Incorrect #988

Closed Bovive closed 2 months ago

Bovive commented 3 months ago

The LAN setting for V-Rising is incorrect. I have found the fix however.

Example Ticket (Not Mine): https://discourse.cubecoders.com/t/configuration-with-v-rising-lanmode/12752

Problem: "LanMode": true, changes to "LanMode": false, even when LAN mode is set to true in the configuration.

Fix:

Change:

    "DisplayName": "LAN Mode",
    "Category": "V Rising - Host Settings",
    "Description": "Use this setting for a server without internet connectivity. The LAN Mode check box must also be checked in-game when connecting.",
    "Keywords": "lan,mode",
    "FieldName": "LanMode",
    "InputType": "checkbox",
    "DefaultValue": "",
    "IsFlagArgument": false,
    "ParamFieldName": "LanMode",
    "IncludeInCommandLine": false,
    "EnumValues": {
      "False": "",
      "True": "-lan"
    }

To:

  {
    "DisplayName": "LAN Mode",
    "Category": "V Rising - Host Settings",
    "Description": "Use this setting for a server without internet connectivity. The LAN Mode check box must also be checked in-game when connecting.",
    "Keywords": "lan,mode",
    "FieldName": "LanMode",
    "InputType": "checkbox",
    "DefaultValue": "false",
    "IsFlagArgument": false,
    "ParamFieldName": "LanMode",
    "IncludeInCommandLine": false,
    "EnumValues": {
      "False": "false",
      "True": "true"
    }
  },

For me I changed the file located at \instances\VRising01\configmanifest.json

Once I made these changes the LAN mode worked fine.

Greelan commented 3 months ago

What's the actual flag format?

Your change would just put true or false in the command line, which doesn't make sense

Bovive commented 3 months ago

What's the actual flag format?

Your change would just put true or false in the command line, which doesn't make sense

It changes the ServerHostSettings.json file. It sets the "LanMode" setting to either true or false in that file.

Edit: I should note that it only works if I manually add "LanMode": false, to the ServerHostSettings.ini file first. Then it updates when I start the server to match the toggle in AMP. My edit is not a real resolution, but hopefully it helps someone fix it. Without the LanMode being set in the ServerHostSettings.json it doesn't work.

Greelan commented 3 months ago

The default json supplied with V Rising from steam doesn't have this setting. I see this now at https://github.com/StunlockStudios/vrising-dedicated-server-instructions/blob/master/1.0.x/INSTRUCTIONS.md for the v1.0 server:

Setting: LanMode
Description: Enable LAN mode.
Type: boolean
Example value: true, false
Overrides: VR_LAN_MODE=<value>, -lanMode <value>, -lan, -enableLanMode, -disableLanMode

Which suggests the existing approach of using -lan in the command line should still work. Perhaps try one of the other command line args to see if they make a difference?

It would be easier to use a command line arg (or even env var) given that the setting is not included in the json config by default.

Greelan commented 3 months ago

You might also need to disable List on Steam and List on EOS in case they are overriding the effect of the flag.

Bovive commented 3 months ago

You might also need to disable List on Steam and List on EOS in case they are overriding the effect of the flag.

I do have those disabled. Unfortunately the other flags also did not work for me.

Greelan commented 3 months ago

Can you try with the env var? Add "VR_LAN_MODE":"true"to App.EnvironmentVariables in GenericModule.kvp (comma separated from the other variables) and remove the LanMode setting from the json file to test

Bovive commented 2 months ago

Thanks for looking into this with me. I think we can close it out. As it turns out AMP was broken and was not updating my templates when I fetched them, so it was an old template. After I fixed that and updated the instance it seems to be working as intended. Much appreciated!