Jump to content

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


Angelo Kerman

Recommended Posts

Latest Release
Source
Wiki
CKAN - YES
Licenses:
Near Future Props by Nertea, licensed under CC-BY-NC-SA-4.0
Source code is GPLv3, artwork is All Rights Reserved

b8BOjbM.png

Bill watched the printer impatiently as it used additive manufacturing to produce the new component. As anxious as he was, he was grateful for the new technology- in years past, they had to carry every conceivable item for every possible contingency. Now they just had to bring along a 3D Printer like the Sandcastle and a stock supply of ore. With the right plans, they could print just about anything that could fit in the printer.

The print head stopped at last, and the engineer pulled the component out of the print chamber. He checked it over and was satisfied with the result. "Here you go, Gilford," Bill said. "Take this repair kit and go fix the solar array. You broke it, you fix it."

Sandcastle is inspired by NASA's 3D Printed Habitat Challenge as well as NASA's In Space Manufacturing experiments ongoing at the International Space Station. It enables you to 3D print parts compatible with the stock EVA Constructions system using no fancy resources except for stock ore, and entire vessels if you have Extraplanetary Launchpads installed. Best yet, you can print up parts and vessels without the need for kerbals!

Features include:

  • Print parts in 3D printers compatible with the stock EVA Construction system.
  • Build bases through EVA Construction, with additional support for @taniwha's Extraplanetary Launchpads.
  • No complicated resource chains- uses stock Ore as the building material, but Sandcastle can easily support other mods via Module Manager patches. And if desired, the parts you print can require other parts as prerequisites!
  • Restock-alike texturing.

A couple of pics:

Jp060Cy.png

kbSZWVL.png

DKzrT3Z.png

DS3Fs7Y.png

DXEf0lj.png

A0F02EZ.png

Recommended Mods

 

Link to comment
Share on other sites

7 minutes ago, Spaceman.Spiff said:

Very cool! :o

Do you think it's possible for EVA construction to pull directly from the printers eventually?

 

If you mean have the ability to do construction without kerbals, no. Stock EVA Construction is built around kerbals doing the construction. At present there is no way to get around that unless Squad changes something under the hood. But that's where @taniwha's Extraplanetary Launchpads comes in. With EL, you can design your base in the VAB/SPH, then send a printing robot out to the site and print the base. I have some ideas on how kerbals and robots can work together to build bases in situ, but I have a few things to work out first.

Meanwhile, my time is split between Sandcastle and one other mod, so it may be a bit before a trove of parts appear. But next up will be a cargo part recycler so you can clean up your inventories.

Link to comment
Share on other sites

2 minutes ago, Angel-125 said:

If you mean have the ability to do construction without kerbals, no. Stock EVA Construction is built around kerbals doing the construction. At present there is no way to get around that unless Squad changes something under the hood. But that's where @taniwha's Extraplanetary Launchpads comes in. With EL, you can design your base in the VAB/SPH, then send a printing robot out to the site and print the base. I have some ideas on how kerbals and robots can work together to build bases in situ, but I have a few things to work out first.

Meanwhile, my time is split between Sandcastle and one other mod, so it may be a bit before a trove of parts appear. But next up will be a cargo part recycler so you can clean up your inventories.

I meant kerbals pulling larger parts than the containers can hold, allowing bigger things to be constructed on EVA. 

I use EPL anyway, the construction bots are a boon. :)
Also, at the current state, how could I patch a part to have a printer module? 

I look forward to developments! 
 

Spoiler

Another mod?!! :oYou’re on a roll!

 

Link to comment
Share on other sites

1 minute ago, Spaceman.Spiff said:

I meant kerbals pulling larger parts than the containers can hold, allowing bigger things to be constructed on EVA. 

I use EPL anyway, the construction bots are a boon. :)
Also, at the current state, how could I patch a part to have a printer module? 

I look forward to developments! 
 

  Hide contents

Another mod?!! :oYou’re on a roll!

 

Any parts that you print must be able to fit the printer's max printable volume as well as fit in one of your vessel's inventory parts. So your kerbals won't be placing 2.5m fuel tanks in their pockets.

In the current state, here is how I add the print shop to the Mobile Processing Lab:

Spoiler

