Jump to content

.CFG for procedural parts


Recommended Posts

i'm facing problems trying to patch a procedural part, RP1 creates a part for proceduralAvionics wich add a ModuleCommand, but in my patch when i tried to add some other module to parts (wich is filtered by this module name), it just does not found the part,

i add a AFTER[RP-0] at the end of the patch and the game give me a warning, and anyway the patch is not applied,

Could someone give me a hint ?

 

Thanks in advance.

Link to comment
Share on other sites

I'm triying to modify a mod (LRTR), i did the following:

@PART[*]:HAS[!LRTFCONF,~lrtfConfName,@MODULE[ModuleCommand], #CrewCapacity[=0]]:FOR[LRTFConfig]:AFTER[xxxRP0]
{
    lrtfUnmanned = true
    lrtfConfName = Unmanned
}

 

and then in another file i have done the folowwing:

@PART[*]:HAS[#lrtfManned[true]]:NEEDS[LRTFConfig]:BEFORE[zTestFlight]
{
    LRTFCONF
    {
         name = Avionics
        partName = #$../name$
        @partName ^= :_:-:
        
        MTBF = 1200
        @MTBF *= #$@LRTFSETTINGS/mtbfMulti$
        duPerFlight = 800
            
        mannedMulti = 3.0 //manned parts return more error data.
            
        cycleReliabilityStart = 0.35
        cycleReliabilityEnd = 0.995

        avionicsAxis = true
        avionicsClamp = true
        avionicsDeadZone = true
        avionicsGlitch = true
        maxDeadtime = 5
        maxWorktime = 40
        //avionicsInvert = true
        avionicsPartial = true
        //avionicsThrustJam = true
        //avionicsTotal = true
    }
}

 

it just cretes a config node in the part, 

 

and then in other file i assing the module like this:

@PART[*]:HAS[@LRTFCONF[Avionics]:HAS[#avionicsSAS[?rue]]]:FOR[zTestFlight]
{
    MODULE
    {
        name = LRTFFailure_AvionicsSAS
        configuration = #$../LRTFCONF[Avionics]/alias$
        duFail = 100
        @duFail *= #$../LRTFCONF[Avionics]/mannedDUMulti$
        duRepair = 250
        @duRepair *= #$../LRTFCONF[Avionics]/mannedDUMulti$
        failureTitle = SAS Failure
        severity = minor
        weight = 8
        failureType = software
    }
}

 

It works but for non procedural parts, the part when said ":AFTER[xxxRP0]" was added by me, and i have tried also with ":AFTER[RP-0]"

when i add this line and KSP loads it give me a warning, but i don't know what is the problem, also i hhave changed the folder name of the mod to 'zzzz*' to ensure the mod is configuring after all other mods, and remove the ":AFTER" rule, but it does not work.

i checked that RP-1 is creating a part for avionics with is a copy from procedulal part, and it adds a CommandModule on it, but this patch does not apply to that part. it does for non procedural parts..

Thanks.

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