#Space Warp
1 messages · Page 5 of 1
I need to think like the average user
aka IQ in negative values
in order to do testing
to out smart the smartest prey, yuo must think like them
behave like them
eat like them
put your coffee cup into your computers coffee tray
...
oh shit, you guys might be to young to even know lol
:D probably
not that young
I remember installing games from 4 CDs
though I barely ever used floppy disks
i dont know where it is rn
but i have this
big stack of cds
like 500
one of these
I got rid of mine years ago
yep, still have like 4 of these
I have a single external cd rom stuffed in a drawer somewhere for when I need to install an OS from a cd
Oh you have the Quake Shareware CD? 😉
i mean i have windows 10h on cd
I guess not all the coolest then
:D
I don't think that would fit on a CD, right?
dvd
right
yeah
Its going out
No, if I was a Betamax user I'd have mentioned hddvd
what they were amazing
like why burn stuff on a disk
we had a blu-ray compatible reader
when you can buy a 1 TB USB
Had

i ate it
Appropriate course or action in these trying times
^
Cheese, I fixed the documentation https://github.com/SpaceWarpDev/SpaceWarpDocs/pull/6
Sent a pull request
Wait its Rexicons github lol
Unless rexicon is you Cheese 🤔
:D
im rexicon
Follow all the same steps in the :ref:`Addressables Loading` documentation for making assets addressable, but make sure that the sprites runtime name is :code:`<partName>_icon.png` and the prefabs runtime name is :code:`<partName>_icon.png`
this is what you changed?
merged
the prefab's runtime name is ___.png?
yeah
am I just dumb or does that not sound right?
🤷 idk what any of these docs do

partname.prefab I think
fr


