Skip to content

Commit

Permalink
- Fix most of the issues with spawn and login points
Browse files Browse the repository at this point in the history
- most of the issues were related to using coroutine.Current instead of
  a callback.
- Swap to DebugSafeTimer for ZDOWatcher
- Fix ZDOWatcher timer problem were it should have been sending data
- add docs on unity flags
  • Loading branch information
zolantris committed Oct 24, 2024
1 parent 9eff58a commit cfee090
Show file tree
Hide file tree
Showing 30 changed files with 1,070 additions and 558 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ below on flags.
Other flags according to chatGPT 4.0. These are nested unity flags. Apparently
no aggregate spot for them.

[Full GPT output of flags](unity-flags-from-chatgpt-4.md)
[Full GPT output of flags](./docs/unity-flags-from-chatgpt-4.md)

[ValheimRAFT_Dir]: src/ValheimRAFT

Expand Down
33 changes: 6 additions & 27 deletions ValheimMods.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,9 @@ Global
{6015B165-2627-40A7-8CA1-3E6B6CD7CB49}.Debug Run Client|Any CPU.Build.0 = Debug Run Client|Any CPU
{6015B165-2627-40A7-8CA1-3E6B6CD7CB49}.Release Run ClientServer|Any CPU.ActiveCfg = Debug Run ClientServer|Any CPU
{6015B165-2627-40A7-8CA1-3E6B6CD7CB49}.Release Run ClientServer|Any CPU.Build.0 = Debug Run ClientServer|Any CPU
{6015B165-2627-40A7-8CA1-3E6B6CD7CB49}.Debug Run Server|Any CPU.ActiveCfg = Debug Run Server|Any CPU
{6015B165-2627-40A7-8CA1-3E6B6CD7CB49}.Debug Run Server|Any CPU.Build.0 = Debug Run Server|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Test|Any CPU.ActiveCfg = Test|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Release Archive|Any CPU.ActiveCfg = Release|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Debug Run Client|Any CPU.ActiveCfg = Debug|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Debug Run ClientServer|Any CPU.ActiveCfg = Debug|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Debug Run Server|Any CPU.ActiveCfg = Debug|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Release Run Client|Any CPU.ActiveCfg = Release|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Release Run ClientServer|Any CPU.ActiveCfg = Release|Any CPU
{E9B48BE9-4D8E-44DB-961A-D7C279B2CA2B}.Release Run Server|Any CPU.ActiveCfg = Release|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Test|Any CPU.ActiveCfg = Test|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Debug Run Client|Any CPU.ActiveCfg = Debug|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Debug Run ClientServer|Any CPU.ActiveCfg = Debug|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Debug Run Server|Any CPU.ActiveCfg = Debug|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Release Archive|Any CPU.ActiveCfg = Release|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Release Run Client|Any CPU.ActiveCfg = Release|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Release Run ClientServer|Any CPU.ActiveCfg = Release|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Release Run Server|Any CPU.ActiveCfg = Release|Any CPU
{64841F32-084A-437C-9A15-34D8354B3ED1}.Test|Any CPU.Build.0 = Test|Any CPU
{675D2FE5-2041-4458-B4C0-B907447605D3}.Test|Any CPU.ActiveCfg = Test|Any CPU
{675D2FE5-2041-4458-B4C0-B907447605D3}.Test|Any CPU.Build.0 = Test|Any CPU
{675D2FE5-2041-4458-B4C0-B907447605D3}.Debug|Any CPU.ActiveCfg = Test|Any CPU
Expand All @@ -85,8 +67,6 @@ Global
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run Client|Any CPU.Build.0 = Debug|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run ClientServer|Any CPU.ActiveCfg = Debug|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run ClientServer|Any CPU.Build.0 = Debug|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run Server|Any CPU.ActiveCfg = Debug|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run Server|Any CPU.Build.0 = Debug|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Release Run Client|Any CPU.ActiveCfg = Release|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Release Run Client|Any CPU.Build.0 = Release|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Release Run ClientServer|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -95,6 +75,8 @@ Global
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Release Run Server|Any CPU.Build.0 = Release|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Release|Any CPU.Build.0 = Release|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Release Archive|Any CPU.Build.0 = Release|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run Server|Any CPU.ActiveCfg = Debug|Any CPU
{C7B295CE-763F-4085-8123-A21CDEE3DB72}.Debug Run Server|Any CPU.Build.0 = Debug|Any CPU
{C9A49715-36CD-49C0-AAE1-1E2C93F08647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9A49715-36CD-49C0-AAE1-1E2C93F08647}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9A49715-36CD-49C0-AAE1-1E2C93F08647}.Debug|Any CPU.Build.0 = Debug|Any CPU
Expand All @@ -120,9 +102,7 @@ Global
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Test|Any CPU.ActiveCfg = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Test|Any CPU.Build.0 = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Debug Run Client|Any CPU.ActiveCfg = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Debug Run Client|Any CPU.Build.0 = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Debug Run Server|Any CPU.ActiveCfg = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Debug Run Server|Any CPU.Build.0 = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Release Run Server|Any CPU.ActiveCfg = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Release Run Server|Any CPU.Build.0 = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Release Run Client|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -131,13 +111,10 @@ Global
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Release Run ClientServer|Any CPU.Build.0 = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Debug Run ClientServer|Any CPU.ActiveCfg = Debug|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Release Archive|Any CPU.ActiveCfg = Release Archive|Any CPU
{421BAEA4-F86F-408F-BE78-97DB762A121E}.Release Archive|Any CPU.Build.0 = Release Archive|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Debug|Any CPU.Build.0 = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Release|Any CPU.ActiveCfg = Release|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Release|Any CPU.Build.0 = Release|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Release Archive|Any CPU.ActiveCfg = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Release Archive|Any CPU.Build.0 = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Test|Any CPU.ActiveCfg = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Test|Any CPU.Build.0 = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Debug Run Client|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -151,6 +128,8 @@ Global
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Debug Run ClientServer|Any CPU.ActiveCfg = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Debug Run ClientServer|Any CPU.Build.0 = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Debug Run Client|Any CPU.Build.0 = Debug|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Release Archive|Any CPU.ActiveCfg = Release|Any CPU
{312A7511-FB7C-4ACE-A46D-16E9CA56A076}.Release Archive|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
54 changes: 54 additions & 0 deletions docs/ValheimModsServer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Server Information

