Jump to content

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


sarbian

Recommended Posts

I'm working on simplifications to MKS, but I have some errors in my MM which I'm hoping someone can help me figure out.

I did this MM CFG

Spoiler

//First pass
@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
{
    //Delete unwanted ModuleResourceConverter_USI
    !MODULE[ModuleResourceConverter_USI]:HAS[#ConverterName[Chemicals]]{}
    !MODULE[ModuleResourceConverter_USI]:HAS[#ConverterName[Metals]]{}
    !MODULE[ModuleResourceConverter_USI]:HAS[#ConverterName[Polymers]]{}
    !MODULE[ModuleResourceConverter_USI]:HAS[#ConverterName[Fertilizer?M?]]{}

    //Delete unwanted ModuleEfficiencyPart
    !MODULE[ModuleEfficiencyPart],*{}
    

    //Delete unwanted RESOURCE
    !RESOURCE[Machinery]{}
    !RESOURCE[Recyclables]{}

    //Delete unwanted ModuleSwappableConverter
    !MODULE[ModuleSwappableConverter],*{}
}

//Second Pass
@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
{
    //Simplifying converters
    @MODULE[ModuleResourceConverter_USI],*
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
    //Change Converter for fertilizer
    @MODULE[ModuleResourceConverter_USI]:HAS[#ConverterName[Fertilizer?G?]]
    {
        @ConverterName = Fertilizer
        @INPUT_RESOURCE:HAS[#ResourceName[Gypsum]]
        {
            @ResourceName = Ore
        }
    }
}

But I keep getting this exception error when loading KSP, which I've been unable to track down so far.

Spoiler

[LOG 19:23:32.161] [ModuleManager] Applying node GTI_SimpleMKS/Patches/Parts/MKS_Processor125/@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS] to UmbraSpaceIndustries/MKS/Parts/MKS_Processor125/MKS_Processor125
[LOG 19:23:32.169] [ModuleManager] Applying node GTI_SimpleMKS/Patches/Parts/MKS_Processor125/@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS] to UmbraSpaceIndustries/MKS/Parts/MKS_Processor125/MKS_Processor125
[LOG 19:23:32.171] [ModuleManager] Exception while processing node : GTI_SimpleMKS/Patches/Parts/MKS_Processor125/@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
System.NullReferenceException: Object reference not set to an instance of an object
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyTo (.ConfigNode node, System.String newName) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader.ModifyNode (.ConfigNode original, .ConfigNode mod) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader+<ApplyPatch>d__63.MoveNext () [0x00000] in <filename unknown>:0 
[LOG 19:23:32.173] [ModuleManager] Processed node was
@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS][@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]]
  @PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
  {
    @MODULE[ModuleResourceConverter_USI],*
    {
      !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]
      {
      }
      !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]
      {
      }
      !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]
      {
      }
    }
    @MODULE[ModuleResourceConverter_USI]:HAS[#ConverterName[Fertilizer?G?]]
    {
      @ConverterName = Fertilizer
      @INPUT_RESOURCE:HAS[#ResourceName[Gypsum]]
      {
        @ResourceName = Ore
      }
    }
  }

I'm sure the error is in my CFG and not MM itself, I just can't figure out what. The log looks like some might be up with my brackets, but I've run over them again and again and they seem balanced enough.... What am I missing?

EDIT:

I think it might be this node, but what is the problem with that?

Spoiler

    @MODULE[ModuleResourceConverter_USI],*
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }

 

Edited by Warezcrawler
Link to comment
Share on other sites

On ‎2‎.‎4‎.‎2017 at 7:38 PM, Warezcrawler said:

EDIT:

I think it might be this node, but what is the problem with that?

  Reveal hidden contents

    @MODULE[ModuleResourceConverter_USI],*
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }

 

Have you tried to change "#" with "@"?

Link to comment
Share on other sites

1 hour ago, sebi.zzr said:

   @MODULE[ModuleResourceConverter_USI],*
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }

have you tried using 

