Jump to content

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


Angelo Kerman

Recommended Posts

Tip for the users, that don't use KIS/KAS or EL and just do EVA-construction:

You can increase the range around a eva kerbal, from which he can pull parts out of an inventory  (e.g. the sandcastle printworkshop) and place them on vessels.

 

Just go to the KSP main folder (there where the ksp-executable is also), open the settings.cfg and search for "range".

There you can adjust the range, from which a kerbal pull things out other part's inventorys (parameter inventory range) and how big the sphere around the kerbal ist, in which he can attach/move parts (parameter eva construction range). Both parameters are in the config right one after another. This little adjustment makes eva construction works so much less fiddly. Just increase them to your liking and sense of realism needed for your individual playstyle.

 

The default values are 5 and 7. 

Edited by Rakete
Link to comment
Share on other sites

20 minutes ago, Rakete said:

Tip for the users, that don't use KIS/KAS or EL and just do EVA-construction:
 settings.cfg and search for "range".

yes, also KSPCommunityFixes makes construction less explosive. 

 

On 12/23/2022 at 2:29 PM, flart said:
  • Deployable Inventory have large inventory parts,  
  • you can set up PartVolumes to calculate volume for almost all parts,
  • weight is not a problem in space or low gravity bodies,
  • changing settings.cfg could make EVA construction more convenient:
    EVA_INVENTORY_RANGE = 15      // 5
    EVA_CONSTRUCTION_RANGE = 15   // 7
    EVA_CONSTRUCTION_COMBINE_RANGE = 15 // 7 
  • KSPCommunityFixes makes EVA construction less volatile

Result — you can print and build with the sandcastle almost everything.

 

Link to comment
Share on other sites

1 hour ago, flart said:

EVA_CONSTRUCTION_COMBINE_RANGE

What does this value do? I just tweaked the other two, and they worked well. But i was not sure what this third parameter does.

 

And yes, KSPCF is almost a mandatory mod for me.

1 hour ago, flart said:

Result — you can print and build with the sandcastle almost everything

Not quite. Some bigger things are not printable, because PartVolumes calculated really big numbers of volumes for some parts. Even the big storage  that comes with sandcastle is not big enough to print everything. E.g. larger engines from near or far future tech.

Edited by Rakete
Link to comment
Share on other sites

5 hours ago, Rakete said:

@Angel-125 I guess I found a little bug. The 3D-Printers seem to pull ore from all ore tanks and seem not to obey tank priorities. You can set those priorities like you want, the printer pulls ore from all tanks.

When I get a moment I'll take a look. I'm largely retired from KSP 1 modding but the odd bug fix here and there is ok. :)

Link to comment
Share on other sites

19 minutes ago, Angel-125 said:

. I'm largely retired from KSP 1

Oh, I didn't know that. Then happy retirement :P

But I would keep reporting bugs, if I should find any more - if this is okay. But as far as I see, it works great.

 

One little bug about the recycler: recycled parts don't disappear from the recycler window (for selection of parts to be recycled) instanteously, after being converted into ore. You have to close and open the recycler. Sometimes even more open/closing cycles to make the recylcler actualize the list of parts available for recycling.

Link to comment
Share on other sites

  • 2 weeks later...

Happy Chinese New Year!

Sandcastle 1.1.1 is now available:

Changes

- The Sandcaster 3D Printer can now recycle vessels, just like the Konstruction Manipulator.
- Fixed issue where Sandcastle wouldn't show parts in the print shop window when Sandcastle was added to Pathfinder templates.
- Fixed issue where the game would crash when deploying the Survey Cone from the Survey Cone Dispenser.
- Fixed odd coloration on deployed survey cones.
- Fixed issue where resources were pulled from the entire vessel instead of stage priority flow.

HNTGUGV.png

V0P7XoS.png

plsdNY0.png

U62TvQy.png

VrTblyo.png

DKQU7d5.png

q0bHfjw.png

3PGrESX.png

eirGeIS.png

Fully automatic base construction is finally working as it should. :)

Link to comment
Share on other sites

7 minutes ago, Angel-125 said:

Fully automatic base construction is finally working as it should. :)

I'd really like to see some hobby youtuber make a short video/tutorial on that Sandcastle/EL-integration.

