#Module Manager Patch

102 messages · Page 1 of 1 (latest)

lean kindle
#

I want to Patch a Patch of SSPX. Especially the Tac-Ls patch.
But idk How to start the .cfg.
With a part config it would be @Part, but here i want patch the complete "TacGenericConverter" Module. But only in that config

quaint jasper
#

there's nothing special about "part"

#

@tidal grailEVER just patches all of the top-level WHATEVER nodes it finds

#

...sorry for ping

lean kindle
#

@MMSEV_TAC_LS
{
@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]
{
@MODULE[TacGenericConverter]:AFTER[Benjee10_MMSEV]
{
@OUTPUT_RESOURCE
{
ResourceName = Food
Ratio = 0.00001925
DumpExcess = false
}
}
}
}

#

my patch

quaint jasper
#

you can't have :AFTER on a non-top-level node

#

move that up to the first line

#

um

#

and I don't understand why you have a non-top-level @PART

lean kindle
quaint jasper
#

but the PART isn't inside MMSEV_TAC_LS, is it?

lean kindle
#

the part configs is saved somewhere eles

quaint jasper
#

@MMSEV_TAC_LS
{
@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]

#

that says "find a PART node inside a MMSEV_TAC_LS node"

#

PARTs generally aren't inside other things

lean kindle
#

yeah. but i tryed it without the @MMSEV_TAC_LS
{

quaint jasper
#

then you did something else wrong

lean kindle
#

and it dident worked

quaint jasper
#

like the AFTER is in the wrong place

lean kindle
#

so it have to be spmething like that

#

@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]:AFTER[Benjee10_MMSEV]
{
@MODULE[TacGenericConverter]
{
@OUTPUT_RESOURCE
{
ResourceName = Food
Ratio = 0.00001925
DumpExcess = false
}
}
}

quaint jasper
#

the output_resource block looks suspect

#

are you trying to add a new output or replace an existing one?

lean kindle
#

i just want to increase the food output for now

quaint jasper
#

for that matter, does the part already have this converter module or are you trying to add one?

#

oh I see

lean kindle
quaint jasper
#

@OUTPUT_RESOURCE is going to target the first one it finds, so you need to specify the one you actually want: @OUTPUT_RESOURCE:HAS[#ResourceName[Food]]

#

and then all the keys inside need @ at the front, or else it will just add them

#

and you don't actually have to specify the resourcename and dumpexcess because you aren't changing them

lean kindle
#

@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]:AFTER[Benjee10_MMSEV]
{
@OUTPUT_RESOURCE:HAS[#ResourceName[Food]]
{
ResourceName = Food
Ratio = 0.00001925
DumpExcess = false

}

}

quaint jasper
#

and then all the keys inside need @ at the front, or else it will just add them
and you don't actually have to specify the resourcename and dumpexcess because you aren't changing them

lean kindle
#

@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]:AFTER[Benjee10_MMSEV]
{
@OUTPUT_RESOURCE:HAS[#ResourceName[Food]]
{
@ResourceName = Food
@Ratio = 0.00001925
@DumpExcess = false

}

}

quaint jasper
#

yes, except you could just delete the ones you're not changing

lean kindle
#

so removing DumpExcess = false

quaint jasper
#

and resourcename

lean kindle
# quaint jasper and resourcename

got that now, dident worked @PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]:AFTER[Benjee10_MMSEV]
{
@OUTPUT_RESOURCE:HAS[#ResourceName[Food]]
{
@Ratio = 0.00001925
}
}

quaint jasper
#

ok, check the logs for the name of your patch and see when/where it applied

#

oh you know what

#

I don't think any of the planetside patches use FOR[Benjee10_MMSEV] so you can't use AFTER with that token

#

I could be wrong about that; but check ksp.log for a marker like :FOR[Benjee10_MMSEV] pass

quaint jasper
#

ah ok, I just re-read the docs and it should be fine

lean kindle
#

[LOG 17:15:42.450] Applying update zMein Zeugs/Greenhous/@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]:AFTER[Benjee10_MMSEV] to Benjee10_MMSEV/Parts/base_greenhouse.cfg/PART[Benjee10_MMSEV_baseGreenhouse]

quaint jasper
#

ok that's good

#