@PART[Large_Crewed_Lab]
{
    MODULE
    {
        name = WBIPrintShop

        // The maximum volume that the printer can print, in liters. Set to less than 0 for no restrictions.
        maxPrintVolume = 200

        // The number of resource units per second that the printer can print.
        printSpeedUSec = 1

        // Flag to indicate whether or not to allow specialists to improve the print speed.
        //Exactly how the specialist does that is a trade secret.
        UseSpecialistBonus = true

        // Per experience rating, how much to improve the print speed by.
        // The print shop part must have crew capacity.
        SpecialistBonus = 0.05

        // The skill required to improve the print speed.
        ExperienceEffect = "ConverterSkill"

        // Name of the effect to play from the part's EFFECTS node when the printer is running.
//        runningEffect =

        // The printer itself may require one or more resources in order to operate.
        // You can also use INPUT_RESOURCE in place of RESOURCE, but the other fields remain the same.        
        // It's possible to have some kind of OUTPUT_RESOURCE as well, but we just use the stock resources.
        RESOURCE
        {
            name = ElectricCharge
            rate = 5
        }
    }
}

 

Link to comment
Share on other sites

2 hours ago, thelostburrito said:

is this going to work with KIS?

No, this is designed to work with stock EVA construction. My older Pathfinder mod is designed for KIS. Technically you could add KIS support but it won't have KIS inventory out of the box.

2 hours ago, SpaceFace545 said:

would structures that look like dirt be possible.

So long as the parts had a dirt texture and a mesh to go with it, it would be possible.

Meanwhile, I'm testing the new cargo recycler:

Y4YT9Q1.png

Link to comment
Share on other sites

26 minutes ago, Spaceman.Spiff said:

What is the efficiency?

IMO, you should only get 10-15% of your pre back after recycling. 

It's configurable:

Spoiler
Quote

    MODULE
    {
        name = WBICargoRecycler
        
        // The number of units of a resource to recycle per second.
        recycleSpeedUSec = 0.5

        // What percentage of the resources that can be recycled.
        recyclePercentage = 0.45

        // Flag to indicate whether or not to allow specialists to improve the recycle speed.
        // Exactly how the specialist does that is a trade secret.
        UseSpecialistBonus = true

        // Per experience rating, how much to improve the recycle speed by.
        // The recycler part must have crew capacity.
        SpecialistBonus = 0.05

        // The skill required to improve the recycling speed.
        ExperienceEffect = "ConverterSkill"

        // Name of the effect to play from the part's EFFECTS node when the recycler is running.
//        runningEffect =

        // The recycler itself may require one or more resources in order to operate.
        // You can also use INPUT_RESOURCE in place of RESOURCE, but the other fields remain the same.        
        // It's possible to have some kind of OUTPUT_RESOURCE as well, but we just use the stock resources.
        RESOURCE
        {
            name = ElectricCharge
            rate = 5
        }
    }

 

 

Link to comment
Share on other sites

Can I suggest something? Would it be possible to introduce individualized whitelists for the PrintShop module (as an editable .cfg property with a list of allowed part names, for example)? This way we can have custom, specialized printers with a selection of parts narrowed down to a predefined set.

Link to comment
Share on other sites

4 hours ago, ktosiu said:

Can I suggest something? Would it be possible to introduce individualized whitelists for the PrintShop module (as an editable .cfg property with a list of allowed part names, for example)? This way we can have custom, specialized printers with a selection of parts narrowed down to a predefined set.

Sure thing, great idea. Thanks for the suggestion! :)

Sandcastle 0.2 is now available:

Changes

- Implemented WBICargoRecycler. It lets you recycle parts from your inventory back into resources and (if enabled) other components that were required during construction. You don't get the full amount of resources back during recycling, but you will get all your components back.
- You can now whitelist a 3D printer's part categories and individual parts if desired. Simply specify a CATEGORY_WHITELIST and/or PARTS_WHITELIST node, respectively. Check out the Patches/StockParts.cfg for details.

Spoiler


// Normally, 3D printers can print from any category, but you can create specialized printers
// that can only print from one or more categories. To do so, simply specify a CATEGORY_WHITELIST
// and one or more whitelistedCategory entries.
CATEGORY_WHITELIST
{
	whitelistedCategory = Pods
	whitelistedCategory = Electrical
}

// Normally, 3D printers can print any part that fits in its maxPrintVolume, but you can create specialized printers
// that can only print one or more parts. To do so, simply specify a PARTS_WHITELIST and one or more whitelistedPart entries.
PARTS_WHITELIST
{
	whitelistedPart = batteryPack
	whitelistedPart = probeCoreCube
}

 

You can specify both a category whitelist and a parts whitelist, or just a category whitelist, or just a parts whitelist. For the Sandcastle parts they won't use these nodes but other parts will be able to make use of them. :)

Link to comment
Share on other sites