Link to comment
Share on other sites

15 hours ago, Angel-125 said:

Happy Chinese New Year!

Sandcastle 1.1.1 is now available:

Changes

- The Sandcaster 3D Printer can now recycle vessels, just like the Konstruction Manipulator.
- Fixed issue where Sandcastle wouldn't show parts in the print shop window when Sandcastle was added to Pathfinder templates.
- Fixed issue where the game would crash when deploying the Survey Cone from the Survey Cone Dispenser.
- Fixed odd coloration on deployed survey cones.
- Fixed issue where resources were pulled from the entire vessel instead of stage priority flow.

HNTGUGV.png

V0P7XoS.png

plsdNY0.png

U62TvQy.png

VrTblyo.png

DKQU7d5.png

q0bHfjw.png

3PGrESX.png

eirGeIS.png

Fully automatic base construction is finally working as it should. :)

Very cool!

Congrats on the release!

Link to comment
Share on other sites

Awesome mod! I was going to ask why the recycler doesn't conserve mass, as I was seeing the mass numbers in KER  mass  tick up when I recycle a part, but I've realized that it instantly deletes the recycled part (and thus its mass) before gradually adding the recycled ore, and I was missing that first part. It looks weird, but you do always end up with less mass than you started with. I'll just leave this in case anyone else is easily confused :)

 

Is there any way to edit the speed of production through the configs?

Link to comment
Share on other sites

On 1/26/2023 at 5:25 AM, kerbnub said:

Awesome mod! I was going to ask why the recycler doesn't conserve mass, as I was seeing the mass numbers in KER  mass  tick up when I recycle a part, but I've realized that it instantly deletes the recycled part (and thus its mass) before gradually adding the recycled ore, and I was missing that first part. It looks weird, but you do always end up with less mass than you started with. I'll just leave this in case anyone else is easily confused :)

 

Is there any way to edit the speed of production through the configs?

In the part config, find the WBIPrintShop entry, and change printSpeedUSec.

Every parameter is commented in the part modules:

Spoiler
	MODULE
	{
		name = WBIPrintShop

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

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

		// 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 = 

		// Name of the animation to play when the printer is running.
		animationName = PrinterAnim

		// 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 = 10
		}

		// 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
//			whitelistedCategory = none
//		}

		// 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 on the whitelist can be printed even if they show up on the global PARTS_BLACKLIST.
//		PARTS_WHITELIST
//		{
//			whitelistedPart = batteryPack
//			whitelistedPart = probeCoreCube
//		}

		// Normally, 3D printers can print any part that fits in its maxPrintVolume, but you can create specialized printers
		// that are incapable of printing parts on this list. To do so, simply specify a PARTS_BLACKLIST and one or more blacklistedPart entries.
//		PARTS_BLACKLIST
//		{
//			blacklistedPart = whoopieCushions
//			blacklistedPart = boomerangFish
//		}
	}

	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 = 

		// Name of the animation to play when the printer is running.
		animationName = PrinterAnim

		// 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
		}
	}

There's actually quite a bit that you can configure in Sandcastle. Be sure to check out the MaterialsList.cfg file for more things that you can configure:

Spoiler
// A materials list specifies what resources it takes to produce a new part. 
// This doesn't take into account the resources needed to run the print shop itself.
MATERIALS_LIST
{
	// Name of the materials list. This should correspond to the part categories:
	// Aero, Cargo, Communication, Control, Coupling, Electrical, Engine, FuelTank, Ground, none, Payload, Pods, Robotics, Science, Structural, Thermal, Utility
	// The default category is named Default. The default category is used if there is no MATERIALS_LIST provided for the part's category.
	// NOTE: The category called "none" shows up in the GUI as "Special"
	name = Default

	// You can specify one or more RESOURCE nodes for the materials list.
	// By default, Sandcastle uses Ore as its resource requirement, but you can specify one or more different resources if desired.
	// NOTE: If you specify more than one RESOURCE, the sum of each resource's rate must be equal to or greater than 1.
	// If that's not the case then Sandbox will add Ore as a resource until the sum of each resource's rate equals 1.
	RESOURCE
	{
		// Name of the required resource.
		name = Ore

		// The multiplier to use when calculating how much of the resource is required to print the part.
		// The exact amount of resource needed depends upon the part mass, the resource density, and the multiplier.
		// The equation is: amountRequired = (partMass / resourceDensity) * rate
		// The multiplier cannot be less than 1. A value greater than 1 represents the resource that's wasted during construction.
		// Since Ore is a generic resource, it has a bunch of useless bits in it, so it generates more waste.
		rate = 1.5
	}
}

