Jump to content

[1.8+] Real Fuels


NathanKell

Recommended Posts

1 minute ago, Starwaster said:

@terminalmonky

Correct. Also, volume, amount/maxAmount are in liters, mass is how much mass per volume unit is added and utilization should be left at 1 unless it's a compressible resource like a gas. notes are optional and will appear in the tank listing when the part is viewed in the VAB

Rockin.  Thanks again for the help!

Link to comment
Share on other sites

10 hours ago, blowfish said:

to be completely honest I'm having a lot of trouble figuring out what you're trying to do.  The information is spread across multiple posts and I can't follow it.

I was able to create a working patch - technically...

In MM cache everything is correct, but in VAB the TANK of each resource I pre-filled is empty.

That's all.

I can't use that patch, unfortunately.

So I have to assume that RF got a bug.

The TANK of each resource is filled when I do NOT delete the stock resource with !RESOURCE, but then it's double in mass.

Ah, just not forget to mention that I only can finally tune the patch when RF let's me, but here it is (it only works correctly when I do some additional work):

GameData\Bluedog_DB\RealFuels-Stockalike\BDB\RF_BDB_zzTanks.cfg - changed:

@PART[bluedog*,Bluedog*]:HAS[@RESOURCE[LqdHydrogen],@RESOURCE[Oxidizer],!MODULE[ModuleFuelTanks]]:NEEDS[RealFuels,!RealismOverhaul]
{
	MODULE
	{
		name = ModuleFuelTanks
		volume = #$/RESOURCE[Oxidizer]/maxAmount$
		@volume *= 5
		@volume += #$/RESOURCE[LqdHydrogen]/maxAmount$
		type = BalloonCryo
		basemass = -1
	}

	!RESOURCE[LqdHydrogen] {}
	!RESOURCE[Oxidizer] {}
}

@PART[bluedog*,Bluedog*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[ModuleFuelTanks]]:NEEDS[RealFuels,!RealismOverhaul]
{
	MODULE
	{
		name = ModuleFuelTanks
		volume = #$/RESOURCE[LiquidFuel]/maxAmount$
		@volume += #$/RESOURCE[Oxidizer]/maxAmount$
		@volume *= 5
		type = Default
		basemass = -1
	}

	!RESOURCE[LiquidFuel] {}
	!RESOURCE[Oxidizer] {}
}

//prunded because it conflicts with generic TAC-LS to MFT/RF patches
//@PART[bluedog*,Bluedog*]:HAS[@RESOURCE[Food],@MODULE[ModuleFuelTanks]]:NEEDS[RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[TacLifeSupport]
//{
//	@MODULE[ModuleFuelTanks]
//	{
//		TANK
//		{
//			name = Food
//			amount = full
//			maxAmount = #$/RESOURCE[Food]/maxAmount$
//		}
//		TANK
//		{
//			name = Water
//			amount = full
//			maxAmount = #$/RESOURCE[Water]/maxAmount$
//		}
//		TANK
//		{
//			name = Oxygen
//			amount = full
//			maxAmount = #$/RESOURCE[Oxygen]/maxAmount$
//		}
//		TANK
//		{
//			name = CarbonDioxide
//			amount = 0
//			maxAmount = #$/RESOURCE[CarbonDioxide]/maxAmount$
//		}
//		TANK
//		{
//			name = Waste
//			amount = 0
//			maxAmount = #$/RESOURCE[Waste]/maxAmount$
//		}
//		TANK
//		{
//			name = WasteWater
//			amount = 0
//			maxAmount = #$/RESOURCE[WasteWater]/maxAmount$
//		}
//	}
//	!RESOURCE[Food] {}
//	!RESOURCE[Water] {}
//	!RESOURCE[Oxygen] {}
//	!RESOURCE[CarbonDioxide] {}
//	!RESOURCE[Waste] {}
//	!RESOURCE[WasteWater] {}
//}


GameData\RealFuels-Stockalike\Fuel_Conversions.cfg.disabled - pruned

And finally:
GameData\ThunderAerospace\TacLifeSupportMFT\MM_AddResourcesMFT_filled.cfg

