Jump to content

[Min KSP 1.12.X] Sandcastle: 3D printing for parts and vessels


Angel-125
 Share

Recommended Posts

Can someone confirm that building a craft with SC parts e.g. the large printer or the storage module, saving, exiting vab, re-entering vab loading the craft results in a negativ cost?

I have seen this with said parts, though while building it was fine.

It was quite a shock when I returned a probe with exotic minerals and rare metals to kerbin I had to pay for recovering it :/

Link to comment
Share on other sites

One thing.

Do I need that ELhelper.dll   for this mod to work properly ? As far as I know the Extraplanetary Launchpads are optional not required right ?
Looks like is doing some nasty things to TWEAKSCALE mod.    

 

EDIT:  Ok for now I fixed it to install only the plugin from Extraplanetary Launchpad ( like in old times with Firespitter plugin ) .      But it is odd that it wants this plugin too  ?  In that case I think there is need to edit the first post and make EL as required ? ( at least the Launcher.dll file for sure )  Or maybe bundle just the dll file with Sandcastle ? 

 

Edited by Jovzin
typos
Link to comment
Share on other sites

You have it the wrong way round, elhelper is to make tweakscale play along el and sandcastle.

Though maybe handy, tweakscale is messing up many things, hence Angel and taniwha have given up on supporting that mod

Edited by Revilo2601
Link to comment
Share on other sites

  • 2 weeks later...
Posted (edited)

Hi!

I'm regularly diagnosing issues on TweakScale's thread about SandCastle, and I finally realised the reason. ExtraPlanetary Launchpads is a hard dependency on the ELHelper.dll library.

[ERR 10:08:57.830] ADDON BINDER: Cannot resolve assembly: Launchpad, Culture=neutral, PublicKeyToken=null

[ERR 10:08:57.843] AssemblyLoader: Exception loading 'ELHelper': System.Reflection.ReflectionTypeLoadException: 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 AssemblyLoader.LoadAssemblies () [0x000e6] in <46478292153440df94e04a2a2ddd1062>:0

Additional information about this exception:

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

Problem: since KSP 1.8.0, when a DLL fails to be loaded it triggers a bug on the KSP's Assembly Resolver  yada yada yada. TL;DR. when something borks being loaded due a faulty dependence, everything else trying to load something (or to use a thingy called Reflection) borks relentlessly due the bug. And I mean everything else (it only happens that TweakScale yells about the problem instead of ignoring it).

Checking on the SandCastle's source code  I confirmed that ExtraPlanetary LaunchPads is a hard dependency of ELHelper, i.e., you need to have ExtraPlanetary Launchpads installed otherwise the ELHelper will not be loaded, and then it will trigger the KSP Bug on Assembly/Resolver, and then everybody else in need to load a dependency or use Reflection will be screwed up.

Interesting enough, Sandcastle.dll itself appears to do not use neither ELHelper neither ExtraPlanetary LaunchPad. What I confirmed by removing ELHelper.dll from the plugins folder and firing up KSP sucessfuly.

So we ended up with two choices:

  • Declaring ExtraPlanetary Launchpads a hard dependency, and not only a suggestion
  • Removing ELHelper.dll from the distribution file, and providing a package to be installed when both SandCastle and ExtraPlanetary Launchpads are present

Otherwise, installing SandCastle on any rig without ExtraPlanetary Launchpads will render KSP in a inconsistent state, triggering folly exceptions on any other 3rd party Assembly that tries to load a dependency or to use the C#'s Reflection.

 

Edited by Lisias
tyops. Who would guess it? :D
Link to comment
Share on other sites

So the point is Sandcastle works fine, EL works fine, only the freaking tweakscale has issues.

So from my point of view... tweakscale should be removed.

There is a reason why Angel and taniwaha have given up on supporting that mod after all 

Link to comment
Share on other sites

2 hours ago, Lisias said:

Hi!

I'm regularly diagnosing issues on TweakScale's thread about SandCastle, and I finally realised the reason. ExtraPlanetary Launchpads is a hard dependency on the ELHelper.dll library.

[ERR 10:08:57.830] ADDON BINDER: Cannot resolve assembly: Launchpad, Culture=neutral, PublicKeyToken=null

[ERR 10:08:57.843] AssemblyLoader: Exception loading 'ELHelper': System.Reflection.ReflectionTypeLoadException: 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 AssemblyLoader.LoadAssemblies () [0x000e6] in <46478292153440df94e04a2a2ddd1062>:0

Additional information about this exception:

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