search for the part name and make sure that your patch got applied after the base support patch

#

and check to see if any other patches are affecting that part

lean kindle
#

so if my pathc comes afeter the patch of benjee and no other patch is patching my patch

quaint jasper
#

I would expect it to work, yeah

#

but patches don't patch other patches, they just patch the current set of data

#

so you're looking for other patches that touch the same part

lean kindle
#

there is only mine and that from benjee

quaint jasper
#

and you're sure the patch isn't applying? you can look in modulemanager.configcache to see the final state of all nodes after patching applies

#

that log doesn't contain "Benjee10_MMSEV_baseGreenhouse" anywhere

#

it's not done loading

lean kindle
#

i right. i launched ksp in an accident and worked with full log

lean kindle
quaint jasper
#

well, there are 4 patches in total:

 8217 [LOG 17:40:24.775] Applying update Benjee10_MMSEV/Patches/TAC/MMSEV_TAC_LS/@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport] to Benjee10_MMSEV/Parts/base_greenhouse.cfg/PART[Benjee10_MMSEV_baseGreenhouse]
 8270 [LOG 17:40:24.800] Applying update zMein Zeugs/Greenhous/@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport] to Benjee10_MMSEV/Parts/base_greenhouse.cfg/PART[Benjee10_MMSEV_baseGreenhouse]
 8397 [LOG 17:40:24.923] Applying update ThunderAerospace/TacLifeSupport/MM_AddLifeSupportModule/@PART[*]:HAS[#CrewCapacity[>0],!MODULE[LifeSupportModule]]:FOR[TacLifeSupport] to Benjee10_MMSEV/Parts/base_greenhouse.cfg/PART[Benjee10_MMSEV_baseGreenhouse]
 8576 [LOG 17:40:25.009] Applying update B9PartSwitch/PartInfo/@PART[*]:HAS[@MODULE[ModuleB9PartSwitch]]:FOR[zzzzzz-B9PartSwitch] to Benjee10_MMSEV/Parts/base_greenhouse.cfg/PART[Benjee10_MMSEV_baseGreenhouse]
#

the b9ps one probably isn't interesting, but it's worth looking at the TACLS one

lean kindle
#

for what do i have to search in th MMcache?

quaint jasper
#

the part name

#

the entire part config should be there

lean kindle
#

i cant find it

#

nvm found it

lean kindle
quaint jasper
#

dumb question, but did you forget to save your cfg patch after editing it?

#

because in the log file it doesn't include the AFTER part

lean kindle
#

nope. the sspx is in the same config but gets loadede

quaint jasper
#

it's not the same patch you showed here

lean kindle
#

looks like i had the after deleted

lean kindle
#

@PART[Benjee10_MMSEV_baseGreenhouse]:NEEDS[TacLifeSupport]:AFTER[Benjee10_MMSEV]
{
@OUTPUT_RESOURCE:HAS[#ResourceName[Food]]
{
@Ratio = 0.00001925
}
}

#

also if i edit the value in the benjee patch manually the manual edit gets applyed

quaint jasper
#

OH

#

we forgot about the TacGenericConverter module

#

the @OUTPUT_RESOURCE node has to be inside @MODULE[TacGenericConverter] {}

#

you had that in the first version but removed it

lean kindle
#

so?

quaint jasper
#

need @ before MODULE

lean kindle
#

right

quaint jasper
#

but yeah that looks right

lean kindle
#

yes. it works

lean kindle
lean kindle
#

@SSPXR-ROOT-TACGREENHOUSE:NEEDS[TacLifeSupport,PlanetarySurfaceStructures]:AFTER[StationPartsExpansionRedux]
{
@MODULE[TacGenericConverter]
{
@OUTPUT_RESOURCE:HAS[#ResourceName[Food]]
{
@Ratio = 0.0000333927083
}
}
}

quaint jasper
#

well, you have a MODULE patch inside something that isn't a PART

lean kindle
#

yes, how do i handle that?

quaint jasper
#

look at your other patch that worked

lean kindle
#

so i have to patch all 4 parts invidual.

quaint jasper
#

Not necessarily

#

you can do @PART[a|b|c]

#

but if they have different ratios..

#

you can do math like @Ratio *= 5

lean kindle