Jump to content

[1.7-1.9] SMURFF: Simple Module adjUstments for Real-ish Fuel-mass Fractions 1.9.1 (02019 Nov 12)


Kerbas_ad_astra

Recommended Posts

9 hours ago, SpaceIsCool said:

How does this mod work, I can't change the amount of fuel in the game?

SMURFF doesn't change how much fuel a part has, it changes how much parts weigh.  (In particular, it makes fuel tanks lighter.)  You'll still have to make bigger rockets than you may be used to from playing stock, but without SMURFF, you'd have to make them even bigger.

Link to comment
Share on other sites

Interesting.
The GameData\Bluedog_DB\Compatibility\Rescale\BlueSmurff.cfg doesn't seem to have anything for RSS in it, but for other solar system rescale mods... with the fact in mind that RSS is most famous (I guess, isn't it?) this is interesting.

Link to comment
Share on other sites

1 hour ago, Gordon Dry said:

Interesting.
The GameData\Bluedog_DB\Compatibility\Rescale\BlueSmurff.cfg doesn't seem to have anything for RSS in it, but for other solar system rescale mods... with the fact in mind that RSS is most famous (I guess, isn't it?) this is interesting.

Patches like these are usually created by the community. Most likely no one who uses that combination of mods has made configs.

Link to comment
Share on other sites

5 hours ago, Karamon said:

