#Space Warp
1 messages · Page 1 of 1 (latest)
👍
The next version of space warp will be able to be loaded as a BepInEx module as well.

Will it have the magic installer exe :D
Thanks to @static mural
I can try to make a magic installer exe if you want
I am alread halfway done with the windows
Legit it's just fetch latest build from github api and unzip it
In docs (I don't exactly remember the route) you can pull from releases or GitHub actions for nightly
Hey are the bepinex gang and SpaceWarp gang roles mutually exclusive? Pls fix if they are
@sacred jasper how do i install the new version of SpaceWarp?
A:
#1079533108786901132
B:
Same as 0.1.0, drag the contents of the Zip folder into the KSP install directory
I remembered what I am going to do next, I was going to add Roslyn support
I messed up the installer @static mural you do it
alr
here is what i have so far (lol):
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
return 0;
}
Yep I am working on roslyn support
Maybe i should do this in C# for octokit
hey @sacred jasper i just realized its impossible for actions to work since it relies on ksp2 binaries and i cant redistribute that
you can go ahead and merge it if u want all thats changed now is the readme
hey @sacred jasper pls create a new release for bepinex/doorstop - if u want them i can provide binaries
Will do in a second
alr
working on a major addition
ok
<@&1078770539688112168> <@&1079271050644303922>
Thoughts on this feature, it adds roslyn compilation for scripts under mod/src folder
https://github.com/X606/SpaceWarp/pull/42
@median pendant could you update your spacewarp for bepinex spacedock with the provided zip folder
In the latest release that I thought I was pinging
Honestly seems kinda not needed to me, just adds a bunch of unneeded complexity
Not that complex, and it makes development a lot easier
Does it? Idk maybe
compare this template to the csproj generator
The other thing is if we add breaking mod class changes, it can easily recompile
I guess yeah
<@&1078770539688112168> <@&1079271050644303922>
Going forward, all changes need to be made on a different branch than main, then reviewed and pulled in.
@topaz jetty https://github.com/SpaceWarpDev/Space-Warp-UI
@topaz jetty you should send a teaser of the UI into the Intercept Games server
Great idea, will do
you can, as long as those binaries are stripped
I just realized something, why are we enforcing a .bundle naming scheme on asset bundles?
thats not a unity standard or anything, unity generates asset bundles without file extensions
also why did we change AssetManager to ResourceManager??
AssetManager is just a better name
@sacred jasper
To enforce consistency between the file name and class name
Sanity checking, it makes sure that what's getting loaded is an asset bundld
Also the game files themselves are named like that so it makes sense
This too, it's consistent with KSP
But the main reason is that it was dying when someone accidentally dragged over a .manifest
Yeah that makes sense, I like to add .gitkeep files to make a git folder structure for distribution folders before using post build events so this prevents it from breaking the loader, too
The file name was the mistake there but I guess we can't change it now
I see ... I mean we could make the current file obsolete and redirect the functions to an asset manager class,
That makes sense though, although now people might be even more confused since they cant find anything with .bundle
See my comment on the issue
any issues that need help with? I can help in Python & documentation, and if needed do C#.
or is there need for an installer script? For Unix based system perhaps.
Documentation would be very appreciated
There is an installer repo under the organization
alright, let me get to it.
quick question, what's the difference between the channels projects/Space Warp and major-projects/Space Warp?
Projects/space warp is archived in favor of this (even though this might move to its own category
Space warp I mean
ok, thanks for info
The finished projects one is for release info
Re: Harmony patch duplication, seems to be a thing, the patch is always applied twice, even when the prefix method returns false which should prevent any other prefix patches for the same method from running:
Prepare run null
Prepare run void KSP.Map.Map3DOrbitalMarker::UpdateDisplayState()
Cleanup run void KSP.Map.Map3DOrbitalMarker::UpdateDisplayState()
Cleanup run null
Prepare run null
Prepare run void KSP.Map.Map3DOrbitalMarker::UpdateDisplayState()
Cleanup run void KSP.Map.Map3DOrbitalMarker::UpdateDisplayState()
Cleanup run null
(moved the info here from the projects category)
Alright, log the stack trace in the patch applying code to the console
Is this the BepInEx or standalone version?
BepInEx but I was getting the same bug in the standalone version so I'm fairly certain it's an issue in both, I can try it out though
Alright, as I said log the stack trace for it as well
OHHHH!
Its applying patches when it loads and in post initialization
It should only apply patches when it loads
thats an easy fix
Wait no
oh I just now noticed, nevermind, this is my fault
lol
I was calling PatchAll in OnInitialized, didn't realize the mod loader did that already
Might be interesting to add a "enabled" tick on the mods. Changes applied on restart.
maybe make a todo list, so if someone wants to work on it but doesnt know what stage u at?
for now seems like the closest thing to that is the GitHub issues: https://github.com/SpaceWarpDev/SpaceWarp/issues
We have a projects page on the organization
Though it's currently private
@bronze anchor
Oh btw @stoic pier I can add you as a maintainer finally
:D kk
We can use the projects tab in GitHub.
Thats what i was thinking of ^^
I’ve been using it on SS3D but haven’t had much exp with it, should be enough for this project
Yup we have 1 and when ready can be made public if you want 🙂
It'd help contributors so please
or make me member and i can see 😏
@stoic pier you have been sent an invite
Add this one
sounds good i will
A little handle to reorder mods would also be nice
Load order is determined by a topological sort, reordering the mods won't do much
Not sure if that’s how it should work
Specially since we have to make a “one size fits all” solution
I think it's the best for now
I don't know if manually messing with load order is the best
But I might add a field for soft dependencies to modinfo, and have it load after that if that dependency exists
Also we should check on curse forge page and update it
@solar crystal the dev branch is unstable-testing
Which is to say @solar crystal that you should change your PR to unstable testing
workin on it sorry
dont have the cli on this machine, tried the stupid desktop software and fucked it up royally
it didnt care about the .gitignore in gitignore and cause me all kinds of headaches, dont use the desktop software.
GitHub Desktop? never had that issue with it
oh it was user error, Im just gonna blame them so i dont feel so dumb.
😆
Changed to unstable , sorry again.
well its the mod template generators fault for not handling * corretly
Nope, they didn't use the template generator
is this what u were thinking?
yep
👍 i will add logic then
Make sure you are using unstable testing as that has some UI changes for the mod list
Also mods are ignored with a .ignore file for referenc
Put that in the mod folder and it is ignored
but for that menu we need a list of disabled mods
when are they ignored?
<Reference Include="0Harmony, Version=2.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HarmonyX.2.10.1\lib\net45\0Harmony.dll</HintPath>
</Reference>
```so like where is this packages folder? do i make it?
oh its in the same directory as the csproj
lmao why is it ..\
Wait did you mess with the csproj
Don't do that.
Please do not do that.
Last time it was messed with was a nightmare
Do the proper thing and install nuget or your prs will be rejected
<@&1078770539688112168> <@&1079271050644303922> do not mess with the .csproj unless you can confirm current build scripts work with a new clone and with an empty nuget cache
Or push a change to the build scripts that requires no extra tools
Just pinging for future reference
choco install nuget.commandline
nuget restore
thx, should put that in the readme
should i make a "loadedmods.json" or smthing to track what mods are aviable. cuz if theres a .ignore i have no way of detecting it
Im back from school!
i’m almost back :(
I cant build the most recent version of SpaceWarp
nuget restore
How do I do that
Ok, right when I sent that message I found it in visual studio lol
had to right click the solution and click restore packages
restoring package only gave me more errors
Quick question (continuing from #🔸mod-making-help ):
When you quit to menu, most GameObjects (including mod gameobjects) are being deleted. The code responsible for that is in GameManager.DestroyAllGameObjectsFlowAction.
I found some possible ways around this that could be implemented on a mod level (for instance setting the HideAndDontSave flag so your object isn't found when the destroy method runs)
I'm just wondering if workarounds for that is something individual mods should implement, or will you be looking to implement a mod loader solution for this?
I think a full SpaceWarp workaround for this would be a good idea
I'll see what I can do before 0.3.0
just setting gameObject.tag = "Game Manager" works on individual mod
The cleanest solution would probably be to register your own tag in the _dontDestroyTags but afaik Unity tags can't be added at runtime.
Not sure about HideAndDontSave. In theory, if mods are registered in the spacewarp manager anyway, it's not important that they can't be found using unity's methods
opened an issue with my findings for now
One idea, nuget repository for SpaceWarp.dll
So that nuget can be used to find space warp references
that would be pretty helpful
<@&1078770539688112168> I need one of you to review my PR
@alpine tendon
private List<(string text, Sprite icon, string ID, Action<bool> action)> _buttonsToBeLoaded =
new List<(string text, Sprite icon, string ID, Action<bool> action)>();
public T RegisterGameToolbarMenu<T>(string text, Sprite icon, string id) where T : ToolbarMenu
{
GameObject toolBarUIObject = new GameObject($"Toolbar: {id}");
DontDestroyOnLoad(toolBarUIObject);
ToolbarMenu menu = toolBarUIObject.AddComponent<T>();
menu.Name = text;
toolBarUIObject.transform.SetParent(transform.parent);
toolBarUIObject.SetActive(true);
_buttonsToBeLoaded.Add((text,icon,id,menu.ToggleGUI));
return menu as T;
}
private void LoadAllButtons()
{
foreach (var button in _buttonsToBeLoaded)
{
ToolbarBackend.AddButton(button.text, button.icon, button.ID, button.action);
}
}
This is the code for it
The text and ID do get hooked up?
<@&1078770539688112168> <@&1079271050644303922> be prepared for a chain of pushes for spacewarp 0.3.0 tomorrow
wanted to do a test build and encountered an issue with builder.py where because my OS is not in English, the Nuget output contained invalid UTF-8 bytes, managed to bypass it by changing the encoding to cp1250 in the line for line in str(nuget_out.stdout, "utf-8").splitlines():
curiously, that didn't happen during 0.2 builds, not sure what changed
We finally got a toolbar? Awesome!
I'm trying to build for bepinex, and running into the following:
BepInExEntrypoint.cs(6,6): error CS0012: The type 'MonoBehaviour' is defined in an assembly that is not referenced. You must add a reference to assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
as well as a ton of prints like this
MainMenuPatcher.cs(12,26): error CS0246: The type or namespace name 'KSP' could not be found (are you missing a using directive or an assembly reference?)
(with namespaces like KSP, KerbalMonoBehaviour, JsonObject, etc.)
do I need unity installed or something?
did you copy dlls?
lol I skipped ahead to "build scripts", good call
, it's building
should I be installing bepinex 5 or 6?
5
is OnInitialized() called before, between or after Awake() and Start() ?
After
ty
<@&1078770539688112168> <@&1079271050644303922> it has been pointed out to me, that if we switched to BepInEx and to a library format, that we can use thunderstore and the thunderstores mod manager out of the box, I would like discussion on this, as it would make modding stuff easier it seems. This would be a somewhat large infrastructure change, but it could be beneficial in the long run. This also solves the mod loader debate once and for all.
Thunderstore could also be used without it as well, but it might be an interesting thing to discuss
There is also the idea of adding a command line switch to switch the mods folder to an external directory
That I can quickly add
I am quickly adding support for thunderstore stuff
<@&1078770539688112168> thunderstore mod manager support is on unstable-testing
(i need to get it added to TMM to be clear, you can't use it before that)
I should've mentioned this yes
wwise version is 2021.2.10, if you want to load a bank you have to use AkSoundEngine.LoadBankMemoryView instead of LoadBank for some reason, simplest version of this is something like
var bytes = File.ReadAllBytes("Z:\\storage/Games/SteamLibrary/steamapps/common/Kerbal Space Program 2/BepInEx/plugins/SpaceWarp/epic.bnk");
AkSoundEngine.LoadBankMemoryView(GCHandle.Alloc(bytes, GCHandleType.Pinned).AddrOfPinnedObject(), (uint)bytes.Length, out uint bankId);
if you have to do this after KSPAudioInitializer.Initialize or the load will fail, this shouldn't be a problem for spacewarp plugins since they load in the loader screen after this method (i think) but bepinex plugins will need to postfix that method and load there (or add themselves to the loading screen too)
i would've thrown this in #🔴tools or #🔴tools-and-resources or something, but I can't post there 
after that its just normal wwise stuff, you can look at the docs
@sacred jasper https://github.com/SpaceWarpDev/SpaceWarp/pull/71
thats all i can do until the nuget package is up
still a lot nicer though
the entire new csproj is
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>0.2.0</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>11</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\external_dlls\Assembly-CSharp.dll</HintPath>
<Publicize>true</Publicize>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>..\external_dlls\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\external_dlls\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="BepInEx.BaseLib" Version="5.4.21" />
<PackageReference Include="HarmonyX" Version="2.10.1" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.1.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="UnityEngine.Modules" Version="2020.3.1" />
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.0" PrivateAssets="all" />
</ItemGroup>
</Project>
i also switched to netstandard2.0 and C# 11, ns2.0 is a bit easier to build everywhere than fx472 and C# 11 just... has more stuff available
(the old csproj was 208 lines btw)
Thank you for this! Also I'm not the only maintainer who can accept PRs, that's what the Space warp dev role is for
I shall look at it in a bit, I have a class soon-ish
Ill look at it in a moment
The one issue with this is it will break mods compiled with the prerelease, but that's why it's a prerelease
@little bay I think the latest unstable commit is causing the game to get stuck when loading a save
seems like an odd place to get stuck
it at least loaded while I was testing it fine
though I only tested loading through BepInEx, I assumed standalone was also fine since they don't really have different logic
I'm using the standalone
Also, the .csproj here needs to be updated
https://github.com/SpaceWarpDev/Space-Warp-Example-Mod-Template
I'll text standalone in a bit
Though realistically only harmony and such can be nugeted for now other ones not so much
save file loaded fine for me using the BepInEx version, but Unity Explorer seems to have stopped working even though it's loaded in the mod list, and other some other mods are broken too:
[Space Warp] [Critical] Exception in Mod: unity_explorer AfterInitialization(): System.MissingMethodException: void SpaceWarp.API.Logging.BaseModLogger.Info(string)
at SpaceWarp.API.SpaceWarpManager.InvokePostInitializeModsAfterAllModsLoaded () [0x0001a] in E:\KSP Stuff\KSP 2 Modding\Mods\SpaceWarp\SpaceWarp\API\SpaceWarpManager.cs:555
even though they clearly have a OnInitialized method
Ohhhhh, it's the logger changes that broke that
Any mod that logs to the console will break in this next update then...
alright, good to know 😁
I'll recompile unity Explorer mod for the next version
Or just switch it to roslyn
Will work on one in a minute
In class right now
For an example though, see lazy orbits 0.3.0 branch
I'd like to introduce a one line option to create an appbar button if that's alright
oo ty, will do
Might be a useful thing as well yeah, I just have the toolbar window abstraction to make UI skins easier and such
I think just grabbing the skin from spacewarp is the better solution for me
the lazyorbit solution looks fairly straightforward, but yeh up to u
one question tho - wheres the button image sourced from? do we need to make it ourselves
The latter yes
This function will load icon.png as a sprite from the same folder as your .dll
oki ty
I just thought of a way to get ksp2 dlls dynamically
Won't be an issue in the future
Store Steam username/password as a secret,
Then use DepotDownloader in the GitHub action
Ah ok
@lime plaza is space warp integration for custom parts feasible?
Because I might push back 0.3 release to add this.
seems to me like 99% of the work happens in Unity
in SpaceWarp all you'd need is support for loading addressables
Will be done by 0.3.0
Will add a /assets/addressables folder
There is one issue though
The load path won't always be in the KSP path if we use thunderstore in the future
But there is an easy fix for that ... we create an addressables folder and copy all mods addressables files into there but delete that folder on launch
do addressables need to be in a specific folder?
hey cheese can I make _buttonsToBeLoaded static? it would make it a complete oneliner
That's fine yeah
They need to be relative to the game directory it seems
I'll look more into it
that's... funky
But the tutorial uses a custom load path relative to the game
but I've also never seen a mod use addressables, so
I can set it up such that it still works
I wouldn't actually know
Each mod: /SpaceWarp/[mod]/assets/addressable/
Runtime: Merge into: /SpaceWarp/.addressables_merged/
Would that work?
[Game path]/SpaceWarp/.addressables/mod/...
We need to maintain support for SpaceWarp being loaded from other places
is there any reason for the new logger to use this syntax which is introducing breaking changes:
Logger.Info("dumping x: {0}", x);
over just
Logger.info($"dumping {x}");
which turns into pretty much the same thing at compile-time but keeps 0.2 mods compatible?
afaik, string interpolation is usually the preferred approach over string.Format
@mossy kraken I think you added this?
just a thought
maybe there's a good reason for it but I'm not aware of it
deleting that second logger parameter indeed fixed the issues with the mods, I'll put in a PR and either it gets accepted or not if there's a reason for it to be like this
Looks like a messed up, you are indeed correct that it will ruin compatibility
the pr is up, from what I'm reading, seems like $"" and string.Format are indeed interchangable
<@&1078770539688112168> <@&1079271050644303922> I am adding addressables support in the next update
The path for addressables to load from when making them will be Game/SpaceWarp/.addressables/mod_id
Why?
Because it needs to copy into the game folder
Nope
The assets go in Mod/assets/addressables
I am doing this for the case when Space Warp is not loaded from in the game directory.
Which it has support for
@lime plaza
It doesn't matter where space warp is loaded from, as long as the current working directory is still the Kerbal Space Program 2 folder
SpaceWarp loads all assets relative to its assembly location
Oh
That will cause many issues
How so?
I have it copy addressable stuff into the game folder
That feels wack
Not really?
The reason for this is so if we want to use something like thunderstore it makes it 10x easier
Let me test something, those paths might accept a variable
Alright
Correction, they do accept a variable, lets see if we can add variables they will accept
Can you show how?
{Variable}/Rest of path
I'm trying to find a variable to test with
That one should work
Seeing if I can go relative to KSPUtil.ApplicationRootPath
That's not gonna change anything as it needs to be spacewarps root path
Make a variable SpaceWarp.RootPath, or better SpaceWarp.ModsFolder
If that doesn't work we can always find + replace in the json file
There already is that variable
Which one?
Got it, thanks java dev
Also @lime plaza can you send me the unity project for your custom part test?
I will try
I have thunderkit installed and KSP imported but don't see any of the assets
Nothing under packages?
THe assemblies are the important part
new pr with easier appbar registration
https://github.com/SpaceWarpDev/SpaceWarp/pull/74
I want the assets so I can quickly copy a part
@lime plaza I am going to push my current addressables right now
nice, so whats the easiest way to add a toolbar btn? i have a png ready for it
SpaceWarpManager.RegisterAppButton(
"Lazy Orbit",
"BTN-LazyOrbitButton",
SpaceWarpManager.LoadIcon(),
ToggleButton);
that's it
Is there still the toolbar menu class support?
yes
I looked through it, I should've remembered
put your 24x24 png next to your dll and call it 'icon.png' and SpaceWarpManager.LoadIcon() will load it
and ping me when you get it set up
I wanna see!
can u pass me that build, im not setup to compile it
would love to test b4 0.3 release tho, if possible
nice ty yep
you run RegisterAppButton from OnInitialized btw
OH HELL YEAH!
You can likely blame localization
This is what the custom part looks like
@sacred jasper Load path {SpaceWarp.API.SpaceWarpManager.MODS_FULL_PATH}/testPart/StandaloneWindows64
I guess {SpaceWarp.API.SpaceWarpManager.MODS_FULL_PATH}/testPart/addressable/StandaloneWindows64
All right that works
Lemme quickly fix the loader in space warp
I'll probably work seeing if I can add localization support, since the mod name currently just doesn't load
Pushed to addressables branch
@lime plaza can you test space warps addressable path, I can't right now
How do I build the branch?
run the builder.py function
After you restore it w/ nuget
Better yet @lime plaza can you just send me the assets built with that load path?
builds in a mod called testPart
And this is for space warp?
Yup
all right imma test after lunch
I'm about to test
Then this might be everything necessary for 0.3.0 then we make documentation on the wiki
@sacred jasper It broke
Why did it break with harmony?
Dunno
Odd
it breaks with no addressables
Whats up with this:
namespace SpaceWarp.Patching.LoadingActions;
Accidental newline got in there it seems
I was confused about the existance of file-scoped namespaces
@lime plaza the patch error is in the main menu patcher
Nor do I?
The error is not the file itself
Actually it might be
I dunno how any of this works
This commit is the version that breaks it I think
@little bay
@lime plaza
(Note I figured this out by going up the commit history and building those versions
not really based on anything but I'd double check that harmony is working properly since that commit
loading the save coincides with the flight UI harmony patch
Gonna test by removing the lmain menu patch rq
Error is before loading a save
Its the main menu patcher that's the issue for some reason
I'm referring to the game getting stuck on "applying legacy part modules" when you load a save, that was introduced in that commit
do u think a fix is possible for the app toolbar names? or is it buried under localization
Is it this?
Try that
It should use the name you provided, can I see your function call?
Didn't work, 0Harmony.xml doesn't exist
I dunno what is causing it then
"Stage Info",
"BTN-StageInfoButton",
SpaceWarpManager.LoadIcon(),
delegate { showGUI = !showGUI; });```
would you send me your source so I can investigate?
Can you provide insight on why your commit is breaking harmony patches
it doesn't look like it's just breaking harmony patches
Then what happened?
Thanks
Why is it trying to load a null type???
[ERR 14:13:41.803] Failed on + Failure has occurred while loading a type.
[ERR 14:13:41.803] HarmonyLib.HarmonyException: Patching exception in method void KSP.Game.StartupFlow.LandingHUD::Start() ---> System.TypeLoadException: Failure has occurred while loading a type.
at HarmonyLib.Patch..ctor (HarmonyLib.HarmonyMethod method, System.Int32 index, System.String owner) [0x00031] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.PatchInfo+<>c__DisplayClass24_0.<Add>b__1 (HarmonyLib.HarmonyMethod method, System.Int32 i) [0x00000] in <4a2409e6eb214388b8d6ab81d407350d>:0
at System.Linq.Enumerable+<SelectIterator>d__154`2[TSource,TResult].MoveNext () [0x0005a] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x0005e] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.SparseArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.SparseArrayBuilder`1[T].ReserveOrAdd (System.Collections.Generic.IEnumerable`1[T] items) [0x00017] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00015] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at HarmonyLib.PatchInfo.Add (System.String owner, HarmonyLib.HarmonyMethod[] add, HarmonyLib.Patch[] current) [0x00058] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.PatchInfo.AddPostfixes (System.String owner, HarmonyLib.HarmonyMethod[] methods) [0x00000] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x00073] in <4a2409e6eb214388b8d6ab81d407350d>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00045] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.Harmony.<PatchAll>b__11_0 (System.Type type) [0x00007] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <4a2409e6eb214388b8d6ab81d407350d>:0
at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <4a2409e6eb214388b8d6ab81d407350d>:0
at Doorstop.Entrypoint.InitializePatches () [0x0000d] in C:\Users\arall\SpaceWarp\SpaceWarp\Entrypoint.cs:63
[ERR 14:13:41.803] Failed on + Failure has occurred while loading a type.
That might be it, gimme a sec
a bit annoying if that fixes it, but oh well
That ... fixed it :c
funky
@lime plaza I pushed the update, mind testing it
it probably has something to do with the game only referencing mscorlib for some reason
and not netstandard.dll
that's weird, I'm on a build from the commit before the fix and have no issues
are you loading through BepInEx
It was broken with both bepinex and doorstop for me
weird
I thought that might be it
.net 4.7 and 4.8 are the magic numbers for ksp1
@lime plaza where does that addressables part add to
@hollow cypress it works fine for me
o.O
here's my build of your mod
yep tested it again to make sure
definitely works for me with netstandard2.0
loads unity_explorer and all harmony mods correctly
yeh same issue, might be the spacewarp build u shared
ah shit
wat
the game has netstandard.dll in the Managed folder, would be weird if it didn't load it
okay here's my spacewarp build + all the mods I've got running
if it still doesn't work I will be very confused
yeah not sure why it's a typeloadexception
someoen else got the name bug when first loading a vessel onto pad, but reverting fixed it apparently
ok yeh reverting fixes for me too
my situation was just loading into game, loading a premade vessel in VAB, then launching, that produces name duplication
nbd tho
the issue definitely had to be somewhere in MainMenuPatcher, not sure why changing framework target would fix it though
got the same issue here
I'll try fixing it
ok nice
pretty sure this is the issue
didn't click for me earlier
yeh localization is a mess
I was about to start working on localization
oh sorry, not in ur project, i mean the base game lol
Yes
I'll add documentation on Roslyn compilation
For now, can I keep building the mod manually?
[LOG 07:27:03.426] [07:27:03.426] [Space Warp] [Error] Directory not found: /bin/```
on latest prerelease
Fuck did I mess that up somehow
I should've quickly tested Path.Combine stuff
same issue for me
I know what the issue is
Test now
@hollow cypress @candid sorrel I just quickly updated a fix to it
Its not even trying to load my mod
All I did between that was update a bunch of stuff to Path.combine
It wasn't before either
i think you pushed the fix to pre-release 1
Which branch are we working from?
we're looking at (pre-)releases
Alright prerelease fix works
yeh works thx
Are we not on a branch?
Alright unstable testing has the fix
I'm just getting a pile of harmony errors

yeah that couldn't have been just fixed by a target framework switch
Anyone else?
@lime plaza try clearing out your nuget packages?
that wouldn't change anything tho
Its definitely something with my build
Just pulled pre-release 2, got directory not found /bin/ but no harmony errors
Wait, the pre-release 2 has the "/bin/" fix
[LOG 15:46:31.873] [15:46:31.873] [Space Warp] [Info] Found mod: custom-flags, attempting to load mod
[LOG 15:46:31.874] [15:46:31.874] [Space Warp] [Error] Directory not found: /bin/
Try repulling
That I just downloaded from github
for me only the pre-release 1 has the bin fix
i think you uploaded the fix on that
I definitely did
@lime plaza fix has been pushed
To where?
Oh, I see it
That is a build of what is on unstable-testing right?
mhm
Oh cool, it works now
I do want to get 0.3.0 out tonight
Did something change with the GUISkin? My mod no longer loads that correctly, neither through ResourceManager.TryGetAsset nor through SpaceWarpManager.Skin
fixed it by deleting the localizer
Odd because I just tested on the prerelease build and ui stuff looks good
weird
gonna try cleaning my folders up and reinstalling most of the stuff
yeah its not working. this is on the bepinex version for reference
the original 0.3.0-prerelease 1 works
the new one doesn't
@candid sorrel ui doesn't work on bepinex, will make fix
build the fix bepinex ui branch
but ill likely force push it into unstable testing
@candid sorrel
will put updated build on prerelease
Prerelease has been updated
@sacred jasper slight bug string catalogPath = Path.Combine(addressablesPath,"/catalog.json");
Fix has been released
facepalms
works, thanks!
fixed in last pr, won't force as its not critical
I am going to take a quick nap ... Then work again
<@&1078770539688112168> <@&1079271050644303922> while I nap, what do we need done to push out 0.3.0
Anyone?
:D
merge 👀
i review u pr
i need if we can maybe do a click through blocker, but that might take an entire release to do
i started rewriting the class just didn’t have time to finish
ok
wow im late again
yeesh
its only been a few hours since school started wow
i mean it ended but still
Fixed ui
nice!
btw im rewriting the installer frontend in typescript with a proper vite dev server and stuff to minimize bugs and stuff
What are the benefits of providing an installer?
🥵
easier access or smthing idfk
no need to use it
just wanted to make something
my ui? xd
i havent seen it lol - i just started working on it lol
it’s dogshit trust me
I spent 5 hours working through a line endings issue
average ksp modder
Almost
fun
sounds like i need to warm up my scss skills
also looking at the rust code - did you have, like, a time limit to make this or something?
me like more than one file for code or else readability go brrrrrrrrrrrrrrrrr
my sanity is a time limit
thatll do it
if u improve 100% approve pr
all the rustaceans crying
this is my first time ever writing rust
gogo
also im gonna improve install path checking - for users like me who have the steam library at D:\SteamLibrary im gonna add a check in this file: C:\Program Files (x86)\Steam\config\libraryfolders.vdf to get all the steam library directories
very good
fuck i spent like 2 hours trying to find that file xdd
couldn’t make it work
npnp
Does this need to be added into space warp or is it specific to the addressable
I'm making a PR
Got it
For translations
Some things in the base game have to use the translation system
is it tied to the in game lang options?
We should start using the translation system for space warp too
That'll be post-0.3.0
@lime plaza could you start writing documentation on part modding w/ localization for spacewarp
I can try, but not for a few hours, where do you want it?
On the github wiki
you can also just use regex lmao https://github.com/thunderstore-io/thunderstore-cli/blob/master/ThunderstoreCLI/Utils/SteamUtils.cs
@river hawk we were working on making a port of ClickThroughBlocker for Space Warp, but noticed its under the LGPL license, meaning we would likely have to compile it and add it as a dependency, as SW uses MIT, any insights on this?
oh yeah - that makes sense. too late tho lol
go impliment and make pr :D
i will test on my install
im not done but ok
then dont pr :D
hardcoding the steam directory 
lol
fr
exactly lol
hardcoding system32 directory 💀
<@&1078770539688112168> <@&1079271050644303922>
We are going to pause major feature changes for now to work on documentation for everything we have.
The reason I ask though is I already have people dming me when I barely know how it works
I also barely know how it works lol
Well you at least figured it out, I couldn't even do that
get together a few "barely-knows" and you'll have a full 1 knowledge 
But I want 2 knowledge
Needs investigation, bepinex
What version was that? I'm using the latest 0.3.0 spacewarp for bepinex release on github and don't have any issues
is the github release different from the one on spacedock?
They should be the same
I'll take a look
[EXC 20:23:29.702] NullReferenceException: Object reference not set to an instance of an object
KSPTestMod.KSPUtils.FixVesselSituation () (at <ca3de388e99b41b387f23a41e1d93537>:0)
KSPTestMod.KSPUtils.Update () (at <ca3de388e99b41b387f23a41e1d93537>:0)
@sacred jasper
absolute legend
I don't know what I am looking at
For all the people that have asked, yes we are working on adding toolbar buttons to the vab. In fact were almost there. Weve also created custom part catagories. The UI stuff just takes a hot minut to get working right.
Oooo
Ive been busy 🙂
pog
I won't be doing much work today
It might be useful to give mod authors a reference to their instance of harmony so they can unpatch if necessary. I'm not sure what the best way to do that would be though.
https://github.com/SpaceWarpDev/SpaceWarp/blob/b73d1ca4a3c3fcd162311a07d5d5c9bf3ac29504/SpaceWarp/API/SpaceWarpManager.cs#L456
Add a harmony manager class, or use space warp manager class and add a GetHarmonyFor(mod_id)
any plans to add mod settings in the spacewarp menu?
that's already a thing
I don't think so
https://github.com/SpaceWarpDev/Space-Warp-Example-Mod-Template/blob/main/ExampleModProject/ExampleMod/ExampleModConfig.cs this is as close as you can get I guess
ty
@sacred jasper lol they just merged your thread into the old one so it's buried at the bottom of the page
(in the forums)
I know lol
how did he not get what the intention was 
I appear to not have access
Alright gimme a moment
For now send me a copy of your tutorial that you want to write, and I'll post it in #🔴tools-and-resources @lime plaza
You can also clone the wiki and pr i think?
The wiki is a separate repo, not a branch, so while I can clone it, I'm not sure I can pr it.
Fair enough, if need be, I can copy it over manually
I'll make sure to credit you
Sound good to you adam?
Yeah
Aight just ping me with a link when it's done
<@&1078770539688112168> could someone else review the pull into main, it adds issue templates and a few other QOL improvements when dealing with space warp
yessir
reviewed @sacred jasper u can pull
u sure u want to make an issue template 👀
lol just gonna be all ksp bugs..
odd @mossy kraken the templates aren't working?
^^
@sacred jasper could you delete the SpaceWarpDocs repo, i need to redo it without public template 😭
Alright, just make a new repo and ill delete the old one
but i wanna name it the same ;-;
the contents is useless dw, i messed up the install
:D
Imma quickly give myself force perms for a moment
@mossy kraken
I'm gonna quickly make my own versions of these and see what happens
Ahh okey 😄 Awesome
🥺 maybe delete docs repo
Done
@lime plaza here is where the new docs will go, this repository
https://github.com/SpaceWarpDev/SpaceWarpDocs/tree/main/source
I'll open a pr for the parts tutorial
make.bat html
and then
sphinx-autobuild source/ build/html/
need to install the python stuff tho
Is there anyway to have keybindings in a mod config? It would be nice to have keybinding input integrated into the mod configure UI
Make a feature request
Will do
I need to do a complete redo of the configuration UI system
Not the API but the UI
@timber cedar likely should add a link to the readthedocs page in the repo
mhm
checking consistency... E:\Programming\KSP2\SpaceWarpDocs\source\modinfo.json.rst: WARNING: document isn't included in any toctree
@timber cedar
I was meaning on the readthedocs repo
ah xd
did it
we are both doing the exact same thing at the same time
:D
@lime plaza add this to the index.rst file in the toctree
modinfo.json.rst
@timber cedar Why does my page vanish from the sidebar when viewing any page other than it and index?
i have the same issue, no clue
im trying to fix it
well its working rn
so idk
im gonna push rn and you can see if it still breaks
PR up
@sacred jasper since you mentioned it, doing it like this would be cool
I will look into how the settings menu works as it would be great to have settings there
or, that same screen but under "Mods" instead of "Settings", and mod list on the left side
since with a larger number of mods the one-page layout could get pretty cluttered
yeah that might be better
we'd have to add a mods button here and on the main menu for that to work
@sacred jasper
## Version Information
###### **KSP 2 Version**
The KSP 2 Version
###### **Space Warp Version**
The Space Warp Version (we do not fix bugs any releases that aren't the latest)
```how about this
Its fine as is
k
@timber cedar Made another pr
It was just a clone of the config tutorial
Just opened a feature request for adding abstractions for game states
I suppose I will work on code for it at some point now that we are getting slightly better documentation
Alright
We might want to change addressables loading to be after first stage initialization
It means that people could add custom scripts to their parts
If I understand stuff correctly
Tomorrow I'll make a part with a custom script
Pretty sure that would be in the addressable
The script can't be in there but the reference can
The script would have to exist in an already loaded assembly
Oh, thats interesting
Asset bundles can't contain code
can u make channel for docs ^^
And this is why I want a space warp category maybe, but have to run it by other admins
u have my support :D
sounds good idea
Thoughts on making the config folder different from the mods folder?
Interesting idea, I feel as if mods should be self contained
For now I would like discussion on this issue
https://github.com/SpaceWarpDev/SpaceWarp/issues/105
It was bound to happen eventually, and we are still early on
Yes, but, I want to keep static mod features, and user mod features separate. That allows someone updating to just nuke the entire folder, and drop it back down without worrying about messing up their configs
<@&1078770539688112168> <@&1079271050644303922> this is an important issue.
I'd get rid of MainMod/Mod now
go the full length instead of piecemeal
or keep them but mark them as [Obsolete] or even [Obsolete(true)] to make using them an error and just use them to load old (old isn't the right word, they're 2 days old, but y'know) mods
I like this solution
Comment this on the issue rq
you can also still have a Mod class (called something else) if you wanted that inherits from the BepInEx plugin class
what about making bep plug-in, but keeping the top level folder. would it still have it?
Makes sense actually as if we register with the type, we don't need mainmod
@sacred jasper Would it be possible to do mod registration this way instead of manual registration?
I'm not sure if BepInEx provides an abstraction for getting plugin assemblies as it loads it, I'll have to look into that
I'm also interested in knowing the answer to Sinon's question btw
what will the folder structure be like
perhaps you should answer on the issue, sorry for bringing it back to discord
this way you can just loop through ChainLoader.Plugins and do pluginObj is ModClass mod to register them
Mods will be BepInEx Plugins and SpaceWarp will likely be doing the loading from the mods folder
you don't have to do any unique loading at all
you can register after they're all done loading, during your plugin's Start
Honestly, I've been considering this change for a while now mentally anxways
Just go for it
could you make a comment on the issue with an example of the folder structure? I'm still not clear on it, sorry
Give me a bit to eat myself
eat yourself?! 😨
Careful with that
that's a new one
I'd just get rid of the SpaceWarp folder structure entirely as well
That's my plan
Would we keep the addressables/localizations/etc folders?
then there's not really any need for backwards compatibility stuff like this
In the plugin folder
each mod should get its own folder in the plugins folder
since the folder structure would change anyway
inside each mod folder I'd have those folders
I mean, I guess users could just move them over if the structure inside the individual mod folder stayed the same
so a mod would look like
BepInEx/plugins:
ModA:
plugin.dll
addressables:
some.bundle
localizations:
idktheformat.csv
ModB:
plugin2.dll
Not quite how addressables work, but I get the idea
And space warp goes into the plugins folder as well?
wait does BepInEx load only top level folder .dlls?
no
Neither do I lol
it searches the entire tree for DLLs
convention is to never have any DLLs in the top level
well then it would make sense to keep them in bin
ModA/bin/pluginA.dll
Yes
that would be fine, not sure when a mod would have more than one plugin though
better yet follow the ksp1 convention and go for ModA/Plugins/pluginA.dll
BepInEx/Plugins/mod/Plugins/x.dll
ew
well, I was thinking of the backwards compatibility measures mentioned before
I don't think we should focus to much on backwards compatibility. We are not even a week into KSP2 yet and should not limit ourself to much to supporting every little convention we have made in the last 6 days.
I'm inclined to agree
If we are going to do this, maybe we should just break things anyways
I think so

It's the perfect time to redo our abstractions
btw, just a thought, wouldn't you consider making the distinct parts of SpaceWarp separate libraries/repos/possibly nuget packages?
what do you mean
like toolbar stuff, ui skin, etc
distinct parts?
this is because the double Plugins is maybe a bit wack, were you proposing this? I suppose it doesn't matter really
SpaceWarp could package things in different assemblies
but I'm not sure why it would do that, really
it's not like you can only depend on part of it
well, you kind of can
actually R2API did this
it's kinda meh
making it more modular would make sense if it intends on adding more and more mostly independent features
with something like a SpaceWarp.Core where all the common stuff is
on one hand, sure
on the other what is there to gain from doing so
like I said, R2API did this https://thunderstore.io/package/tristanmcpherson/R2API/
and it was... okay?
not much changed after the rework
well, I guess it won't change too much for a project of this scope
not like the library size will grow to hundreds of MB
hopefully

and even if it did, in all likelihood you'd be pulling the entire thing anyway
either just due to having more than a few mods or one dumb mod depends on all pieces because they weren't sure what they would need
If its used rarely enough and its big enough to split off, it probably shouldn't be part of SpaceWarp
me reading this: 🐒
KSPTestMod.KSPUtils.FixVesselSituation is throwing an error - something is undefined
That is an error with the Kerbalpatchprogram mod
And IIRC that mod is bepinex, so that shouldn't have anything to do with sw?
am i retarded?
wrong folder
one up, yeah?
that needs to go in the parent folder, ye
rip
@sacred jasper how much have you done for the BepInEx switch
Just created the branch
cool, I'll try to come up with something to start with and PR into it then
@hollow cypress@wise swift
Could we move discussion of the issue here? or to the repo
sure
@late condor too
this is the current situation
no, its moving towards an existing standard, instead of making a new one (itself)
which discussion
of the possible change to bepinex
the new one is already here.
ok, i just really like what youve done with spacewarp tbh
Spacewarp is great, I don't think anyone is contending otherwise
u were here from day one working hard, u added tons of great stuff like UI style and app bar integration
it can still do all those things without having overlap with the loader aspects
?
did you reach out to them?
I just feel like it would be healthier for space warp and the modding community if space warp changed to a library that provides those abstractions
what bugs are there in 5.4.21
Bepinex has a gigantic community of developers with years of experience
It'd allow bepinex mods to easily use space warp abstractions and vice versa
They have helped both modders and game developers with bepinex issues
ok provide them but dont kill the current system, just integrate it into it without the breaking changes or folder moves that have been proposed.
if you legitimately believe there is a bug, you should raise it with them, but at the moment there isn't really much reason to suspect there is bug
is that really an issue? it's been a single-digit number of days
if this is where bepinex is coming from ill take a hard pass ty
can't expect it to be immovable and 100% backwards compatible
Why though, why should we not make this change, especially with how early on it is in modding
well, first of all I"m not a bepinex contributor, second I've been looknig at your code but I've been trapped by unrelated issues preventing me from testing anything
Why are you making such a claim, as its not my job to fix bepinex issues, its not theirs.
of your gaslighting ability? ive seen enough
haters gunna hate I guess
abusers gonna abuse
I mean, I've legitimately been spending hours actually looking into your issue
and modders gonna keep modding
how many channels are going to have some drama today 
Not a gaslighter 
why: its going to break tons of stuff.
early or not your one is working better than the other system.
whats the point of Spacewarp with that change?
I just don't know how to respond to that, if I knew what the issue was, do yuo think I would still have the project open?
to provide a common abstraction library for mods to use
oh oh oh he suddenly forgot
no, I forgot nothing, I haven't figured it out
after hours of work... what was he doing again?
This is starting to get uncivil
What is the point of this whole exercise? I don't think it has much to do with the discussion about mod loaders
maybe take this somewhere else?
they're asking what you're looking into
when gaslighters are selling a product, i avoid it
not the cause of the issue
huh?

Why the ShowGUI method never executes and whether or not thats because of BepInEx or because of an issue with the SpaceWarp Plugin for BepInEx triggering a failure condition.
I was going to approach this by converting the mod into a BepInEx mod to remove Spacewarp from the equation, as much as is possible since it relies on SW features
but I donno whats going on, I can't seem to get anything to compile anymore and I have no idea whats going on
and like, not even StageInfo, anything at alll
at first I thought it was a ThunderKit bug, but I'm running into the same issue with Visual studio now too
weird