## Mods

- Server dev commands - (for speeding up things)
- VNEI - to quickly add items
- CustomSeed - to get a good spawn location when regenerating worlds. Example
seed with immediate water near spawn. `DivyagCimv`

## Setup Commands

- Configure the command. And add the password to __quickconnect__ mod. Add a DNS
route
to avoid having to add more IPs. DNS routes will resolve to the dynamic ip
that your ISP sets
Windows .bat command

```bat
valheim_server -nographics -batchmode -name "ZolVehicles" -port 2456 -world "ZolVehicles" -password "<password>"
```

## Multiple Accounts

Use sandboxie with another steam account to be able to launch multiple instances
of a game with different profiles without steam freaking out.

**Steam is going to fight you if you allow file access so follow step 1 to the
letter.**

1. Select container that disables access to files
- IE Do not let any files be copied / synced from the main machine to the
sandbox. Syncing steam files from Main -> Sandbox breaks steam quickly and
causes collisions.
2. Copy both R2ModMan and Steam installers into the User/current drive.
3. Steam. Install Valheim.
4. After installation go into steam and set all the files right click
Properties. Then Configuration > Check run as administrator for all steam
files
- This includes bin files inside steam
5. Install R2ModMan. But you will realize it cannot execute valheim correctly.
6. Manually execute by running an admin script + powershell.
```powershell
C:\steam\steamapps\common\Valheim\valheim.exe -console --doorstop-enable true --doorstop-target C:\Users\<your_username>\AppData\Roaming\r2modmanPlus-local\Valheim\profiles\ashlands\BepInEx\core\BepInEx.Preloader.dll
```
Create script within the sandbox that does this quickly. You can do this by
running
```powershell
new-item -path ./ -name runValheimModded.ps1 -value "C:\steam\steamapps\common\Valheim\valheim.exe -console --doorstop-enable true --doorstop-target C:\Users\<your_username>\AppData\Roaming\r2modmanPlus-local\Valheim\profiles\ashlands\BepInEx\core\BepInEx.Preloader.dll"
```

You should now be able to launch both client + server + a VM client or even
another server with this approach.
10 changes: 10 additions & 0 deletions docs/start_headless_bat.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
set SteamAppId=892970

echo "Starting server PRESS CTRL-C to exit"

REM Tip: Make a local copy of this script to avoid it being overwritten by steam.
REM NOTE: Minimum password length is 5 characters & Password cant be in the server name.
REM NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall.
@REM -console -worldsize "small" -difficulty "easy" -mode "pvp" -crossplay "false"
valheim_server -nographics -batchmode -name "ZolVehicles" -port 2456 -world "ZolVehicles" -password "12345" -public
Loading

0 comments on commit cfee090

Please sign in to comment.