Jump to content

[1.8.x-1.12.x] Module Manager 4.2.3 (July 03th 2023) - Fireworks season


sarbian

Recommended Posts

quick question:

when I have

I can use

#$key[1, ]$

to get the value "x"

what If I want to do the same thing with this:

I guess the space after the comma in

[1, ]

means that the separator used is "space"

I would guess this wont work

[1,,]

so is there a way to define "comma" as the separator?

The comma is the default separator:

#$key[1]$

Link to comment
Share on other sites

on an unrelated note,

I may be missing this, but is it possible to check if a module has at least one key with a value different from x?

for example


Module
{
key = OK
key = OK
key = OK
}
Module
{
key = OK
key = OK
key = OK
key = OK
key = OK
}
Module
{
key = OK
key = Banana
}
Module
{
key = Airplane
key = OK
key = Tuesday
}

I want to make an :HAS filter that will find the third and fourth "Module" since they have at least one "key" with a value different from "OK"

Edit:

I solved this by using a logic that didn't require that feature :)

Edited by Sigma88
Link to comment
Share on other sites

Question... what does the "Quick Reload Database" option do in comparison to "Reload Database"? It's faster, but does it skip anything/what?

It skips the rebuild of the drag cubes (the partdatabase.cfg or something like that)

Stickman939 : if it does that then you have a patch that change something somewhere in your gamedata

Link to comment
Share on other sites

Hello.

I need help writing a .cfg file

I have the following nodes inside a bracket called TANK_DEFINITIONS:


