Jump to content

[1.3.0] OPT Space Plane v2.0.1 - updated 29/07/2017


K.Yeon

Recommended Posts

There seems to be a couple H type parts intended for solitary use though. This does't need a cockpit I don't think, the drone cor is already more than enough haha

Link to comment
Share on other sites

21 hours ago, JadeOfMaar said:

<snip>

What H body needs in my opinion, is a mechanism (whether a docking system or K parts with chunks cut out, or both) so an H plane can sit, fit and properly attach to a K plane......and an H cargo bay or two, and a bicoupler that doesn't offset engines attached to that.

I have tried to make this happen with clipped docking ports. Didn't turn out well.

Link to comment
Share on other sites

@kraden I've had for a long time, the idea to turn some of the existing attach nodes into docking ports to avoid the problems of adding and clipping docking ports. I never went through with it because as a modder, there are many other, more interesting things to experiment with. (See OPT_WBI, OPT_USI, upcoming OPT_BP9S, and the WarpJets) 

Spoiler

The WarpJet SAGE is also going to not die or suck as bad in thick atmo anymore.

 

Link to comment
Share on other sites

On 2/21/2018 at 8:47 PM, JadeOfMaar said:

To apply Wild Blue's complete storage selection options to the H body parts, change any of these lines 1563 (short noses), 1597 (inline tanks), 1648 (long noses) in OPT_WBI.cfg to templateNodes = STORAGETEMPLATE

That would be:

templateNodes = STORAGE_TEMPLATE, since STORAGETEMPLATE gives:

Spoiler

WBIMultipurposeStorage [FFCFE2E2][2128.3600]: initTemplates called templateNodes: STORAGETEMPLATE templateTags:
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

WBIMultipurposeStorage [FFCFE2E2][2128.3600]: STORAGETEMPLATE has 0 templates.
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Which is probably why this happens:

Spoiler