// In addition to the standard materials, any parts in the specified tech node may require additional resources.
// Out of the box, Sandcastle only uses stock resources, so this node would only be used when the mod has been patched to use custom resources.
//TECH_NODE_MATERIALS
//{
//	// Name of the tech node
//	name = unifiedFieldTheory

//	// One or more resources
//	RESOURCE
//	{
//		name = RubberChickens
//		rate = 5
//	}
//}

// Specific parts can require specialized resources, conditions, and/or other parts to print them.
// Out of the box, Sandcastle only uses stock resources, so this node would only be used when the mod has been patched to use custom resources or when it needs
// specific components or conditions. This example can patch all command pods and probe cores, but the new fields added below can be applied to any part config.
//@PART[*]:HAS[@MODULE[ModuleCommand],~CrewCapacity[>0]]
//{
	// If the part has TechHidden = true and category = none, and has a ModuleCargoPart config node, a ModuleGroundPart config node,
	// or a config node of a part module derived from ModuleCargoPart or ModuleGroundPart, then it can be printed by a 3D printer even when
	// it is hidden from the tech tree and/or VAB/SPH. It will appear in the Special part category of the 3D printer.
//	canPrintHiddenPart = true

	// You can specify whether or not to remove the part's resources after it's been printed.
//	removeResources = false

	// You can specify one or more specialized resources to print the part.
//	PRINT_RESOURCE
//	{
//		name = ComputerChips
//		rate = 1.01
//	}

	// The minimum level of gravity/vessel acceleration force needed to print the part, in m/sec^2.
	// If set to 0, then the vessel will need to be in microcravity (orbiting, sub-orbital, or on an escape trajectory, and not accelerating).
	// The default is -1, which means that there are no g-level requirements.
//	minimumGravity = 0

	// The minimum level of pressure on the vessel that's needed to print the part, in kPA.
	// If set to 0, then the vessel must be in a vacuum. If > 1, then the vessel must be in an atmosphere or submerged.
	// The default is -1, which means that there are no pressure requirements.
//	minimumPressure = 0

	// The name and amount of a part that's required to finish assembly. 
	// The required components must be located somwhere in the vessel's inventory.
	// You can specify one or more REQUIRED_COMPONENT nodes.
//	REQUIRED_COMPONENT
//	{
		// Name of the part (NOT the title!)
//		name = batteryPack

		// The number of parts required. Default is 1.
//		amount = 2
//	}
//}

// ALL Printers will never be able to print parts on this global blacklist- unless a specific 3D printer allows it in its PARTS_WHITELIST.
// For specific printers, you can also specify a PARTS_BLACKLIST in the WBIPrintShop config node. In that case, both the global list and the local list apply.
PARTS_BLACKLIST
{
	// Specify one or more blacklistedPart entries
	blacklistedPart = boxOfGenericSpecializedParts
}

 

 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Are the two Sandcastle electric smelters for Extraplanetary Launchpads supposed to say they consume 5063060.88 u/s of ElectricalCurrent? 

dyHm4Lq.png

While I do have the NF, OPM, Restock, and some other tool and visual mods installed, I can't think of anything that would affect the EC consumption of these specific parts.

Link to comment
Share on other sites

  • 1 month later...
On 3/30/2023 at 4:46 PM, PhaserArray said:

Are the two Sandcastle electric smelters for Extraplanetary Launchpads supposed to say they consume 5063060.88 u/s of ElectricalCurrent? 

dyHm4Lq.png

While I do have the NF, OPM, Restock, and some other tool and visual mods installed, I can't think of anything that would affect the EC consumption of these specific parts.

This issue may be related to the configuration of EL and requires modifying the configuration in ExtraplanetaryLaunchpads\Resources\ECSmelter.