// created by Gordon Dry in August 2017
//
// This only works correctly when following the workout instructions from
//
//

@TANK_DEFINITION[ServiceModule]:HAS[!TANK[ReservePower]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,AmpYear,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_0]
{
	TANK
	{
		name = ReservePower
		mass = 0.00289
		amount = 0.0
		maxAmount = 0.0
		utilization = 10
		note = (1 L battery mass weights 0.289 KG and holds 10 KW)
		fillable = True
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_0]
{
	!MODULE[ModuleFuelTanks]:HAS[#type[LifeSupportAll]] { }
}

@PART[*]:HAS[!MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_0]
{
	MODULE
	{
		name = ModuleFuelTanks
		type = ServiceModule
//		basemass = -1
		volume = 0
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[ElectricCharge]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_1]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[ElectricCharge]]
	{
		%TANK[ElectricCharge]
		{
			%mass = 0.00289
			%amount = 100
			@amount *= #$/CrewCapacity$
			@amount *= #$/mass$
			@amount += 200
			%maxAmount = #$amount$
			%utilization = 10
			%note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[ElectricCharge]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_1]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[ElectricCharge]]
	{
		TANK
		{
			name = ElectricCharge
			mass = 0.00289
			amount = 100
			@amount *= #$/CrewCapacity$
			@amount *= #$/mass$
			@amount += 200
			maxAmount = #$amount$
			utilization = 10
			note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[ElectricCharge]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_1]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[ElectricCharge]]
	{
		%TANK[ElectricCharge]
		{
			%mass = 0.00289
			%amount = #$/RESOURCE[ElectricCharge]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%utilization = 10
			%note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[ElectricCharge]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_1]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[ElectricCharge]]
	{
		TANK
		{
			name = ElectricCharge
			mass = 0.00289
			amount = #$/RESOURCE[ElectricCharge]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			utilization = 10
			note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_1]
{
	!RESOURCE[ElectricCharge] {}
	@MODULE[ModuleFuelTanks]
	{
		temp = #$TANK[ElectricCharge]/maxAmount$
		@temp /= #$TANK[ElectricCharge]/utilization$
		@volume += #$temp$
		!temp = delete
	}
//	%RESOURCE[ElectricCharge]
//	{
//		%amount = #$/MODULE[ModuleFuelTanks]/TANK[ElectricCharge]/amount$
//		%maxAmount = #$amount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Food]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_2] 
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Food]]
	{
		%TANK[Food]
		{
			%mass = 0.0003
			%amount = 1.46267
			@amount *= #$/CrewCapacity$
			@amount *= 3
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%info = (1 L weights 0.3 KG)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Food]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_2]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Food]]
	{
		TANK
		{
			name = Food
			mass = 0.0003
			amount = 1.46267
			@amount *= #$/CrewCapacity$
			@amount *= 3
			@amount *= #$/mass$
			maxAmount = #$amount$
			info = (1 L weights 0.3 KG)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Food]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_2]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Food]]
	{
		%TANK[Food]
		{
			%mass = 0.0003
			%amount = #$/RESOURCE[Food]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%info = (1 L weights 0.3 KG)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Food]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_2]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Food]]
	{
		TANK
		{
			name = Food
			mass = 0.0003
			amount = #$/RESOURCE[Food]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			info = (1 L weights 0.3 KG)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_2]
{
	!RESOURCE[Food] {}
	@MODULE[ModuleFuelTanks]
	{
		@volume += #$TANK[Food]/maxAmount$
	}
//	%RESOURCE[Food]
//	{
//		%amount = #$/MODULE[ModuleFuelTanks]/TANK[Food]/amount$
//		%maxAmount = #$amount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Water]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_3]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Water]]
	{
		%TANK[Water]
		{
			%mass = 0.001
			%amount = 0.96667
			@amount *= #$/CrewCapacity$
			@amount *= 3
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%note = (1 L weights 1 KG)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Water]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_3]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Water]]
	{
		TANK
		{
			name = Water
			mass = 0.001
			amount = 0.96667
			@amount *= #$/CrewCapacity$
			@amount *= 3
			@amount *= #$/mass$
			maxAmount = #$amount$
			note = (1 L weights 1 KG)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Water]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_3]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Water]]
	{
		%TANK[Water]
		{
			%mass = 0.001
			%amount = #$/RESOURCE[Water]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%note = (1 L weights 1 KG)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Water]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_3]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Water]]
	{
		TANK
		{
			name = Water
			mass = 0.001
			amount = #$/RESOURCE[Water]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			note = (1 L weights 1 KG)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_3]
{
	!RESOURCE[Water] {}
	@MODULE[ModuleFuelTanks]
	{
		@volume += #$TANK[Water]/maxAmount$
	}
//	%RESOURCE[Water]
//	{
//		%amount = #$/MODULE[ModuleFuelTanks]/TANK[Water]/amount$
//		%maxAmount = #$amount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Oxygen]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_4]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Oxygen]]
	{
		%TANK[Oxygen]
		{
			%mass = 0.000316 
			%amount = 148.05067
			@amount *= #$/CrewCapacity$
			@amount *= 3
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%utilization = 221.1347
			%note = (pressurized 221:1 - 1 L weights 0.316 KG)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Oxygen]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_4]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Oxygen]]
	{
		TANK
		{
			name = Oxygen
			mass = 0.000316 
			amount = 148.05067
			@amount *= #$/CrewCapacity$
			@amount *= 3
			@amount *= #$/mass$
			maxAmount = #$amount$
			utilization = 221.1347
			note = (pressurized 221:1 - 1 L weights 0.316 KG)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Oxygen]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_4]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Oxygen]]
	{
		%TANK[Oxygen]
		{
			%mass = 0.000316 
			%amount = #$/RESOURCE[Oxygen]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%utilization = 221.1347
			%note = (pressurized 221:1 - 1 L weights 0.316 KG)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Oxygen]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_4]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Oxygen]]
	{
		TANK
		{
			name = Oxygen
			mass = 0.000316 
			amount = #$/RESOURCE[Oxygen]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			utilization = 221.1347
			note = (pressurized 221:1 - 1 L weights 0.316 KG)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_4]
{
	!RESOURCE[Oxygen] {}
	@MODULE[ModuleFuelTanks]
	{
		temp = #$TANK[Oxygen]/maxAmount$
		@temp /= #$TANK[Oxygen]/utilization$
		@volume += #$temp$
		!temp = delete
	}
//	%RESOURCE[Oxygen]
//	{
//		%amount = #$/MODULE[ModuleFuelTanks]/TANK[Oxygen]/amount$
//		%maxAmount = #$amount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Waste]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_5]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Waste]]
	{
		%TANK[Waste]
		{
			%mass = 0.0007
			%amount = 0
			%maxAmount = 0.13333
			@maxamount *= #$/CrewCapacity$
			@maxamount *= 3
			@maxAmount *= #$/mass$
			@note = (1 L weights 0.7 KG)
			%fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[Waste]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_5]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Waste]]
	{
		TANK
		{
			name = Waste
			mass = 0.0007
			amount = 0
			maxAmount = 0.13333
			@maxamount *= #$/CrewCapacity$
			@maxamount *= 3
			@maxAmount *= #$/mass$
			note = (1 L weights 0.7 KG)
			fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Waste]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_5]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[Waste]]
	{
		%TANK[Waste]
		{
			%mass = 0.0007
			%amount = #$/RESOURCE[Waste]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			@note = (1 L weights 0.7 KG)
			%fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[Waste]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_5]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[Waste]]
	{
		TANK
		{
			name = Waste
			mass = 0.0007
			amount = #$/RESOURCE[Waste]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			note = (1 L weights 0.7 KG)
			fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_5]
{
	!RESOURCE[Waste] {}
	@MODULE[ModuleFuelTanks]
	{
		@volume += #$TANK[Waste]/maxAmount$
	}
//	%RESOURCE[Waste]
//	{
//		%amount = 0
//		%maxAmount = #$/MODULE[ModuleFuelTanks]/TANK[Waste]/maxAmount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[WasteWater]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_6]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[WasteWater]]
	{
		%TANK[WasteWater]
		{
			%mass = 0.0010205
			%amount = 0
			%maxAmount = 1.232
			@maxamount *= #$/CrewCapacity$
			@maxamount *= 3
			@maxAmount *= #$/mass$
			%note = (1 L weights 1.0205 KG)
			%fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[WasteWater]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_6]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[WasteWater]]
	{
		TANK
		{
			name = WasteWater
			mass = 0.0010205
			amount = 0
			maxAmount = 1.232
			@maxamount *= #$/CrewCapacity$
			@maxamount *= 3
			@maxAmount *= #$/mass$
			note = (1 L weights 1.0205 KG)
			fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[WasteWater]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_6]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[WasteWater]]
	{
		%TANK[WasteWater]
		{
			%mass = 0.0010205
			%amount = #$/RESOURCE[WasteWater]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%note = (1 L weights 1.0205 KG)
			%fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[WasteWater]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_6]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[WasteWater]]
	{
		TANK
		{
			name = WasteWater
			mass = 0.0010205
			amount = #$/RESOURCE[WasteWater]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			note = (1 L weights 1.0205 KG)
			fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_6]
{
	!RESOURCE[WasteWater] {}
	@MODULE[ModuleFuelTanks]
	{
		@volume += #$TANK[WasteWater]/maxAmount$
	}
//	%RESOURCE[WasteWater]
//	{
//		%amount = 0
//		%maxAmount = #$/MODULE[ModuleFuelTanks]/TANK[WasteWater]/maxAmount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[CarbonDioxide]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_7]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[CarbonDioxide]]
	{
		%TANK[CarbonDioxide]
		{
			%mass = 0.00087725 
			%amount = 0
			%maxAmount = 127.884
			@maxamount *= #$/CrewCapacity$
			@maxamount *= 3
			@maxAmount *= #$/mass$
			%utilization = 476.2173
			%note = (pressurized 476:1 - 1 L weights 0.87725 KG)
			%fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[CarbonDioxide]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_7]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[CarbonDioxide]]
	{
		TANK
		{
			name = CarbonDioxide
			mass = 0.00087725
			amount = 0
			maxAmount = 127.884
			@maxamount *= #$/CrewCapacity$
			@maxamount *= 3
			@maxAmount *= #$/mass$
			utilization = 476.2173
			note = (pressurized 476:1 - 1 L weights 0.87725 KG)
			fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[CarbonDioxide]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_7]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[CarbonDioxide]]
	{
		%TANK[CarbonDioxide]
		{
			%mass = 0.00087725 
			%amount = 0
			%maxAmount = #$/RESOURCE[CarbonDioxide]/maxAmount$
			@maxAmount *= #$/mass$
			%utilization = 476.2173
			%note = (pressurized 476:1 - 1 L weights 0.87725 KG)
			%fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[CarbonDioxide]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_7]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[CarbonDioxide]]
	{
		TANK
		{
			name = CarbonDioxide
			mass = 0.00087725
			amount = 0
			maxAmount = #$/RESOURCE[CarbonDioxide]/maxAmount$
			@maxAmount *= #$/mass$
			utilization = 476.2173
			note = (pressurized 476:1 - 1 L weights 0.87725 KG)
			fillable = false
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_7]
{
	!RESOURCE[CarbonDioxide] {}
	@MODULE[ModuleFuelTanks]
	{
		temp = #$TANK[CarbonDioxide]/maxAmount$
		@temp /= #$TANK[CarbonDioxide]/utilization$
		@volume += #$temp$
		!temp = delete
	}
//	%RESOURCE[CarbonDioxide]
//	{
//		%amount = 0
//		%maxAmount = #$/MODULE[ModuleFuelTanks]/TANK[CarbonDioxide]/maxAmount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[ReservePower]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,AmpYear,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_8]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[ReservePower]]
	{
		%TANK[ReservePower]
		{
			%mass = 0.00289
			%amount = 80
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%utilization = 10
			%note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],!Resource[ReservePower]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,AmpYear,!RealismOverhaul]:BEFORE[ZZZZ_GD_TACLSMFTRF_8]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[ReservePower]]
	{
		TANK
		{
			name = ReservePower
			mass = 0.00289
			amount = 80
			@amount *= #$/mass$
			maxAmount = #$amount$
			utilization = 10
			note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[ReservePower]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,AmpYear,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_8]
{
	@MODULE[ModuleFuelTanks]:HAS[@TANK[ReservePower]]
	{
		%TANK[ReservePower]
		{
			%mass = 0.00289
			%amount = #$/RESOURCE[ReservePower]/maxAmount$
			@amount *= #$/mass$
			%maxAmount = #$amount$
			%utilization = 10
			%note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			%fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0],@Resource[ReservePower]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,AmpYear,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_8]
{
	@MODULE[ModuleFuelTanks]:HAS[!TANK[ReservePower]]
	{
		TANK
		{
			name = ReservePower
			mass = 0.00289
			amount = #$/RESOURCE[ReservePower]/maxAmount$
			@amount *= #$/mass$
			maxAmount = #$amount$
			utilization = 10
			note = (1 L battery mass weights 0.289 KG and holds 10 KW)
			fillable = true
		}
	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,AmpYear,!RealismOverhaul]:AFTER[ZZZZ_GD_TACLSMFTRF_8]
{
	!RESOURCE[ReservePower] {}
	@MODULE[ModuleFuelTanks]
	{
		temp = #$TANK[ReservePower]/maxAmount$
		@temp /= #$TANK[ReservePower]/utilization$
		@volume += #$temp$
		!temp = delete
	}
//	%RESOURCE[ReservePower]
//	{
//		%amount = #$/MODULE[ModuleFuelTanks]/TANK[ReservePower]/amount$
//		%maxAmount = #$amount$
//	}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],#CrewCapacity[>0]]:NEEDS[modularFuelTanks|RealFuels,TacLifeSupport,!RealismOverhaul]:FOR[ZZZZ_GD_TACLSMFTRF_9]
{
	@MODULE[ModuleFuelTanks]
	{
		@volume *= 1.3
	}
}

Logs and all:
https://www.dropbox.com/s/4rivarjzsmk3ac9/2017-08-05-1 KSP.log.zip?dl=1

Edited by Gordon Dry
Link to comment
Share on other sites

@taniwha Could you have a look at this?  It seems like after your change, tanks can't be filled by default except by putting resources on the part.  For example, this patch in RF Stockalike should be putting EC and MonoPropellant in the tanks by default but is not (setting maxAmount is not working).  Confirmed that it was working on the previous commit.

@Gordon Dry it does seem there is an issue here, but as a word of future advice, can I suggest that you narrow down what you think isn't working instead of posting a large number of configs?  In this particular case, you're setting maxAmount = something and amount = filled and expecting the tanks to be filled by default but the were not.  That is the info I needed, the rest is just noise.

Link to comment
Share on other sites

Yeah, white noise at least. You're right.

It's difficult to differ, often I read phrases like "please provide full logs" so perhaps I mismatched the logic.

And I know the bitterness of white noise myself, like cleaning coffee cups at the sink and somebody is still talking to me...

Link to comment
Share on other sites

btw while fiddling I recognized that the specific weights of many resources seem to be chosen by random.

For example in ModuleFuelTanks type = ServiceModule the Water weights 1 kg per 100 liters.

Also the gases and fuels seem unrealistic.

Using Wolfram alpha I just checked at least for Oxygen and CarbonDioxide and just changed the values in my patch. They look good in VAB.
But I'm not sure about CarbonDioxide, the compression ratio seems too high.
I know it's not the default value from RealTankTypes.cfg - I got it from another patch because default 200 seemed by random to me.
Especially because CarbonDioxide could become solid/frozen, see https://en.wikipedia.org/wiki/Carbon_dioxide#Physical_properties
Edit: ah, well, under normal atmospheric pressure it's frozen below 194.6° K
I guess I just set it back to Utilization 200, because that is the maximum that RealFuels should support.
So now it's Oxygen / CarbonDioxide

The mass values inside TANK had to be multiplied by 10, so for example:

Default RealTankTypes.cfg:

	TANK
	{
		name = Oxygen
		mass = 0.00003
		utilization = 200
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}

changes to:

	TANK
	{
		name = Oxygen
		mass = 0.0002858
		utilization = 200
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized 200:1 - 1 L weights 0.2858 KG)
	}

in my patch.

Is this done on purpose for the stock solar system and changed to realistic values in RO ??
I didn't find any patch in my archived RO for 1.2.2 that changes the masses / ulilizations.

Edit:
some additional noise in a spoiler

Spoiler

default:


	TANK
	{
		name = Hydrogen
		mass = 0.00003
		utilization = 100
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}

should be:


	TANK
	{
		name = Hydrogen
		mass = 0.00000899
		utilization = 100
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized 100:1 - 1 L weights 8.99 grams)
	}

If MON1 is DINITROGEN TETROXIDE, then
default:


	TANK
	{
		name = MON1
		mass = 0.000081
		utilization = 1
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (pressurized)
	}

should be:


	TANK
	{
		name = MON1
		mass = 0.00145
		utilization = 1
		fillable = True
		amount = 0.0
		maxAmount = 0.0
		note = (1 L weights 1.45 KG )
	}


 

If there is interest, I could provide a more realistic RealTankTypes.cfg
I'm not sure if I should just let the note stay "(pressurized)" or be more specific, but not too much, like for example:
(200:1 / 1L = 0.286KG)
for Oxygen?

Edited by Gordon Dry
too much ideas, too much noise, too much...
Link to comment
Share on other sites

33 minutes ago, Gordon Dry said:

What I said. 1L Water = 0.01 KG is really different. :D

The resource density is defined here.  It's 0.001 t/L = 1 kg/L which is correct.  The only thing RF defines is the mass of the tank itself (not its contents).

Link to comment
Share on other sites

@Gordon Dry before you can contribute to the project you need a better understanding of what the individual configs do and what the ramifications of your changes would be. Do you really think we've been using an incorrect density for water for all these years? And that's how long some of us have been doing this for. You can't just go around making config changes willy nilly and then tell us they're more realistic when you don't understand what you're changing. You need (please) to research thoroughly what you're doing before submitting contributions.

That having been said: Yes, the mass system for tanks that RF uses does have issues but those issues stem from an abstracted system and not from incorrect values in the tank config files. As a result of that abstraction, tank masses will be too low for some tank sizes but increasing the tank mass values will penalize the most commonly used tank sizes. (rocket sized tanks as opposed to scuba tank)

Link to comment
Share on other sites

Is there a way to adjust the maximum capacity of all command pods to accomodate for Life Support Resources? I'm playing around with Kerbalism, RF/RF-Stockalike, and VSPR. I'm showing the VSPR Mk 1-2 pod with a max capacity of 150L, and an available capacity of -75.5L with Food, Water, Oxygen, EC and Nitrogen. Since the VSPR Mk 1-2 has Integrated RCS, It needs to have RCS fuel for said RCS to work. Since I cant add Hydrazine to the pod, my RCS is useless, and since I use ManatoryRCS, I have almost no control.

Link to comment
Share on other sites

2 hours ago, DJ Reonic said:

Is there a way to adjust the maximum capacity of all command pods to accomodate for Life Support Resources? I'm playing around with Kerbalism, RF/RF-Stockalike, and VSPR. I'm showing the VSPR Mk 1-2 pod with a max capacity of 150L, and an available capacity of -75.5L with Food, Water, Oxygen, EC and Nitrogen. Since the VSPR Mk 1-2 has Integrated RCS, It needs to have RCS fuel for said RCS to work. Since I cant add Hydrazine to the pod, my RCS is useless, and since I use ManatoryRCS, I have almost no control.

The volume of the module needs increasing. You could patch it yourself but really whatever patch added the resources probably needs fixing. 

 

I also have  an idea I'd been planning on implementing that would make it easier to patch in life support resources that would prevent MFT from trampling all over them but I'd held off because feedback was practically nonexistent.  

But what you can do is

@PART[partname]
{
	@MODULE[ModuleFuelTanks]
	{
		@volume += (whatever extra vol in liters you need)
	}
}

 

Edited by Starwaster
Link to comment
Share on other sites

14 hours ago, Starwaster said:

The volume of the module needs increasing. You could patch it yourself but really whatever patch added the resources probably needs fixing. 

 

I also have  an idea I'd been planning on implementing that would make it easier to patch in life support resources that would prevent MFT from trampling all over them but I'd held off because feedback was practically nonexistent.  

But what you can do is


@PART[partname]
{
	@MODULE[ModuleFuelTanks]
	{
		@volume += (whatever extra vol in liters you need)
	}
}

 

I tried several variotions of this and am still not seeing any change. I'm going to continue to play around with it (learn more about MM) and see what I get. If you are still considering that Life Support thing, I'd be happy to test it for you. I'm going to try a duplication and modification of the Kerbalism Default Profile and see how that works.

Edited by DJ Reonic
Link to comment
Share on other sites

@Gordon Dry I think that belongs in RF stockalike, not the base RF.  Remember that RF is used by Realism Overhaul too, and auto-balancing doesn't really make sense there.  Also I think RF stockalike already has life support patches, but with tank autofill broken they aren't doing their job.

Link to comment
Share on other sites

1 hour ago, blowfish said:

Also I think RF stockalike already has life support patches

Yes, but that portion doesn't read the stock resources but always uses generic calculations. And it uses final. I had to prune these lines.

1 hour ago, blowfish said:

I think that belongs in RF stockalike

My suggestion is code-wise, not patch wise.

Link to comment
Share on other sites

RealFuels v12.2.4 and v12.3.0 are released which should fix the resource bug

Please make sure you have the correct version of RealFuels for your version of KSP.  They are not cross-compatible

v12.2.4 is for KSP 1.2.2 only and can be downloaded here

v12.3.0 is for KSP 1.3 only and can be downloaded here

Sorry about having multiple versions out at the same time, having to keep supporting 1.2.2 while 1.3 is out is proving to be rather complicated

Edited by blowfish
Link to comment
Share on other sites

22 minutes ago, Gordon Dry said:

With "resource bug" did you mean the issue I mentioned that TAC-LS tanks are not filled by MM patches?

If yes, it still does not work.

Are you talking about the patches that come with RF Stockalike or some custom ones?  If it's custom, could you check whether the default ones in RF Stockalike are working as expected with no custom stuff?  I'm at work right now and can't look myself.

Edited by blowfish
Link to comment
Share on other sites

On 15.08.2017 at 9:13 PM, blowfish said:

could you check whether the default ones in RF Stockalike are working as expected with no custom stuff?

No. It's just drop monopropellant instead of converting it to hydrazine. Judging by ModuleManager's config cache it's just not see TAC-LS fuel tanks:

MODULE
{
	name = ModuleFuelTanks
	type = LifeSupportAll
	basemass = -1
	volume = 3.549
}

And this config don't work too. It's create empty fuel tank, but don't fill it:

Y3bbcS8m.png

P.S. I also found that RF don't touch fuel tanks when loading saved ships. Don't know is it bug or feature:

kRpIloKm.png

Edited by Canis Dirus Leidy
Link to comment
Share on other sites

2 hours ago, blowfish said:

(i.e. command pods pre-populate with life support resources).

Problem isn't in the life support resources, but monopropellant/hydrazine conversion:

1rCB3Gkm.jpg

P.S. Tried luck with clean KSP 1.2.2 install (just RealFuels 1.2.2.4/Module Manager 2.7.6 and RFStockalike engines configs) - all works like a charm. Almost same config (RealFuels 1.2.3/ModuleManager 2.8.1 or 2.8.0) with KSP 1.3 - empty tanks in pods and SRBs.

P.P.S. TAC LS (v0.13.0)/RealFuels/RFStockalike combo in KSP 1.2.2 don't work either. Same problem with non-existing tanks for monopropellant.

Edited by Canis Dirus Leidy
Link to comment
Share on other sites

Ugh, OK, definitely reproduced the issue with the solids.  Turns out I didn't actually revert those commits on the 1.3 branch.  This is why I really hate having two branches right now.  Will have a fix shortly.

As for the issue with command pods not being able to accept RCS fuel, I think that TAC and RF Stockalike aren't cooperating - they are getting the LifeSupportAll tank type but should be getting ServiceModule.  Not sure which side the fix needs to go on but it isn't a pure RF issue per se.

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