(dw we love you cheese
)
it's been slowing down but yeah, should be there in a couple of days or so
you can write a patcher and just hook the loading stuff yourself
average aaron response
do it your self 
<3
smh why didn't I think of it before
I already wrote a patcher to load UITK assemblies
but yeah they load before the chainloader starts
so you can effectively mod bepinex itself during that time
❤️
nice, that's pretty much what I needed
I assume I can use Harmony within the patcher still?
yeah
oh yeah it's literally in the 2nd paragraph lol
you just can't reference any game or Unity DLLs
I should read first and then ask questions
is there a harmony for unreal games
nah
no
:C
how to mod unreal game
but yeah just do
public static class Patcher
{
// List of assemblies to patch
public static IEnumerable<string> TargetDLLs
{
get
{
Harmony.CreateAndPatchAll(typeof(Patcher).Assembly, "SpaceWarpPatcher");
return Array.Empty<string>();
}
}
public static void Patch(AssemblyDefinition assembly)
{
// empty method, bepinex just needs to see it
}
}
ez
so you can still use harmony
why would you want to do that so early anyway
the game window isn't even open at the point this happens
ikik, but is there any point later that i could
...
just about any time
OnGUI?
I'll work on this kinda stuff tomorrow when Im free
I have arisen
so spacewarps wiki says that all parts should be under the default assets, but can they not be?
i think that it would be better if each part had it own .addressable file
that way i could just export the part that i want instead of exporting all of them everytime
you can get started on it
the code i wrote should be literally plug in play here
as we still have almost the same file system
"click button" generate .ignore
"unclick" delete .ignore
obv in the spacewarpmanager just ignore mods that have a .ignore
@old vault https://medium.com/swlh/is-using-linq-in-c-bad-for-performance-318a1e71a732 it doesn't seem to me like using Linq for filtering/transformations is as bad as people make it out to be
basically functional/query-style abstractions for for/foreach cycles
huh
here's an example from the benchmark
similar to something like calling myArray.forEach(item => ...) in Javascript
^
It depends what you mean by "bad". In a business app, yes, you don't care.
In a game where your budget to reach 60 FPS is 16.6 ms, yes, it definitely matters a lot.
:D this wont affect millisecond performance
the specific method in question is not something that should be called in a loop anyway
itll be eaten by the variation in frame time
You don't know where this will be called this is is meant as an API.
And yes, it definitely matters.
yeah but it's just bad practice to fetch parts like this every Update cycle
And yet, in my experience, youc an be sure that tons of mods will do it
me nowhere
oh
i'm just commenting about a GitHub issue
but then they will suffer from bad performance anyway, the little overhead that not using Linq will remove won't save them
but I see your point
I just think that realistically this specific method implementation won't have much performance impact, since using it outside of the game loop will only result in negligible one-time performance loss and using it in a game loop will be bad with or without Linq
From my experience in KSP 1, there are many cases where you need to iterate over all parts or all modules. And caching isn't always a viable option.
Things change in the context of unity
Unity doesn't handle garbage collection the best, and linq produces garbage
fair, I don't have any real experience with that
Its not a big deal if you're using linq occasionally on stuff like user initiated actions, but it becomes a big provlem if used in any kind of loops or automated systems
The problem here is that this is an api, and its not predictable when the code will be called
If someone decides to use it in a loop, it will take a massive shit on the GC and cause problems that were entirely avoidable by writing more verbose code
Sure, I see your point, wasn't aware of the GC issues
Shouldn't be an issue making a quick PR to fix it then
I see that got said all that already lol
It's not just a GC issue. Allocations are slow in themselves. Your method is not just 2x or 3x slower than a discrete for loop, it's an order of magnitude slower.
And while the overhead is indeed small, these things pile up very quickly.
I tend to group allocs with gc tbh
(to be fair it's not mine, i was just interested in why you thought it was so bad)
it shouldnt be called often, why would someone loop it for one...
Its a smell more than outright bad, in an api it can lead to systemic issues if a lot of people use it
Yeah that was my main point
But I also see the other side of the argument
Doesn't matter why
You can't make people not call it in a loop
What matters is, someone will, even though they maybe shouldn't, and if that happens to turn out to be something popular, then it will look like its spacewarps fault
Perception control is valuable
i considered linqs performance and thought itd be a non issue in the intended use case
I would do the same honestly
But I guess it makes sense to think about these things more in terms of what (possibly nonsensical) uses it might have for other people
the intended use case for this is at load time
as for ienumerable i had no clue
I'm not sure what the "intended use case" is.
But given that by nature a part collection can change over time (editor actions, and decoupling/docking/undocking in flight), whatever is calling this has only two options :
- cache the result and try to cover all possible events where the cache must be invalidated
- call this every update
@gilded kettle can explain better
basically afaik the use case this was specifically made for was to edit part definitions and their modules during game loading
If you want to design it specifically for that, put in control code to enforce it
But tbh, that will be more work than just reformatting the code to not use linq
if you guys are still talking about the linq performance, its basically non-existent until you start reaching the hundreds of thousands of elements
you shouldnt worry about those kind of functions
the API does not provide access to a vessel's parts to be clear
the specific instances of them
if the for loop is faster, than just use it :D
Its definitely much more impactful than that in my experience, and I'm a big fan of using LINQ
only the general definitions of parts
what are the benifitis of linq other than saving 4 lines of code
I use linq anywhere i can, but I've had plenty of code that was slow, in unity, specifically because of linq that wasn't some gigantic liqn operation happening thousands of times
Its more expressive
its more expressive than a literal for loop??
I can't honestly imagine any use case where you would need to fetch part definitions other than at game load time
Absolutely imo
Tbh, I dont even know how to argue that
:D i understand ^
I'd get it if we were talking about parts that can change on the fly, aka actual instances of parts on a vessel in either the VAB or in flight
I'm just speaking from general unity experience to be absolutely clear
I definitely don't know the context well
I just think that that may be where @old vault and I misunderstood each other
If this code can absolutely not be used in a situation where it could be called hundreds of times in a loop, then its not an issue
since part definitions can't be affected by editor actions, decoupling/docking/undocking, etc
they just get loaded when the game starts
and that's it
afaik
me: starts using linq recursively
I absolutely love linq, best thing ever, just needs to be considered carefully in unity
Okay, well, it's definitely fine then. I was definitely was thinking this was for vessel parts.
wassup?
But I also stand by my stance that LINQ should be nowhere near game-loop code.
Even in initialization methods or one-shoot events, this can pile up and contribute to slower load time, stutter on those events, etc.
And yes, LINQ is slow, garbagey and should be avoided in those contexts.
If it wasn't, there wouldn't be massive efforts from the .NET team to try to replace and speedup its internals.
And there wouldn't be many popular projects that try to reimplement it with structs and using various other techniques to improve its performance.
Also, something to keep in mind is that Unity isn't running on modern .NET / CoreCLR but on the Mono runtime, where many such high level API suffer from even more performance issues.
Yeah to be fair I absolutely forgot to take Mono into account
im so confused 😭
To quote the official "Fixing Performance Problems" unity guide :
LINQ and Regular Expressions
Both LINQ and Regular Expressions generate garbage due to boxing that occurs behind the scenes. It is best practice to avoid using these altogether where performance is a concern.
good lmao, i was distracted with TUX
I'm looking into it now
and I'm thinking this should actually be done differently
like a single .ignore file with the names of all the dlls not to load
or something similar
since BepInEx plugins (even without a swinfo.json file) are also displayed in the Mod List UI
and they don't have to have separate folders technically
but it still makes sense to allow unloading them, because why not
we'll be patching BepInEx classes anyway to do it
so might as well allow it for any plugin
that could work yeah
whatever easiest
this isn’t supposed to be something performanced
For reference on the LINQ discussion, here are some quick and dirty BenchmarkDotNet results for various implementations of the method :
| Method | Runtime | PartCount | Mean | Ratio | Gen0 |
|------------------|----------|-----------|-----------|-------|--------|
| For | .NET 6.0 | 10 | 1.375 ns | 1.00 | - |
| ForEach | .NET 6.0 | 10 | 1.617 ns | 1.18 | - |
| StructEnumerable | .NET 6.0 | 10 | 2.256 ns | 1.64 | - |
| LINQ | .NET 6.0 | 10 | 26.503 ns | 19.27 | 0.0014 |
| | | | | | |
| For | Mono | 10 | 1.630 ns | 1.00 | - |
| ForEach | Mono | 10 | 14.007 ns | 8.59 | - |
| StructEnumerable | Mono | 10 | 13.271 ns | 8.14 | - |
| LINQ | Mono | 10 | 61.134 ns | 37.48 | 0.0174 |
| | | | | | |
| For | .NET 6.0 | 500 | 1.390 ns | 1.00 | - |
| ForEach | .NET 6.0 | 500 | 1.619 ns | 1.17 | - |
| StructEnumerable | .NET 6.0 | 500 | 2.246 ns | 1.62 | - |
| LINQ | .NET 6.0 | 500 | 26.955 ns | 19.40 | 0.0014 |
| | | | | | |
| For | Mono | 500 | 1.716 ns | 1.00 | - |
| ForEach | Mono | 500 | 14.066 ns | 8.18 | - |
| StructEnumerable | Mono | 500 | 12.251 ns | 7.14 | - |
| LINQ | Mono | 500 | 62.616 ns | 36.46 | 0.0174 |
There are 4 implementations :
Foris a direct iteration using nested for loopsForEachis a direct iteration using nested foreach loopsStructEnumerableis a foreach loop over a custom struct IEnumerableLINQis the original (actually made a bit better by using.Any()instead of.Count() > 0)
The StructEnumerable is functionally equivalent as the LINQ one (can be implemented as a helper extension method)
And the Gen0 column is representative of how much time is spent due to GC memory allocations.
what we've learned from this is that Mono sucks 
Yep, it does. Unfortunately, we are stuck with it 😛
Mono is missing more or less entirely the last 5-6 years of improvements that went into .NET
And even ignoring that, it has always been quite behind even in the late .NET Framework days...
bruh...
@wicked wyvern any updates on mod toggling?
yeah, have most of the work done I think, but I'll have to finish it tomorrow since it's really late
we might want to look into checking dependencies when we do this as well lol
so that might add a bit of work
not necessary for first implementation but a qol thing
would be nice to have for 1.1, for sure
probably X606 should add on the forum's spacewarp post the "how to update to 1.0.0"
theres a wiki/docs for that
yeah but its not on the forum post i think
theres a forum?
KSP forums
https://forum.kerbalspaceprogram.com/index.php?/topic/213036-space-warp/
It does say the wiki is your friend but people tend to just skip whats not in bold letters
Space Warp 1.0.0 Space Warp is a modding API for Kerbals Space Program 2. Links Space Dock Source Code (MIT License) Features Asset bundle support Part modding Mods menu Console Fancy UI stuff Has an inbuilt stockalike UI skin for mods to use. Addressables Support Localization Support Part Moddin...
allocations are not that slow
for most garbage collectors its barely more than a pointer bump, unless it has to go and get more memory from the system
need text wrapping in modmanager
does 1.1.0 have a ETA? i have some improvments to the Colors and if its close i'll make them tomorrow
@sacred jasper can i do a full code reformat and cleanup on the 1.1.0 branch
all the dumb unused vars and incorrect whitespaces
unsed imports
kk
public static void Initialize(SpaceWarpPlugin spaceWarpPlugin)
{
Logger = spaceWarpPlugin.Logger;
Path.GetDirectoryName(spaceWarpPlugin.Info.Location);
AppbarBackend.AppBarInFlightSubscriber.AddListener(Appbar.LoadAllButtons);
AppbarBackend.AppBarOABSubscriber.AddListener(Appbar.LoadOABButtons);
}
what
Path.GetDirectoryName(spaceWarpPlugin.Info.Location);
what
???????
@wicked wyvern
whoops
rider decided to just push instead of pr
thx rider
i guess this doesnt do anything
ok i reverted
could've at least tried to launch the game :p
no this absolutely should have yelled at you for this
harmony does not support what you changed
xd just look
this show throw an exception immediately once SpaceWarp loads
the game will probably load fine
but there will be an error in the log
all the menus work
and no mods will work
yes
what file is this in?
ConfigurationPatch or ColorsPatch
this?
yes
yes
currently only one mod
i can add more later xd
maybe its a bad example mod
errors are about gui and lang missing
not me
send the bepinex log
idm fixing it ^
okok
so its not game breaking
thats why i didnt notice
i gotchu
harmony should kill you for that, i dont know why it isn't
void KSP.Modules.Module_Color::OnInitialize() with 0 prefixes, 1 postfixes, 0 transpilers, 0 finalizers
this
it fixed auto
but yeah never good to have that
fixed auto?
idk im making shit up
i assume thats what postfix is
oh
maybe its the name of the function
nvm
i see now
idk i dont harmony much
good i think?
same exception is still there
ColorsPatch
i might know what it is
needs to be __instance
like that?
is what supposed to be there
[Error : HarmonyX] Failed to patch virtual Type[] System.Reflection.Assembly::GetTypes(): System.Exception: Parameter "typeException" not found in method virtual Type[] System.Reflection.Assembly::GetTypes()
at HarmonyLib.Public.Patching.HarmonyManipulator.EmitCallParameter (System.Reflection.MethodInfo patch, System.Boolean allowFirsParamPassthrough, Mono.Cecil.Cil.VariableDefinition& tmpObjectVar, System.Collections.Generic.List`1[HarmonyLib.Public.Patching.HarmonyManipulator+ArgumentBoxInfo]& tmpBoxVars) [0x007ae] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.<WriteFinalizers>g__WriteFinalizerCalls|39_1 (System.Boolean suppressExceptions, HarmonyLib.Public.Patching.HarmonyManipulator+<>c__DisplayClass39_0& ) [0x0003c] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteFinalizers (HarmonyLib.Internal.Util.ILEmitter+Label returnLabel) [0x001c1] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x0023c] in <474744d65d8e460fa08cd5fd82b5d65f>:0
the file is called FixGetTypes
a
but yeah normally harmony yells at you like this when that happens
^
oh
make the consts in SpaceWarpPlugin public again
yeah those two
they're meant for people to use
yeah i got that :D
🤷
thanks for not making that obvious in the suggestion itself rider
yeah
i dont really like to auto apply
but there were like 500 "add _ to var name" warnings
easier to just fix after
lmao
[Error :Space Warp] System.NullReferenceException: Object reference not set to an instance of an object
at SpaceWarp.AssetHelpers.LoadLocalizationFromFolder (System.String folder) [0x00001] in C:\Users\david\Documents\KSPMods\SpaceWarp\SpaceWarp\AssetHelpers.cs:31
at SpaceWarp.Patching.LoadingActions.LoadLocalizationAction.DoAction (System.Action resolve, System.Action`1[T] reject) [0x00018] in C:\Users\david\Documents\KSPMods\SpaceWarp\SpaceWarp\Patching\LoadingActions\LoadLocalizationAction.cs:23
[Error : HarmonyX] Failed to patch void KSP.Game.StartupFlow.LandingHUD::Start(): System.Exception: Parameter "instance" not found in method void KSP.Game.StartupFlow.LandingHUD::Start()
at HarmonyLib.Public.Patching.HarmonyManipulator.EmitCallParameter (System.Reflection.MethodInfo patch, System.Boolean allowFirsParamPassthrough, Mono.Cecil.Cil.VariableDefinition& tmpObjectVar, System.Collections.Generic.List`1[HarmonyLib.Public.Patching.HarmonyManipulator+ArgumentBoxInfo]& tmpBoxVars) [0x007ae] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WritePostfixes (HarmonyLib.Internal.Util.ILEmitter+Label returnLabel) [0x001a5] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x00234] in <474744d65d8e460fa08cd5fd82b5d65f>:0
these are the two left
i can read them now :D
or not
is that last one from us?
oh
no i see now
and the top one is from translations
okok
looks good?
except for that last one, yeah
honestly
just right click on one of the [HarmonyPatch] attributes
hit find usages
and just go through them that way
to make sure we get them all
higher up in the right click menu
if its got no parameters its probably fine
i have no idea if that spelling fix is because the devs misspelled it or because we misspelled it
the "metallic" one
i wanted to do that
but maybe they will get called later
and someone will have an error
then they can get added back later
what do you mean
is your computer okay
why is it only compiling one crate at a time
oh
my PC complies like
12 crates at once
idk why
🤷
i could report another rust issue
later tho
21gb target folder
💀
i have a compiled version
u watch?
yeah
xd or not
i guess it doesnt work that way
cant open dev compiled targets
:C
some clown "redstone" keeps like removing my cargo.lock file
which causes it to recompile everything
youch
i think thats like 0.0.1
i just cloned it to see how long it would take to build
current repo ^
its in no way stable xdd
not going to be for a while
itll probably open a window?
aaron look
looks nice
its going to be pretty hard to succeed ckan though
we arent trying to xdd
your words, not mine
not mine either
redstones
i dont think its a successor in any way
just a cool project to work on
either way
appbar also still works
u see any other issues with the code?
...i'm going to bed
eh its a dev branch
can always rollback
cheese is gonna pull tomorrow and see like 36 files changed
quick question are the parts info stored in a .json file?
i think they are in the appdata
^
they are in addressable bundles in JSON format
KSP2_x64_Data/StreamingAssets/aa/StandaloneWindows64
ok thx
i hate that cuz every change to the parts' config has to go through a loading screen now :(
yeah
also, could we ditch the current path system in the future? Its impossible to get different image extensions them reliably
correct.
gl merging
god be with you
sowy :D
maybe store something like TryGetAsset<Texture>(path), allowing for paths with the same name
huh why was this split
the name of the pr is "3rd pass"
this is like 4th time now
tomorrow im gonna need to do another like 2 refactors
the code is just so badly formatted xdd
Re: formatting - I think for a community project of this scale, it would not be a bad idea to set some coding standards
That people have to adhere to if they want to merge their PR
@sacred jasper I have to say I severely underestimated the difficulty of preload patching BepInEx
I thought for some reason that a simple Harmony patch would do it but it seems like it has to be done with Mono.Cecil
and the "docs" for that are the least helpful thing ever
Why are you trying to preload patch bepinex?
the goal is to allow to toggle whether to load a plugin (after restart) or not
Renaming wont work cuz haha file in use :3
Hmm
the other option is just to Destroy the plugin after it was already loaded and leave the responsibility of cleaning up after themselves in OnDestroy to the mod devs
I feel there is more options here
The issue is that the loading of the DLLs no longer happens in SpaceWarp
BepInEx does it and it doesn't have any capabilities to not load certain DLLs
We'd have to patch it
Which you can't do using a Harmony patch since those get run after BepInEx already starts loading DLLs
So the option i was thinking of was a preload patcher for the BepInEx binary
But it's much more complicated than I anticipated
The only patcher I've written so far just took some DLLs and replaced them with a different version
That was basically two lines of code
This would require to patch some methods and create new ones from within the AssemblyDefinition
any way to give space warp priority when bepinex loads?
Haven't really thought about that
Does Awake run as soon as BepInEx loads the DLL in?
no clue :P
Seems like I'm seriously behind the times, everything has a Discord server these days 
Everything has a discord, thats a fact lol
This was the first one I joined other than my WoW guild 
I thought it was a platform for gaming VC mostly
I have my thunserkit discord, a friend group discord, a family discord, and a personal discord....
Which I use to store notes about things and links and stuff
Cant be older than me can ya (i mean in the ksp world, you definitely can)
I'm definitely rocking the buschemi
25 
💀
Lol, you're just a kid
Ive got nephews older than you
what generation even is that :D
i think to late for last gen
Thats gen z
and too early for this gen
Millennial through and through
"Researchers and popular media use the early 1980s as starting birth years and the mid-1990s to early 2000s as ending birth years" from the wiki on Millennials
Yeah you're definitely a gen z, at 25
Omg I'm an old fart, when did this happen
Idk, I usually see that defined as 2000+
Pew research ends millennial at 96
And at the very least i don't feel like a part of that crowd at all 
But the reality is that generations are very loosely defined
But my nieces are all gen z, and they are 20 to 24
so you must have the most experience with coding 
Maybe in terms of years, but Aaron really knows his stuff
My knowledge is, more abstract :p
aaron just reads the docs 💀
Help me Passive-Picasso Twiner, you're my only hope
Yeah. But he remembers them :p

I always read the docs every time I'm coding because I cant remember that stuff
never read the docs unless im at least 10 hours in
Maybe that's why your refactor gives me like 10 exceptions that weren't there before

The first thing I do when I'm using something else is find the docs for whatever I'm working on, so I have it on hand

Time to see if my broken ass laptop manages to work long enough to get something done on this 3 hours long train ride
The integrated GPU is dying and I need it for work 
I do
But the internal GPU powers the laptop screen
While the external has the HDMI port
So when the integrated GPU bugs out, I can only use an external monitor
Which i don't have on a train

Not for my laptop
o
I don't have Optimus
Optimus is what allows you to switch the GPU afaik
?
how
Nope, don't have that tab at all
xd
It's just not a thing on most laptops
idk then
The display is just driven directly by the integrated GPU
And it then sends over requests to the external one for more complex rendering
Is how i understand it works
But there's no way to just directly connect the screen to the external one
get second laptop
use as external display
That's weird then, i don't even see support for that in the list
i have unstable laptop
I have a 3060
Experience pure performance with AMD Ryzen™ 6000 Series Mobile Processors, NVIDIA® RTX™ 3050 graphics, and Lenovo X Power.
^
Wtf is that an ultrabook with a gaming GPU?
It's like 4 kg
Of what
$
:P

its quite unstable though
not stable centos 7 machine
this is like 12 hours of battery life
Ok, at least that makes a bit more sense
ye
would it be ok for me to add a ReloadAsset on the assetManager? that would allow for hotswapping textures w/o reloading the game
it should, i'll just replace the entry of the path with the new texture
i mean its suposed to be that easy....
Why has this become a reaction image
Just because I speak in archaisms that yee use not does not make it my catch phrase
verily I doth apprehend the import of yond terms, yet I electeth not to employeth them for their antiquity.
i think that’s the limit of my shakespeare knowledge
I'm not sure what I should work on in terms of Space Warp
I'll happily leave it to you to figure out the preload patcher for BepInEx 
What I have right now is basically the UI back to what it was with the toggles + saving the info to a file
Not very useful
If we can't get BepInEx to read it
Assemblyname also works too
Can't use BIE GUID very easily since you'd have to load the assembly for that
For mods with swinfo.json we can just parse that
But displaying currently disabled BIE only mods would be tough
Since there's no metadata outside of the assembly
this will be fixed next update right?
Yrs
idk if its worth it changing then
I meant i immediately focused on the red
what even is that?
failed mod?
or out of date
oh its "unsupported"
im gonna make the Mods and Unmanaged Mods retractable
for large lists
python builder.py doesnt export to the non compress file anymore
done
it did for me
did you check the actual files inside?


cheese look at pr?
Cheese sick but I shall look
Why does this change code in the harmony patch?
Ohh
it will
you actually can't use Cecil, even if you wanted to
could you maybe show me a quick example of a Harmony patch inside a preload patcher?
i kinda gathered from this that I can't
I sent it originally immediately after suggesting it
you can't patch the game with harmony during a preloader
bepinex itself is fair game
preloaders work by editing the assembly before it's even loaded
which is why you can't use harmony, it works on loaded assemblies
But BIE would already be loaded?
bepinex is already loaded, so you couldn't patch it with cecil even if you wanted to
but harmony still works fine
will the preload patcher be called before any assemblies are loaded by BIE?
it's not documented that way because you're meant to patch the game with a preloader, not bepinex
but like
sorry, I have like 0 insight into BepInEx
yes
Preload kinda has to
it's called immediately when bepinex loads
this is before even unity loads
The plugins require the assembly csharp to be loader
alright then, I guess I'll finish it myself cheese
So this will be the second bepinex thing sw is patching
it's not like I'm making any mods :p
much appreciated
The first being config manager
yeah but that's technically a mod
I mean, there are other ways to do this
I personally think requiring OnDisable is better
but if you don't want to do that, then you don't have many other options
yeah I think it would be too unreliable
there will 100% be some mods that don't do it
and then we'd have the game full of Harmony patches and whatnot from "disabled" mods
personally I think disabling mods is completely a mod manager job if you're going to require a game restart anyway
there's not really a difference in UX if both are just a checkbox and both require a restart
then, if mod managers eventually do want to support disabling mods in them, you'll have two ways to disable mods
Then the mod manager should just use the same way :3
syncing mod manager state with game state sounds like a nightmare
also means you'll never be able to change how it works, since the implementations have to always be in sync
is there no built in .ignore for bep
nope
that sounds like a bit of an oversight
it has no way to disable dlls without renaming them when the game is not on
that's why I want to patch that in with Harmony
Munix knows what they are doing
oh btw I don't care about pronouns too much but you can just call me he 😆
who even mentioned pronounds
xd
i feel like this is still a violation
you can skip the eula
I just thought I'd clarify since I know cheese and some others refer to me as they
which again I don't mind
I refer to literally anyone as they out of habit unless told not to
yeah I usually do at least until I'm certain of what to use
seems like a common courtesy these days
this message got delayed by like 2 mintes 💀
although for example in Czech there's literally no other way to refer to someone other than he/she, and I've never even seen any attempts at gender neutral terms
Which mod?
that seems fine to me, the mod itself doesn't remove them or make impossible to see the logos
it's up to the user to do
so to me it reads as fine
but i'm not a lawyer
Unsure about this one
what do you mean by that?
on first boot you can skip it with this mod
Ill assume for the benefit of the doubt, that Dakota has talked to her.
If she posts it here, I will confirm that with dakota
ohhh I didn't even realize that there's a EULA screen at first launch
I've launched the game like hundreds of times at least so I forgot lol
yeah
could we make so that .cfg files get read too? we store the string[] or smth
i'd like to have custom settings for each part for Colors
this is how it works
best example i could find
we need to add to the example mod
that is bad exmaple @gilded kettle
i didnt realize he hasnt updated the repo in three weeks
xd
i guess no
im trying to find an example :D
Its ok i tho we can wait for him to updated the repo, i dont need it for now
the shader editing isnt even finished yet lmao
still need docs about this
@sacred jasper the configuration manager is broken in 1.1.0
known?
whuh
did you remove the patch......
which patch
the config manager one
private static void Thing([HarmonyArgument("__result")] ref ReturnType res)
{
}
public int Thing { get; set; }
.field private int32 '<Thing>k__BackingField'
unsafe class ExampleClass
{
public int IntProperty { get; set; }
public double DoubleProperty { get; set; }
}
unsafe static void Main(string[] args)
{
ExampleClass example = new ExampleClass { IntProperty = 42, DoubleProperty = 3.14 };
TypedReference intRef = __makeref(example.IntProperty);
int* intPtr = (int*)*(IntPtr*)&intRef;
Console.WriteLine($"IntProperty value: {(*intPtr)}");
TypedReference doubleRef = __makeref(example.DoubleProperty);
double* doublePtr = (double*)*(IntPtr*)&doubleRef;
Console.WriteLine($"DoubleProperty value: {(*doublePtr)}");
}