Link to comment
Share on other sites

On 5/6/2023 at 4:09 AM, Aebestach said:

support for SystemHeat in the future?

The future is now, old man. :)

You're invited to test it. (While it's an extra of my mod suite: RR, there is no need to install any other RR mod for it to work. The association with RR comes from the fact that EL converters put out a few resources on the side that RR helps to make useful.)

 

 

Link to comment
Share on other sites

4 hours ago, JadeOfMaar said:

The future is now, old man. :)

You're invited to test it. (While it's an extra of my mod suite: RR, there is no need to install any other RR mod for it to work. The association with RR comes from the fact that EL converters put out a few resources on the side that RR helps to make useful.)

 

 

Does RR make Sandcastle use something more than just plain ore to print stuff?

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 2 months later...
On 3/30/2023 at 4:46 AM, PhaserArray said:

Are the two Sandcastle electric smelters for Extraplanetary Launchpads supposed to say they consume 5063060.88 u/s of ElectricalCurrent? 

dyHm4Lq.png

While I do have the NF, OPM, Restock, and some other tool and visual mods installed, I can't think of anything that would affect the EC consumption of these specific parts.

 

On 5/6/2023 at 8:11 AM, Aebestach said:

This issue may be related to the configuration of EL and requires modifying the configuration in ExtraplanetaryLaunchpads\Resources\ECSmelter.

It is indeed related to that exact EL configuration file.  The original recipe from EL for this was posted by @Tonka Crash in the EL thread.  The values from the original post result in EC usage that is identical for smelting MetalOre and melting ScrapMetal.  Because other mods might rely on the recipe as it appears in the EL release being what it is, I made a patch to add a new recipe specifically for Sandcastle that matches the original posted EC usage and then assigns that revised (reverted?) recipe to both Sandcastle smelters.  It would probably be safe to just patch the original recipe, but maybe somebody out there is using some mod that really is (though unlikely) balanced around that incredibly high EC usage.  Anyway, here it is if someone wants it:

Sandcastle Smelter Patch:

Spoiler
// --------------------------------------------------------------------------------------------------------------------------
// Sandcastle Smelter Recipe Fix
// 
//	Replaces the recipe used by the Sandcastle smelters with the original recipe written by Tonka Crash and posted at:
//
//	https://forum.kerbalspaceprogram.com/topic/54284-112-extraplanetary-launchpads-v6993/?do=findComment&comment=3759826
//
//	The only difference between this recipe and the one in the current release of Extraplanetary Launchpads is the EC
//	consumption.  Note that the recipe included with Sandcastle for use with Classic Stock Resources already uses this
//	much lower value.
// --------------------------------------------------------------------------------------------------------------------------

EL_ConverterRecipe:NEEDS[Launchpad,Sandcastle]
{
	name = ECHeatedSmelterForSandcastle
	Input
	{
		efficiency = 1.0
		ElectricCharge = 0.002459947
		MetalOre = 0.005110022
		LiquidFuel = 0.000480766
	}
	Output
	{
		efficiency = 1.0
		Metal = 0.00357408
		Water* = 0.000432367
		CarbonDioxide* = 0.001584342
	}
}

@PART[wbiELSmelter,wbiELMiniSmelter]:NEEDS[Launchpad,Sandcastle]
{
	@MODULE[ELConverter]
		{
			@ConverterRecipe:HAS[#ConverterRecipe[ECHeatedSmelter]] = ECHeatedSmelterForSandcastle
		}
}

 

 

Link to comment
Share on other sites

  • 3 weeks later...

iICQtyk.pngHi, I'm new to sandcastle and sent the larger 3D print shop to minmus with ore and some kerbals. However when I try to print an item the status changes to "idle", and nothing happens. When I've tested it sitting on the launchpad at the ksc it has worked, I was wondering if anyone might know how to get it to work?

I've included a screenshot incase it helps.

Edit: I think I found the issue. I used a ground anchor and a KIS fixed telescopic joint to try and anchor the printer onto the ground, which seemed to break it. It stayed broken even after removing the anchor, so to fix it I just flew a new printer to minmus.

Edited by Findlay R
Managed to solve my issue
Link to comment
Share on other sites

  • 2 weeks later...

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