#Space Warp - KSP Mod Manager

1 messages · Page 1 of 1 (latest)

stray carbon
viral lark
#

why not use an off the shelf unity modloader?

stray carbon
#

Im thinking mostly because it'd be nice to have a standard for stuff like custom parts

#

although I guess having that as a separate mod could work too

cunning spire
#

Better not reinvent the wheel but make a new car out of it

viral lark
#

yeah a common pattern in unity game modding these days is building a common library for a stock modloader

cunning spire
#

it seems that they use Addressables to load stuff

#

that could ease out life a bit

viral lark
#

a partloader mod for BepInEx seems like it would be fairly easy to implement

stray carbon
#

why BepInEx over like melonloader?

viral lark
#

I have a personal dislike for MelonLoader because of the people behind it

stray carbon
#

oh?

viral lark
#

and what they have done over the years

#

tl;dr melonloader was built on stolen code and only apologised for when they were called out

stray carbon
#

omg yes

viral lark
#

they've also been know to harass other modloader devs

#

BepInEx can do everything MelonLoader can (including loading ML mods lmao)

#

and in many ways does it better

barren brook
#

/gamedata/mods/ can be loaded

deft linden
#

Space Warp - KSP Mod Manager

dapper maple
#

How would I go about setting up a development environment / building to run in KSP?

New to C# modding so still figuring things out.

Been able to copy KSP dlls to /external_dlls but not sure what to do from there

stray carbon
#

we're still working on it 😅 but I can ping you when its semi useable :)

dapper maple
#

haha no worries, thanks!

deft linden
#
{
    "mod_id": "[SHOULD BE THE SAME AS FOLDER NAME]",
    "author": "",
    "source": "",
    "version": "",
    "dependencies": [
        {
            "id": "example_mod",
            "version": {
                "min": "0.0.0",
                "max": "9.9.9 (can be * for no max version)"
            }
        }
    ],
    "ksp2_version": {
        "min": "...",
        "max": "... (can be * for no max version)"
    }
}
barren brook
deft linden
#

This will be the structure of "modinfo.json" that Space Warp will assume

barren brook
deft linden
#

Thats KSPs in built mod manager

barren brook
#

this is the ksp2 structure

barren brook
dapper maple
# deft linden ```json { "mod_id": "[SHOULD BE THE SAME AS FOLDER NAME]", "author": "",...
GitHub

1.13+ Alternative of AlmostEnoughItems / JustEnoughItems - RoughlyEnoughItems/fabric.mod.json at 10.x-1.19.3 · shedaniel/RoughlyEnoughItems

#

probably don't need everything though like mixins for example in your config but doesn't seem like a terrible way to base it off of

stray carbon
#

@unborn kettle

unborn kettle
deft linden
#

#archive-space-warp

iron grove
#

I have a little bit of experience in illustrator

deft linden
#

Aight

cunning spire
#

Just going to throw a few things to consider:

  • Mod order, as some mod core might be needed before loading other depending mods
  • Mods loaded count when we initialize the mod loader
  • Support for KSP2 DLL overrides, maybe do it in a way it uses the dnSpy to edit specific files
  • Support for editing base game config files, without having to use a mod for it
  • Make an example mod
    Not sure if those are tackled but that’s what comes to mind
stray carbon
#

moved to #archive-space-warp

unborn kettle
barren brook
#

unpinning since it moved to it's own channel

zenith moon
#

Compiled the latest master branch and tried to load the BepInEx version, log says "Skipping type [SpaceWarp.BepInExEntrypoint] because its version is invalid."

deft linden
#

You targeted it to BepInEx?

zenith moon
#

ran build.bat -a and grabbed the build/BepInEx folder

deft linden
#

@royal belfry is the one who made the bepinex stuff

zenith moon
#

seems like I know where the issue is, BepInExEntrypoint takes the version information from MyPluginInfo.PLUGIN_VERSION, MyPluginInfo gets generated from project settings, and the project has no version setting

#

so version is null

zenith moon
#

in the class attribute in BepInExEntrypoint.cs:

[BepInPlugin("com.github.x606.spacewarp", "SpaceWarp", MyPluginInfo.PLUGIN_VERSION)]
public class BepInExEntrypoint : BaseUnityPlugin
...

deft linden
#

Hmm?

namespace SpaceWarp
{
    public static class MyPluginInfo
    {
        public const string PLUGIN_GUID = "SpaceWarp";
        public const string PLUGIN_NAME = "";
        public const string PLUGIN_VERSION = "1.0.0.0";
    }
}
zenith moon
#

yeah but when you build the project, PLUGIN_VERSION gets rewritten to ""

#

seems to be a feature of /packages/BepInEx.PluginInfoProps.2.1.0

deft linden
zenith moon
#

Created a PR for it

deft linden
zenith moon
#

I noticed that it suddenly jumped from green to conflicts lol

deft linden
#

Lol, I'll fix it

#

Or you can

#

I'll just push a version of it with the correct version and close your PR @zenith moon ?

zenith moon
#

I just reforked it and edited the file again, takes a minute on the website

deft linden
#

@zenith moon care to test current version with BepInEx?

zenith moon
#

just did, works

deft linden
stray carbon
iron grove
#

Niiice

royal belfry
long crag
deft linden
#

<Version>0.2.0</Version>

long crag
#

Is there any way for me to verify that on the compiled library? Otherwise i'll try building from source

#

found it

#

changing the version number there fixes it

#

It's also an empty const string in the MyPluginInfo class, where it's supposed to grab the version number from when building

#

not sure what went wrong there

zenith moon
#

that's weird, I haven't had that issue since submitting the PR that added the <version> tag to the project