Jump to content

[KSP >= 1.3.0] TweakScale - Under Lisias' Management - 2.4.7.6 - 2024-0322


Lisias

Recommended Posts

19 minutes ago, Lisias said:

I'm unsure I understood you. On that vídeo you sent, this root part modification was done, right?

I will rewatch it with more attention. 

Yes, I made changes to the root part in the video I posted.(Perhaps you could try merging the carriers after modifying the root parts.)

Link to comment
Share on other sites

2 hours ago, DY_ZBX said:

Yes, I made changes to the root part in the video I posted.(Perhaps you could try merging the carriers after modifying the root parts.)

Ah, got it! :)

You have rerooted the craft to make the last part you attached (inverted) as the new root!! I reproduced the problem here!

Interesting enough, I could load the first parcel on Editor without triggering the misplacement of the part (this is what I though it was problem), so I was wrong about the problem you are experiencing. You found a new one!

And this is not related to TweakScale, because I didn't scaled the parts - since I was the one that coded TweakScale, I know that the PartModule deactivate itself when the part is not scaled (it's just not run at all), so it's impossible that TweakScale would be the culprit of this one.

So this is something on KSP-Recall, or you found a new bug on KSP Editor itself.

So I removed TweakScale and KSP-Recall from the testbed and tried to reproduce the problem. No success, so I conclude we have a missing use case on KSP-Recall itself!

As a proof of concept, I rebuild the same parcel but starting with the Docking Port Jr; attaching the SAS (inverted) and then attaching the Probe Core (also inverted). When I tried to merge this thing on other craft, it worked as expected. So the problem is for sure related to rerooting the craft.

I will tackle down this one here: https://github.com/net-lisias-ksp/KSP-Recall/issues/56

(I'm still recovering from a very nasty flu, so I can make any promises about when)

Cheers!

 

Link to comment
Share on other sites

I decided to come back to KSP after a year... and I got hit with the missing .dll issue as well. 

KSP.log -> https://drive.google.com/file/d/1NmOIwTlX1SEK9lQ7MksriE6kpuuBRT15/view?usp=sharing

This is a semi-fresh install (I removed all mods using CKAN, purged GameData of all files other than Squad folder and used CKAN to reinstall mods from cache), so I'm kinda surprised to see this happen... Especially since this is the first time I made build only with CKAN, without manually adding some other mods. I also see some other warnings in the loading screen, but to be absolutely frank, I always had at least some and my game never broke up... So I just decided to ignore them in the true Kerbal fashion ^^'

Link to comment
Share on other sites

46 minutes ago, Astraph said:

I decided to come back to KSP after a year... and I got hit with the missing .dll issue as well. 

KSP.log -> https://drive.google.com/file/d/1NmOIwTlX1SEK9lQ7MksriE6kpuuBRT15/view?usp=sharing

This is a semi-fresh install (I removed all mods using CKAN, purged GameData of all files other than Squad folder and used CKAN to reinstall mods from cache), so I'm kinda surprised to see this happen... Especially since this is the first time I made build only with CKAN, without manually adding some other mods. I also see some other warnings in the loading screen, but to be absolutely frank, I always had at least some and my game never broke up... So I just decided to ignore them in the true Kerbal fashion ^^'

Your KSP.log is truncated. Please send me a new one - be sure to quit KSP before copying KSP.log to prevent it from being truncated.

Cheers!

NAH… I got enough log to diagnose it (by luck).

[ERR 23:09:58.284] ADDON BINDER: Cannot resolve assembly: ContractConfigurator, Culture=neutral, PublicKeyToken=null

[ERR 23:09:58.285] AssemblyLoader: Exception loading 'ScrapYard_ContractConfigurator': System.Reflection.ReflectionTypeLoadException: Exception of type 'Syste
m.Reflection.ReflectionTypeLoadException' was thrown.
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at AssemblyLoader.LoadAssemblies () [0x000e6] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0

Additional information about this exception:

 System.IO.FileNotFoundException: Could not load file or assembly 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies.
File name: 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

ScrapYard is complaining that it needs Contract Configurator. The Add'On thread says Contract Configurator is only needed on KSP 1.12,x - don't have a clue about the reason CKAN din't installed it!

I think you need to talk to CKAN guys to sort it out to preventing getting hit by this problem next time you reinstall things!

Cheers² :)

— — POST EDIT — — 

In time, this happens due a bug on a thingy from KSP called Assembly Loader/Resolver yada yada yada :P . When something borks while trying to load a DLL (and it can be anyone by any reason), something on that thingy gets broken and from that point anyone else trying to load DLLs will bork equally no matter its DLL being fine or not.

