Jump to content

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


sarbian

Recommended Posts

Kerbas_ad_astra: @ means modify and % means modify-or-create. When you modify a value, of necessity the old value is clobbered because there's only one of it. When you modify a node, however, you're modifying it non-destructively because there's no old value to clobber.

Link to comment
Share on other sites

I'm still not getting why that is the case. Couldn't a node get pruned and replaced just like a value within a node? I can see that there may be many nodes of the same type within a config node (e.g. MODULE), but there can be many values associated with the same key (e.g. all of the "default=whatever" lines in ScienceDefs.cfg), and ModuleManager provides syntax for selecting which one in particular should be modified.

Link to comment
Share on other sites

It's a matter of code complexity and use case. So far no use case came forward that justify the increased code complexity (and as far as I remember it is way more complex for a node).

% for a node is already a bit complex to use since the result is not as clear as with values (you can end up with an near empty node) and the use case are few.

Link to comment
Share on other sites

But @ and % don't mean replace, they mean *edit*.

It just so happens that if there's only one thing to edit, editing it means replacing it, whereas with nodes, nothing happens unless you also do stuff to the values inside them

@NODE[foo]

{

}

does nothing because nodes are containers for values, they don't have values themselves. @ was chosen for good reason; if you're confused, say it out loud.

@FOO

{

@bar = zzz

}

"At node FOO, at value bar, set it equal to zzz."

Link to comment
Share on other sites

I think it's finally sinking in for me (if I understand correctly, ModuleManager is focused on modifying things line-by-line at the key-value scale, not so much at the node level). Thanks for being patient.

However, in the documentation, % is explicitly said to mean "replace", which is the source of my confusion. Maybe "edit-or-create" would be a better term.

Link to comment
Share on other sites

What does this error message mean? something wrong with the config itself (Syntax error, etc)? or something wrong with a part the config is modifying?

[ModuleManager] ModuleManager: 837 patches applied, found 1 error
1 error in GameData/RetroFuture/Patches/RF_DRCPatch.cfg

Link to comment
Share on other sites

What does this error message mean? something wrong with the config itself (Syntax error, etc)? or something wrong with a part the config is modifying?

[ModuleManager] ModuleManager: 837 patches applied, found 1 error
1 error in GameData/RetroFuture/Patches/RF_DRCPatch.cfg