Module WBIMultipurposeStorage threw during OnStart: System.IndexOutOfRangeException: Array index is out of range.
  at WildBlueIndustries.TemplateManager.get_Item (Int64 index) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIResourceSwitcher.initTemplates () [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIResourceSwitcher.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIModuleSwitcher.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIAffordableSwitcher.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIConvertibleStorage.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIOpsManager.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIMultiConverter.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIMultipurposeStorage.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at Part.ModulesOnStart () [0x00000] in <filename unknown>:0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Module WBIResourceDistributor threw during OnStart: System.IndexOutOfRangeException: Array index is out of range.
  at WildBlueIndustries.TemplateManager.get_Item (Int64 index) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIResourceSwitcher.get_CurrentTemplateName () [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIResourceDistributor.OnStart (StartState state) [0x00000] in <filename unknown>:0
  at Part.ModulesOnStart () [0x00000] in <filename unknown>:0

 

On 2/22/2018 at 7:50 PM, JadeOfMaar said:

In that case, change the top of the patch I gave you to be like this. :sticktongue:


+PART[h_3m_crew_mm]
{
	@name = h_3m_lab_mm
	@title = OPT H Mounted Science Lab
	@category = Science
	@TechRequired = advExploration
	@description = Someone wanted an H sized science lab! It wasn't too hard to produce it... Let's hope the client isn't bothered that the science computer is a little slow and a little short on storage.
}
@PART[h_3m_lab_mm]:NEEDS[Pathfinder]
{
	MODULE
	{
		name = WBIScienceConverter
		...

 

Labs also need:

Spoiler

    MODULE
    {
        name = ModuleScienceLab
        containerModuleIndex = 0
        dataStorage = 900
        crewsRequired = 1
        canResetConnectedModules = True
        canResetNearbyModules = True
        interactionRange = 5
        SurfaceBonus = 0.35
        ContextBonus = 0
        homeworldMultiplier = 0.1
        RESOURCE_PROCESS
        {
            name = ElectricCharge
            amount = 10
        }
    }

And probably:

Spoiler

    @MODULE[ModuleScienceContainer]
    {
        %collectActionName = Take Data
        %allowRepeatedSubjects = True
    }

But they still have an issue of not being one of the expected places for experiments to take place and so fail on meeting the requirements. I am seeking advice on that in the pathfinder thread. Other than that the work continues at a pace :)

Link to comment
Share on other sites

3 hours ago, Apaseall said:

templateNodes = STORAGE_TEMPLATE, since STORAGETEMPLATE gives:

A big fat oops. :blush:

2 hours ago, Apaseall said:

But they still have an issue of not being one of the expected places for experiments to take place and so fail on meeting the requirements. I am seeking advice on that in the pathfinder thread. Other than that the work continues at a pace :)

As I haven't gone this far with angel-125's science system my wisdom reaches its end. :(

But perhaps this is what you need. If not, then what needs to be changed is either elsewhere or is hardcoded in the plugin that powers it.

// changes any WBI experiments that have a required part list, adds this lab to their lists
@EXPERIMENT_DEFINITION:HAS[#id[WBI*],#requiredPart[*]]
{
	requiredPart = h_3m_lab_mm
}

 

Link to comment
Share on other sites

Very cool stuff. Hope to see more become of the H body :) 

Might've been mentioned before, but... will there ever be an extension that has adapters for the Mark IV mod?

Link to comment
Share on other sites

Ok so I am trying to squish some issues.

I started off with a great big pile of this:

Spoiler

null texture passed to GUI.DrawTexture

Which lead me to this:

Spoiler

WBIMultipurposeStorage [FFD0266C][826.2000]: RedecorateModule encountered an ERROR: System.NullReferenceException: Object reference not set to an instance of an object
  at WildBlueIndustries.WBIResourceSwitcher.adjustKeptResources (.ConfigNode nodeTemplate) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIResourceSwitcher.RedecorateModule (Boolean loadTemplateResources) [0x00000] in <filename unknown>:0

Which sort of made sense, trying to draw something but not being given something to draw.

Looking around I got this:

Spoiler

WBIMultipurposeStorage [FFD0266C][826.2000]: changeDecals has no named transforms to change.

Sounds like the right trail?

Foolishly I thought to seek the inconsistency by comparing to something that did appear to work, or rather did not seem to be throwing an error:

Spoiler

WBIMultipurposeStorage [FFD025F2][826.2000]: Module redecorated.

Rather good at this point.

On the one hand I have an error thrown like this:

Spoiler

WBIMultipurposeStorage [FFD0266C][826.2000]: SetupAnimations called.
WBIMultipurposeStorage [FFD0266C][826.2000]: Part is not inflatable.
WBIMultipurposeStorage [FFD0266C][826.2000]: OnStart - State: Orbital  Part: h.3m.crew.mm
WBIMultipurposeStorage [FFD0266C][826.2000]: initTemplates called templateNodes: OPTKIS_TEMPLATE;OPTSNACKS_TEMPLATE;OPTTAC_TEMPLATE templateTags:
WBIMultipurposeStorage [FFD0266C][826.2000]: OPTKIS_TEMPLATE;OPTSNACKS_TEMPLATE;OPTTAC_TEMPLATE has 1 templates.
WBIMultipurposeStorage [FFD0266C][826.2000]: Template 0: KIS
WBIMultipurposeStorage [FFD0266C][826.2000]: RedecorateModule called. loadTemplateResources: True template index: 0
WBIMultipurposeStorage [FFD0266C][826.2000]: loadResourcesFromTemplate called for template: KIS
WBIMultipurposeStorage [FFD0266C][826.2000]: template: OPTKIS_TEMPLATE
{
    templateTags = stowage
    isKISInventory = True
    description = This kit stores, well, anything it can hold. OPT's staff and any passengers are afforded ample room to carry (usually) important luggage.
    requiresModule = ModuleKISInventory
    glowPanel = WildBlueIndustries/000WildBlueTools/Decals/StorageGlow
    logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Storage
    title = Storage
    shortName = Storage
    author = JadeOfMaar
    name = KIS
}
WBIMultipurposeStorage [FFD0266C][826.2000]: capacityFactor: 0.6
WBIMultipurposeStorage [FFD0266C][826.2000]: Clearing resource list, should keep: ElectricCharge;Snacks;Food;Water;Oxygen;Waste;WasteWater;CarbonDioxide;
WBIMultipurposeStorage [FFD0266C][826.2000]: Resources cleared
WBIMultipurposeStorage [FFD0266C][826.2000]: template resource count: 0
WBIMultipurposeStorage [FFD0266C][826.2000]: capacityModifier: 0.6
WBIMultipurposeStorage [FFD0266C][826.2000]: OnRedecorateModule called
WBIMultipurposeStorage [FFD0266C][826.2000]: loadModulesFromTemplate called for template: KIS
WBIMultipurposeStorage [FFD0266C][826.2000]: New name: KIS
WBIMultipurposeStorage [FFD0266C][826.2000]: changeDecals called.
WBIMultipurposeStorage [FFD0266C][826.2000]: changeDecals has no named transforms to change.
WBIMultipurposeStorage [FFD0266C][826.2000]: RedecorateModule encountered an ERROR: System.NullReferenceException: Object reference not set to an instance of an object
  at WildBlueIndustries.WBIResourceSwitcher.adjustKeptResources (.ConfigNode nodeTemplate) [0x00000] in <filename unknown>:0
  at WildBlueIndustries.WBIResourceSwitcher.RedecorateModule (Boolean loadTemplateResources) [0x00000] in <filename unknown>:0
WBIMultipurposeStorage [FFD0266C][826.2000]: initModuleGUI called
 

On the other hand I have no error like this:

Spoiler

WBIMultipurposeStorage [FFD025F2][826.2000]: SetupAnimations called.
WBIMultipurposeStorage [FFD025F2][826.2000]: Part is not inflatable.
WBIMultipurposeStorage [FFD025F2][826.2000]: OnStart - State: Orbital  Part: h.4m.nose.mm
WBIMultipurposeStorage [FFD025F2][826.2000]: initTemplates called templateNodes: OPT_TEMPLATE;OPTSNACKS_TEMPLATE;OPTTAC_TEMPLATE;OPTKIS_TEMPLATE;OPTSAS_TEMPLATE templateTags:
WBIMultipurposeStorage [FFD025F2][826.2000]: OPT_TEMPLATE;OPTSNACKS_TEMPLATE;OPTTAC_TEMPLATE;OPTKIS_TEMPLATE;OPTSAS_TEMPLATE has 5 templates.
WBIMultipurposeStorage [FFD025F2][826.2000]: Template 0: LFO
WBIMultipurposeStorage [FFD025F2][826.2000]: Template 1: LiquidFuel
WBIMultipurposeStorage [FFD025F2][826.2000]: Template 2: MonoProp
WBIMultipurposeStorage [FFD025F2][826.2000]: Template 3: KIS
WBIMultipurposeStorage [FFD025F2][826.2000]: Template 4: SAS
WBIMultipurposeStorage [FFD025F2][826.2000]: RedecorateModule called. loadTemplateResources: False template index: 0
WBIMultipurposeStorage [FFD025F2][826.2000]: updateResourcesFromTemplate called for template: LFO
WBIMultipurposeStorage [FFD025F2][826.2000]: template: OPT_TEMPLATE
{
    templateTags = stowage
    description = This kit stores LiquidFuel and Oxidizer, required by most rocket engines, namely the Dark Drive.
    glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LFOGlow
    logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LFO
    shortName = LFO
    author = JadeOfMaar
    name = LFO
    RESOURCE
    {
        maxAmount = 810
        amount = 810
        name = LiquidFuel
    }
    RESOURCE
    {
        maxAmount = 990
        amount = 990
        name = Oxidizer
    }
}
WBIMultipurposeStorage [FFD025F2][826.2000]: capacityFactor: 0.48
WBIMultipurposeStorage [FFD025F2][826.2000]: template resource count: 2
WBIMultipurposeStorage [FFD025F2][826.2000]: Extraneous resources cleared.
WBIMultipurposeStorage [FFD025F2][826.2000]: OnRedecorateModule called
WBIMultipurposeStorage [FFD025F2][826.2000]: loadModulesFromTemplate called for template: LFO
WBIMultipurposeStorage [FFD025F2][826.2000]: New name: LFO
WBIMultipurposeStorage [FFD025F2][826.2000]: changeDecals called.
WBIMultipurposeStorage [FFD025F2][826.2000]: changeDecals has no named transforms to change.
WBIMultipurposeStorage [FFD025F2][826.2000]: Module redecorated.
WBIMultipurposeStorage [FFD025F2][826.2000]: initModuleGUI called

I turn my attention to attention to the part names and look at OTP_WBI to see what is being done to them.

I get for the one with the error:

Spoiler

@PART[h_3m_crew_mm|h_3m_crew_fm]:NEEDS[Pathfinder]
{
    !RESOURCE[ElectricCharge] {}
    !RESOURCE[LiquidFuel] {}
    !RESOURCE[Oxidizer] {}
    !RESOURCE[MonoPropellant] {}
    !MODULE[FSfuelSwitch] {}
    !MODULE[InterstellarFuelSwitch] {}
    
    //Biome scanner is what you need to unlock a biome
    MODULE
    {
        name = ModuleBiomeScanner
        moduleIsEnabled = false
        showUpgradesInModuleInfo = true
        UPGRADES
        {
            UPGRADE
            {
                name__ = CrewCabScienceUpgrade
                description__ = The Crew Cabin now performs Geo-surveys
                moduleIsEnabled = true
            }
        }
    }
    
    MODULE:NEEDS[KIS]
    {
        name = ModuleKISInventory
        maxVolume = 100
        externalAccess = true
        internalAccess = true
        slotsX = 5
        slotsY = 4
        slotSize = 50
        itemIconResolution = 128
        selfIconResolution = 128
        openSndPath = KIS/Sounds/containerOpen
        closeSndPath = KIS/Sounds/containerClose
        defaultMoveSndPath = KIS/Sounds/itemMove
    }
    
    MODULE
    {
        name = WBIMultipurposeStorage
        //enableLogging = True
        enableLogging = False
        isInflatable = False
        fieldReconfigurable = True
        confirmResourceSwitch = True
        showGUI = True
        
        // Tanks
        templateNodes = OPTKIS_TEMPLATE;OPTSNACKS_TEMPLATE;OPTTAC_TEMPLATE
        defaultTemplate = KIS
        capacityFactor = 0.6
        resourcesToKeep = ElectricCharge;Snacks;Food;Water;Oxygen;Waste;WasteWater;CarbonDioxide;
        
        // If KIS mode
        baseStorage = 0.001
        maxStorage = 3000
    }
    
    MODULE:NEEDS[Snacks]
    {
        name = SoilRecycler
        ConverterName = Soil Recycler
        StartActionName = Start Soil Recycler
        StopActionName = Stop Soil Recycler
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = true
        SpecialistEfficiencyFactor = 0.2
        UseSpecializationBonus = true
        SpecialistEfficiencyFactor = 0.1
        ExperienceEffect = ScienceSkill
        EfficiencyBonus = 1.0
        RecyclerCapacity = 4
    
        INPUT_RESOURCE
        {
            ResourceName = Soil
            Ratio = 0.000034723
            FlowMode = ALL_VESSEL
          }

        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 12
        }

        OUTPUT_RESOURCE
        {
            ResourceName = Snacks
            Ratio = 0.000034723
            DumpExcess = false
            FlowMode = ALL_VESSEL
        }
    }
}

OPTKIS_TEMPLATE:NEEDS[KIS]
{
    name = KIS
    author = JadeOfMaar
    shortName = Storage
    title = Storage
    logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Storage
    glowPanel = WildBlueIndustries/000WildBlueTools/Decals/StorageGlow
    requiresModule = ModuleKISInventory
    description = This kit stores, well, anything it can hold. OPT's staff and any passengers are afforded ample room to carry (usually) important luggage.
    isKISInventory = True
    templateTags = stowage
}

For the one that seems to work I find this:

Spoiler

@PART[h_4m_nose_mm|h_4m_nose_fm]:NEEDS[Pathfinder]
{
    !RESOURCE[ElectricCharge] {}
    !RESOURCE[LiquidFuel] {}
    !RESOURCE[Oxidizer] {}
    !RESOURCE[MonoPropellant] {}
    !MODULE[FSfuelSwitch] {}
    !MODULE[InterstellarFuelSwitch] {}
    
    MODULE:NEEDS[KIS]
    {
        name = ModuleKISInventory
        maxVolume = 100
        externalAccess = true
        internalAccess = true
        slotsX = 5
        slotsY = 4
        slotSize = 50
        itemIconResolution = 128
        selfIconResolution = 128
        openSndPath = KIS/Sounds/containerOpen
        closeSndPath = KIS/Sounds/containerClose
        defaultMoveSndPath = KIS/Sounds/itemMove
    }
    
    MODULE
    {
        name = WBIMultipurposeStorage
        //enableLogging = True
        enableLogging = False
        isInflatable = False
        fieldReconfigurable = True
        confirmResourceSwitch = True
        showGUI = True
        
        // Tanks
//        templateNodes = OPT_TEMPLATE;OPTSNACKS_TEMPLATE;OPTTAC_TEMPLATE;OPTKIS_TEMPLATE;OPTSAS_TEMPLATE
//xxxxx
        templateNodes = STORAGE_TEMPLATE
        defaultTemplate = LFO
        capacityFactor = 0.48
        
        // If KIS mode
        baseStorage = 0.001
        maxStorage = 2000
    }

    MODULE
    {
        name = WBIResourceDistributor
        resourceBlacklist = ReplacementParts
    }
}

OPT_TEMPLATE
{
    name = LFO
    author = JadeOfMaar
    shortName = LFO
    logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LFO
    glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LFOGlow
    description = This kit stores LiquidFuel and Oxidizer, required by most rocket engines, namely the Dark Drive.
    templateTags = stowage
    RESOURCE
    {
         name = LiquidFuel
         amount = 810
         maxAmount = 810
    }
    RESOURCE
    {
        name = Oxidizer
        amount = 990
        maxAmount = 990
    }
}   

All well and good. But looking closely, I see that although the templateNodes = STORAGE_TEMPLATE, I see the defaultTemplate = LFO which brings the OPT_WBI template LFO not one from WBI itself. Confused? Yes I am.

I would have thought that the WBI STORAGE_TEMPLATE would have its own LFO template. Obviously not. Maybe a different name. Now I am trying to find out what templates are available, but first I need to find the place where STORAGE_TEMPLATE is defined in WBI.

I do not understand why one set will deal with decals and the other will not.

Do recall that nothing has been done to the crew cabin, it has only been cloned and the clone manipulated elsewhere. The nose seems to not throw an error.

Link to comment
Share on other sites

2 hours ago, JadeOfMaar said:

A big fat oops. :blush:

As I haven't gone this far with angel-125's science system my wisdom reaches its end. :(

But perhaps this is what you need. If not, then what needs to be changed is either elsewhere or is hardcoded in the plugin that powers it.


// changes any WBI experiments that have a required part list, adds this lab to their lists
@EXPERIMENT_DEFINITION:HAS[#id[WBI*],#requiredPart[*]]
{
	requiredPart = h_3m_lab_mm
}

 

I am trying this:

Spoiler

//    BasicExperiments
//@EXPERIMENT_DEFINITION[WBISpaceAdaptionStudy|WBIPowerToolsEvaluation|WBIConstructionTechniques|WBICrystalGrowth|WBIIceCreamResearch|WBITemperatureStudy|WBIThermalStudy|WBIGooStudy|WBICryogenicResourceStudy|WBILongTermCryogenicMiniStudy|WBIMESS]:NEEDS[OPT_h_3m_lab_mm]:AFTER[Pathfinder]
//{
//    requiredPart = OPT H Mounted Science Lab
//}

@EXPERIMENT_DEFINITION[WBISpaceAdaptionStudy]:NEEDS[OPT_h_3m_lab_mm]:AFTER[Pathfinder]
{
    requiredPart = OPT H Mounted Science Lab
}


// DeepFreezeExperiments
//@EXPERIMENT_DEFINITION[WBICryogenicStudy|WBILongTermCryogenicStudy|WBICryogenicRadiationStudy]:NEEDS[OPT_h_3m_lab_mm&DeepFreeze]:AFTER[Pathfinder]
//{
//    requiredPart = OPT H Mounted Science Lab
//}

The first time I ran it I had both EXPERIMENT_DEFINITION live [the one in the middle was not there then]. It spat out that it as deleting the root node, but gave the cause as NEEDS DeepFreeze. Which is correct, I do not have DeepFreeze.

The second time I ran, I commented out the second EXPERIMENT_DEFINITION. I got no deletion of root node, and I got no deletion of node. But it was not applied.

The next time I run it, shortly probably, I will try the one I just added, the single experiment.

Hope you don't mind me posting all this here, let me know if you would rather I did not. It is a kinda way to blow off a bit of headscratching.

I bet the issue is around the NEEDS, I used a :FOR with the belief that would make it available. Maybe the MM doc is out of date? You see I want this patch to only run if the lab exists.

aha, ID[WBI blah| blah], doh!

Link to comment
Share on other sites

1 hour ago, Apaseall said:

I am trying this:

  Reveal hidden contents

//    BasicExperiments
//@EXPERIMENT_DEFINITION[WBISpaceAdaptionStudy|WBIPowerToolsEvaluation|WBIConstructionTechniques|WBICrystalGrowth|WBIIceCreamResearch|WBITemperatureStudy|WBIThermalStudy|WBIGooStudy|WBICryogenicResourceStudy|WBILongTermCryogenicMiniStudy|WBIMESS]:NEEDS[OPT_h_3m_lab_mm]:AFTER[Pathfinder]
//{
//    requiredPart = OPT H Mounted Science Lab
//}

@EXPERIMENT_DEFINITION[WBISpaceAdaptionStudy]:NEEDS[OPT_h_3m_lab_mm]:AFTER[Pathfinder]
{
    requiredPart = OPT H Mounted Science Lab
}


// DeepFreezeExperiments
//@EXPERIMENT_DEFINITION[WBICryogenicStudy|WBILongTermCryogenicStudy|WBICryogenicRadiationStudy]:NEEDS[OPT_h_3m_lab_mm&DeepFreeze]:AFTER[Pathfinder]
//{
//    requiredPart = OPT H Mounted Science Lab
//}

The first time I ran it I had both EXPERIMENT_DEFINITION live [the one in the middle was not there then]. It spat out that it as deleting the root node, but gave the cause as NEEDS DeepFreeze. Which is correct, I do not have DeepFreeze.

The second time I ran, I commented out the second EXPERIMENT_DEFINITION. I got no deletion of root node, and I got no deletion of node. But it was not applied.

The next time I run it, shortly probably, I will try the one I just added, the single experiment.

Hope you don't mind me posting all this here, let me know if you would rather I did not. It is a kinda way to blow off a bit of headscratching.

I bet the issue is around the NEEDS, I used a :FOR with the belief that would make it available. Maybe the MM doc is out of date? You see I want this patch to only run if the lab exists.

aha, ID[WBI blah| blah], doh!

You should not be using :FOR unless you are the author of that mod because it results in the satisfaction of all :NEEDS that check for that mod. So if any other mods you have or install in the future do a :NEEDS check for that mod? You just told them it exists. (that is documented btw)

Also :NEEDS only checks for mods (not parts) so if you are doing a :NEEDS[OPT_h_3m_lab_mm] then that better be the name of a folder directly under GameData or the name of a plugin in GameData or one of its subfolders.

You also can't have spaces in part names or when you are checking for part names.

 

Link to comment
Share on other sites

2 hours ago, Starwaster said:

You should not be using :FOR unless you are the author of that mod because it results in the satisfaction of all :NEEDS that check for that mod. So if any other mods you have or install in the future do a :NEEDS check for that mod? You just told them it exists. (that is documented btw)

Also :NEEDS only checks for mods (not parts) so if you are doing a :NEEDS[OPT_h_3m_lab_mm] then that better be the name of a folder directly under GameData or the name of a plugin in GameData or one of its subfolders.

You also can't have spaces in part names or when you are checking for part names.

 

Hi Starwaster. Many thanks for commenting. I am new to patching as you can quite well see. Any help and advice is gladly received.

The :FOR is intentional. Here:

Spoiler

+PART[h_3m_crew_mm]:FOR[OPT_h_3m_lab_mm]:NEEDS[OPT]
{
    @name = h_3m_lab_mm
    @title = OPT H Mounted Science Lab
    @category = Science
    @TechRequired = advExploration
    @description = Someone wanted a H Mounted sized science lab! It wasn't too hard to produce it... Let's hope the client isn't bothered that the science computer is a little slow and a little short on storage.
}

I wanted some way of letting my other patches know that OPT_h_3m_lab_mm exists. That is so they can check for them with :NEEDS. My path is /GameData/my_MM/OPT_h_3m_lab_mm.cfg.

The idea is to take an existing part, in this case an OPT H Mounted Crew cabin, clone it into a lab. Then apply patches to the lab in order to get it to work. I have created no .dll files. I am working only with patches. I thought the use of :FOR would avoid my having to try to guess where an :AFTER needs to be checking. An example is that whilst I am patching OPT parts, those parts need to be patched after Pathfinder parts/modules have been created. To complicated matters further I need OPT_WBI to run before my patches, but my patches are named like OPT_h_3m_lab_mm, meaning that they would naturally be run before OPT_WBI. If it can further complicate matters, some of the items in OPT_WBI have AFTER Pathfinder also. That would mean I need Pathfinder to run, OPT_WBI to run, then my patches. I am trying to avoid chasing my own tail, by trying to specify exactly when my patch is run. I guess patch ordering is a bit of tricky thing to keep track of.

Since the :FOR is for the file OPT_h_3m_lab_mm.cfg and I wrote that patch I hope that no one else is writing a .dll or anything else with that exact same name. That is the reason why it is rather a long and odd name.

Regarding part names and spaces, I am not sure which piece you mean. I know that space are not covered with * but require ?. If you mean are there spaces in the EXPERIMENT_DEFINITON IDs by WBI, then no they have no spaces.

I am currently trying to get this to work:

Spoiler

// ----------------------------------------------------------- MM Patched Here ----------------------------------------------------------------------------------------------

// This patch allows h_3m_lab_mm to be recognised as being capable of fulfilling EXPERIMENT_DEFINITION[]s requiredPart
//        needs to run after GameData\WildBlueIndustries\000WildBlueTools\Experiments as it modifies EXPERIMENT_DEFINITION[WBI...]s created by it
//        assume that AFTER[Pathfinder] will suffice

//    BasicExperiments & DeepFreeze?
@EXPERIMENT_DEFINITION[*]:HAS[#id[WBI*]&#requiredPart[*]]:NEEDS[OPT_h_3m_lab_mm]:AFTER[Pathfinder]
{
    requiredPart = OPT H Mounted Science Lab
}

// ----------------------------------------------------------- Just Notes Below Here ----------------------------------------------------------------------------------------
// Notes
// Notes    PART{name = WBI_DocSciLab, title = Doc Science Lab}
// Notes    EXPERIMENT_DEFINITION{id = WBISpaceAdaptionStudy, requiredPart = Doc Science Lab}
// Notes
// Notes    requiredPart is rather different in that more than one name value pair exists for the same name, e.g.
// Notes        requiredPart = M.O.L.E.
// Notes        requiredPart = LDEF Science Processor
// Notes        requiredPart = Bigby Orbital Workshop
// Notes        requiredPart = D2 Centrifuge
// Notes        requiredPart = D2 Science Module
// Notes        requiredPart = GondoLab
// Notes        requiredPart = Doc Science Lab
// Notes        requiredPart = Tranquility Mk2 Habitat
// Notes    I am assuming that like adding multiple instances of MODULE with the same name by omitting the @, I can add another name value pair as;
// Notes        requiredPart = OPT H Mounted Science Lab

I can see the patch is read, that it is not deleted as either root node or other, but the patch is not being applied.

You will note that I wrote requiredPart = OPT H Mounted Science Lab, which is the title not the name of the part. This is because I am using PART{name = WBI_DocSciLab} DocSciLab.cfg as a guide. I am also using \GameData\WildBlueIndustries\000WildBlueTools\Experiments\BasicExperiments.cfg as a guide {the above patch notes have examples from there}.

For example the experiment SpaceAdaptationStudy has the Doc Science Lab as one of a list of possible places where the experiment can be run. But that is the title of the part, the name of the part is WBI_DocSciLab.

My next attempt will be to try h_3m_lab_mm and see if that will allow the patch to be applied by ModuleManager. If it is applied I am keen to see if using the part name will actually pass the requirements test, as like I have already stated, the requirements use the part title.

Tis fun and all that.

Please understand that I am doing this for myself {as I am having great fun with OPT KH , H Mounted parts in a spaceplane}, but would like to share any success with the community. It is not my intention to steal or in any other way detract/deflect (whatever the phrase is) from the great work by @Angel-125.

Same sentiments go with @JadeOfMaar work with OPT and OPT_WBI. Since I am actively playing with these parts I thought I would give a little back by trying to further develop parts or test patches like OPT_WBI.

Oh and I love KSS :)

Edited by Apaseall
Link to comment
Share on other sites

@Apaseall Are you absolutely sure about that "AFTER Pathfinder" stuff? I don't see any of that in my own file. :/ I highly suggest you rename your mod on the whole to something easier and more precise for your :FOR passes like OPT_X or OPT_Z. This and no "AFTER Pathfinder" actually existing should save you nearly all your trouble.

Link to comment
Share on other sites

1 hour ago, JadeOfMaar said:

@Apaseall Are you absolutely sure about that "AFTER Pathfinder" stuff? I don't see any of that in my own file. :/ I highly suggest you rename your mod on the whole to something easier and more precise for your :FOR passes like OPT_X or OPT_Z. This and no "AFTER Pathfinder" actually existing should save you nearly all your trouble.

The first attempt at writing this got ate by the evil that is doing more than one thing at a time on the one computer.

Right try again.

I am trying to modify nodes within the EXPERIMENT_DEFINITION node that is created by the file BasicExperiments.cfg located in GameData\WildBlueIndustries\000WildBlueTools\Experiments. I presumed that I needed the nodes to actually exist before I modified them, hence the :AFTER[Pathfinder]. Or rather I cannot find a dll in the 000WildBlueTools folder, meaning I cannot directly test either a :NEEDS nor an :AFTER. I picked Pathfinder as an indirect test that the nodes exist.

Yes having a patch name that is named such that it runs at a place in the order of patches that I wish it to would be good. Or rather it would be passively assigning a run location. I am trying to actively specify when the patch runs.

There are two items I am presently focused on, the first is trying to get :HAS to work in a way I desire, the second is trying to also work with :HAS but to test name value pairs where more than one instance of the same name exists with different values.

:HAS filtering, A AND NOT(B OR C) is not going well for some reason. So I am trying :HAS to add something, then another :HAS to delete it. I guess it is a matter of ordering since brackets are not allowed, parenthesis.

:HAS multiple name value pairs I have sought advice on, I think it might be to do with accessing them through their index. Which has its own set of issues.

Then I will get back to the issue of decals not being accessed correctly. By that I mean why one call for a decal works and another does not.

So that is me with patch fingers in mods; backinblack, opt, wbi[pathfinder], extraplanetary launchpads, community resource pack, connected living space, opt wbi. Yes I am having fun :)

Link to comment
Share on other sites

4 hours ago, Ironcladsix said:

While I am thinking about it, how hard would it be to add a thrust reverser to the J81?

It requires that the part be remodelled and  animation added to rotate the thrust vector and possibly the parts associated with it such as nozzles or thrust deflector added.

@Apaseall ok I see what you were trying to do. It appeared to me that you thought you could base NEEDS off of part existence but you're just trying to be creative in how to deal with the problem

Edited by Starwaster
Link to comment
Share on other sites

18 minutes ago, Starwaster said:

 

@Apaseall ok I see what you were trying to do. It appeared to me that you thought you could base NEEDS off of part existence but you're just trying to be creative in how to deal with the problem

Thanks :) I am new to modulemanager. I am trying to figure out how to do stuff, in the best way rather than typing and going with what works.

Link to comment
Share on other sites

I was wondering is OPT still worth the download or are there more relevant mods to find nowadays?

 

I love OPT but I have a miserable time actually doing what I'd like with it, that is build a large space plane that I can explore the system with, mainly because I can't thing of a decent way to carry a sufficient sized rover/lander to celestial bodies.

Link to comment
Share on other sites

3 hours ago, ToastyOats said:

I was wondering is OPT still worth the download or are there more relevant mods to find nowadays?

 

I love OPT but I have a miserable time actually doing what I'd like with it, that is build a large space plane that I can explore the system with, mainly because I can't thing of a decent way to carry a sufficient sized rover/lander to celestial bodies.

OPT is quite worth it. All of its body types have cargo bays that can hold payloads that are 2.5m and a little wider. What you need or may be missing ought to include:

  • Better engineering skill
    OPT is quite capable of what you want but clearly you're doing something wrong, or your particular spaceplane should not be an SSTO (give it drop tanks).
  • OPT Legacy
    There are two of this mod. You probably only have OPT Main. Legacy contains engines that are more OP but also give you more options in propellants, shapes and sizes, and will allow spaceplanes to operate very well on bodies other than Kerbin and Laythe. Legacy also has even more body and wing parts too, to truly feed your creative need. :P 
  • Install a station parts mod
    If building a really big plane is overall too much trouble, build a station with OPT engines attached and have it carry the plane around.
8 hours ago, Apaseall said:

The first attempt at writing this got ate by the evil that is doing more than one thing at a time on the one computer.

Right try again.

I am trying to modify nodes within the EXPERIMENT_DEFINITION node that is created by the file BasicExperiments.cfg located in GameData\WildBlueIndustries\000WildBlueTools\Experiments. I presumed that I needed the nodes to actually exist before I modified them, hence the :AFTER[Pathfinder]. Or rather I cannot find a dll in the 000WildBlueTools folder, meaning I cannot directly test either a :NEEDS nor an :AFTER. I picked Pathfinder as an indirect test that the nodes exist.

Yes having a patch name that is named such that it runs at a place in the order of patches that I wish it to would be good. Or rather it would be passively assigning a run location. I am trying to actively specify when the patch runs.

There are two items I am presently focused on, the first is trying to get :HAS to work in a way I desire, the second is trying to also work with :HAS but to test name value pairs where more than one instance of the same name exists with different values.

:HAS filtering, A AND NOT(B OR C) is not going well for some reason. So I am trying :HAS to add something, then another :HAS to delete it. I guess it is a matter of ordering since brackets are not allowed, parenthesis.

:HAS multiple name value pairs I have sought advice on, I think it might be to do with accessing them through their index. Which has its own set of issues.

Then I will get back to the issue of decals not being accessed correctly. By that I mean why one call for a decal works and another does not.

So that is me with patch fingers in mods; backinblack, opt, wbi[pathfinder], extraplanetary launchpads, community resource pack, connected living space, opt wbi. Yes I am having fun :)

Perhaps I should have suggested :AFTER[MOLE] (if you have that installed) or not put any such pass statement on the experiment patch.

In MM's boolean system, OR takes precedence over AND, so the basic structure you want is [A,B,!C|A,C,!B] (comma and & for AND, pipe character for OR). Assuming you want B and C to be absent together, the way you should write your condition is [A&!B&!C] or if you have a condition for when one or both other mods are absent, write two patches: [A&B&!C] then [A&C&!B]. So far I've only used OR for additive needs. I don't use OR in subtractive needs.

Link to comment
Share on other sites

Not sure if this is a known issue or not, but I cant get the Stail Inline DockingPort to attach properly. I can attach normally to my craft(flipped on any axis using either attach node), but cant attach anything after that. 

Link to comment
Share on other sites

2 hours ago, Jesusthebird said:

Not sure if this is a known issue or not, but I cant get the Stail Inline DockingPort to attach properly. I can attach normally to my craft(flipped on any axis using either attach node), but cant attach anything after that. 

Do you have Tweakable Everything installed? It is known to interfere with OPT pretty fiercely.

Link to comment
Share on other sites

16 hours ago, JadeOfMaar said:

Perhaps I should have suggested :AFTER[MOLE] (if you have that installed) or not put any such pass statement on the experiment patch.

In MM's boolean system, OR takes precedence over AND, so the basic structure you want is [A,B,!C|A,C,!B] (comma and & for AND, pipe character for OR). Assuming you want B and C to be absent together, the way you should write your condition is [A&!B&!C] or if you have a condition for when one or both other mods are absent, write two patches: [A&B&!C] then [A&C&!B]. So far I've only used OR for additive needs. I don't use OR in subtractive needs.

Problem solved: (or rather I have not yet checked modulemanager.cache but outputlog.txt looks good)

Spoiler

@EXPERIMENT_DEFINITION:HAS[#id[WBI*]&#requiredPart[Doc?Science?Lab]]:NEEDS[OPT_h_3m_lab_mm]:AFTER[Pathfinder]
{
    requiredPart = OPT H Mounted Science Lab
}

 

Link to comment
Share on other sites

3 hours ago, Plecy75 said:

How can i make the parts use interstellar fuel switch instead of FS fuel switch?

Better is coming for OPT. The next Legacy release will use B9 Part Switch. IFS is very, very tedious to provide support for, and B9 Part Switch is far easier to provide support for. Once this is done, fuel options can be added by writing just two small config nodes versus adding to arrays and doing math for every group of parts that share a tank size.

Configurable Containers support might come too which is even easier but I only ever had that installed for a very brief time.

Edited by JadeOfMaar
Link to comment
Share on other sites

3 hours ago, eddie113 said:

when will OPT Space Plane parts come out for the latest version?

(version 1.4.1.2009)

It should already be compatible. Just need to ensure its dependancies are up to date.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...