TANK_DEFINITION
{
name = Default
highlyPressurized = False
basemass = 0.000016 * volume
TANK
{
name = LqdOxygen
mass = 0.000014
utilization = 1
fillable = True
amount = 0.0
maxAmount = 0.0
temperature = 90.15
loss_rate = 0.000000005
note = (lacks insulation)
}

How do I access the TANK nodes? I think it goes something like:


@TANK_DEFINITION:HAS[RealismOverhaul]
{
@TANK[LqdOxygen]
{
@mass:
}
}

What should I write?

Link to comment
Share on other sites

You're right up to the @mass: which should instead be @mass=1 if you wanted 1 ton, or @mass=1.5 if you want 1.5 tons, etc.

- - - Updated - - -

You're right up to the @mass: which should instead be @mass=1 if you wanted 1 ton, or @mass=1.5 if you want 1.5 tons, etc.

Oh also change

@TANK_DEFINITION:HAS[RealismOverhaul]

to

@TANK_DEFINITION[Default]:HAS[RealismOverhaul]

Link to comment
Share on other sites

Hello.

I need help writing a .cfg file

I have the following nodes inside a bracket called TANK_DEFINITIONS:


TANK_DEFINITION
{
name = Default
highlyPressurized = False
basemass = 0.000016 * volume
TANK
{
name = LqdOxygen
mass = 0.000014
utilization = 1
fillable = True
amount = 0.0
maxAmount = 0.0
temperature = 90.15
loss_rate = 0.000000005
note = (lacks insulation)
}

How do I access the TANK nodes? I think it goes something like:


@TANK_DEFINITION:HAS[RealismOverhaul]
{
@TANK[LqdOxygen]
{
@mass:
}
}

What should I write?

If by


@TANK_DEFINITION[B]:HAS[RealismOverhaul][/B]

you mean that the patch has to be applyed only if RealismOverhaul is installed you should change

:HAS to :NEEDS

Link to comment
Share on other sites

Nope.


@TANK_DEFINITION[Default]
{
@TANK[[COLOR=#333333]LqdOxygen]
[/COLOR]{
@mass = xxxxx
}
}

@Krakenfour : He has a good point, there would be no tank definitions if RF is not installed, so no need for a FOR or NEEDS section at all if it's your own personal installation. (And technically it would do no work even if you didn't have it installed.) Also, just realized it was HAS and not FOR... yea that was wrong too. HAS checks for the presence of blocks and variables. FOR is used to prioritize a part for its mod.

Link to comment
Share on other sites

@Krakenfour : He has a good point, there would be no tank definitions if RF is not installed, so no need for a FOR or NEEDS section at all if it's your own personal installation. (And technically it would do no work even if you didn't have it installed.) Also, just realized it was HAS and not FOR... yea that was wrong too. HAS checks for the presence of blocks and variables. FOR is used to prioritize a part for its mod.

Here's the completed file that removes most of the resource tanks from real fuels:


@TANK_DEFINITION[Default]:FINAL
{
!TANK[NTO]
{
}
!TANK[UDMH]
{
}
!TANK[Aerozine50]
{
}
!TANK[HTP]
{
}
!TANK[AvGas]
{
}
!TANK[IRFNA-III]
{
}
!TANK[Aniline]
{
}
!TANK[Ethanol75]
{
}
!TANK[Ethanol90]
{
}
!TANK[LqdAmmonia]
{
}
!TANK[ClF3]
{
}!TANK[ClF5]
{
}
!TANK[Diborane]
{
}
!TANK[Pentoborane]
{
}
!TANK[Ethane]
{
}
!TANK[Ethylene]
{
}
!TANK[OF2]
{
}
!TANK[LqdFluorine]
{
}
!TANK[N2F4]
{
}
!TANK[Methanol]
{
}
!TANK[Furfuryl]
{
}
!TANK[UH25]
{
}
!TANK[Tonka250]
{
}
!TANK[Tonka500]
{
}
!TANK[IWFNA]
{
}!TANK[IRFNA-IV]
{
}
!TANK[AK20]
{
}
!TANK[AK27]
{
}
!TANK[MON1]
{
}
!TANK[MON3]
{
}
!TANK[MON10]
{
}
!TANK[MON15]
{
}
!TANK[MON20]
{
}
!TANK[MON25]
{
}
!TANK[Hydyne]
{
}
!TANK[Syntin]
{
}
!TANK[LiquidFuel]
{
}
!TANK[Oxidizer]
{
}
!TANK[LeadBallast]
{
}
}
@TANK_DEFINITION[Cryogenic]:FINAL
{
@basemass = 0.000025 * volume
!TANK[NTO]
{
}
!TANK[UDMH]
{
}
!TANK[Aerozine50]
{
}
!TANK[HTP]
{
}
!TANK[AvGas]
{
}
!TANK[IRFNA-III]
{
}
!TANK[Aniline]
{
}
!TANK[Ethanol75]
{
}
!TANK[Ethanol90]
{
}
!TANK[LqdAmmonia]
{
}
!TANK[ClF3]
{
}!TANK[ClF5]
{
}
!TANK[Diborane]
{
}
!TANK[Pentoborane]
{
}
!TANK[Ethane]
{
}
!TANK[Ethylene]
{
}
!TANK[OF2]
{
}
!TANK[LqdFluorine]
{
}
!TANK[N2F4]
{
}
!TANK[Methanol]
{
}
!TANK[Furfuryl]
{
}
!TANK[UH25]
{
}
!TANK[Tonka250]
{
}
!TANK[Tonka500]
{
}
!TANK[IWFNA]
{
}!TANK[IRFNA-IV]
{
}
!TANK[AK20]
{
}
!TANK[AK27]
{
}
!TANK[MON1]
{
}
!TANK[MON3]
{
}
!TANK[MON10]
{
}
!TANK[MON15]
{
}
!TANK[MON20]
{
}
!TANK[MON25]
{
}
!TANK[Hydyne]
{
}
!TANK[Syntin]
{
}
!TANK[LiquidFuel]
{
}
!TANK[Oxidizer]
{
}
!TANK[LeadBallast]
{
}
}
!TANK_DEFINITION[Structural]:FINAL
{
}
!TANK_DEFINITION[Balloon]:FINAL
{
}
!TANK_DEFINITION[BalloonCryo]:FINAL
{
}
@TANK_DEFINITION[Electric_Propulsion]:FINAL
{
!TANK[KryptonGas]
{
}
!TANK[ElectricCharge]
{
}
!TANK[Hydrogen]
{
}
!TANK[LeadBallast
{
}
}

Anything pointedly wrong?

Link to comment
Share on other sites

You could shorten it by combining all the tank removals inside the same block into a single line using the | operator like !TANK[KryptonGas|ElectricCharge] but of course just keep adding |name|name for all the types.

Link to comment
Share on other sites

You could shorten it by combining all the tank removals inside the same block into a single line using the | operator like !TANK[KryptonGas|ElectricCharge] but of course just keep adding |name|name for all the types.

Oooh, nice.

Module manager is just so handy, isn't it?

Link to comment
Share on other sites

I just want to make sure that the following Module Manager patch will remove the upgrade options from the RO engines, and not break them instead:


@PART[LR87LH2Vac]:AFTER[RealismOverhaul]
{
@description = Aerojet developed the LR87 engine (used for the Titan series) into a liquid hydrogen/oxygen engine for prospective USAF contracts in the 1958-1960 period. This version represents a version of the engine with a larger nozzle optimized for vacuum use.
@MODULE[ModuleEngines*]
{
@minThrust = 0
}
!MODULE[ModuleEngineConfigs]
{
}
}

Intended behavior: Engine can be throttled to zero thrust, engine cannot be upgraded in the VAB.

Link to comment
Share on other sites

@Krakenfour: Not really kosher to be posting identical posts in two threads just to get an answer. As I just said in the RO thread. No that will break function. You'll need to keep at least one Config node in ModuleEngineConfigs. Not get rid of it entirely. Otherwise you are probably removing all aspects of what RealFuels fixes.

Link to comment
Share on other sites

I just want to make sure that the following Module Manager patch will remove the upgrade options from the RO engines, and not break them instead:


@PART[LR87LH2Vac]:AFTER[RealismOverhaul]
{
@description = Aerojet developed the LR87 engine (used for the Titan series) into a liquid hydrogen/oxygen engine for prospective USAF contracts in the 1958-1960 period. This version represents a version of the engine with a larger nozzle optimized for vacuum use.
@MODULE[ModuleEngines*]
{
@minThrust = 0
}
!MODULE[ModuleEngineConfigs]
{
}
}

Intended behavior: Engine can be throttled to zero thrust, engine cannot be upgraded in the VAB.

Looks good

- - - Updated - - -

@Krakenfour: Not really kosher to be posting identical posts in two threads just to get an answer. As I just said in the RO thread. No that will break function. You'll need to keep at least one Config node in ModuleEngineConfigs. Not get rid of it entirely. Otherwise you are probably removing all aspects of what RealFuels fixes.

No, he'll be left with what's in ModuleEngines/ModuleEnginesFX

Link to comment
Share on other sites

More help please :(

I have these two engines:


@PART[microEngine]:FOR[RealismOverhaul]:NEEDS[!RftS,!RealFuels_StockEngines]
{
%RSSROConfig = True
!MODULE[TweakScale]
{
}
@MODEL:NEEDS[VenStockRevamp]
{
@model = VenStockRevamp/Squad/Parts/Propulsion/LV-1B
}

%title = Generic 1kN Thruster
%manufacturer = Generic
%description = Thruster for orbital maneuvers, similar to ones used in the Galileo probe.
%attachRules = 1,1,1,0,0
%mass = 0.015
%maxTemp = 1973.15
!MODULE[ModuleJettison],*:NEEDS[VenStockRevamp] {} // no tankbutss in LV-1B model
!node_stack_top1 = DEL // no tankbutts in model, no need for extra node.
@MODULE[ModuleEngines*]
{
%maxThrust = 1.618
%minThrust = 1.618
%heatProduction = 17.5
@atmosphereCurve
{
@key,0 = 0 321
@key,1 = 1 112
}
@PROPELLANT[LiquidFuel]
{
@name = MMH
@ratio = 0.504
}
@PROPELLANT[Oxidizer]
{
@name = NTO
@ratio = 0.496
}
ullage = False
pressureFed = True
IGNITOR_RESOURCE
{
name = ElectricCharge
amount = 0.01
}
}
useRcsConfig = RCSBlock4x
useRcsCostMult = 0.25
useRcsMass = True
}
+PART[microEngine]:FOR[RealismOverhaul]:NEEDS[!RftS,!RealFuels_StockEngines]
{
@name = ROAJ10-137
%RSSROConfig = True
!MODULE[TweakScale]
{
}
!mesh = DEL
!MODEL {}
MODEL
{
model = Squad/Parts/Engine/liquidEngineLV-1/model
scale = 17.5, 17.5, 17.5
position = 0.0, 2.0, 0.0
}
%node_stack_top = 0.0, 0.01, 0.0, 0.0, 1.0, 0.0, 4
%node_attach = 0.0, 0.016, 0.01, 0.0, 1.0, 0.0, 4
%node_stack_bottom = 0.0, -2.93, 0.0, 0.0, -1.0, 0.0, 3
%attachRules = 1,1,1,0,0
@title = AJ10-137 (SPS) [3.9 m]
%manufacturer = Aerojet
@description = The Aerojet AJ10-137 rocket engine used on the Apollo Service Module as the Service Propulsion System (SPS).
@mass = 0.650
@maxTemp = 1973.15
!MODULE[ModuleEngineConfigs] {}
@MODULE[ModuleEngines*]
{
@minThrust = 97.86
@maxThrust = 97.86
@heatProduction = 100
@PROPELLANT[LiquidFuel]
{
@name = Aerozine50
@ratio = 0.502
}
@PROPELLANT[Oxidizer]
{
@name = NTO
@ratio = 0.498
}
@atmosphereCurve
{
@key,0 = 0 314
@key,1 = 1 150
}
%ullage = True
%pressureFed = True
!IGNITOR_RESOURCE,* {}
IGNITOR_RESOURCE
{
name = ElectricCharge
amount = 0.5
}
}
!MODULE[ModuleAlternator]
{
}
MODULE
{
name = ModuleGimbal
gimbalTransformName = thrustTransform
gimbalRange = 4.5
useGimbalResponseSpeed = true
gimbalResponseSpeed = 16
}
MODULE
{
name = ModuleEngineConfigs
type = ModuleEngines
modded = false
configuration = AJ10-137
CONFIG
{
name = AJ10-137
minThrust = 97.86
maxThrust = 97.86
heatProduction = 100
PROPELLANT
{
name = Aerozine50
ratio = 0.502
DrawGauge = True
}
PROPELLANT
{
name = NTO
ratio = 0.498
}
atmosphereCurve
{
key = 0 314
key = 1 150
}
}
}
!useRcsConfig = DEL
!useRcsCostMult = DEL
!useRcsMass = DEL
}

1) How do I specify which engine I am modifying, as they are both parts created from [microEngine].

I've thought up of this:

@PART[microEngine]:AFTER[RealismOverhaul]:HAS[#manufacturer[Generic]]

Basically, I use a HAS restriction.

2) I'm unsure about modifying the RESOURCE nodes.

Should I assume that they have been modified by RealismOverhaul and do this:

@PROPELLANT[MMH]		{
@name = UDMH


or should I continue with this:


@PROPELLANT[LiquidFuel]
{
@name = UDMH

?

Thanks for the help, as always.

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