@MODULE:HAS[#name[ModuleResourceConverter_USI]]

instead of what you have?

Link to comment
Share on other sites

17 hours ago, Sigma88 said:

have you tried using 

@MODULE:HAS[#name[ModuleResourceConverter_USI]]

instead of what you have?

I tried this just now. Same basic error.

Spoiler

[LOG 17:31:44.913] [ModuleManager] Exception while processing node : GTI_SimpleMKS/Patches/Parts/MKS_Processor125/@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
System.NullReferenceException: Object reference not set to an instance of an object
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyTo (.ConfigNode node, System.String newName) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader.ModifyNode (.ConfigNode original, .ConfigNode mod) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader+<ApplyPatch>d__63.MoveNext () [0x00000] in <filename unknown>:0 
[LOG 17:31:44.915] [ModuleManager] Processed node was
@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS][@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]]
  @PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
  {
    @MODULE:HAS[#name[ModuleResourceConverter_USI]]
    {
      !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]
      {
      }
      !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]
      {
      }
      !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]
      {
      }
    }
  }

 

18 hours ago, sebi.zzr said:

Have you tried to change "#" with "@"?

I tried this as well, and I still get the exception. Though I must say, that even without the exception in this try, I would not expect the value to have changed, since the syntax here is for nodes and not values, as @blowfish pointed out.

Spoiler