I'm looking at this, thinking some of the Kerbal Dynamics models could be made to fit in nicely - 3d printer as an example

Also the KPBS OSE workshops could be used.

Will this be available as a standalone like EL is with say Simple Construction?

Link to comment
Share on other sites

3 hours ago, theJesuit said:

I'm looking at this, thinking some of the Kerbal Dynamics models could be made to fit in nicely - 3d printer as an example

Also the KPBS OSE workshops could be used.

Will this be available as a standalone like EL is with say Simple Construction?

That's a good question. To be honest, I figured that people would either delete the parts they didn't want or just use another solution for 3D printing like OSE Workshop. Sandcastle is more than just the 3D printer plugin and Module Manager patch. Er, it will be... I'm planning on adding parts for building bases that can be 3D printed as well.

For the resources required to print parts, I'm sticking to stock Ore out of the box, but I've provided the means to Module Manager patch the resources to match whatever system you desire. All it would take is someone writing the patches, and I'd link to the post.

Link to comment
Share on other sites

Well, this does look like a different solution to tbe OSE workshop which has KIS issues?  I'm waiting for a simple solution that uses the stock system. EL still requires KIS for full functionality too.

But i did wonder about the base parts as you started it was the sequel to Pathfinder.  Now we know!

As for patching, I'll be making it compatible with Simplex Resources straight away methinks.

 

Link to comment
Share on other sites

4 hours ago, theJesuit said:

would work

It would. MoarKerbals was working(and is working, but i'm too dumb in C# to make it in a flawless release), it allowed to print random kerbals from specified resource. It does no problems, kerbals are born with backpack and chute in 1.11+. Also, Angel has made a ClassConverter module before(it's in Pathfinder DLL) that allows to change kerbal profession.

Link to comment
Share on other sites

6 hours ago, Hohmannson said:

It would. MoarKerbals was working(and is working, but i'm too dumb in C# to make it in a flawless release), it allowed to print random kerbals from specified resource. It does no problems, kerbals are born with backpack and chute in 1.11+. Also, Angel has made a ClassConverter module before(it's in Pathfinder DLL) that allows to change kerbal profession.

Damn.  I'm going down that rabbit hole again.

MoarKerbals... that is what i want.  And it works?  What is the issue with release then?  This could be what I need for SimplexColonies... a resource of colonists that is treated as a resource but from whom kerbals are recruited from closed arcologies.  Once a certain population is reached (import resource from kerbin) you send a kerbalnaut to 'recruit' a fresh kerbal. 

Okay.  Maybe a request to LGG to tidy up the code then?

With this in mind I humbly withdraw my feature request.   :confused:

Peace

Link to comment
Share on other sites

43 minutes ago, theJesuit said:

works

It does, on 1.7.3. I managed to recompile it, but a non-critical bug appeared. I turned it to more experienced maintainer Zer0Kerbal, who disappeared from forums, GitHub and entire internet in summer. So, IDK, ask LGG or i can just DM you a source code and a compiled library for 1.8.1. Or you can take sources and .sln from guthub and compile it. Sometimes it says "i see no resource" so you have to press cloning button several times, that's the bug.

Edited by Hohmannson
Link to comment
Share on other sites

The idea behind Sandcastle is to keep things simple and let others patch in desired functionality. Think of it as a clean slate that has the minimum possible dependencies (if any), including my own legacy mods like WildBlueTools and Pathfinder. You'll be able to 3D print parts and hang out in them, but that's about it unless you write a patch for, say, MoarKerbals. I'll probably include an Extras folder for things like WildBlueTools (Omni converter and Omni storage), Snacks, and Classic Stock Resources, but I'll leave it to others to create patches for CRP and other mods. If that happens then I'll be happy to post links on the OP to wherever those patches exist.

Link to comment
Share on other sites

On 4/6/2021 at 1:41 PM, Hohmannson said:

It does, on 1.7.3. I managed to recompile it, but a non-critical bug appeared. I turned it to more experienced maintainer Zer0Kerbal, who disappeared from forums, GitHub and entire internet in summer. So, IDK, ask LGG or i can just DM you a source code and a compiled library for 1.8.1. Or you can take sources and .sln from guthub and compile it. Sometimes it says "i see no resource" so you have to press cloning button several times, that's the bug.

Can you provide a set of steps which will reliably reproduce the error?

I'll look into it, sounds like there is a nullref causing the failure.

Sad about @zer0Kerbal, I have no idea what happened to him.  We were working well together

You realize, of course, that this is going to make me adopt all of his "simple" mods?

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...