Problem: since KSP 1.8.0, when a DLL fails to be loaded it triggers a bug on the KSP's Assembly Resolver  yada yada yada. TL;DR. when something borks being loaded due a faulty dependence, everything else trying to load something (or to use a thingy called Reflection) borks relentlessly due the bug. And I mean everything else (it only happens that TweakScale yells about the problem instead of ignoring it).

Checking on the SandCastle's source code  I confirmed that ExtraPlanetary LaunchPads is a hard dependency of ELHelper, i.e., you need to have ExtraPlanetary Launchpads installed otherwise the ELHelper will not be loaded, and then it will trigger the KSP Bug on Assembly/Resolver, and then everybody else in need to load a dependency or use Reflection will be screwed up.

Interesting enough, Sandcastle.dll itself appears to do not use neither ELHelper neither ExtraPlanetary LaunchPad. What I confirmed by removing ELHelper.dll from the plugins folder and firing up KSP sucessfuly.

So we ended up with two choices:

  • Declaring ExtraPlanetary Launchpads a hard dependency, and not only a suggestion
  • Removing ELHelper.dll from the distribution file, and providing a package to be installed when both SandCastle and ExtraPlanetary Launchpads are present

Otherwise, installing SandCastle on any rig without ExtraPlanetary Launchpads will render KSP in a inconsistent state, triggering folly exceptions on any other 3rd party Assembly that tries to load a dependency or to use the C#'s Reflection.

 

Silver lining is that Sandcastle isn't using ELHelper. That was a earlier attempt at supporting Extraplanetary Launchpads and is a leftover. The latest version just published removes that dll.

Link to comment
Share on other sites

On 1/24/2022 at 11:45 AM, Angel-125 said:

What other types of panels were you thinking of? I've considered panels like those from Making History, and a set like DSEV's MMOD panels, but I haven't figured out the best way to do that yet.

Just a filled in, white colored grid panel would be great. Also, have you considered letting the part grid module also scale the model it is tiling? That would allow for a lot more freedom.  Sorta like TweakScale, but just for the grid part so it should be a lot less complex.

Link to comment
Share on other sites

It depends on the size. The smallest printer can basically print nothing, were the biggest one can print almost everything. 

And it depends on the playmode I think, some things might be hidden.

 

But while we are at the Pathfinder parts...

Anyone else unable to print the doc Sci lab? After that update I'm not able to print it, it just doesn't finish the job. All other parts are good

Link to comment
Share on other sites

1 hour ago, Revilo2601 said:

Anyone else unable to print the doc Sci lab? After that update I'm not able to print it, it just doesn't finish the job. All other parts are good

Have you tried other science labs? If those don't work either I suspect its the same issue I had with parts containing ModuleScienceLab in OSE where they wouldn't print (details in the spoiler).

Spoiler

In order to for the module to be converted to a ProtoPartModuleSnapshot and/or ConfigNode (I forget which; possibly both)  ModuleScienceLab requires the field ExperimentData to be a List<string> (cannot be null) but the module doesn't assign anything to the field itself (at least not in flight; I assume it does in the editors hence it not being an issue for vanilla KSP). Fixing it is as simple as module.ExperimentData = new List<string>(); before converting the part.

Link to comment
Share on other sites

Posted (edited)
57 minutes ago, Revilo2601 said:

I got rid of ose to be honest, actually because I couldn't print any of the inflatable parts in the ose workshop.

I meant in Sandcastle; sorry if that wasn't clear. The actual issue I'm talking about is with the KSP labs themselves and would need to be worked around by Sandcastle. OSE isn't related to this other than it being how I encountered the issue. BDArmory and KIS (and probably other mods too) also have to do the same thing.

If it is the same problem I had then no Science Lab will be printable and there's nothing you can do about it yourself – Sandcastle would need to be patched. Otherwise there may be a specific issue with that part in particular, which I'm sure would also be useful for Angel to know about.

P.S. what inflatable parts are you referring to? If you let me know I can make sure they are compatible with my overhauled version of OSE. (You should PM me or post it in the dev thread in my signature rather than here so as to not clog up this thread with stuff unrelated to Sandcastle.)

Edited by Alphathon
Link to comment
Share on other sites

On 5/16/2022 at 4:41 PM, Clancythecat said:

Is anyone else having an issue where the pathfinder print shops don't have anything in them?

?imw=5000&imh=5000&ima=fit&impolicy=Lett

exactly the same issue here, i just manually added the module in the config

Link to comment
Share on other sites

4 hours ago, Don0303 said:

exactly the same issue here, i just manually added the module in the config

Yeah, I actually made a patch that did that before but then the sand castle compatibility patch released, and so I removed it, but it seems like he'll have to re-implement it.

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.

 Share

×
×
  • Create New...