Since TweakScale makes heavy use of DLLs, and it's somewhat popular, it ends up that TweakScale is the most visible victim of the problem. And it's visible because TweakScale complains about anything that can damage your savegame, and being half-loaded definitively will corrupt any savegame that uses TweakScale for good. No salvage possible.

Edited by Lisias
Diagnosed it / post edit
Link to comment
Share on other sites

21 hours ago, Lisias said:

Hi! You got a nasty occurrence of a duplicated patch:

[LOG 19:32:19.935] [TweakScale] ERROR: **FATAL** Part pp.vvmach (Plume Party Vapor Vent Mach) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0

We will need to find who is double patching the pp.vvmach e fix it. Problem: I found the same patch happening 3 times on your log!

[LOG 19:09:24.429] Applying update PlumeParty/Vapor/vent/@PART[pp_vvmach]:NEEDS[TweakScale] to PlumeParty/Vapor/vent.cfg/PART[pp_vvmach]
[LOG 19:09:24.430] Applying update PlumeParty/Vapor/vent/@PART[pp_vvmach]:NEEDS[TweakScale] to PlumeParty/Vapor/vent.cfg/PART[pp_vvmach]
[LOG 19:09:24.431] Applying update PlumeParty/Vapor/vent/@PART[pp_vvmach]:NEEDS[TweakScale] to PlumeParty/Vapor/vent.cfg/PART[pp_vvmach]

And I don't have the slighest idea about the reason. KSP Recall modules are also being applied 3 times!

And the reason appears to be you having more than one copy of ModuleManager running on the rig!

[LOG 19:23:02.404] AssemblyLoader: Loading assembly at D:\Games\steamapps\common\Kerbal Space Program\GameData\ModuleManager.4.2.2.dll
[LOG 19:23:02.405] AssemblyLoader: KSPAssembly 'ModuleManager' V2.5.0
[LOG 19:23:02.554] AssemblyLoader: Loading assembly at D:\Games\steamapps\common\Kerbal Space Program\GameData\Benjee10_Orion_v1.1.0\GameData\ModuleManager.4.2.2.dll
[LOG 19:23:02.568] AssemblyLoader: KSPAssembly 'ModuleManager' V2.5.0

Interesting… It was my understanding that on KSP 1.12.3 duplicated DLLs would be resolved by promoting only the newest one to run, but apparently I was wrong.

Completely remove the directory GameData\Benjee10_Orion_v1.1.0 and see if the problem goes away - I expect it does.

After confirming the diagnosis, you will need to install Benjee10_Orion correctly: you need to unzip the package into a temporary directory, and then move the package's GameData contents into your KSP's GameData, instead of unzipping the thing on the KSP's Root and hoping for the best.

Additionally, pay special attention to avoid having more than one ModuleManager installed on your rig - apparently this is not safe as I was thinking.

Thank you! yeah, benjee usually has benjee10_ (addon) as the gamedata file, so i assumed it was.. apparantly he put an actual gamedata in aswell.. Thank you! you are the most professional modder i have ever seen! you are a true savior :)

Edited by Lucky21
Link to comment
Share on other sites

3 hours ago, Lisias said:

Ah, got it! :)

You have rerooted the craft to make the last part you attached (inverted) as the new root!! I reproduced the problem here!

Interesting enough, I could load the first parcel on Editor without triggering the misplacement of the part (this is what I though it was problem), so I was wrong about the problem you are experiencing. You found a new one!

And this is not related to TweakScale, because I didn't scaled the parts - since I was the one that coded TweakScale, I know that the PartModule deactivate itself when the part is not scaled (it's just not run at all), so it's impossible that TweakScale would be the culprit of this one.

So this is something on KSP-Recall, or you found a new bug on KSP Editor itself.

So I removed TweakScale and KSP-Recall from the testbed and tried to reproduce the problem. No success, so I conclude we have a missing use case on KSP-Recall itself!

As a proof of concept, I rebuild the same parcel but starting with the Docking Port Jr; attaching the SAS (inverted) and then attaching the Probe Core (also inverted). When I tried to merge this thing on other craft, it worked as expected. So the problem is for sure related to rerooting the craft.

I will tackle down this one here: https://github.com/net-lisias-ksp/KSP-Recall/issues/56