IIRC, it does mean a config error. Maybe a missing bracket or brace. (if you use Notepad++, that's easy to check for. Do a count first for { then for }. Both counts need to come back the same. [ and ] as well)

Link to comment
Share on other sites

Is there any operator for "OR" for the search-parameters' nodes?

Here is what I'm trying to do; It's probably easier to understand:


@PART[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngines]:HAS[@PROPELLANT[XenonGas] [U][B]OR[/B][/U] @PROPELLANT[ArgonGas] [U][B]OR[/B][/U] @PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final
{
@minThrust = 0
@maxThrust *= 10
}

The operator, or examples for cases such as this aren't specified in the documentation (or I missed it, twice)...

Link to comment
Share on other sites

| is or.

I tried using | but it doesn't seem to be working. How can I verify for sure?

[EDIT] I think I might have found the problem...Or at least something that could be a problem if I wasn't using the standard configs of the ION engines...


//Deals with standard config
@PART[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final
{
@minThrust = 0
@maxThrust *= 100
}

//Deals with extra RF|MFT configs
@PART[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final
{
@minThrust = 0
@maxThrust *= 100
}

[EDIT-2]

Ok...I've found the logs and the patches seem to be applied, or at least logged...However I am not sure the changes are taking effect in-game at all, or at least in the way I expected them to...


[LOG 12:59:27.794] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to KSPX/Parts/Utility/small_ionEngine/part/cl_small_ionEngine
[LOG 12:59:27.800] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625/ionArgon-0625
[LOG 12:59:27.801] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionArgon-0625-2/ionArgon-0625-2/ionArgon-0625-2
[LOG 12:59:27.803] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionArgon-125/ionArgon-125/ionArgon-125
[LOG 12:59:27.804] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625/ionXenon-0625
[LOG 12:59:27.806] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-0625-2/ionXenon-0625-2/ionXenon-0625-2
[LOG 12:59:27.807] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-0625-3/ionXenon-0625-3/ionXenon-0625-3
[LOG 12:59:27.808] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-125/ionXenon-125/ionXenon-125
[LOG 12:59:27.810] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-25/ionXenon-25/ionXenon-25
[LOG 12:59:27.815] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to RLA_Stockalike/Parts/Engine/ec_arcjet/part/RLA_arcjet
[LOG 12:59:27.816] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to RLA_Stockalike/Parts/Engine/ec_ion/part/RLA_ion
[LOG 12:59:27.820] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final to Squad/Parts/Engine/ionEngine/ionEngine/ionEngine
[LOG 12:59:27.839] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625/ionArgon-0625
[LOG 12:59:27.841] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionArgon-0625-2/ionArgon-0625-2/ionArgon-0625-2
[LOG 12:59:27.842] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionArgon-125/ionArgon-125/ionArgon-125
[LOG 12:59:27.844] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625/ionXenon-0625
[LOG 12:59:27.845] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-0625-2/ionXenon-0625-2/ionXenon-0625-2
[LOG 12:59:27.847] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-0625-3/ionXenon-0625-3/ionXenon-0625-3
[LOG 12:59:27.848] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-125/ionXenon-125/ionXenon-125
[LOG 12:59:27.850] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to NearFuturePropulsion/Parts/Engines/ionXenon-25/ionXenon-25/ionXenon-25
[LOG 12:59:27.855] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to RLA_Stockalike/Parts/Engine/ec_arcjet/part/RLA_arcjet
[LOG 12:59:27.857] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to RLA_Stockalike/Parts/Engine/ec_ion/part/RLA_ion
[LOG 12:59:27.862] [ModuleManager] Applying node _AlmightyR/RO_ElectricPropulsionDeuselessnator_AlmightyR/@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final to Squad/Parts/Engine/ionEngine/ionEngine/ionEngine

Are MM patches cummulative? Meaning that if RealismOverhaul sets "maxThrust = 0.000092" in a patch, and my patch is applied after RO's patch, with "maxThrust *=100", then the final result is "maxThrust = 0.0092"?

[EDIT-3]

Nope...Patches are not having any effect...I tried to skip the math operator and put "maxThrust = 1", but in-game the maxThrust is still the same I had before...

Edited by AlmightyR
Link to comment
Share on other sites

I tried using | but it doesn't seem to be working. How can I verify for sure?

[EDIT] I think I might have found the problem...Or at least something that could be a problem if I wasn't using the standard configs of the ION engines...


//Deals with standard config
@PART
[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:AFTER[RealismOverhaul]:Final
{
@minThrust = 0
@maxThrust *= 100
}

//Deals with extra RF|MFT configs
@PART
[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG
[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:AFTER[RealismOverhaul]:Final
{
@minThrust = 0
@maxThrust *= 100
}

Are MM patches cummulative? Meaning that if RealismOverhaul sets "maxThrust = 0.000092" in a patch, and my patch is applied after RO's patch, with "maxThrust *=100", then the final result is "maxThrust = 0.0092"?

[EDIT-3]

Nope...Patches are not having any effect...I tried to skip the math operator and put "maxThrust = 1", but in-game the maxThrust is still the same I had before...

Yes patches are cumulative. Order is important.

I see multiple problems with your config

I have not used the | operator but I don't think you are using it correctly. Pretty sure @PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge] should be @PROPELLANT[XenonGas|ArgonGas|ElectricCharge]

Also, minThrust and maxThrust are fields of the ModuleEngines, ModuleEnginesFX or ModuleEngineConfig modules. You're trying to modify something in the PART node and not any MODULE node. Your conditionals are looking for ModuleEngineConfigs so it you probably want this: (it's untested but it should work)

(used :Final. It's not something you use alongside of other ordinal conditions like :BEFORE, :FOR or :AFTER)


@PART
[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG
[*]:HAS[@PROPELLANT[XenonGas|ArgonGas|ElectricCharge]]]]:Final
{
@MODULE[ModuleEngineConfigs]
{
@CONFIG
[*]:HAS[@PROPELLANT[XenonGas|ArgonGas|ElectricCharge]],*
{
@minThrust = 0
@maxThrust *= 100
}
}
}

Link to comment
Share on other sites

Hidden items are anything that gets removed with NEEDS... and don't worry about it :)

I know that reply was quite some time ago but...

Its happening to me with the following mods:

Interstellar

B9 Aerospace

FAR

MechJeb

HyperEdit

On loadup, I see: "ModuleManager: 253 patches applied, 350(ish) hidden items" and I'm consistently missing at least half the Interstellar parts. I'm playing career, I've unlocked the entire tech tree (I had the interstellar tree selected) for the sake of trying to figure this out. Every. Time. Theyre. Missing.

Windows 8.1, x32KSP .25

Any ideas?

Thanks

Link to comment
Share on other sites

Pretty sure @PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge] should be @PROPELLANT[XenonGas|ArgonGas|ElectricCharge]

Nope...Tested it out and it doesn't work unless I specify each one in their own @PROPELLANT...

Also, minThrust and maxThrust are fields of the ModuleEngines, ModuleEnginesFX or ModuleEngineConfig modules. You're trying to modify something in the PART node and not any MODULE node.

Yep...That was the problem...I completely forgot the search conditionals don't actually "enter" the nodes they "select", and that the nodes' references must be repeated inside the actual modifying part of the script...

Here is the final, tested-&-working, code for anyone interested:


@PART[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]:Final
{
@MODULE[ModuleEngines*]
{
@minThrust = 0
@maxThrust *= 10
}
}

@PART[*]:NEEDS[RealismOverhaul]:HAS[@MODULE[ModuleEngineConfigs]:HAS[@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]]]:Final
{
@MODULE[ModuleEngineConfigs]
{
@CONFIG[*]:HAS[@PROPELLANT[XenonGas]|@PROPELLANT[ArgonGas]|@PROPELLANT[ElectricCharge]]
{
@minThrust = 0
@maxThrust *= 10
}
}
}

Thanks a lot for the help and info @Starwaster! You're awesome! :)

When I dominate the world, maybe, just maybe, I won't send you to work on the salt mines...I'll click your reputation button so that I am reminded of that when it's time...:P

Edited by AlmightyR
Link to comment
Share on other sites

When I dominate the world, maybe, just maybe, I won't send you to work on the salt mines...I'll click your reputation button so that I am reminded of that when it's time...:P

Fantastic, I was really worried about the salt mine thing. It's bad for the skin.

Link to comment
Share on other sites

No. But you can use regular expressions; there's some examples in the wiki that show how to do an equivalent to +=

I must be blind cus I can't find them :(

EDIT: LOL :blush: I really was blind. Was looking for examples on the sparse wiki page, not the test page full of cfgs :blush: Anyways "stringvar ^= :$:stuff to add:" works wonderfully :D

Edited by INSULINt
Link to comment
Share on other sites

Hope someone can help and see what, I'm doing wrong wanting to change the ModuleAnimator to the Firespitter plugin and this is what, I used

@PART[ASET_PRC_Bumper]
{
!MODULE[ModuleAnimator] {}

MODULE
{

name = FSanimateGeneric

startEventGUIName = Deploy Bumper
endEventGUIName = Retract Bumper
actionGUIName = Toggle Bumper
animationName = Deploy_RoverBumperAnim

availableInEVA = True
}
}

all works but the solarpanels, I can see the power there getting but there not charging the batterys if, I edit the part cfg it works why won't my patch work ?

EDIT- here is the part cfg

PART
{
name = ASET_PRC_Bumper
module = Part
author = Alexustas


scale = 1
rescaleFactor = 1

MODEL
{
model = ASET/PRC/KRoverBumper
}

node_stack_ToPlatform = 0.0, -0.02101165, -0.230, 1.0, 0.0, 0.0, 0


//node_stack_bottom = 0.0, -0.1287344, 0.0, 0.0, 1.0, 0.0, 0
//node_attach = 0.0, -0.1287344, 0.0, 0.0, -1.0, 0.0, 0

TechRequired = composites
entryCost = 5800
cost = 520
category = Structural
subcategory = 0
title = ASET PRC Bumper
manufacturer = ASET
description =
attachRules = 1,0,0,0,0

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


MODULE
{
name = ModuleAnimator
animationName = Deploy_RoverBumperAnim //Name of the animation from the model
guiEnableName = Deploy Bumper //Part tooltip name to display for deployment
guiDisableName = Retract Bumper //Part tooltip name to display for retraction


animationSpeed = 0.25 //Normalized speed of the animation (1 is usually good)

oneShot = false //If the animation can only be played once
activeEditor = true //If the part toolitp is visible in the editor
activeFlight = true //If the part tooltip is visible in flight
activeUnfocused = true //If the part tooltip is visible from EVA
unfocusedRange = 5 //The range from which the part tooltip is visible from in EVA
}




MODULE
{
name = KASModuleGrab
evaPartPos = (-0.2, 0.10, -0.25)
evaPartDir = (0,1,0)
attachNodeName = ToPlatform
customGroundPos = true
dropPartPos = (0.0, 0.0, 1.00)
dropPartRot = (0.0, 1.0, 0.0)
bayType = BumperNode
bayNode = ToPlatform
bayRot = (0.0, 0.0, 0.0)
storable = true
storedSize = 8
}

MODULE
{
name = ModuleDeployableSolarPanel

sunTracking = false

raycastTransformName = suncatcher
pivotName = solarPivot

isBreakable = false

resourceName = ElectricCharge

chargeRate = 0.5

powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}


RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 45
}


}

EDIT- Fixed This works

@PART[ASET_PRC_Bumper]
{
%MODULE[ModuleAnimator]
{
%name = FSanimateGeneric
%startEventGUIName = Deploy Bumper
%endEventGUIName = Retract Bumper
%actionGUIName = Toggle Bumper
%animationName = Deploy_RoverBumperAnim
%availableInEVA = True
}
}

Edited by Mecripp2
Link to comment
Share on other sites

Hope someone can help and see what, I'm doing wrong wanting to change the ModuleAnimator to the Firespitter plugin and this is what, I used
@PART[ASET_PRC_Bumper]
{
!MODULE[ModuleAnimator] {}

MODULE
{

name = FSanimateGeneric

startEventGUIName = Deploy Bumper
endEventGUIName = Retract Bumper
actionGUIName = Toggle Bumper
animationName = Deploy_RoverBumperAnim

availableInEVA = True
}
}

all works but the solarpanels, I can see the power there getting but there not charging the batterys if, I edit the part cfg it works why won't my patch work ?

EDIT- here is the part cfg

PART
{
name = ASET_PRC_Bumper
module = Part
author = Alexustas


scale = 1
rescaleFactor = 1

MODEL
{
model = ASET/PRC/KRoverBumper
}

node_stack_ToPlatform = 0.0, -0.02101165, -0.230, 1.0, 0.0, 0.0, 0


//node_stack_bottom = 0.0, -0.1287344, 0.0, 0.0, 1.0, 0.0, 0
//node_attach = 0.0, -0.1287344, 0.0, 0.0, -1.0, 0.0, 0

TechRequired = composites
entryCost = 5800
cost = 520
category = Structural
subcategory = 0
title = ASET PRC Bumper
manufacturer = ASET
description =
attachRules = 1,0,0,0,0

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


MODULE
{
name = ModuleAnimator
animationName = Deploy_RoverBumperAnim //Name of the animation from the model
guiEnableName = Deploy Bumper //Part tooltip name to display for deployment
guiDisableName = Retract Bumper //Part tooltip name to display for retraction


animationSpeed = 0.25 //Normalized speed of the animation (1 is usually good)

oneShot = false //If the animation can only be played once
activeEditor = true //If the part toolitp is visible in the editor
activeFlight = true //If the part tooltip is visible in flight
activeUnfocused = true //If the part tooltip is visible from EVA
unfocusedRange = 5 //The range from which the part tooltip is visible from in EVA
}




MODULE
{
name = KASModuleGrab
evaPartPos = (-0.2, 0.10, -0.25)
evaPartDir = (0,1,0)
attachNodeName = ToPlatform
customGroundPos = true
dropPartPos = (0.0, 0.0, 1.00)
dropPartRot = (0.0, 1.0, 0.0)
bayType = BumperNode
bayNode = ToPlatform
bayRot = (0.0, 0.0, 0.0)
storable = true
storedSize = 8
}

MODULE
{
name = ModuleDeployableSolarPanel

sunTracking = false

raycastTransformName = suncatcher
pivotName = solarPivot

isBreakable = false

resourceName = ElectricCharge

chargeRate = 0.5

powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}


RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 45
}


}

EDIT- Fixed This works

@PART[ASET_PRC_Bumper]
{
%MODULE[ModuleAnimator]
{
%name = FSanimateGeneric
%startEventGUIName = Deploy Bumper
%endEventGUIName = Retract Bumper
%actionGUIName = Toggle Bumper
%animationName = Deploy_RoverBumperAnim
%availableInEVA = True
}
}

technically you could shorten the number of things MM needs to patch by eliminating from your patch the parameters that are unchanged.

For example:

@PART[ASET_PRC_Bumper]
{
%MODULE[ModuleAnimator]
{
%name = FSanimateGeneric
%startEventGUIName = Deploy Bumper
%endEventGUIName = Retract Bumper
%actionGUIName = Toggle Bumper
%availableInEVA = True
}
}

In the above, I was able to remove the "animationName" parameter because it is the same for both modules. This is not really necessary for a single application but if you want to make a single patch work for multiple parts, detecting common parameters becomes necessary so you do not need to specify the specific information for each part individually. Unfortunately, in this situation, there are other necessary parameters with differing names which make any attempts to modularize the patch nearly impossible... so I guess my point really doesn't work when dealing with a change between stock and FS animators. Too bad I'd already written all this out before I realized that.

Link to comment
Share on other sites

I have an idea. Could MM "cache" configs? As in, write down the "final" version of the config (with all the patches applied) somewhere and, assuming nothing changes, read from it on the next load? At 4000 patches (RO tends to do that), loading them takes up a chunk of time, and it would also help debugging (you could easily check how does the part's final config look like).

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