[LOG 17:35:33.913] [ModuleManager] Exception while processing node : GTI_SimpleMKS/Patches/Parts/MKS_Processor125/@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
System.NullReferenceException: Object reference not set to an instance of an object
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyTo (.ConfigNode node, System.String newName) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader.ModifyNode (.ConfigNode original, .ConfigNode mod) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader+<ApplyPatch>d__63.MoveNext () [0x00000] in <filename unknown>:0 
[LOG 17:35:33.915] [ModuleManager] Processed node was
@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS][@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]]
  @PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
  {
    @MODULE[ModuleResourceConverter_USI],*
    {
      !INPUT_RESOURCE:HAS[@ResourceName[Machinery]]
      {
      }
      !OUTPUT_RESOURCE:HAS[@ResourceName[Recyclables]]
      {
      }
      !REQUIRED_RESOURCE:HAS[@ResourceName[Machinery]]
      {
      }
    }

If I change it to the below one, then I don't get the exception, but as expected it only changes the first nodes values and not them all as I need it to.

Spoiler

@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
{
    //Simplifying converters
    //@MODULE[ModuleResourceConverter_USI],*
    //@MODULE:HAS[#name[ModuleResourceConverter_USI]]
    @MODULE[ModuleResourceConverter_USI]
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
}

That it does not hit all module can be seen from the "ModuleManager.ConfigCache".

Spoiler

UrlConfig
{
    name = MKS_Processor125
    type = PART
    parentUrl = UmbraSpaceIndustries/MKS/Parts/MKS_Processor125
    url = UmbraSpaceIndustries/MKS/Parts/MKS_Processor125/MKS_Processor125
    PART
    {
        name = MKS_Processor125
        module = Part
        author = RoverDude
        scale = 1
        rescaleFactor = 1
        node_stack_bottom = 0.0, -1, 0.0, 0.0, -1.0, 0.0, 1
        node_stack_top = 0.0, 1, 0.0, 0.0, 1.0, 0.0, 1
        TechRequired = advConstruction
        entryCost = 5000
        cost = 10000
        category = none
        subcategory = 0
        title = Material Processing Unit (1.25m)
        manufacturer = USI - Manufacturing Division
        description = The MPU allows you to quickly process planetary resources into useful products.  It may be used on its own, or used to boost productivity of Tundra-style refineries.  The MPU also features advanced automation controls, allowing it to be effectively used without the presence of crew.
        tags = USI MKS resources industrial convert sort smelt repair swap config MetalicOre Substrate Minerals MaterialKits Metals Polymers Ore Recyclables SpecializedParts ElectricCharge e/c
        attachRules = 1,0,1,1,0
        mass = 0.031
        dragModelType = default
        maximum_drag = 0.3
        minimum_drag = 0.2
        angularDrag = 1
        crashTolerance = 8
        maxTemp = 2000
        bulkheadProfiles = size1
        breakingForce = 2500
        breakingTorque = 2500
        MODEL
        {
            model = UmbraSpaceIndustries/MKS/Assets/Converter125
            rotation = 180,0,0
        }
        MODULE
        {
            name = ModuleOverheatDisplay
        }
        MODULE
        {
            name = ModuleResourceConverter_USI
            ConverterName = LFO
            StartActionName = Start LFO
            StopActionName = Stop LFO
            Efficiency = 1
            AutoShutdown = true
            GeneratesHeat = true
            UseSpecialistBonus = false
            TemperatureModifier
            {
                key = 0 10000
                key = 500 5000
                key = 1000 2500
                key = 1250 2500
                key = 1500 500
                key = 2000 0
            }
            ThermalEfficiency
            {
                key = 0 0
                key = 500 0.25
                key = 1000 1.0
                key = 1250 0.5
                key = 1500 0.1
                key = 2000 0
            }
            INPUT_RESOURCE
            {
                ResourceName = Ore
                Ratio = 0.013
            }
            INPUT_RESOURCE
            {
                ResourceName = ElectricCharge
                Ratio = 1.56
            }
            OUTPUT_RESOURCE
            {
                ResourceName = LiquidFuel
                Ratio = 0.00117
                DumpExcess = False
            }
            OUTPUT_RESOURCE
            {
                ResourceName = Oxidizer
                Ratio = 0.00143
                DumpExcess = False
            }
        }
        MODULE
        {
            name = ModuleResourceConverter_USI
            ConverterName = LiquidFuel
            StartActionName = Start LiquidFuel
            StopActionName = Stop LiquidFuel
            Efficiency = 1
            AutoShutdown = true
            GeneratesHeat = true
            UseSpecialistBonus = false
            TemperatureModifier
            {
                key = 0 10000
                key = 500 5000
                key = 1000 2500
                key = 1250 2500
                key = 1500 500
                key = 2000 0
            }
            ThermalEfficiency
            {
                key = 0 0
                key = 500 0.25
                key = 1000 1.0
                key = 1250 0.5
                key = 1500 0.1
                key = 2000 0
            }
            INPUT_RESOURCE
            {
                ResourceName = Ore
                Ratio = 0.013
            }
            INPUT_RESOURCE
            {
                ResourceName = ElectricCharge
                Ratio = 1.56
            }
            OUTPUT_RESOURCE
            {
                ResourceName = LiquidFuel
                Ratio = 0.0026
                DumpExcess = False
            }
            INPUT_RESOURCE
            {
                ResourceName = Machinery
                Ratio = 0.00000045
            }
            OUTPUT_RESOURCE
            {
                ResourceName = Recyclables
                Ratio = 0.00000045
                DumpExcess = true
            }
            REQUIRED_RESOURCE
            {
                ResourceName = Machinery
                Ratio = 90
            }
        }
        MODULE
        {
            name = ModuleResourceConverter_USI
            ConverterName = MonoPropellant
            StartActionName = Start MonoPropellant
            StopActionName = Stop MonoPropellant
            Efficiency = 1
            AutoShutdown = true
            GeneratesHeat = true
            UseSpecialistBonus = false
            
            {
                key = 0 10000
                key = 500 5000
                key = 1000 2500
                key = 1250 2500
                key = 1500 500
                key = 2000 0
            }
            ThermalEfficiency
            {
                key = 0 0
                key = 500 0.25
                key = 1000 1.0
                key = 1250 0.5
                key = 1500 0.1
                key = 2000 0
            }
            INPUT_RESOURCE
            {
                ResourceName = Ore
                Ratio = 0.013
            }
            INPUT_RESOURCE
            {
                ResourceName = ElectricCharge
                Ratio = 1.56
            }
            OUTPUT_RESOURCE
            {
                ResourceName = MonoPropellant
                Ratio = 0.0026
                DumpExcess = False
            }
            INPUT_RESOURCE
            {
                ResourceName = Machinery
                Ratio = 0.00000045
            }
            OUTPUT_RESOURCE
            {
                ResourceName = Recyclables
                Ratio = 0.00000045
                DumpExcess = true
            }
            REQUIRED_RESOURCE
            {
                ResourceName = Machinery
                Ratio = 90
            }
        }
        MODULE
        {
            name = ModuleResourceConverter_USI
            ConverterName = Fertilizer
            StartActionName = Start Fertilizer(G)
            StopActionName = Stop Fertilizer(G)
            Efficiency = 1
            AutoShutdown = true
            GeneratesHeat = true
            UseSpecialistBonus = false
            TemperatureModifier
            {
                key = 0 10000
                key = 500 5000
                key = 1000 2500
                key = 1250 2500
                key = 1500 500
                key = 2000 0
            }
            ThermalEfficiency
            {
                key = 0 0
                key = 500 0.25
                key = 1000 1.0
                key = 1250 0.5
                key = 1500 0.1
                key = 2000 0
            }
            INPUT_RESOURCE
            {
                ResourceName = Ore
                Ratio = 0.00082
            }
            INPUT_RESOURCE
            {
                ResourceName = ElectricCharge
                Ratio = 1.23
            }
            OUTPUT_RESOURCE
            {
                ResourceName = Fertilizer
                Ratio = 0.00041
                DumpExcess = False
            }
            INPUT_RESOURCE
            {
                ResourceName = Machinery
                Ratio = 0.00000045
            }
            OUTPUT_RESOURCE
            {
                ResourceName = Recyclables
                Ratio = 0.00000045
                DumpExcess = true
            }
            REQUIRED_RESOURCE
            {
                ResourceName = Machinery
                Ratio = 90
            }
        }
        MODULE
        {
            name = USI_ModuleFieldRepair
        }
        MODULE
        {
            name = MKSModule
        }
        MODULE
        {
            name = ModuleCoreHeat
            CoreTempGoal = 1000
            CoreToPartRatio = 0.1
            CoreTempGoalAdjustment = 0
            CoreEnergyMultiplier = 0.1
            HeatRadiantMultiplier = 0.25
            CoolingRadiantMultiplier = 0
            HeatTransferMultiplier = 0
            CoolantTransferMultiplier = 0.01
            radiatorCoolingFactor = 1
            radiatorHeatingFactor = 0.05
            MaxCalculationWarp = 1000
            CoreShutdownTemp = 2000
            MaxCoolant = 250
        }
        MODULE
        {
            name = USI_InertialDampener
        }
        MODULE
        {
            name = ModulePlanetaryLogistics
            PushOnly = true
        }
        MODULE
        {
            name = ModuleAGX
        }
        MODULE
        {
            name = KRnDModule
            dryMass_scienceCost = 10
            dryMass_costScaleReference = 1
            dryMass_costScale = 2
            dryMass_improvement = -0.1
            dryMass_improvementScale = 1
            ispVac_scienceCost = 15
            ispVac_costScale = 2
            ispVac_improvement = 0.05
            ispVac_improvementScale = 1
            ispAtm_scienceCost = 15
            ispAtm_costScale = 2
            ispAtm_improvement = 0.05
            ispAtm_improvementScale = 1
            fuelFlow_scienceCost = 10
            fuelFlow_costScale = 2
            fuelFlow_improvement = 0.1
            fuelFlow_improvementScale = 1
            torque_scienceCost = 5
            torque_costScale = 2
            torque_improvement = 0.25
            torque_improvementScale = 1
            chargeRate_scienceCost = 10
            chargeRate_costScale = 2
            chargeRate_improvement = 0.05
            chargeRate_improvementScale = 1
            crashTolerance_scienceCost = 10
            crashTolerance_costScale = 2
            crashTolerance_improvement = 0.15
            crashTolerance_improvementScale = 1
            batteryCharge_scienceCost = 10
            batteryCharge_costScaleReference = 500
            batteryCharge_costScale = 2
            batteryCharge_improvement = 0.2
            batteryCharge_improvementScale = 1
            generatorEfficiency_scienceCost = 15
            generatorEfficiency_costScale = 2
            generatorEfficiency_improvement = 0.1
            generatorEfficiency_improvementScale = 1
            converterEfficiency_scienceCost = 15
            converterEfficiency_costScale = 2
            converterEfficiency_improvement = 0.1
            converterEfficiency_improvementScale = 1
            parachuteStrength_scienceCost = 10
            parachuteStrength_costScale = 2
            parachuteStrength_improvement = 0.3
            parachuteStrength_improvementScale = 1
            maxTemperature_scienceCost = 5
            maxTemperature_costScale = 2
            maxTemperature_improvement = 0.2
            maxTemperature_improvementScale = 1
            fuelCapacity_scienceCost = 5
            fuelCapacity_costScaleReference = 1000
            fuelCapacity_costScale = 2
            fuelCapacity_improvement = 0.05
            fuelCapacity_improvementScale = 1
        }
        MODULE
        {
            name = ModuleLogisticsConsumer
        }
        MODULE
        {
            name = USI_ModuleRecycleablePart
            Menu = Disassemble Part
            ResourceName = MaterialKits
            Efficiency = .5
        }
        MODULE
        {
            name = GTI_MultiModeConverter
            availableInFlight = true
            availableInEditor = true
        }
    }
}

So what am I missing in the syntax?

EDIT:

I just tried two more ways

This one did not throw an exception, but did not finish the job (expected)

Spoiler

@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
{
    //Simplifying converters
    //@MODULE[ModuleResourceConverter_USI],*
    @MODULE[ModuleResourceConverter_USI],0
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
    @MODULE[ModuleResourceConverter_USI],1
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
}

This one threw the exception

Spoiler

@PART[MKS_Processor125]:AFTER[MKS]:FOR[GTI_SimpleMKS]
{
    //Simplifying converters
    //@MODULE[ModuleResourceConverter_USI],*
    @MODULE[ModuleResourceConverter_USI],0
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
    @MODULE[ModuleResourceConverter_USI],1
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
    @MODULE[ModuleResourceConverter_USI],2
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
    @MODULE[ModuleResourceConverter_USI],3
    {
        !INPUT_RESOURCE:HAS[#ResourceName[Machinery]]{}
        !OUTPUT_RESOURCE:HAS[#ResourceName[Recyclables]]{}
        !REQUIRED_RESOURCE:HAS[#ResourceName[Machinery]]{}
    }
}

I counted the module nodes, and it does hold 4 nodes. So why is this one failing?

 

EDIT EDIT:

ARHHHHGGGG...... After 1700 tries I found it. Apparently there is a syntax error in the "MKS_Processor125.CFG" in MKS mod in one of the nodes. This means MM fails to do it's thing! It should have a "TemperatureModifier" nodes name, but it is missing. I will report this to @RoverDude

Spoiler

    MODULE
    {
        name = ModuleResourceConverter_USI
        ConverterName = MonoPropellant
        StartActionName = Start MonoPropellant
        StopActionName = Stop MonoPropellant
        Efficiency = 1    
        AutoShutdown = true
        GeneratesHeat = true
        UseSpecialistBonus = false
        {
            key = 0 10000
            key = 500 5000
            key = 1000 2500
            key = 1250 2500
            key = 1500 500
            key = 2000 0
        }        

        ThermalEfficiency 
        {
            key = 0 0
            key = 500 0.25
            key = 1000 1.0
            key = 1250 0.5
            key = 1500 0.1
            key = 2000 0
        }
        INPUT_RESOURCE
        {
            ResourceName = Ore
            Ratio =  0.013
        }
        
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 1.56
        }
        
        OUTPUT_RESOURCE
        {
            ResourceName = MonoPropellant
            Ratio = 0.0026
            DumpExcess = False
        }
        INPUT_RESOURCE
        {
            ResourceName = Machinery
            Ratio = 0.00000045
        }
        OUTPUT_RESOURCE
        {
            ResourceName = Recyclables
            Ratio = 0.00000045
            DumpExcess = true
        }
        REQUIRED_RESOURCE
        {
            ResourceName = Machinery
            Ratio = 90
        }
    }            

 

Edited by Warezcrawler
Link to comment
Share on other sites

Is there a way to reference a value from a key within a node of another mod's node?

i.e. I want to reference Sigma Dimension's 'landscape' value and use it within an EVE node.

SigmaDimensions
{
	landscape = *value* //Terrain deformity multiplying factor
}

Call the above value and reference it in the following:

@EVE_CLOUDS:FINAL
{
	@OBJECT:HAS[#body[Sarnus,Urlum,Neidon,Tekto,Thatmo]]
	{
		@altitude *= value //REFERENCE TO 'landscape' VALUE FROM SIGMA DIMENSIONS
	}
}

Could you achieve it by using the following?

@SigmaDimensions
{
	landscape = *
}

@EVE_CLOUDS:FINAL
{
	landscapeMultiplier = #$@SigmaDimensions/landscape$
	@OBJECT:HAS[#body[Sarnus,Urlum,Neidon,Tekto,Thatmo]]
	{
		@altitude *= #$landscapeMultiplier$
	}
}
Edited by Poodmund
Link to comment
Share on other sites

2 hours ago, Poodmund said:

Is there a way to reference a value from a key within a node of another mod's node?

i.e. I want to reference Sigma Dimension's 'landscape' value and use it within an EVE node.


SigmaDimensions
{
	landscape = *value* //Terrain deformity multiplying factor
}

Call the above value and reference it in the following:


@EVE_CLOUDS:FINAL
{
	@OBJECT:HAS[#body[Sarnus,Urlum,Neidon,Tekto,Thatmo]]
	{
		@altitude *= value //REFERENCE TO 'landscape' VALUE FROM SIGMA DIMENSIONS
	}
}

Could you achieve it by using the following?


@SigmaDimensions
{
	landscape = *
}

@EVE_CLOUDS:FINAL
{
	landscapeMultiplier = #$@SigmaDimensions/landscape$
	@OBJECT:HAS[#body[Sarnus,Urlum,Neidon,Tekto,Thatmo]]
	{
		@altitude *= #$landscapeMultiplier$
	}
}

almost,

the idea is correct, or you could bypass the "landscapeMultiplier" by doing directly 


        @altitude *= #$@SigmaDimensions/landscape$

 

biggest problem is that #body[Sarnus,Urlum] will fail

you want to use :HAS[#body[Sarnus]|#body[Urlum]|#body[Neidon]]

 

I don't even know if MM can handle OR there, so you might need to use multiple nodes 

Link to comment
Share on other sites

I need a little help here.  The following MM works, but I'd like to get it into a single stanza, but I can't get the "or" to work, so I have it separate.

@PART[*]:HAS[@MODULE[ModuleDecouple]]:NEEDS[StageRecovery]
{
	MODULE
	{
		name = RecoveryIDModule
	}
	MODULE
	{
		name = ControllingRecoveryModule
	}
}
@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler]]:NEEDS[StageRecovery]
{
	MODULE
	{
		name = RecoveryIDModule
	}
	MODULE
	{
		name = ControllingRecoveryModule
	}
}

 

Link to comment
Share on other sites

57 minutes ago, linuxgurugamer said:

but I can't get the "or" to work

would be extra helpful to see how you were going about trying to get the OR working :wink: This is how I would do it based off other configs I see using the operator

@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]
{
	MODULE
	{
		name = RecoveryIDModule
	}
	MODULE
	{
		name = ControllingRecoveryModule
	}
}

Since I have to guess maybe you were trying

@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler]|@MODULE[ModuleDecouple]]:NEEDS[StageRecovery]

?

Link to comment
Share on other sites

10 hours ago, Drew Kerman said:

would be extra helpful to see how you were going about trying to get the OR working :wink: This is how I would do it based off other configs I see using the operator


@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]
{
	MODULE
	{
		name = RecoveryIDModule
	}
	MODULE
	{
		name = ControllingRecoveryModule
	}
}

Since I have to guess maybe you were trying


@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler]|@MODULE[ModuleDecouple]]:NEEDS[StageRecovery]

?

Your guess was correct (I found an old copy in a backup)

However, your suggestion did not work:

@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]

No errors from MM that I can see, it shows the line in the log:

Config(@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]) FMRS/FMRS_MM/@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]

Just does nothing

Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

However, your suggestion did not work:

1 hour ago, blowfish said:

unfortunately it doesn't look like there's an or operator inside a HAS block.  Just checked the code.

D'oh! Yea, I built my example from seeing the OR used to detect multiple PART[] instances, which is why I didn't know it wouldn't work

 

Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

Your guess was correct (I found an old copy in a backup)

However, your suggestion did not work:


@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]

No errors from MM that I can see, it shows the line in the log:


Config(@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]) FMRS/FMRS_MM/@PART[*]:HAS[@MODULE[ModuleAnchoredDecoupler|ModuleDecouple]]:NEEDS[StageRecovery]

Just does nothing

You could try

@PART[*]:HAS[@MODULE[Module*Decouple*]]:NEEDS[StageRecovery]

That should catch both ModuleAnchoredDecoupler and ModuleDecouple

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