Any chance to get SMURFF config for BDB ? It has some nice engines but they weight at least twice as much as stock engines with SMURFF :(

You've got two options. You can remove the SMURFFExclude flag and set the systemScale variable to 1 to allow SMURFF to run and disable BDB's stuff.

@PART[bluedog*,Bluedog*]:BEFORE[SMURFF]
{
    !SMURFFExclude = remove
}
@BDBRESCALECONFIG:AFTER[zzzBluedog_DB_0]
{
	@systemScale = 1
}

Or if you just want to change how engines are handled and leave the rest as is you can set the engine multiplier directly, possibly with a value pulled from the SMURFF script.

@BDBRESCALECONFIG:AFTER[zzzBluedog_DB_1]
{
	@engineFactor = 0.5 // Adjusted engine mass will be mass * engineFactor
}

 

Link to comment
Share on other sites

9 hours ago, Jso said:

 


@PART[bluedog*,Bluedog*]:BEFORE[SMURFF]
{
    !SMURFFExclude = remove
}
@BDBRESCALECONFIG:AFTER[zzzBluedog_DB_0]
{
	@systemScale = 1
}

 

 

Works perfectly fine, it disabled any configs that BDB had and allowed SMURFF to kick in and rebalance weight of everything. Thank you .

Link to comment
Share on other sites

12 hours ago, Nightside said:

Most likely no one who uses that combination of mods has made configs.

Well, because RO needs some time to catch up the actual release SMURFF is the only alternative when also using RSS - so this combination of mods is a pause-filler.

Link to comment
Share on other sites

  • 4 weeks later...

I seem to be having an issue with the dry mass of switchable tanks in procedural parts (v1.2.12). Mixed LFO works fine but switching to separate liquid fuel or oxidizer returns them to their stock dry mass.

I took a peak under the hood, and SMURFF edits to PP's TankContentSwitch module look (to my eyes) like they should be fine, but in the ModuleManager.ConfigCache file some changes don't seem to have been applied.

The tank capacity stays consistent across each tank type despite the unitsPerT values not being changed for LF and Ox.

(Code comments my own)

// Code snippet from ModuleManager.ConfigCache

		MODULE
		{
			name = TankContentSwitcher
			useVolume = true
			TANK_TYPE_OPTION
			{
				name = Mixed
				dryDensity = 0.027225 //Changed by SMURFF
				costMultiplier = 1.0
				RESOURCE
				{
					name = LiquidFuel
					unitsPerT = 2880 //Changed by SMURFF
				}
				RESOURCE
				{
					name = Oxidizer
					unitsPerT = 3520 //Changed by SMURFF
				}
			}
			TANK_TYPE_OPTION
			{
				name = LiquidFuel
				dryDensity = 0.1  //Not changed
				costMultiplier = 0.65
				RESOURCE
				{
					name = LiquidFuel
					unitsPerT = 800  //Not changed
				}
			}
			TANK_TYPE_OPTION
			{
				name = Oxidizer
				dryDensity = 0.1  //Not changed
				costMultiplier = 0.75
				RESOURCE
				{
					name = Oxidizer
					unitsPerT = 977.7778  //Not changed
				}
			}
		}

I double checked this on a clean KSP (1.3.0) install and added only SMURFF(1.6.2), procedural parts (v1.2.12) and module manager (2.8.1) and still had the same issue.

Link to comment
Share on other sites

17 hours ago, Kerbas_ad_astra said:

Does it work for RCS type tanks?

Yes, RCS works just right, it looks like it's just the switchable options for the standard fuel tank.

I spotted on github that PP has had compatibility changes in the TankContentSwitcher.dll for 1.3. I'm a bit of a noob with C#, could this be related? https://github.com/Starwaster/ProceduralParts/commit/98b9fd6a3df2f728f1ab7c2996b27b1162b6022

Link to comment
Share on other sites

That shouldn't matter; SMURFF works by Module Manager patches, that act before anything that Procedural Parts does.  There's got to be some nuance of MM that is tripping me up here.  I may have been 'too clever' in putting those patches together; I'll see if separating them works better.

Link to comment
Share on other sites

Just so you're aware, there seems to be an incompatibility between SMURFF and both "Modular Fuel Tanks" and "Configurable Containers", the two mods that let you stick any sort of resource into your tanks.

Any tank patched by either mod (i.e. all(?) tanks when these are installed) will not have its dry mass correctly adjusted by SMURFF.  E.g. the FL-200T will have 0.125 dry mass with/without SMURFF.  I suspect this may be because they don't come with any resources by default, so they don't trigger the mass reduction?

(On top of that, there's a direct incompatibility between Procedural Parts + Configurable Containers — the procedural tank dry mass is always 1.0 tons, no matter what size or contents.  But this is between those two mods and has nothing to do with SMURFF, so.)

Link to comment
Share on other sites

Modular Fuel Tanks does its own mass calculations without regard to the 'mass' variable in the part config.  Furthermore, many parts get individually customized mass values.  It would not be practical to support changes to those values; the appropriate counterpart to use in larger solar systems is RealFuels.

This also appears to be the case for Configurable Containers.

Link to comment
Share on other sites

Actually, Configurable Containers works differently: It doesn't touch the dry mass for the default case, but some resources (I think e.g. xenon?) may add mass based on volume.

As a test, I set up a 100% stock game with just ModuleManager, and added a .cfg file of my own that reduced the dry mass of the FL-T200 tank to 42kg instead of the default 125kg.  Under ModularFuelTanks, you're correct, the mass was reset to 125kg.  But under both stock and Configurable Containers, the dry mass remained 42kg.

However, Configurable Containers also removes the default resources, meaning the tank no longer carries LFO by default.  I'm thinking that may be what makes SMURFF not recognise it as a tank?  Is there a flag I can set (other than adding a resource) to force SMURFF to adjust it?

Edited by Wisq
Link to comment
Share on other sites

Okay, turns out I can actually just edit the SMURFF rules that trigger on LiquidOxygen and Oxidizer, and set them to :BEFORE[ConfigurableContainers].  Once I do this, the FL-T200 has 31kg mass, which is the same as what it has when SMURFF is installed but Configurable Containers is not.

What's a bit weird is, I can't seem to get the same effect if I go into ConfigurableContainers and set them to run :AFTER[SMURFF] or :AFTER[zzz_SMURFF].  Not sure what's going on there.

Link to comment
Share on other sites

uhhh

 

[LOG 12:42:18.884] [ModuleManager] Applying node SMURFF/SMURFF/@PART[*]:HAS[@MODULE[ModuleEngines*],!MODULE[ModuleEngines*]:HAS[!PROPELLANT[Oxidizer]],!MODULE[ModuleCommand],~CrewCapacity[>0],!MODULE[ModuleCargoBay],@MODULE[ModuleSMURFF],~SMURFFExclude[*rue]]:FOR[zzz_SMURFF] to SETIrebalance/0ProceduralParts/SETI-PP-HRB/proceduralTankHRB
[LOG 12:42:18.885] [ModuleManager] Cannot find key reservedmass in PART
[LOG 12:42:18.886] [ModuleManager] Error - Cannot parse variable search when editing key mass = #$reservedmass$
[LOG 12:42:18.889] [ModuleManager] Cannot find key reservedmass in PART
[LOG 12:42:18.890] [ModuleManager] Error - Cannot parse variable search when editing key mass = #$reservedmass$
[LOG 12:42:18.896] [ModuleManager] Applying node SMURFF/SMURFF/@PART[*]:HAS[@MODULE[ModuleEngines*],!MODULE[ModuleEngines*]:HAS[!PROPELLANT[Oxidizer]],!MODULE[ModuleCommand],~CrewCapacity[>0],!MODULE[ModuleCargoBay],@MODULE[ModuleSMURFF],~SMURFFExclude[*rue]]:FOR[zzz_SMURFF] to SETIrebalance/MM-NewParts/hybridBoosterRT-11/hybridBooster-RT11/hybridBooster

Found the problem. It was SETI Rebalance's procedural(?) Hybrid Rocket Booster

Edited by N70
Link to comment
Share on other sites

A solid rocket engine with no solid fuel!  Thanks for the heads-up.

@N70, @VexAurora, I think I've sorted out your issues, could you please try the latest version of SMURFF.cfg from GitHub?  (Grab the file directly from the repo, not from the 'releases' page.)

@Wisq...sorry, still working on that one.

Link to comment
Share on other sites

  • 4 weeks later...
11 hours ago, LordOfMinecraft99 said:

Quick question: Could you make this work with Real Fuels- If I use it with Real Fuels, parts have Negative mass which leads to glitches-

https://forum.kerbalspaceprogram.com/index.php?/topic/164834-rocket-hovers-above-pad/

Have you tried turning off setting the Smurff Tank Lever and Engine Lever to zero?  

Link to comment
Share on other sites

15 hours ago, LordOfMinecraft99 said:

Quick question: Could you make this work with Real Fuels- If I use it with Real Fuels, parts have Negative mass which leads to glitches-

https://forum.kerbalspaceprogram.com/index.php?/topic/164834-rocket-hovers-above-pad/

You really shouldn't use Real Fuels and SMURFF together.  They both make fuel tanks and engines lighter, so at best, you'll get unrealistically light parts, and at worst you get negative-mass glitches like yours.  SMURFF has some protections against making parts with negative mass, but Real Fuels uses a different set of variables, it adds a bunch of new resources and tank types, and most challenging of all, it patches a lot of parts individually (as opposed to using the consistent 8:1 ratio that most stock tanks adhere to), so it's not practical for me (or the RF devs) to add patches to make them work together.

The one thing SMURFF does that RF does not is make pods lighter, so if you really want to keep it, you could do as Nightside suggests.  That will stop SMURFF from tinkering with engines and fuel tanks, and only change the masses of command pods.

Link to comment
Share on other sites

  • 2 weeks later...

Okay, I just read through this entire thread, and couldn't find a clear answer (or it's there, but the fact that it's 4:30am here means I missed it) to this - possibly probably - stupid question:

Can this be used in a stock-sized system?  If yes, does it have any effect?  I know it rebalances mass fractions, but most of what I've read in this thread keeps referring to rescaled systems (and I understand that that is the point of the mod - to allow stock fuel tanks, engines and pods to be used in rescaled systems), but since you've also mentioned how stock mass fractions are way off (balancing for the smaller size of the Kerbin system), I guess I was wondering if it would be pointless to try this mod on a stock sized system.

Link to comment
Share on other sites

SMURFF can be used in any solar system, and if the 'lever' variables have positive values, then SMURFF will reduce the masses of parts (specifically: engines, heat shields, fuel tanks, and crew capsules, provided they use stock-like resources and balancing).

In my opinion, it only makes sense to do this in upscaled solar systems.  Stock parts are much heavier than real-world rocket parts (relative to their performance, so mass fractions and TWR), but that's intentional, so that making rockets for the Kerbin solar system is less challenging than in the real world, but not trivial (using SMURFF in the stock solar system would make the game much easier -- too much so, IMO).  That balance is maybe suited for systems up to ~4x in size, but starts to break down pretty rapidly past ~6x (RSS is ~10x).

Link to comment
Share on other sites

46 minutes ago, Kerbas_ad_astra said:

SMURFF can be used in any solar system, and if the 'lever' variables have positive values, then SMURFF will reduce the masses of parts (specifically: engines, heat shields, fuel tanks, and crew capsules, provided they use stock-like resources and balancing).

In my opinion, it only makes sense to do this in upscaled solar systems.  Stock parts are much heavier than real-world rocket parts (relative to their performance, so mass fractions and TWR), but that's intentional, so that making rockets for the Kerbin solar system is less challenging than in the real world, but not trivial (using SMURFF in the stock solar system would make the game much easier -- too much so, IMO).  That balance is maybe suited for systems up to ~4x in size, but starts to break down pretty rapidly past ~6x (RSS is ~10x).

Okay, that's kinda what I figured, but I wanted to make sure.  I'm not sure I want to ever play an upscaled system (I don't think I'm experienced enough with KSP to take on that challenge yet), but there's one planet in Galileo's Planet Pack (I'm looking at you, Tellumo) that a mission to might benefit from something like SMURFF.  Nearly twice the gravity as Gael (the Kerbin equivalent), and ten times the atmospheric pressure.

Meh, I'll just leave it for now, and if I ever do end up playing a scaled system, then I'll try SMURFF.

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