sarbian

[1.4.0-1.7.x] Module Manager 4.0.3 (August 9th 2019) - Right To Ludicrous Speed

Recommended Posts

I pushed a small v2.4.5.

It let's you use more than one part name for a pach by separating with ',' or '|'. ie :

@PART[part1,part2]

@PART[part1|part2]

@PART[b9_*,TV_*]

Not tested because I am lazy today, and it was a small change (and I'll pay Murphy a beer).

Get it somewhere around here : https://ksp.sarbian.com/jenkins/job/ModuleManager/

Share this post


Link to post
Share on other sites

I sadly still cannot get it to work. Here is a sample config file:

@PART[liquidEngine] //LV-T30
{
@MODULE[ModuleEngines]
{
@maxThrust *= 0.85
@atmosphereCurve
{
@key = 0 316
@key = 1 272
}

}
}

The thrust scales fine, but the Isp remains unchanged. I also tried this:

@PART[liquidEngine] //LV-T30
{
@MODULE[ModuleEngines]
{
@maxThrust *= 0.85
@atmosphereCurve
{
key = 0 316
key = 1 272
}

}
}

But that did not work either.

Share this post


Link to post
Share on other sites

Since both Isp properties have the same name (key), you need to reference them by index (the order they appear in the original config). This works:

@PART[liquidEngine] //LV-T30 
{
@MODULE[ModuleEngines]
{
@maxThrust *= 0.85
@atmosphereCurve
{
@key,0 = 0 316
@key,1 = 1 272
}

}
}

Share this post


Link to post
Share on other sites

Thats because both key lines are editing the first. You have to use an index when there's multiple values with the same name.

Check the examples above you.

:Edit: Ninja'd my master :P

Share this post


Link to post
Share on other sites
Since both Isp properties have the same name (key), you need to reference them by index (the order they appear in the original config). This works:

@PART[liquidEngine] //LV-T30 
{
@MODULE[ModuleEngines]
{
@maxThrust *= 0.85
@atmosphereCurve
{
@key,0 = 0 316
@key,1 = 1 272
}

}
}

So now I have to change all that by hand. Great. Anyways, thanks for the help!

Share this post


Link to post
Share on other sites

Hi, dunno if it is something related directly to MM , but when using in conjuction with TweakScale 1.43 , there is a bug with camera mode ( view get zoomed out ):

with no other mods rather than MM and Tweakscale 1.43

1. Launch craft

2. Try to change camera, all is ok

3. Revert to launch

4. Change camera and....bug

I have tryed also ModuleManager.2.3.4 and ModuleManager.2.4.5 with same result , something messed up with tweakscale?

output log https://www.dropbox.com/s/6ecv2wb8kqu0nwk/output_log.zip?dl=0

Edited by brusura

Share this post


Link to post
Share on other sites

Not a MM bug; MM just changes cfgs before they are read by KSP. If you remove it, TweakScale no longer gets applied to anything, that's all.

Share this post


Link to post
Share on other sites
Not a MM bug; MM just changes cfgs before they are read by KSP. If you remove it, TweakScale no longer gets applied to anything, that's all.

Got it, I tryed with only the Mark1Cockpit TweakScale and MM , only one patch is applied during loading screen and the bug is still present, I guess Biotronic could help then

Share this post


Link to post
Share on other sites

Since "hidden" parts must still load textures etc. to keep old ships from breaking they are still using memory. what I am looking for is if MM can somehow interrupt the loading of these hidden parts and get them to just not load at all. something that checks for the hidden flag and then maybe deletes all lines from the .cfg. or maybe just the "PART" line... I do not know what or how it would work, so hoping someone here may have an idea.

Share this post


Link to post
Share on other sites
Since "hidden" parts must still load textures etc. to keep old ships from breaking they are still using memory. what I am looking for is if MM can somehow interrupt the loading of these hidden parts and get them to just not load at all. something that checks for the hidden flag and then maybe deletes all lines from the .cfg. or maybe just the "PART" line... I do not know what or how it would work, so hoping someone here may have an idea.

No, it cannot.

Share this post


Link to post
Share on other sites

Not only that, it's not loading *parts* that takes up memory, it's loading textures. As of KSP 0.20, textures are loaded independently of models are loaded independently of cfgs; only once *everything* is loaded into memory do they get connected.

Share this post


Link to post
Share on other sites

As NathanKell said any mbm, png & tga (more?) file in gamedata is loaded, regardless of their usage. If you don't want unused texture to be loaded have a look at LoadOnDemand

Share this post


Link to post
Share on other sites
I pushed a small v2.4.5.

It let's you use more than one part name for a pach by separating with ',' or '|'. ie :

@PART[part1,part2]

@PART[part1|part2]

@PART[b9_*,TV_*]

Not tested because I am lazy today, and it was a small change (and I'll pay Murphy a beer).

Get it somewhere around here : https://ksp.sarbian.com/jenkins/job/ModuleManager/

What would be the odds of possible ! functionality since multiple arguments can be passed here now? Basically to be able to have wildcard searches with exclusions. For example:

@PART[mod*|!modSpecialPart]
{
do stuff
}

Or possibly just giving one of these two separators this function if that's easier?

Share this post


Link to post
Share on other sites
What would be the odds of possible ! functionality since multiple arguments can be passed here now? Basically to be able to have wildcard searches with exclusions. For example:

@PART[mod*|!modSpecialPart]
{
do stuff
}

Or possibly just giving one of these two separators this function if that's easier?

You could write that as something like @PART[mod*]:HAS[~name[modSpecialPart]] without using the new features. (I could be wrong on the negation inside the HAS block; I couldn't find that in the documentation.)

Share this post


Link to post
Share on other sites
You could write that as something like @PART[mod*]:HAS[~name[modSpecialPart]] without using the new features. (I could be wrong on the negation inside the HAS block; I couldn't find that in the documentation.)

You're not wrong at all and I can't believe I didn't think of that already, thanks.

Share this post


Link to post
Share on other sites

I've been experiencing a problem removing a module that has a tag. I have messed with it for a few hours and just can't see what I'm doing wrong. I'm sure it is something simple....

The module as it exists is:


MODULE{
name = BioGen
tag = Photosynthesis
bioLabel = Oxygen Production
AlwaysActive = true
RequiresAllInputs = true
hasMax = true
bioIn{
Light = 0.5
ElectricCharge = 5
Nutrients = 0.0001
CarbonDioxide = 0.0008
}
bioOut{
Oxygen = 0.0001
}
}

and the MM line I'm using is:


-MODULE[BioGen,Photosynthesis]{}

I know I am targeting the correct part because I can change the description using @desctiption. At first I thought there might be some non printing characters in the tag, or maybe there was some space trailing problems, but I just can't find anything wrong. Help?

Share this post


Link to post
Share on other sites
try this:

-MODULE[BioGen]:HAS[#tag[Photosynthesis]] {}

Note the space before the {} ...

Thank you so much. That did it, but shouldn't what I was doing have worked too? I tried altering my line to put a space before the {} and it still didn't work.

Very frustrating.

Share this post


Link to post
Share on other sites
Thank you so much. That did it, but shouldn't what I was doing have worked too? I tried altering my line to put a space before the {} and it still didn't work.

Very frustrating.

Just a hunch but I think that recent changes might have broken the tag system. (specifically, the recent addition to parse multiple CSV nodes within a single pair of brackets)

Additionally, spaces in front of a pair of braces are not necessary. Why is this still going around?

Consider the following: The first set of configs will have exactly the same result as the second.


@PART
[*]:HAS[@RESOURCE[ElectricCharge]]
{
!RESOURCE[ElectricCharge]{}
}


@PART
[*]:HAS[@RESOURCE[ElectricCharge]]
{
!RESOURCE[ElectricCharge] {}
}

I have almost 100 sets of config tweaks accumulated over the past year that I've written myself and have never had any fail because it lacked a space in front of a pair of braces.

Share this post


Link to post
Share on other sites

I have a feature request, no idea if it's possible or not.

Could parts be modified based on the folder name? So you could have something like:

@Part[*]:FOLDER[universalStorage/Parts]

Where folder is the path under GameData

This would effect every part in that directory and sub directories.

Share this post


Link to post
Share on other sites

Hi. I was wondering if someone could help me. I'm writing a MM patch to make a Realism Overhaul engine based on an engine from SXT.

The game won't load past the SXT engine which I've modded and I can't figure out why. I'm using Module Manager 2.4.4, from B9 I think.

Original part:

PART
{
// Kerbal Space Program - Part Config
//

// --- general parameters ---
name = SXTLT80
module = Part
author = Lack

// --- asset parameters ---

MODEL
{
model = SXT/Parts/Engine/J2Engine/model
texture = model000 , Squad/Parts/Engine/liquidEngine2/model000
texture = model001 , Squad/Parts/Engine/liquidEngine2/model001
texture = model004 , Squad/Parts/FuelTank/fuelTank_long/model000
texture = model005_NRM , Squad/Parts/FuelTank/fuelTank_long/model001
scale = 0.46 , 0.5 , 0.46
}
scale = 1
rescaleFactor = 1

// --- node definitions ---
node_stack_top = 0.0, 0, 0.0, 0.0, 1.0, 0.0 , 2
node_stack_bottom = 0.0, -1.5325, 0.0, 0.0, 1.0, 0.0 , 2
node_attach = 0.0, 0.12, 0.0, 0.0, 1.0, 0.0 , 2

// --- FX definitions ---

fx_exhaustFlame_blue = 0.0, -5.74338, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -5.74338, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -5.74338, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustSparks_flameout = 0.0, -5.74338, 0.0, 0.0, 1.0, 0.0, flameout

// --- Sound FX definition ---

sound_vent_medium = engage
sound_rocket_hard = running
sound_vent_soft = disengage
sound_explosion_low = flameout

// --- editor parameters ---
TechRequired = advRocketry
entryCost = 3500
cost = 1200
category = Propulsion
subcategory = 0
title = LV-T80 Liquid Fuel Engine
manufacturer = LLL
description = [SXT\Parts\Engine\J2Engine\part.cfg]

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,0,0

// --- standard part parameters ---
mass = 3
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 3600

MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 480
heatProduction = 400
fxOffset = 0, 0, 0.574338
PROPELLANT
{
name = LiquidFuel
ratio = 0.9
DrawGauge = True
}
PROPELLANT
{
name = Oxidizer
ratio = 1.1
}
atmosphereCurve
{
key = 0 360
key = 1 300
}

}

MODULE
{
name = ModuleJettison
jettisonName = fairing
bottomNodeName = bottom
isFairing = True
jettisonedObjectMass = 0.1
jettisonForce = 5
jettisonDirection = 0 0 1
}

MODULE
{
name = ModuleAnimateHeat
ThermalAnim = J2anim
}

// The gimbal module works just fine. I've tabbed it out in case you want to use it.
//MODULE
//{
//name = ModuleGimbal
//gimbalTransformName = gimbal
//gimbalRange = 1
//}

MODULE
{
name = ModuleAlternator
RESOURCE
{
name = ElectricCharge
rate = 1.0
}
}
RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 0
}

}

My MM patch:

 @PART[SXTLT80]:FOR[RealismOverhaul]:NEEDS[!RftS,!RealFuels_StockEngines]
{

%RSSROConfig = true
%yearIntroduced = 1961
%title = Blackstone
%manufacturer = EDS Industries
%description = An early rocket by EDS industries. Made for spaceplanes. Throttleable.

@mass = 0.178
%breakingForce = 100
%breakingTorque = 100

!MODULE[ModuleAlternator]{}
!RESOURCE[ElectricCharge]{}
!MODULE[ModuleJettison]{}
!MODULE[ModuleGimbal]{}
!MODULE[TweakScale]{}

@MODEL
{
@scale = 0.42 , 0.4 , 0.42
}

@MODULE[ModuleEngines*]
{
@minThrust = 58.7
@maxThrust = 82.5
@heatProduction = 170
@atmosphereCurve
{
@key,0 = 255
@key,1 = 225
}

@PROPELLANT[LiquidFuel]
{
@name = Alcohol
@ratio = 0.491
}
@PROPELLANT[Oxidizer]
{
@name = LiquidOxygen
@ratio = 0.509
}
}

MODULE
{
name = ModuleEngineConfigs
configuration = Mk.1 Alcohol+LiquidOxygen
modded = false

CONFIG
{
name = Mk.1 Alcohol+LiquidOxygen
minThrust = 58.7
maxThrust = 82.5
heatProduction = 170

PROPELLANT
{
name = Alcohol
ratio = 0.491
Drawgauge = True
}
PROPELLANT
{
name = LiquidOxygen
ratio = 0.509
}
atmosphereCurve
{
key = 0 255
key = 1 225
}
}

CONFIG
{
name = Mk.2 Kerosene+LiquidOxygen
minThrust = 66.8
maxThrust = 109.7
heatProduction = 220

PROPELLANT
{
name = Kerosene
ratio = 0.360
Drawgauge = True
}
PROPELLANT
{
name = LiquidOxygen
ratio = 0.640
}
atmosphereCurve
{
key = 0 324
key = 1 264
}
}

CONFIG
{
name = Mk.3 Kerosene+LiquidOxygen
minThrust = 69.6
maxThrust = 128.7
heatProduction = 220

PROPELLANT
{
name = Kerosene
ratio = 0.360
Drawgauge = True
}
PROPELLANT
{
name = LiquidOxygen
ratio = 0.640
}
atmosphereCurve
{
key = 0 331
key = 1 276
}
}
}

MODULE
{
name = KM_Gimbal
gimbalTransformName = gimbal
yawGimbalRange = 1
pitchGimbalRange = 1
enableRoll = true
}

MODULE
{

name = ModuleEngineIgnitor
ignitionsAvailable = 10
autoIgnitionTemperature = 600
ignitorType = Electric
useUllageSimulation = True
isPressureFed = True

IGNITOR_RESOURCE
{
name = ElectricCharge
amount = 2
}
}
}

I'm sure it's just a beginners mistake. But it would be very much appreciated if anyone could point it out for me. Thanks.

Share this post


Link to post
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.