diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..6126719c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,91 @@ +name: Create Release + +on: + workflow_dispatch: + inputs: + prerelease: + description: Prerelease + type: boolean + bypassCheck: + description: Bypass Version Check + type: boolean + +permissions: + contents: write + +env: + PROJ_USERNAME: Raicuparta + PROJ_NAME: QuantumSpaceBuddies + REAL_PROJ_NAME: QSB + +jobs: + pre_job: + name: Check For Other Releases + outputs: + version: ${{ steps.out.outputs.version }} + exists: ${{ steps.out.outputs.exists }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: "actions/checkout@v3" + + - name: Fetch + run: git fetch + + - name: Read Manifest + id: read-manifest + run: echo "manifest=$(< ./${{ env.REAL_PROJ_NAME }}/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT + + - name: Check For Release + id: check-tag + run: echo "exists=$(git ls-remote --exit-code --tags origin ${{ env.TAG }} >/dev/null 2>&1 && echo true || echo false)" >> $GITHUB_OUTPUT + env: + TAG: "v${{fromJson(steps.read-manifest.outputs.manifest).version}}" + + - name: Output Version Info + id: out + run: | + echo "version=${{fromJson(steps.read-manifest.outputs.manifest).version}}" >> $GITHUB_OUTPUT + echo "exists=${{steps.check-tag.outputs.exists}}" >> $GITHUB_OUTPUT + + - name: Error + if: ${{ steps.out.outputs.exists != 'false' && (!inputs.bypassCheck) }} + run: echo "::error file=manifest.json,title=Refusing to Release::Your mod was not released because there is already a release with the version in manifest.json" + release: + needs: pre_job + if: ${{ (needs.pre_job.outputs.version != '0.0.0') && (needs.pre_job.outputs.exists == 'false') || (inputs.bypassCheck) }} + name: Create Release + runs-on: windows-latest + steps: + - name: Checkout + uses: "actions/checkout@v3" + + - name: Setup .NET + uses: "actions/setup-dotnet@v3" + + - name: Remove .csproj.user + run: if (Test-Path ${{ env.REAL_PROJ_NAME }}/${{ env.REAL_PROJ_NAME }}.csproj.user) { rm ${{ env.REAL_PROJ_NAME }}/${{ env.REAL_PROJ_NAME }}.csproj.user } + + - name: Build Mod + run: dotnet build -c Release + + - name: Upload Artifact + uses: "actions/upload-artifact@v3" + with: + name: "${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}" + path: "${{ env.REAL_PROJ_NAME }}/bin/Release" + + - name: Zip For Release + run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./${{ env.REAL_PROJ_NAME }}/bin/Release/** + + - name: Create Release + uses: "ncipollo/release-action@v1" + with: + allowUpdates: true + commit: ${{ github.ref_name }} + tag: v${{ needs.pre_job.outputs.version }} + name: Version ${{ needs.pre_job.outputs.version }} + omitBodyDuringUpdate: true + artifacts: "${{ env.PROJ_USERNAME}}.${{ env.PROJ_NAME }}.zip" + draft: true + prerelease: ${{ inputs.prerelease }} diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 00000000..064a1536 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,98 @@ +> :warning: Warning! :warning: +Mod development needs a powerful PC! +Unexpected errors and issues may occur when editing networking code. +Running multiple instances of the game can be very taxing on your computer. +We're not responsible if you push your PC too hard. + +## Prerequisites +- Visual Studio 2022. +- Epic or Steam version of Outer Wilds. +- Keyboard with numpad for in-game debug actions. + +We recommend using the Outer Wilds Mod Manager, but you can use OWML on its own if you want. + +## Cloning and configuration +- Clone QSB's source code. +- Copy the file `DevEnv.template.targets` and rename it to `DevEnv.targets`. +- In `DevEnv.targets`, edit the entry for `` to point to your installation of OWML. This should be the folder named `OWML`. If using the manager, you can find this directory by : + - Legacy Manager : Press the "Mods Directory" button and go up a folder. + - New Manager : Press the "..." button at the top, and select "Show OWML Folder". +- `QSB.sln` should now be ready to open. ***This solution needs to be opened with Visual Studio 2022 or higher!*** + +## Steam +If using the Steam version of Outer Wilds, you will need to create a file to allow you to run multiple instances of the game. +- Navigate to your game install folder. You can find this by right-clicking on the game in Steam, and going `Manage > Browse local files`. +- Create a file named `steam_appid.txt`. +- In this file, write `753640` and save. +This file will override some Steam DRM features and allow the game to be ran multiple times at once. + +## Building +Simply build the solution normally. (`Build > Build Solution` or CTRL-SHIFT-B) + +The files will automatically be copied over to your OWML installation and be ready to play - no DLL copying needed. + +For documentation reasons, here is the build flow : + +- MirrorWeaver is built. +- EpicOnlineTransport is built. +- EpicRerouter is built. +- QSB is built. +- Any `.exe.config` files are removed from the build. +- QSB.dll is processed ("weaved") by MirrorWeaver. This injects all the boilerplate code that Mirror needs to function. +- If needed/possible, any `.dll` or `.exe` files are copied to the Unity project. + +## Debugging +### Debug Actions : + +Hold Q and press : + +- Numpad 1 - Teleport to nearest player. +- Numpad 2 - If holding LeftShift, warp to the dreamworld Vault fire. If not, warp to the Endless Canyon. +- Numpad 3 - Unlock the Sealed Vault. +- Numpad 4 - Damage the ship's electrical system. +- Numpad 5 - Trigger the supernova. +- Numpad 6 - Set the flags for having met Solanum and the Prisoner. +- Numpad 7 - Warp to the Vessel. +- Numpad 8 - Insert the Advanced Warp Core into the Vessel. +- Numpad 9 - If holding LeftShift, load the SolarSystem scene. If not, load the EyeOfTheUniverse scene. +- Numpad 0 - Revive a random dead player. + +### Debug Settings : + +Create a file called `debugsettings.json` in the mod folder. +The template for this file is this : + +```json +{ + "dumpWorldObjects": false, + "instanceIdInLogs": false, + "hookDebugLogs": false, + "avoidTimeSync": false, + "autoStart": false, + "kickEveryone": false, + "disableLoopDeath": false, + "debugMode": false, + "drawGui": false, + "drawLines": false, + "drawLabels": false, + "drawQuantumVisibilityObjects": false, + "drawGhostAI": false, + "greySkybox": false +} +``` + +- dumpWorldObjects - Creates a file with information about the WorldObjects that were created. +- instanceIdInLogs - Appends the game instance id to every log message sent. +- hookDebugLogs - Print Unity logs and warnings. +- avoidTimeSync - Disables the syncing of time. +- autoStart - Host/connect automatically for faster testing. +- kickEveryone - Kick anyone who joins a game. +- disableLoopDeath - Make it so the loop doesn't end when everyone is dead. +- debugMode - Enables debug mode. If this is set to `false`, none of the following settings do anything. +- drawGui - Draws a GUI at the top of the screen that gives information on many things. +- drawLines - Draws gizmo-esque lines around things. Indicates reference sectors/transforms, triggers, etc. LAGGY. +- drawLabels - Draws GUI labels attached to some objects. LAGGY. +- drawQuantumVisibilityObjects - Indicates visibility objects with an orange shape. +- drawGhostAI - Draws debug lines and labels just for the ghosts. +- greySkybox - Turns the skybox grey. Useful in the Eye, where it's pretty dark. + diff --git a/EpicOnlineTransport/EpicOnlineTransport.csproj b/EpicOnlineTransport/EpicOnlineTransport.csproj index 8b101b34..0b7d1d20 100644 --- a/EpicOnlineTransport/EpicOnlineTransport.csproj +++ b/EpicOnlineTransport/EpicOnlineTransport.csproj @@ -8,7 +8,7 @@ License.md - + diff --git a/EpicRerouter/EpicRerouter.csproj b/EpicRerouter/EpicRerouter.csproj index d797329f..a6efdf87 100644 --- a/EpicRerouter/EpicRerouter.csproj +++ b/EpicRerouter/EpicRerouter.csproj @@ -14,7 +14,7 @@ - - + + diff --git a/MirrorWeaver/MirrorWeaver.csproj b/MirrorWeaver/MirrorWeaver.csproj index 8cc6f6c8..f8a45469 100644 --- a/MirrorWeaver/MirrorWeaver.csproj +++ b/MirrorWeaver/MirrorWeaver.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/QSB.sln b/QSB.sln index eff33a19..498d8553 100644 --- a/QSB.sln +++ b/QSB.sln @@ -8,6 +8,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2569F98D-F671-42AA-82DE-505B05CDCEF2}" ProjectSection(SolutionItems) = preProject .gitignore = .gitignore + DEVELOPMENT.md = DEVELOPMENT.md LICENSE = LICENSE README.md = README.md TRANSLATING.md = TRANSLATING.md @@ -15,9 +16,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MirrorWeaver", "MirrorWeaver\MirrorWeaver.csproj", "{DA8A467E-15BA-456C-9034-6EB80BAF1FF9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EpicOnlineTransport", "EpicOnlineTransport\EpicOnlineTransport.csproj", "{971AA4A1-6729-40DE-AADF-2754F1E8783A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EpicOnlineTransport", "EpicOnlineTransport\EpicOnlineTransport.csproj", "{971AA4A1-6729-40DE-AADF-2754F1E8783A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EpicRerouter", "EpicRerouter\EpicRerouter.csproj", "{639EFAEE-C4A1-4DA2-8457-D0472A9F6343}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EpicRerouter", "EpicRerouter\EpicRerouter.csproj", "{639EFAEE-C4A1-4DA2-8457-D0472A9F6343}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/QSB.sln.DotSettings b/QSB.sln.DotSettings index 5a30abd4..202de95c 100644 --- a/QSB.sln.DotSettings +++ b/QSB.sln.DotSettings @@ -8,6 +8,8 @@ Required Required NEXT_LINE_SHIFTED_2 + QSB + UWP True True True diff --git a/QSB/DeathSync/Messages/PlayerDeathMessage.cs b/QSB/DeathSync/Messages/PlayerDeathMessage.cs index 376f7c09..142fa4f8 100644 --- a/QSB/DeathSync/Messages/PlayerDeathMessage.cs +++ b/QSB/DeathSync/Messages/PlayerDeathMessage.cs @@ -42,7 +42,7 @@ public class PlayerDeathMessage : QSBMessage var deathMessage = Necronomicon.GetPhrase(Data, NecronomiconIndex); if (deathMessage != null) { - MultiplayerHUDManager.Instance.WriteMessage(string.Format(deathMessage, playerName), Color.grey); + MultiplayerHUDManager.Instance.WriteSystemMessage(string.Format(deathMessage, playerName), Color.grey); } RespawnManager.Instance.OnPlayerDeath(player); diff --git a/QSB/DeathSync/RespawnOnDeath.cs b/QSB/DeathSync/RespawnOnDeath.cs index e83f5801..865ce8db 100644 --- a/QSB/DeathSync/RespawnOnDeath.cs +++ b/QSB/DeathSync/RespawnOnDeath.cs @@ -239,7 +239,7 @@ public class RespawnOnDeath : MonoBehaviour } var cloak = Locator.GetCloakFieldController(); - // visible stranger and maybe NH disables cloak + // visible stranger disables cloak if (cloak) { cloak._playerInsideCloak = false; diff --git a/QSB/HUD/Messages/ChatMessage.cs b/QSB/HUD/Messages/ChatMessage.cs index e9d25bbc..b8333299 100644 --- a/QSB/HUD/Messages/ChatMessage.cs +++ b/QSB/HUD/Messages/ChatMessage.cs @@ -8,7 +8,7 @@ using UnityEngine; namespace QSB.HUD.Messages; -internal class ChatMessage : QSBMessage<(string message, Color color)> +public class ChatMessage : QSBMessage<(string message, Color color)> { public ChatMessage(string msg, Color color) : base((msg, color)) { } diff --git a/QSB/HUD/MultiplayerHUDManager.cs b/QSB/HUD/MultiplayerHUDManager.cs index fe698ba1..702c8faa 100644 --- a/QSB/HUD/MultiplayerHUDManager.cs +++ b/QSB/HUD/MultiplayerHUDManager.cs @@ -23,6 +23,7 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart private Transform _textChat; private InputField _inputField; private Material _markerMaterial; + private bool _ready; public static Sprite UnknownSprite; public static Sprite DeadSprite; @@ -64,6 +65,11 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart Interloper = QSBCore.HUDAssetBundle.LoadAsset("Assets/MULTIPLAYER_UI/playerbox_interloper.png"); WhiteHole = QSBCore.HUDAssetBundle.LoadAsset("Assets/MULTIPLAYER_UI/playerbox_whitehole.png"); SpaceSprite = QSBCore.HUDAssetBundle.LoadAsset("Assets/MULTIPLAYER_UI/playerbox_space.png"); + + QSBSceneManager.OnPostSceneLoad += (OWScene old, OWScene newScene) => + { + _ready = false; + }; } private const int LINE_COUNT = 11; @@ -77,8 +83,21 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart private readonly ListStack<(string msg, Color color)> _messages = new(false); private float _lastMessageTime; + // this just exists so i can patch this in my tts addon + // perks of being a qsb dev :-) + public void WriteSystemMessage(string message, Color color) + { + WriteMessage(message, color); + } + public void WriteMessage(string message, Color color) { + // dont write messages when not ready + if (!_ready) + { + return; + } + /* Tricky problem to solve. * - 11 available lines for text to fit onto * - Each line can be max 41 characters @@ -307,6 +326,8 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart _lines.Clear(); _messages.Clear(); _textChat.GetComponent().alpha = 0; + + _ready = true; } public void UpdateMinimapMarkers(Minimap minimap) @@ -439,7 +460,7 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart Destroy(player.HUDBox?.gameObject); Destroy(player.MinimapPlayerMarker); - WriteMessage(string.Format(QSBLocalization.Current.PlayerLeftTheGame, player.Name), Color.yellow); + WriteSystemMessage(string.Format(QSBLocalization.Current.PlayerLeftTheGame, player.Name), Color.yellow); } private PlanetTrigger CreateTrigger(string parentPath, HUDIcon icon) diff --git a/QSB/Messaging/QSBMessage.cs b/QSB/Messaging/QSBMessage.cs index f52f55b6..f332dfb5 100644 --- a/QSB/Messaging/QSBMessage.cs +++ b/QSB/Messaging/QSBMessage.cs @@ -7,7 +7,8 @@ public abstract class QSBMessage /// /// set automatically by Send /// - protected internal uint From; + // public so it can be accessed by a patch + public uint From; /// /// (default) uint.MaxValue = send to everyone
/// 0 = send to host @@ -45,7 +46,8 @@ public abstract class QSBMessage public abstract class QSBMessage : QSBMessage { - protected D Data { get; private set; } + // public so it can be accessed by a patch + public D Data { get; private set; } protected QSBMessage(D data) => Data = data; public override void Serialize(NetworkWriter writer) diff --git a/QSB/MeteorSync/MeteorManager.cs b/QSB/MeteorSync/MeteorManager.cs index 29c841f8..b93704ab 100644 --- a/QSB/MeteorSync/MeteorManager.cs +++ b/QSB/MeteorSync/MeteorManager.cs @@ -1,7 +1,6 @@ using Cysharp.Threading.Tasks; using QSB.MeteorSync.WorldObjects; using QSB.WorldSync; -using System.Linq; using System.Threading; namespace QSB.MeteorSync; @@ -17,9 +16,7 @@ public class MeteorManager : WorldObjectManager // wait for all late initializers (which includes meteor launchers) to finish await UniTask.WaitUntil(() => LateInitializerManager.isDoneInitializing, cancellationToken: ct); - // NH can make multiple so ensure its the stock whitehole - var whiteHole = QSBWorldSync.GetUnityObjects().First(x => x.GetAstroObjectName() == AstroObject.Name.WhiteHole); - WhiteHoleVolume = whiteHole?.GetComponentInChildren(); + WhiteHoleVolume = QSBWorldSync.GetUnityObject(); QSBWorldSync.Init(); QSBWorldSync.Init(); QSBWorldSync.Init(); diff --git a/QSB/ModelShip/ModelShipManager.cs b/QSB/ModelShip/ModelShipManager.cs index 9561475e..3d8df0df 100644 --- a/QSB/ModelShip/ModelShipManager.cs +++ b/QSB/ModelShip/ModelShipManager.cs @@ -37,13 +37,6 @@ internal class ModelShipManager : WorldObjectManager public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct) { - // NH can remove this - var modelShip = QSBWorldSync.GetUnityObject()._modelShipBody; - if (!modelShip) - { - return; - } - if (QSBCore.IsHost) { Instantiate(QSBNetworkManager.singleton.ModelShipPrefab).SpawnWithServerOwnership(); diff --git a/QSB/Player/Messages/PlayerJoinMessage.cs b/QSB/Player/Messages/PlayerJoinMessage.cs index f7af042b..005777b1 100644 --- a/QSB/Player/Messages/PlayerJoinMessage.cs +++ b/QSB/Player/Messages/PlayerJoinMessage.cs @@ -127,7 +127,7 @@ public class PlayerJoinMessage : QSBMessage var player = QSBPlayerManager.GetPlayer(From); player.Name = PlayerName; - MultiplayerHUDManager.Instance.WriteMessage(string.Format(QSBLocalization.Current.PlayerJoinedTheGame, player.Name), Color.green); + MultiplayerHUDManager.Instance.WriteSystemMessage(string.Format(QSBLocalization.Current.PlayerJoinedTheGame, player.Name), Color.green); DebugLog.DebugWrite($"{player} joined. qsbVersion:{QSBVersion}, gameVersion:{GameVersion}, dlcInstalled:{DlcInstalled}", MessageType.Info); } diff --git a/QSB/Player/Messages/PlayerKickMessage.cs b/QSB/Player/Messages/PlayerKickMessage.cs index 84834b5e..ec074623 100644 --- a/QSB/Player/Messages/PlayerKickMessage.cs +++ b/QSB/Player/Messages/PlayerKickMessage.cs @@ -36,15 +36,15 @@ internal class PlayerKickMessage : QSBMessage { if (QSBPlayerManager.PlayerExists(PlayerId)) { - MultiplayerHUDManager.Instance.WriteMessage(string.Format(QSBLocalization.Current.PlayerWasKicked, QSBPlayerManager.GetPlayer(PlayerId).Name), Color.red); + MultiplayerHUDManager.Instance.WriteSystemMessage(string.Format(QSBLocalization.Current.PlayerWasKicked, QSBPlayerManager.GetPlayer(PlayerId).Name), Color.red); return; } - MultiplayerHUDManager.Instance.WriteMessage(string.Format(QSBLocalization.Current.PlayerWasKicked, PlayerId), Color.red); + MultiplayerHUDManager.Instance.WriteSystemMessage(string.Format(QSBLocalization.Current.PlayerWasKicked, PlayerId), Color.red); return; } - MultiplayerHUDManager.Instance.WriteMessage(string.Format(QSBLocalization.Current.KickedFromServer, Data), Color.red); + MultiplayerHUDManager.Instance.WriteSystemMessage(string.Format(QSBLocalization.Current.KickedFromServer, Data), Color.red); MenuManager.Instance.OnKicked(Data); NetworkClient.Disconnect(); diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index 1e54438c..bc28ee29 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -79,7 +79,7 @@ public class QSBCore : ModBehaviour { // incompatible mods "Raicuparta.NomaiVR", - // "xen.NewHorizons", + "xen.NewHorizons", "Vesper.AutoResume", "Vesper.OuterWildsMMO", "_nebula.StopTime", @@ -308,32 +308,3 @@ public class QSBCore : ModBehaviour } } } - -/* - * _nebula's music thanks - * I listen to music constantly while programming/working - here's my thanks to them for keeping me entertained :P - * - * Wintergatan - * HOME - * C418 - * Lupus Nocte - * Max Cooper - * Darren Korb - * Harry Callaghan - * Toby Fox - * Andrew Prahlow - * Valve (Mike Morasky, Kelly Bailey) - * Joel Nielsen - * Vulfpeck - * Detektivbyrån - * Ben Prunty - * ConcernedApe - * Jake Chudnow - * Murray Gold - * Teleskärm - * Daft Punk - * Natalie Holt - * WMD - * Woody Jackson - * Brian David Gilbert - */ diff --git a/QSB/SectorSync/QSBSectorManager.cs b/QSB/SectorSync/QSBSectorManager.cs index c7025685..21fc185f 100644 --- a/QSB/SectorSync/QSBSectorManager.cs +++ b/QSB/SectorSync/QSBSectorManager.cs @@ -91,15 +91,11 @@ public class QSBSectorManager : WorldObjectManager // time loop spinning ring { - // NH can remove this var TimeLoopRing_Body = GameObject.Find("TimeLoopRing_Body"); - if (TimeLoopRing_Body) - { - var Sector_TimeLoopInterior = GameObject.Find("Sector_TimeLoopInterior").GetComponent(); - // use the same trigger as the parent sector - FakeSector.Create(TimeLoopRing_Body, Sector_TimeLoopInterior, - x => x._triggerRoot = Sector_TimeLoopInterior._triggerRoot); - } + var Sector_TimeLoopInterior = GameObject.Find("Sector_TimeLoopInterior").GetComponent(); + // use the same trigger as the parent sector + FakeSector.Create(TimeLoopRing_Body, Sector_TimeLoopInterior, + x => x._triggerRoot = Sector_TimeLoopInterior._triggerRoot); } // TH elevators diff --git a/QSB/ShipSync/ShipManager.cs b/QSB/ShipSync/ShipManager.cs index 8bf13d8c..90e875b7 100644 --- a/QSB/ShipSync/ShipManager.cs +++ b/QSB/ShipSync/ShipManager.cs @@ -184,6 +184,11 @@ public class ShipManager : WorldObjectManager private void UpdateElectricalComponent() { + if (ShipElectricalComponent == null) + { + return; + } + var electricalSystem = ShipElectricalComponent._electricalSystem; var damaged = ShipElectricalComponent._damaged; diff --git a/QSB/Syncs/Occasional/OccasionalManager.cs b/QSB/Syncs/Occasional/OccasionalManager.cs index a9aa2361..726a861d 100644 --- a/QSB/Syncs/Occasional/OccasionalManager.cs +++ b/QSB/Syncs/Occasional/OccasionalManager.cs @@ -22,11 +22,6 @@ internal class OccasionalManager : WorldObjectManager foreach (var proxy in cannon._realDebrisSectorProxies) { - // NH can remove these - if (!proxy) - { - continue; - } SpawnOccasional(proxy.transform.root.GetAttachedOWRigidbody(), gdBody); } diff --git a/QSB/WorldSync/QSBWorldSync.cs b/QSB/WorldSync/QSBWorldSync.cs index 4305b2b9..a20ef519 100644 --- a/QSB/WorldSync/QSBWorldSync.cs +++ b/QSB/WorldSync/QSBWorldSync.cs @@ -208,8 +208,7 @@ public static class QSBWorldSync { // So objects have time to be deleted, made, whatever // i.e. wait until Start has been called - // TODO: see if this number of frames actually works. TWEAK! - Delay.RunFramesLater(10, () => BuildWorldObjects(loadScene).Forget()); + Delay.RunNextFrame(() => BuildWorldObjects(loadScene).Forget()); } }; diff --git a/QSB/manifest.json b/QSB/manifest.json index 6a4ea52e..3ce3c11c 100644 --- a/QSB/manifest.json +++ b/QSB/manifest.json @@ -7,8 +7,8 @@ "body": "- Disable *all* other mods. (Can heavily affect performance)\n- Make sure you are not running any other network-intensive applications." }, "uniqueName": "Raicuparta.QuantumSpaceBuddies", - "version": "0.29.0", - "owmlVersion": "2.9.0", + "version": "0.29.1", + "owmlVersion": "2.9.3", "dependencies": [ "_nebula.MenuFramework", "JohnCorby.VanillaFix" ], "pathsToPreserve": [ "debugsettings.json" ], "requireLatestVersion": true diff --git a/README.md b/README.md index 76fa21a0..9c6c82af 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ Spoilers within! ### Easy installation (recommended) -- [Install the Outer Wilds Mod Manager](https://github.com/Raicuparta/ow-mod-manager#how-do-i-use-this); +- [Install the Outer Wilds Mod Manager](https://outerwildsmods.com/mod-manager/); - Install Quantum Space Buddies from the mod list displayed in the application; - If you can't get the mod manager to work, follow the instructions for manual installation. ### Manual installation -- [Install OWML](https://github.com/amazingalek/owml#installation); +- [Install OWML](https://github.com/ow-mods/owml#installation); - [Download the latest Quantum Space Buddies release](https://github.com/misternebula/quantum-space-buddies/releases/latest); - Extract the `QSB` directory to the `OWML/Mods` directory; - Run `OWML.Launcher.exe` to start the game. @@ -47,7 +47,7 @@ Spoilers within! ## Frequently Asked Questions ### I keep timing out when trying to connect! -Check the mod settings for "Use KCP Transport". You have to forward port 7777 as TCP/UDP, or use Hamachi. ALL PLAYERS MUST HAVE THIS AS THE SAME VALUE. +Check the mod settings for "Use KCP Transport". You have to forward port 7777 as TCP/UDP, or use Hamachi. ***All players must either be using KCP, or not using KCP.*** ### Requirements - Latest version of OWML. @@ -89,102 +89,22 @@ QSB is a fully synced game. The other players are actually there in the world, a Outer Wilds Online is easier to set up, but much more basic in its features. The other players cannot affect your game, and do not contribute to anything in your save. The loop is entirely per-player. -### Why would someone make this mod? Seems like a lot of effort for no reward. - -Good question. - -Let me know if you find an answer. - -**Update**: a plausible answer is the enjoyment you get seeing/hearing about others playing with their friends :) - ## Translating See [TRANSLATING.md](TRANSLATING.md) -## Development Setup +## Development Setup / Contributing -- [Download the Outer Wilds Mod Manager](https://github.com/raicuparta/ow-mod-manager) and install it anywhere you like; -- Install OWML using the Mod Manager -- Clone QSB's source -- Open the file `DevEnv.targets` in your favorite text editor -- (optional if copying built dlls manually) Edit the entry `` to point to your OWML directory (it is installed inside the Mod Manager directory) -- (optional if no unity project) Edit the entry `` to point to the Assets folder of the QSB unity project -- Open the project solution file `QSB.sln` in Visual Studio 2022 - -If developing with the Steam version of Outer Wilds you can't run multiple instances of the game by default. To do so, create a file called `steam_appid.txt` in your Outer Wilds directory and write `753640` inside it, then run the exe directly. - -A powerful PC is needed for development, due to the high amount of RAM and CPU needed to run 2 or 3 instances of modded Outer Wilds. - -It is also recommended to lower all graphics settings to minimum, be in windowed mode, and lower resolution to roughly a quarter of your monitor space. This lets you run multiple instances of Outer Wilds to quickly test QSB. - -Some debugging options exist to make things easier. These come in the form of actions and settings. -### Debug Actions : - -Hold Q and press : - -- Numpad 1 - Teleport to nearest player. -- Numpad 2 - If holding LeftShift, warp to the dreamworld Vault fire. If not, warp to the Endless Canyon. -- Numpad 3 - Unlock the Sealed Vault. -- Numpad 4 - Damage the ship's electrical system. -- Numpad 5 - Trigger the supernova. -- Numpad 6 - Set the flags for having met Solanum and the Prisoner. -- Numpad 7 - Warp to the Vessel. -- Numpad 8 - Insert the Advanced Warp Core into the Vessel. -- Numpad 9 - If holding LeftShift, load the SolarSystem scene. If not, load the EyeOfTheUniverse scene. -- Numpad 0 - Revive a random dead player. - -### Debug Settings : - -Create a file called `debugsettings.json` in the mod folder. -The template for this file is this : - -``` -{ - "dumpWorldObjects": false, - "instanceIdInLogs": false, - "hookDebugLogs": false, - "avoidTimeSync": false, - "autoStart": false, - "kickEveryone": false, - "disableLoopDeath": false, - "debugMode": false, - "drawGui": false, - "drawLines": false, - "drawLabels": false, - "drawQuantumVisibilityObjects": false, - "drawGhostAI": false, - "greySkybox": false -} -``` - -- dumpWorldObjects - Creates a file with information about the WorldObjects that were created. -- instanceIdInLogs - Appends the game instance id to every log message sent. -- hookDebugLogs - Print Unity logs and warnings. -- avoidTimeSync - Disables the syncing of time. -- autoStart - Host/connect automatically for faster testing. -- kickEveryone - Kick anyone who joins a game. -- disableLoopDeath - Make it so the loop doesn't end when everyone is dead. -- debugMode - Enables debug mode. If this is set to `false`, none of the following settings do anything. -- drawGui - Draws a GUI at the top of the screen that gives information on many things. -- drawLines - Draws gizmo-esque lines around things. Indicates reference sectors/transforms, triggers, etc. LAGGY. -- drawLabels - Draws GUI labels attached to some objects. LAGGY. -- drawQuantumVisibilityObjects - Indicates visibility objects with an orange shape. -- drawGhostAI - Draws debug lines and labels just for the ghosts. -- greySkybox - Turns the skybox grey. Useful in the Eye, where it's pretty dark. - -**Warning : Mod development can lead to unexpected errors in your computer system.** -- **When editing the networking code, mistakes can lead to QSB overwhelming your network connection with excess packets**. -- **Too high RAM usage will lead to Outer Wilds sticking at ~31% loading, then crashing**. -- **There have been instances of graphics cards crashing, and needing to be disabled/re-enabled from Device Manager.** +See [DEVELOPMENT.md](DEVELOPMENT.md) ## Authors and Special Thanks ### Authors -- [\_nebula](https://github.com/misternebula) - Developer of v0.3.0 onwards -- [JohnCorby](https://github.com/JohnCorby) - Co-developer of v0.13.0 onwards. -- [AmazingAlek](https://github.com/amazingalek) - Developer of v0.1.0 - v0.7.1. -- [Raicuparta](https://github.com/Raicuparta) - Developer of v0.1.0 - v0.2.0. +- [\_nebula](https://github.com/misternebula) - Lead Dev *(v0.3.0 onwards.)* +- [JohnCorby](https://github.com/JohnCorby) - Lead Dev *(v0.13.0 onwards)* +- [AmazingAlek](https://github.com/amazingalek) - Ex-Developer *(v0.1.0 - v0.7.1)* +- [Raicuparta](https://github.com/Raicuparta) - Ex-Developer *(v0.1.0 - v0.2.0)* ### Contributers