(I'm still recovering from a very nasty flu, so I can make any promises about when)

Cheers!

 

Thank you for all you do and I wish you good health.

Link to comment
Share on other sites

2 hours ago, Lisias said:

ScrapYard is complaining that it needs Contract Configurator. The Add'On thread says Contract Configurator is only needed on KSP 1.12,x - don't have a clue about the reason CKAN din't installed it!

I think you need to talk to CKAN guys to sort it out to preventing getting hit by this problem next time you reinstall things!

Thanks a lot! And while Contract Configurator did solve that issue, I got a completely different one now... This time it also drops an error about Kopernicus, which I assume to be possibly related to the fact I installed Galaxies Unbound on top of GPP (which should be OK, from what I read in their thread) and GEP (which might not be)... ^^'

Ksp.log again -> https://drive.google.com/file/d/1NmOIwTlX1SEK9lQ7MksriE6kpuuBRT15/view?usp=sharing

This time I let the game load completely (I used the OK button from the error message and closed it mid-loading the previous time, maybe that's why it got cut off), so hopefully this log is going to be ok... Sorry about last time.

Link to comment
Share on other sites

2 hours ago, Astraph said:

Thanks a lot! And while Contract Configurator did solve that issue, I got a completely different one now... This time it also drops an error about Kopernicus, which I assume to be possibly related to the fact I installed Galaxies Unbound on top of GPP (which should be OK, from what I read in their thread) and GEP (which might not be)... ^^'

Ksp.log again -> https://drive.google.com/file/d/1NmOIwTlX1SEK9lQ7MksriE6kpuuBRT15/view?usp=sharing

This time I let the game load completely (I used the OK button from the error message and closed it mid-loading the previous time, maybe that's why it got cut off), so hopefully this log is going to be ok... Sorry about last time.

Ugh… Now things got really messy, found something new on your log!

[ERR 01:43:25.661] Couldn't extract exception string from exception of type TargetInvocationException (another exception of class 'ExecutionEngineException' was thrown while proc
essing the stack trace)

[EXC 01:43:25.661]

<.....>
  
[LOG 01:43:25.702] [AddonLoader]: Instantiating addon '_BuildManager' from assembly '_BuildManager'
[EXC 01:43:25.707] ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
        System.Reflection.Assembly.get_Location () (at <9577ac7a62ef43179789031239ba8798>:0)
        _BuildManager._BuildManager+<>c__DisplayClass2_0.<logVersion>b__1 (System.Reflection.Assembly x) (at <b7753086ed104f0cb27def0fb5040bc9>:0)
        System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
        System.Linq.Enumerable+WhereSelectArrayIterator`2[TSource,TResult].ToList () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
        System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
        _BuildManager._BuildManager.logVersion () (at <b7753086ed104f0cb27def0fb5040bc9>:0)
        _BuildManager._BuildManager.Awake () (at <b7753086ed104f0cb27def0fb5040bc9>:0)
        UnityEngine.DebugLogHandler:LogException(Exception, Object)
        ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
        UnityEngine.GameObject:AddComponent(Type)
        AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
        AddonLoader:StartAddons(Startup)
        <LoadObjects>d__90:MoveNext()
        UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
        <CreateDatabase>d__71:MoveNext()
        UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
        GameDatabase:StartLoad()
        <LoadSystems>d__11:MoveNext()
        UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
        LoadingScreen:Start()

Later, I found many, many exceptions about Kopernicus but, frankly, knowing KSP as we know, I can't rule out Kopernicus being screwed by this first problem.

Well, weird new things usually demands weird new procedures. Let's eliminate some variables from this equation, being them 

  • 000_Harmony
  • 000_KSPBurst

Remove these two folders and rerun KSP and send me the new KSP.log to see what we get. I think the real problem will happen again, but this time without someone in the middle borking while handling the bork and, so, we will get the problem being properly logged and can do something about.

Once we fix the problem, you can install them back.

Link to comment
Share on other sites

12 hours ago, Lisias said:

Later, I found many, many exceptions about Kopernicus but, frankly, knowing KSP as we know, I can't rule out Kopernicus being screwed by this first problem.

Well, weird new things usually demands weird new procedures. Let's eliminate some variables from this equation, being them 

  • 000_Harmony
  • 000_KSPBurst

Remove these two folders and rerun KSP and send me the new KSP.log to see what we get. I think the real problem will happen again, but this time without someone in the middle borking while handling the bork and, so, we will get the problem being properly logged and can do something about.

Once we fix the problem, you can install them back.

By the Twin-Tailed Comet... I swear that this build was, for once, made only using CKAN, without manually adding anything (the only stuff I did was overriding CKAN's version compatibility to install USI and MKS - the app says they should be compatible with 1.12, so I didn't think this would cause any problems...)

Either way, I removed both folders (as in, manually moved them from GameData to an outside folder. Uninstalling them in CKAN would also uninstall Galaxies Unbound, FAR and a bunch of other mods - as you asked to remove only those two, I understood that would go against your testing plan. ^^'

Anyway, here's the new ksp.log: https://drive.google.com/file/d/1NmOIwTlX1SEK9lQ7MksriE6kpuuBRT15/view?usp=sharing

I'm very, very grateful for your time, I hope we can find the culprit... ^^'

Link to comment
Share on other sites

1 hour ago, Astraph said:

By the Twin-Tailed Comet... I swear that this build was, for once, made only using CKAN, without manually adding anything (the only stuff I did was overriding CKAN's version compatibility to install USI and MKS - the app says they should be compatible with 1.12, so I didn't think this would cause any problems...)

Either way, I removed both folders (as in, manually moved them from GameData to an outside folder. Uninstalling them in CKAN would also uninstall Galaxies Unbound, FAR and a bunch of other mods - as you asked to remove only those two, I understood that would go against your testing plan. ^^'

Anyway, here's the new ksp.log: https://drive.google.com/file/d/1NmOIwTlX1SEK9lQ7MksriE6kpuuBRT15/view?usp=sharing

I'm very, very grateful for your time, I hope we can find the culprit... ^^'

Well, well, well… That one is a new. Really, really new! 

[LOG 16:54:58.285] Calling KSP-Recall.ModuleManagerSupport.ModuleManagerAddToModList()
[EXC 16:54:58.287] Exception while calling KSP-Recall.ModuleManagerSupport.ModuleManagerAddToModList(): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
  at (wrapper managed-to-native) System.Reflection.Assembly.get_code_base(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetCodeBase (System.Boolean escaped) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Reflection.Assembly.get_CodeBase () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Reflection.AssemblyName.Create (System.Reflection.Assembly assembly, System.Boolean fillCodebase) [0x00010] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Reflection.RuntimeAssembly.GetName (System.Boolean copiedName) [0x0000e] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Reflection.Assembly.GetName () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at KSPe.Util.SystemTools+Assembly+Finder.ExistsByName (System.String qn) [0x00031] in <db68626e2fd64c5fa45e9c0df657f9e4>:0
  at KSP_Recall.ModuleManagerSupport.checkForProceduralPartsAttachmentNodes () [0x00000] in <6241eeb3c72b4f7ab3036f34ee51b728>:0
  at KSP_Recall.ModuleManagerSupport.ModuleManagerAddToModList () [0x00072] in <6241eeb3c72b4f7ab3036f34ee51b728>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <9577ac7a62ef43179789031239ba8798>:0

And KSP-Recall was caught on the cross fire. :P 

However, I'm reasonably sure Recall is a innocent bystander because this happened too in your previous log, but further on the timeline:

[LOG 01:43:25.702] [AddonLoader]: Instantiating addon '_BuildManager' from assembly '_BuildManager'
[EXC 01:43:25.707] ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
        System.Reflection.Assembly.get_Location () (at <9577ac7a62ef43179789031239ba8798>:0)
        _BuildManager._BuildManager+<>c__DisplayClass2_0.<logVersion>b__1 (System.Reflection.Assembly x) (at <b7753086ed104f0cb27def0fb5040bc9>:0)
        System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
        System.Linq.Enumerable+WhereSelectArrayIterator`2[TSource,TResult].ToList () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
        System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
        _BuildManager._BuildManager.logVersion () (at <b7753086ed104f0cb27def0fb5040bc9>:0)
        _BuildManager._BuildManager.Awake () (at <b7753086ed104f0cb27def0fb5040bc9>:0)
        UnityEngine.DebugLogHandler:LogException(Exception, Object)
        ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
        UnityEngine.GameObject:AddComponent(Type)
        AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
        AddonLoader:StartAddons(Startup)
        <LoadObjects>d__90:MoveNext()
        UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
        <CreateDatabase>d__71:MoveNext()
        UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
        GameDatabase:StartLoad()
        <LoadSystems>d__11:MoveNext()
        UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
        LoadingScreen:Start()

So we have a suspect - someone is injecting illegal bytes sequences on the Stack instead of sane UTF-8 strings.

And we found a weakness (not exactly a bug) on Harmony (or perhaps on Burst?), as it is being caught with its pants down by the problem while trying to handling the problem.  Reach the maintainers with that log and ask for a slightly more robust exception handling so next time something like this happens, it's easier to diagnose.

Now, back to the smelly under our noses: the good news about being caught in the cross fire on KSP-Recall is that I know that code very well (I'm the crazy SAS that wrote the stunt, after all!! :sticktongue:). And I know that the code checks the running KSP environment version and looks for two Assemblies to check if they are installed - and this code is the smoking gun that proves you have an Assembly DLL with a corrupted String on the name or some other metadata! (other occurrences also suggests such problem, but since I don't have easy access to that source code, I used mine to get such proof).

Now the problem is… HOW BY KRAKEN'S SAKE we will find the kraken damned DLL with a corrupted string on the metadata if we can't print it's name without triggering again the problem (it was what caught Harmony or Burst with its pants down in the last log).

I will need a bit of time in order to cook something, we are going to need some instrumenting in your rig to get the answers we need.

In the mean time, put back that two add'ons. There're some things that depend on them and are borking on their load, triggering that nasty KSP's Assembly Loader/Resolver bug, that by itself creates a whole different set of problems that will surely get in the way on the diagnosing.

In the hopes to reduce the scope of potential troublemakers, what were the latest add'ons you installed before getting this error?

Edited by Lisias
tyops as usulla...
Link to comment
Share on other sites

7 hours ago, Lisias said:

In the hopes to reduce the scope of potential troublemakers, what were the latest add'ons you installed before getting this error?

Now that's a good question... I did the most reasonable thing ever and just went into CKAN, ticked GU, MKS, USI, GPP and a total of 120 mods, installed them and then booted up the game. The last ones I meddled with were MSI/USI and Firespitter, 

I guess I could make a fresh install the proper way, going a few mods at a time and seeing when the error shows up.  I have absolutely no coding experience whatsoever (apart from VBA, but I already learnt that it's not something I should mention around people doing actual coding), but from what you're writing I assume my case is some pretty werid one... So, as much as I feel bad to take so much of your time already, I also hope that at least something good comes out of it in the form for fixing some weird issue other people might have in the future ^^'

Link to comment
Share on other sites

Heya, I don't know if this has been suggested, but would you consider implementing tech tree support? It would be nice because with the current system I can build a massive rocket on the first few nodes. With a tech tree system you could make it so that things can only be scaled up to 1.25 meters or equivalent at the start, then in later nodes it becomes possible to scale things larger, maybe it could happen when you unlock that scale, so if I unlock 5 meter scale parts I can scale up parts to 5 meters.

Edited by Rutabaga22
Because I said so
Link to comment
Share on other sites

2 hours ago, Rutabaga22 said:

Heya, I don't know if this has been suggested, but would you consider implementing tech tree support? It would be nice because with the current system I can build a massive rocket on the first few nodes. With a tech tree system you could make it so that things can only be scaled up to 1.25 meters or equivalent at the start, then in later nodes it becomes possible to scale things larger, maybe it could happen when you unlock that scale, so if I unlock 5 meter scale parts I can scale up parts to 5 meters.

Yes, there were some discussions in the past - but as the time gone by (and the bugs blew up), I ended up forgetting about this subject!

Well, I will not forget it again: https://github.com/net-lisias-ksp/TweakScale/issues/264

Let's see how the remaining of this year behaves - so I can find time to give some care to TweakScale!

 

2 hours ago, jebycheek said:

We need breaking ground expansion tweaking!plz:cool:

Most of Serenity parts are already supported, including Science. The only parts I'm reticent to publish are the robotics, because they are pretty buggy and unstable as they are, what to say after scaling them.

But, as long you understand that things may blow up horribly in your savegame by trying it, there are two ways in which you can try your luck and scale them:

By editing this file and removing the "//" from the patches:

https://github.com/net-lisias-ksp/TweakScale/blob/master/GameData/TweakScale/patches/SquadExpansion/Serenity/Robotics.cfg 

By downloading the latest TweakScale BETA and then creating a directory called "TweakScaleExperimental" on your GameData:

https://github.com/net-lisias-ksp/TweakScale/releases/tag/PRERELEASE%2F2.5.0.49

Both approaches will work, but the BETA has improved support - and both will be risky nevertheless. Please make constants backups of your savegames, and don't risk anything you don't want to loose by using these stunts.

Feel free to report any misbehaviours you find, but please understand that they will not be considered "bugs" and probably I will not be able to work on them for some time.

Edited by Lisias
better phrasing
Link to comment
Share on other sites

1 hour ago, Lisias said:

Yes, there were some discussions in the past - but as the time gone by (and the bugs blew up), I ended up forgetting about this subject!

Well, I will not forget it again: https://github.com/net-lisias-ksp/TweakScale/issues/264

Let's see how the remaining of this year behaves - so I can find time to give some care to TweakScale!

 

Most of Serenity parts are already supported, including Science. The only parts I'm reticent to publish are the robotics, because they are pretty buggy and unstable as they are, what to say after scaling them.

But, as long you understand that things may blow up horribly in your savegame by trying it, there are two ways in which you can try your luck and scale them:

By editing this file and removing the "//" from the patches:

https://github.com/net-lisias-ksp/TweakScale/blob/master/GameData/TweakScale/patches/SquadExpansion/Serenity/Robotics.cfg 

By downloading the latest TweakScale BETA and then creating a directory called "TweakScaleExperimental" on your GameData:

https://github.com/net-lisias-ksp/TweakScale/releases/tag/PRERELEASE%2F2.5.0.49

Both approaches will work, but the BETA has improved support - and both will be risky nevertheless. Please make constants backups of your savegames, and don't risk anything you don't want to loose by using these stunts.

Feel free to report any misbehaviours you find, but please understand that they will not be considered "bugs" and probably I will not be able to work on them for some time.

Sweet! it's exactly what i want.thanks,I'll see what i can do.:kiss:

Link to comment
Share on other sites

FYI, the git clone command fails on Windows because a filename contains a colon (":"):

$ git clone https://github.com/net-lisias-ksp/TweakScale.git
Cloning into 'TweakScale'...
remote: Enumerating objects: 12360, done.
remote: Counting objects: 100% (438/438), done.
remote: Compressing objects: 100% (188/188), done.
remote: Total 12360 (delta 254), reused 417 (delta 243), pack-reused 11922
Receiving objects: 100% (12360/12360), 217.86 MiB | 1.84 MiB/s, done.
Resolving deltas: 100% (8393/8393), done.
error: invalid path 'Docs/LMJ/[0.90] TweakScale - Rescale Everything! (v1.50 - 2014-12-24 10:40 UTC) - Add-on Releases - Kerbal Sp.01.pdf'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Trying to create such a filename manually:

z4lYz76.png

I'll submit a fix pull request for this in a bit...

... and "KSPe" has the same problem but with a pipe:

$ git clone https://github.com/net-lisias-ksp/KSPe.git
Cloning into 'KSPe'...
remote: Enumerating objects: 6984, done.
remote: Counting objects: 100% (675/675), done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 6984 (delta 489), reused 617 (delta 450), pack-reused 6309
Receiving objects: 100% (6984/6984), 14.34 MiB | 1.93 MiB/s, done.
Resolving deltas: 100% (4731/4731), done.
error: invalid path 'Docs/RecomendedReadings/Native interoperability best practices - .NET | Microsoft Docs.pdf'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

I'll submit a separate fix for that as well...

... EDIT: or many separate fixes, to account for all the branches...

Edited by HebaruSan
Link to comment
Share on other sites

I'm having an issue, I don't know if its Procedural Parts, Tweakscale or KSP Recall thats doing this, but for some reason this happens almost all the time I try to use symmetry with Procedural SRB's. Something, I dont know what, crams 500 liters of solid fuel into the rocket booster, making the Missile completely useless, as well as the plane.
(this started happening after updating BDArmory Plus to the newest version)
https://imgur.com/a/5SE368U

Link to comment
Share on other sites

On 9/25/2022 at 2:32 PM, bruh_moment said:

I'm having an issue, I don't know if its Procedural Parts, Tweakscale or KSP Recall thats doing this, but for some reason this happens almost all the time I try to use symmetry with Procedural SRB's. Something, I dont know what, crams 500 liters of solid fuel into the rocket booster, making the Missile completely useless, as well as the plane.
(this started happening after updating BDArmory Plus to the newest version)
https://imgur.com/a/5SE368U

Well, without more information, I can only guess. Send me the KSP.log after reproducing the problem so I can check for some Exception or any other weirdly.

But, back to the guess: apparently you had diagnosed the mishap yourself - something on the new BDArmory Plus is reseting something, and TweakScale is being caught with its pants down.

Since some time TweakScale ceased to force its weight on 3rd parties (see this post for more information), and started to rely on a sane KSP runtime (exactly to prevent TweakScale from doing this to 3rd parties, by the way).

Spoiler

 

Problem is that once TweakScale started to rely on the KSP runtime (what was made possible by Recall), it became vulnerable to being screwed by 3rd parties. Apparently it was what happened to you.

Since I had problems with Procedural Parts myself (see this post for more information), I think I know why BDA+ guys did things this way (again, assuming it's really DBA+): in a nutshell, Procedural Parts neglects correct data to KSP on OnLoad, and so someone else needs to update it by brute-force later. The way I solved it for TweakScale was to write a patch on KSP-Recall to scavenge the correct data and fill the empty spaces while loading KSP, what for all effects solves the root problem without screwing up anybody else. You can find the patch here. And I did it on Recall because fixing 3rd parties is completely out of scope for TweakScale, Recall is the place where I choose to fix these problems. This removes TweakScale from a problem in which it's completely innocent, and centralizes my fixing efforts on a single place where it's easier (or less hard) to have everything synchronised.

What I suggest you to do is:

  • Be absolutely sure it's the BDArmory Plus the source of the misbehaviour:
    • Revert BDA+ to the previous release. If the problem goes away, you have confirmation.
  • Once you had confirmed the problem is BDArmory Plus, reach the maintainers explaining the problem and pinpointing the patch I linked above (or just link this post to them and call it a day!)
    • With this information, they will be able to decide if they add a dependency on KSP-Recall (and activates the patch for themselves too) or if they try to fix the problem themselves on a custom patch (and remove whatever clutch they hypothetically did on code).
      • Both ways will work, it's the nice thing about fixing things using patches. :) 

Assuming the problem is really on BDArmory Plus, the maintainers ideally should take proper measures to fix the problem on their side on a way that respects the KSP's PartModule's life cycle (as I did on Recall), otherwise they will be screwing up any 3rd parties that need tp trust the PartModule's info (and not only TweakScale).

Cheers!

Edited by Lisias
Typos! Good thing they're not illegal!
Link to comment
Share on other sites

Good day! So I had an error recently where if I add the USI mods mixed with Tweakscale, it throws an error: "System.Reflection.ReflectionTypeLoadException"

This appears to be fixed if I remove the USI mods from my Gamedata folder, so presumably it either needs another file, or interferes with something else. Does anybody know how to fix this? (KSP.log included)

Thanks in regard!

-Mr. QB

 

https://drive.google.com/file/d/15I5zIDrV_m8FMQVf19-7r-9QhwGMlRBh/view?usp=sharing (this is the log)

Link to comment
Share on other sites

1 hour ago, Mr. QB said:

Good day! So I had an error recently where if I add the USI mods mixed with Tweakscale, it throws an error: "System.Reflection.ReflectionTypeLoadException"

Hi!

You got bitten by a nasty KSP bug on a thingy called "Assembly Loader/Resolver", this is what loads DLLs to be used by KSP and so any problem on it is pretty nasty. The problem is triggered when something fails to be loaded by any reason, what breaks something inside the thing and from that point, anything else trying to load somethings fails no matter what - even when everything is right.

Since TweakScale cannot allow a savegame to be loaded when it is not on a consistent state (as this would destroy all scaled parts on the savegame!!), TweakScale checks if everything is allright after being loaded and, if not, yells about so you can do something about - like asking help here. :)

On the KSP log you sent, the problem appears to be unrelated to USI at all… Apparently it's EnvironmentalVisualEnhancements!

[ERR 17:55:41.210] ADDON BINDER: Cannot resolve assembly: Utils, Culture=neutral, PublicKeyToken=null

[ERR 17:55:41.213] AssemblyLoader: Exception loading 'CelestialShadows': System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadExce
ption' was thrown.
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at AssemblyLoader.LoadAssemblies () [0x000e6] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0

Additional information about this exception:

 System.IO.FileNotFoundException: Could not load file or assembly 'Utils, Version=1.11.6.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'Utils, Version=1.11.6.1, Culture=neutral, PublicKeyToken=null'

It's trying to load a thingy called Utils, but this thing is not being found. This is that triggers the Assembly Loader/Resolver bug - from this point, everybody else is being screwing - as DOE. Even Recall is being caught indirectly by this mess!

[LOG 17:55:51.764] Calling KSP-Recall.ModuleManagerSupport.ModuleManagerAddToModList()
[EXC 17:55:51.775] Add to mod list threw an exception in loading CelestialShadows, Version=1.11.6.1, Culture=neutral, PublicKeyToken=null: System.Reflection.ReflectionTypeLoadExce
ption: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at ModuleManager.ModListGenerator.GetAdditionalModsFromStaticMethods (ModuleManager.Logging.IBasicLogger logger) [0x00021] in <410b7909691747c78c895491c954d2a4>:0

I think that USI was just an innocent bystander that had the bad luck of stepping on the mine, triggering this cascade of events. Perhaps whatever installed USI updated EVE too, and then you got the impression that USI was the problem!

In a way or another, your best line of action is to reach EVE maintainers and ask for help about the missing "Util" thingy. You may want to uninstall EVE until they fix the problem, otherwise you will not be able to startup your game!

(Removing TweakScale will only remove the one yelling about the problem, the problem will be still there, screwing up silently everybody else!)

Link to comment
Share on other sites

Hey all,

Been using a custom MM patch I threw together that adds tweakscale to all parts that didn't already have it (along with changing all tweakscale types to freescale) for a long while now. I don't know when this broke, I jumped from 1.3 to 1.7 , then 1.9 to 1.12, using the patch all the while, however I don't know if I tested EVA in the last few versions. It's pretty simple (I've changed it from the original, see below code, but I think it was similar to the below:

@PART[*]:HAS[!MODULE[ProceduralPart]]:FINAL
{
	%MODULE[TweakScale]
	{
        %type = free
	%defaultScale = 100
	}
}

I recently found (after some time-consuming troubleshooting) that my patch was causing the Kraken to appear every time I tried to EVA a kerbal (using DebugStuff I saw that my crew hatch collision box was over-sized so I thought maybe that was part of the issue [little dude jumps out, freaks out, goes flying away after some exorcism shenanigans and dies]) but I found that was a red herring. I believe what it was doing was that even though I added another patch to remove tweakscale from anything with the command module but it continued (not to mention I hadn't realized that tweakscale adds itself to command pods anyways)

I finally got it working by just having it change all parts with the tweakscale module already added to be free-scale, but assumed that the issue was caused by the patch adding tweakscale at the inventory level (I hadn't played much since they added ground science, cargo parts, etc, so figured maybe it's affecting the jetpack/parachute, or something like that but I haven't gotten into KSP long enough to progress to the point where I finally can EVA since probably 1.3.1 or possibly 1.7).

I would like to keep the "tweakscale for all" MM patch, but I obviously need to make it so it doesn't add itself to whatever part that affects a kerbal on EVA. I am working on just adding it on a part-by-part basis as I play and find which parts don't have the module, but I have a lot of mods so I'd prefer to try and pin down the exact "part" that's giving my Kerbals an aneurism since it seems like an easy fix .

I was hoping that either a) maybe someone could  list out what are considered "parts" when it comes to kerbals on EVA (eg. jetpack, parachute, etc) on a default launch (by that I mean Mk 1_2 command pod launched by itself with the kerbal's default inventory untouched).  or b) someone has created a similar patch with the fix already added that I could use. I'd like to keep the patch and just have it ignore whatever part applied to the kerbal on EVA that's causing the issue.

Thanks in advance for any help!

 

*Edit* Found out the EVA suits were added at parts at some point (haven't done an EVA since before EVA suits were added as parts. Updated patch seems to work so far (still probably very crude, this was made back when TweakScale was pretty primitive compared to what we have now)

For those interested, the following MM patch works (so far, at least with the 170+ mods I'm running, I may find an issue further down the line) for adding TweakScale to all parts as well as makes all TweakScale modules free-scale:

Spoiler
@PART[*]:HAS[!MODULE[ProceduralPart]]:NEEDS[ProceduralParts]:FINAL // P-Parts since they're already scalable
{
	%MODULE[TweakScale]
	{
        %type = free
		%defaultScale = 100
	}
}
@PART[*]:HAS[@MODULE[RealChuteModule]]:NEEDS[RealChute]:FINAL // Used to break Real Chutes
{
	!MODULE[TweakScale] {}
}

@PART[kerbalEVA*]:FINAL
{
	!MODULE[TweakScale] {}
}


// Game Breaking (probably, don't care enough to test)

@PART[PotatoComet]:FINAL
{
	!MODULE[TweakScale] {}
}

@PART[PotatoRoid]:FINAL
{
	!MODULE[TweakScale] {}
}

@PART[flag]:FINAL
{
	!MODULE[TweakScale] {}
}

@PART[kerbalEVA]:FINAL
{
	!MODULE[TweakScale] {}
}

@PART[kerbalEVAfemale]:FINAL
{
	!MODULE[TweakScale] {}
}

@PART[kerbalEVASlimSuit]:FINAL
{
	!MODULE[TweakScale] {}
}

@PART[kerbalEVASlimSuitFemale]:FINAL
{
	!MODULE[TweakScale] {}
}

 

 

Edited by shoe7ess
Link to comment
Share on other sites

8 hours ago, shoe7ess said:

Hey all,

Been using a custom MM patch I threw together that adds tweakscale to all parts that didn't already have it (along with changing all tweakscale types to freescale) for a long while now. I don't know when this broke, I jumped from 1.3 to 1.7 , then 1.9 to 1.12, using the patch all the while, however I don't know if I tested EVA in the last few versions. It's pretty simple (I've changed it from the original, see below code, but I think it was similar to the below:

 

Tweakscale by itself only support stock + DLC parts. Everything else is moved to separate mod:

Try to install companion and then see if something missing. If there is no support for some of your favorite mods yet, then write pull request on companion github.
It is separated for a reason, to easy identify and solve badly written patches. Easier to maintain both in that way and MM patches for some mod can be published after proper testing without fear that something else will become broken.

 

 

 

 

Link to comment
Share on other sites

2 hours ago, kcs123 said:

Tweakscale by itself only support stock + DLC parts. Everything else is moved to separate mod:

Try to install companion and then see if something missing. If there is no support for some of your favorite mods yet, then write pull request on companion github.
It is separated for a reason, to easy identify and solve badly written patches. Easier to maintain both in that way and MM patches for some mod can be published after proper testing without fear that something else will become broken.

 

 

 

 

I really need to start making pull requests but luckily the patch ended up being an issue with stock KSP (plus tweakscale and MM of course), buttom of post has the fixed patch. EVA suit patches were the issue (had no idea they started being considered parts). I did grab some compatibility patches, but not many of them applied to mods I had. I hope more gets added. In the meantime if I happen across some sort of compatibility issue with anther mod I'll report through there.

Thanks! :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...