Jump to content

[1.2.2] Contract Pack: Clever Sats 1.4 (13/12/2016)


severedsolo

Recommended Posts

I know this mod doesn't officially support 1.10.1, but I'm wondering if this issue can be fixed on my side or if I should report it to Contract Configurator. I encounter lots of errors like this one:

Spoiler

[ERR 09:26:35.810] ContractConfigurator.Behaviour.ExpressionFactory: CONTRACT_TYPE 'CleverSatProbeMalfunction', BEHAVIOUR '<blank>' of type 'Expression': A validation error occured while loading the key 'badSat' with value '09153 Olympus 9'.

[EXC 09:26:36.179] ArgumentException: Unexpected value: Olympus
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatement[TResult] (T lval) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatementInner[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatement[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    Rethrow as Exception: Error parsing statement.
    Error occurred near '*':
    09153 Olympus 9
    ......* <-- HERE
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpressionGeneric (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.Behaviour.Expression+<>c__DisplayClass22_0.<OnLoad>b__1 (System.String s) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Action`1[T] setter, ContractConfigurator.IContractConfiguratorFactory obj, T defaultValue, System.Func`2[T,TResult] validation) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    ContractConfigurator.LoggingUtil:LogException(Exception)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, String, Func`2)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Func`2)
    ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1)
    System.Reflection.MethodBase:Invoke(Object, Object[])
    ContractConfigurator.<UpdateNonDeterministicValuesIterator>d__31:MoveNext()
    System.Linq.ConcatIterator`1:MoveNext()
    ContractConfigurator.<GenerateContract>d__33:MoveNext()
    ContractConfigurator.<ContractEnumerator>d__32:MoveNext()
    ContractConfigurator.ContractPreLoader:Update()

"09153 Olympus 9" is a name of my vessel. Apparently, the mod doesn't like that it has spaces in the name and throws an exception. As a result, I also don't get CleverSatProbeMalfunction contracts.

Link to comment
Share on other sites

  • 3 months later...

Apologies for resurrecting this, but it's the closest to what I am looking for.  This wonderful pack generates contracts to destroy Sats deployed only by this agency.  What of the below should I tweak to have the pack generate contracts to destroy only vessels labelled as debris, thank you.

    CONTRACT_TYPE
{
    name = CleverSatRogueAI
    title = Destroy a rogue satellite
    group = CleverSat
    description = It seems that @/Sat has gone rogue. We need to terminate it.
    genericDescription = One of our satellites has gone rogue. We need to terminate it.
    targetBody = @/Sat.CelestialBody()
    synopsis = Destroy the rogue satellite.
    completedMessage = Crisis averted. Good job.
    rewardFunds = Random(20000,40000)
    rewardReputation = Random(1.0, 2.0)
    maxSimultaneous = 1

    DATA
    {
    type = Vessel    
    Sat = $badSat
    title = One of your satellites must have gone rogue.
    }
    
    PARAMETER
    {
        name = DestroySat
        type = VesselParameterGroup
        vessel = @/Sat
        
        PARAMETER
        {
            name = VesselDestroyed
            type = VesselDestroyed
            title = Destroy @/Sat. With extreme prejudice.
        }
    }
}

Link to comment
Share on other sites

4 minutes ago, WhitestWizard said:

What of the below should I tweak to have the pack generate contracts to destroy only vessels labelled as debris, thank you.

This is more a question for the Contract Configurator thread, but I'll give you a start:

You'd need to rewrite the DATA node (warning - this has been done from memory so syntax might be wrong, check the Contract Configurator Wiki)
 

DATA
    {
    type = Vessel    
    debrisTarget = AllVessels().Where(v => v.VesselType() == Debris).Random()
    title = //flavour text
    }

That will grab any vessel that has been marked as debris, you would then target the DATA node using @/debrisTarget

You probably don't want to use .Random() though as that will duplicate contracts. What you probably want is a uniqueness check - which you can read all about here: https://github.com/jrossignol/ContractConfigurator/wiki/Data-Node

Link to comment
Share on other sites

  • 3 weeks later...

Hey, I have a question. I have the Stayputnik probe, Solar panels unlocked and the rng is liking me. But it says that I have the Stayputnik probe requirement as unmet for some reason. I don't know if this is because I'm playing with Unkerballed Start or what, but is this some sort of bug?
screenshot5.png
screenshot6.png

Link to comment
Share on other sites

Interesting...

My installation showed the exact same error (didn't pay attention to these contracts for a while, and didn't notice earlier).

The KSP.log showed

[ERR 11:43:45.063] ContractConfigurator.PartUnlockedRequirement: CONTRACT_TYPE 'CleverSatCore', REQUIREMENT 'Probe' of type 'PartUnlocked': Error parsing part

plus

Spoiler

[EXC 11:43:45.066] ArgumentException: 'probeCoreSphere' is not a valid Part.
    ContractConfigurator.ExpressionParser.PartParser.ParseIdentifier (ContractConfigurator.ExpressionParser.BaseParser+Token token) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseVarOrIdentifier (ContractConfigurator.ExpressionParser.BaseParser+Token token) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseSimpleStatement[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatementInner[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatement[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    Rethrow as Exception: Error parsing statement.
    Error occurred near '*':
    probeCoreSphere
    ...............* <-- HERE
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ConfigNodeUtil.ParseSingleValue[T] (System.String key, System.String stringValue, System.Boolean allowExpression) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Boolean allowExpression) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Action`1[T] setter, ContractConfigurator.IContractConfiguratorFactory obj, T defaultValue, System.Func`2[T,TResult] validation) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    ContractConfigurator.LoggingUtil:LogException(Exception)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, List`1, Func`2)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
    ContractConfigurator.PartUnlockedRequirement:LoadFromConfig(ConfigNode)
    ContractConfigurator.ContractRequirement:GenerateRequirement(ConfigNode, ContractType, ContractRequirement&, IContractConfiguratorFactory)
    ContractConfigurator.ContractRequirement:GenerateRequirement(ConfigNode, ContractType, ContractRequirement&, IContractConfiguratorFactory)
    ContractConfigurator.ContractType:Load(ConfigNode)
    ContractConfigurator.<LoadContractTypeConfig>d__31:MoveNext()
    ContractConfigurator.<FinalizeContractTypeLoad>d__30:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[WRN 11:43:45.067] ContractConfigurator.ContractType: Errors encountered while trying to load CONTRACT_TYPE 'CleverSatCore'
 

Thought to myself, maybe it's due me to purging the old Stayputnik part? I changed the MM patch to

Spoiler

//Add revamped probe core to the cleversat contract pack
//Add Kopernicus solarpanel if available
@CONTRACT_TYPE[CleverSatCore]:FINAL
{
    !REQUIREMENT[Probe] {}
    
    REQUIREMENT
    {
        name = Any
        type = Any
        
        REQUIREMENT
        {
            name = Probe_v2
            type = PartUnlocked
            part = probeCoreSphere_v2
        }
    }
    
    @REQUIREMENT[Any]:HAS[@REQUIREMENT[PartModuleUnlocked]]:NEEDS[Kopernicus]
    {
        REQUIREMENT
        {
            name = PartModuleUnlocked
            type = PartModuleUnlocked
            partModule = KopernicusSolarPanel
        }
    }
}
 

and, tatah (wonders of world of tech), now it looks:

Kerbal-Space-Program-2021-03-10-11-51-26

 

Link to comment
Share on other sites

19 minutes ago, FabioofSpace said:

Hey, what do I have to correct in line 19? Cause I don't understand what you mean with "(a closing bracket too much)"

Count the brackets.

    excludeTargets = $ConstellationList.Add(Target).Where(g => Vessel(g).IsOrbiting() && Vessel(g).Orbit().Inclination() < incThreshold))

should read

    excludeTargets = $ConstellationList.Add(Target).Where(g => Vessel(g).IsOrbiting() && Vessel(g).Orbit().Inclination() < incThreshold)

OK?

Edited by VoidSquid
Link to comment
Share on other sites

1 hour ago, VoidSquid said:

Interesting...

My installation showed the exact same error (didn't pay attention to these contracts for a while, and didn't notice earlier).

The KSP.log showed

[ERR 11:43:45.063] ContractConfigurator.PartUnlockedRequirement: CONTRACT_TYPE 'CleverSatCore', REQUIREMENT 'Probe' of type 'PartUnlocked': Error parsing part

plus

  Hide contents

[EXC 11:43:45.066] ArgumentException: 'probeCoreSphere' is not a valid Part.
    ContractConfigurator.ExpressionParser.PartParser.ParseIdentifier (ContractConfigurator.ExpressionParser.BaseParser+Token token) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseVarOrIdentifier (ContractConfigurator.ExpressionParser.BaseParser+Token token) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseSimpleStatement[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatementInner[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseStatement[TResult] () (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    Rethrow as Exception: Error parsing statement.
    Error occurred near '*':
    probeCoreSphere
    ...............* <-- HERE
    ContractConfigurator.ExpressionParser.ExpressionParser`1[T].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ConfigNodeUtil.ParseSingleValue[T] (System.String key, System.String stringValue, System.Boolean allowExpression) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Boolean allowExpression) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    ContractConfigurator.ConfigNodeUtil.ParseValue[T] (ConfigNode configNode, System.String key, System.Action`1[T] setter, ContractConfigurator.IContractConfiguratorFactory obj, T defaultValue, System.Func`2[T,TResult] validation) (at <ef0243a06f2841fe9bf57034a334902e>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    ContractConfigurator.LoggingUtil:LogException(Exception)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, List`1, Func`2)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
    ContractConfigurator.PartUnlockedRequirement:LoadFromConfig(ConfigNode)
    ContractConfigurator.ContractRequirement:GenerateRequirement(ConfigNode, ContractType, ContractRequirement&, IContractConfiguratorFactory)
    ContractConfigurator.ContractRequirement:GenerateRequirement(ConfigNode, ContractType, ContractRequirement&, IContractConfiguratorFactory)
    ContractConfigurator.ContractType:Load(ConfigNode)
    ContractConfigurator.<LoadContractTypeConfig>d__31:MoveNext()
    ContractConfigurator.<FinalizeContractTypeLoad>d__30:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[WRN 11:43:45.067] ContractConfigurator.ContractType: Errors encountered while trying to load CONTRACT_TYPE 'CleverSatCore'
 

Thought to myself, maybe it's due me to purging the old Stayputnik part? I changed the MM patch to

  Hide contents

//Add revamped probe core to the cleversat contract pack
//Add Kopernicus solarpanel if available
@CONTRACT_TYPE[CleverSatCore]:FINAL
{
    !REQUIREMENT[Probe] {}
    
    REQUIREMENT
    {
        name = Any
        type = Any
        
        REQUIREMENT
        {
            name = Probe_v2
            type = PartUnlocked
            part = probeCoreSphere_v2
        }
    }
    
    @REQUIREMENT[Any]:HAS[@REQUIREMENT[PartModuleUnlocked]]:NEEDS[Kopernicus]
    {
        REQUIREMENT
        {
            name = PartModuleUnlocked
            type = PartModuleUnlocked
            partModule = KopernicusSolarPanel
        }
    }
}
 

and, tatah (wonders of world of tech), now it looks:

Kerbal-Space-Program-2021-03-10-11-51-26

 

I applied all the patches, but strangely it is still not showing. Is this because I'm on 1.11? screenshot11.png

Link to comment
Share on other sites

Don't know (I'm using KSP 1.10.1.), but I doubt it.

What does your MM patch read?

Mine now is:

Spoiler

//Add revamped probe core to the cleversat contract pack
//Add Kopernicus solarpanel if available
@CONTRACT_TYPE[CleverSatCore]:FINAL
{
    !REQUIREMENT[Probe] {}
    
    REQUIREMENT
    {
        name = Any
        type = Any
        
        REQUIREMENT
        {
            name = Probe_v2
            type = PartUnlocked
            part = probeCoreSphere_v2
        }
    }
    
    @REQUIREMENT[Any]:HAS[@REQUIREMENT[PartModuleUnlocked]]:NEEDS[Kopernicus]
    {
        REQUIREMENT
        {
            name = PartModuleUnlocked
            type = PartModuleUnlocked
            partModule = KopernicusSolarPanel
        }
    }
}
 

And anything regarding CleverSatCore in your KSP.log?

Link to comment
Share on other sites

2 minutes ago, VoidSquid said:

Don't know (I'm using KSP 1.10.1.), but I doubt it.

What does your MM patch read?

Mine now is:

  Hide contents

//Add revamped probe core to the cleversat contract pack
//Add Kopernicus solarpanel if available
@CONTRACT_TYPE[CleverSatCore]:FINAL
{
    !REQUIREMENT[Probe] {}
    
    REQUIREMENT
    {
        name = Any
        type = Any
        
        REQUIREMENT
        {
            name = Probe_v2
            type = PartUnlocked
            part = probeCoreSphere_v2
        }
    }
    
    @REQUIREMENT[Any]:HAS[@REQUIREMENT[PartModuleUnlocked]]:NEEDS[Kopernicus]
    {
        REQUIREMENT
        {
            name = PartModuleUnlocked
            type = PartModuleUnlocked
            partModule = KopernicusSolarPanel
        }
    }
}
 

And anything regarding CleverSatCore in your KSP.log?

Spoiler

//Add revamped probe core to the cleversat contract pack
//Add Kopernicus solarpanel if available
@CONTRACT_TYPE[CleverSatCore]:FINAL
{
    !REQUIREMENT[Probe] {}
    
    REQUIREMENT
    {
        name = Any
        type = Any
        
        REQUIREMENT
        {
            name = Probe_v2
            type = PartUnlocked
            part = probeCoreSphere_v2
        }
    }
    
    @REQUIREMENT[Any]:HAS[@REQUIREMENT[PartModuleUnlocked]]:NEEDS[Kopernicus]
    {
        REQUIREMENT
        {
            name = PartModuleUnlocked
            type = PartModuleUnlocked
            partModule = KopernicusSolarPanel
        }
    }
}
 

Spoiler

Cleversat_patch.cfg

[LOG 12:10:34.603] Load(Texture): ContractPacks/CleverSat/Agent/CleverSat
[LOG 12:10:34.611] Load(Texture): ContractPacks/CleverSat/Agent/CleverSat_scaled
[LOG 12:10:34.614] Load(Texture): ContractPacks/CleverSat/Images/Hal
[WRN 12:10:34.624] Texture resolution is not valid for compression: 'C:\Games\KSP JNSQ\GameData\ContractPacks\CleverSat\Images\Hal.png' - consider changing the image's width and height to enable compression

[LOG 12:13:12.048] Config(@CONTRACT_TYPE[CleverSatCore]:FINAL) /Cleversat_patch/@CONTRACT_TYPE[CleverSatCore]:FINAL

[LOG 12:13:12.198] Config(CONTRACT_GROUP) ContractPacks/CleverSat/CleverSat/CleverSat
[LOG 12:13:12.198] Config(CONTRACT_TYPE) ContractPacks/CleverSat/CleverSatConstellation/CleverSatConstellation
[LOG 12:13:12.198] Config(CONTRACT_TYPE) ContractPacks/CleverSat/CleverSatConstellationShift/CleverSatConstellationShift
[LOG 12:13:12.198] Config(CONTRACT_TYPE) ContractPacks/CleverSat/CleverSatCore/CleverSatCore
[LOG 12:13:12.198] Config(CONTRACT_TYPE) ContractPacks/CleverSat/CleverSatProbeMalfunction/CleverSatProbeMalfunction
[LOG 12:13:12.198] Config(CONTRACT_TYPE) ContractPacks/CleverSat/CleverSatRandomShift/CleverSatRandomShift
[LOG 12:13:12.198] Config(CONTRACT_TYPE) ContractPacks/CleverSat/CleverSatRogueAI/CleverSatRogueAI
[LOG 12:13:12.198] Config(AGENT) ContractPacks/CleverSat/Agent/CleverSatsAgency/Astronomical Survey Society
[LOG 12:13:12.199] Config(@STRATEGY_LEVEL_EXPAND[EngineerFocus]:NEEDS[Strategia]) ContractPacks/CleverSat/Patches/Strategia/@STRATEGY_LEVEL_EXPAND[EngineerFocus]:NEEDS[Strategia]

Changed : /Cleversat_patch.cfg.cfg
Changed : ContractPacks/CleverSat/CleverSatRandomShift.cfg.cfg

[LOG 12:10:24.696] Deleting node in file ContractPacks/CleverSat/CleverSatCore subnode: CONTRACT_TYPE/REQUIREMENT:NEEDS[RemoteTech] as it can't satisfy its NEEDS

[LOG 12:10:27.785] Applying update ContractConfigurator/patches/Agent_Title/@AGENT[*]:HAS[~title] to ContractPacks/CleverSat/Agent/CleverSatsAgency.cfg/AGENT[Astronomical Survey Society]
[LOG 12:10:27.789] Applying update ContractPacks/CleverSat/Patches/Strategia/@STRATEGY_LEVEL_EXPAND[EngineerFocus]:NEEDS[Strategia] to JNSQ/JNSQ_Configs/Strategia.cfg/STRATEGY_LEVEL_EXPAND[EngineerFocus]
[LOG 12:10:27.789] Applying update ContractPacks/CleverSat/Patches/Strategia/@STRATEGY_LEVEL_EXPAND[EngineerFocus]:NEEDS[Strategia] to Strategia/Strategies/Operations-2-EngineerFocus.cfg/STRATEGY_LEVEL_EXPAND[EngineerFocus]

[LOG 12:11:00.498] Applying update /Cleversat_patch/@CONTRACT_TYPE[CleverSatCore]:FINAL to ContractPacks/CleverSat/CleverSatCore.cfg/CONTRACT_TYPE[CleverSatCore]

[LOG 12:22:09.388] [INFO] ContractConfigurator.ContractConfigurator: Loading CONTRACT_GROUP: 'CleverSat'
[LOG 12:22:23.834] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatConstellation'
[LOG 12:22:23.884] [INFO] ContractConfigurator.ContractType: Successfully loaded CONTRACT_TYPE 'CleverSatConstellation'
[LOG 12:22:23.892] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatConstellationShift'
[LOG 12:22:23.926] [INFO] ContractConfigurator.ContractType: Successfully loaded CONTRACT_TYPE 'CleverSatConstellationShift'
[LOG 12:22:23.934] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatCore'
[ERR 12:22:23.944] ContractConfigurator.PartModuleUnlockedRequirement: CONTRACT_TYPE 'CleverSatCore', REQUIREMENT 'PartModuleUnlocked' of type 'PartModuleUnlocked': A validation error occured while loading the key 'partModule' with value 'System.Collections.Generic.List`1[System.String]'.

[WRN 12:22:23.952] ContractConfigurator.ContractType: Errors encountered while trying to load CONTRACT_TYPE 'CleverSatCore'
[LOG 12:22:23.965] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatProbeMalfunction'
[LOG 12:22:24.184] [INFO] ContractConfigurator.ContractType: Successfully loaded CONTRACT_TYPE 'CleverSatProbeMalfunction'
[LOG 12:22:24.202] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatRandomShift'
[LOG 12:22:24.209] [INFO] ContractConfigurator.ContractType: Successfully loaded CONTRACT_TYPE 'CleverSatRandomShift'
[LOG 12:22:24.217] [INFO] ContractConfigurator.ContractType: Loading CONTRACT_TYPE: 'CleverSatRogueAI'
[LOG 12:22:24.219] [INFO] ContractConfigurator.ContractType: Successfully loaded CONTRACT_TYPE 'CleverSatRogueAI'

This is all I found from the logs and the patch

Link to comment
Share on other sites

@VoidSquid It's been a while since I wrote the patch to include the probe_v2 core into the contract pack and maybe something changed since then so please correct me if I'm wrong but a node of the type "any" like this:

REQUIREMENT
{
	name = Any
	type = Any
	[...]
}

should fulfill the requirement once ANY of them is met...right? 
IIRC that's the reason why I was able to include the kopernicus solar panels without checking if these are actually enabled in the config since it is not necessary to use the kopernicus solarpanels, just because kopernicus is installed.

So, if I'm right, there should be no difference in the result between your edited version of my patch and my original. So, I've got a question for you: do you use kopernicus in your game installed you've used to test this?

As far as I can tell, the issue is actually the missing "s" at the end of "KopernicusSolarPanel", so it should be "KopernicusSolarPanels". Obviously, this issue will not affect you without kopernicus installed.

I swear my patch used to work when I wrote it, so maybe there was an actual change to the name of the partmodule or I actually messed it up and never ever noticed for whatever reason.

Anyway, TLDR ( @FabioofSpace that's the important part for you as well): add an "s" the kopernicus partmodule so it says:

partModule = KopernicusSolarPanels

or if you prefer the whole patch:

//Add revamped probe core to the cleversat contract pack
//Add Kopernicus solarpanel if available
@CONTRACT_TYPE[CleverSatCore]:FINAL
{
	!REQUIREMENT[Probe] {}
	
	REQUIREMENT
	{
		name = Any
		type = Any
		
		REQUIREMENT
		{
			name = Probe
			type = PartUnlocked
			part = probeCoreSphere
		}
		
		REQUIREMENT
		{
			name = Probe_v2
			type = PartUnlocked
			part = probeCoreSphere_v2
		}
	}
	
	@REQUIREMENT[Any]:HAS[@REQUIREMENT[PartModuleUnlocked]]:NEEDS[Kopernicus]
	{
		REQUIREMENT
		{
			name = PartModuleUnlocked
			type = PartModuleUnlocked
			partModule = KopernicusSolarPanels
		}
	}
}

 

Link to comment
Share on other sites

This:

[ERR 12:22:23.944] ContractConfigurator.PartModuleUnlockedRequirement: CONTRACT_TYPE 'CleverSatCore', REQUIREMENT 'PartModuleUnlocked' of type 'PartModuleUnlocked': A validation error occured while loading the key 'partModule' with value 'System.Collections.Generic.List`1[System.String]'.

Is it possible that any mod you have replaces/removes the part?

1 minute ago, 4x4cheesecake said:

so please correct me if I'm wrong

Can only say that it works fine for me, after changing the patch to ignore the non-v2 part, as I purged the old Stayputnik v1 via JC.

See the screenshot in my earlier post.

Link to comment
Share on other sites

5 minutes ago, VoidSquid said:

Can only say that it works fine for me, after changing the patch to ignore the non-v2 part, as I purged the old Stayputnik v1 via JC.

Oh, you purged it via JC that actually makes sense to break then, for the same reason it breaks on the KopernicusSolarPanels: CC still looks for the part/partmodule and will throw an exception if it doesn't find it. Usually the part is just hidden and still accessible but purging via JC completely removes it from the game.

Now I understand why it works for you but still, that should only be the case if you don't have kopernicus installed because the missing "s" is still a thing. Would you mind to satisfy my curiosity and tell me if you run kopernicus on the install you've tried this?

Link to comment
Share on other sites

  

11 minutes ago, 4x4cheesecake said:

you purged it via JC that actually makes sense to break then

Yepp, and hence removing the respective lines did fix it for me.

I'm wondering if maybe @FabioofSpace also might have purged a specific part?

 

11 minutes ago, 4x4cheesecake said:

Would you mind to satisfy my curiosity

If you're asking so nicely, I actually would :D

No Kopernicus here.

Edited by VoidSquid
Link to comment
Share on other sites

Still have to wonder though, my error caused by a non existent part was  

2 hours ago, VoidSquid said:

[ERR 11:43:45.063] ContractConfigurator.PartUnlockedRequirement: CONTRACT_TYPE 'CleverSatCore', REQUIREMENT 'Probe' of type 'PartUnlocked': Error parsing part

while @FabioofSpace got

31 minutes ago, VoidSquid said:

[ERR 12:22:23.944] ContractConfigurator.PartModuleUnlockedRequirement: CONTRACT_TYPE 'CleverSatCore', REQUIREMENT 'PartModuleUnlocked' of type 'PartModuleUnlocked': A validation error occured while loading the key 'partModule' with value 'System.Collections.Generic.List`1[System.String]'.

Similar, but not identical. You think it could be because of the Kopernicus typo, @4x4cheesecake ?

Edited by VoidSquid
Link to comment
Share on other sites

16 minutes ago, VoidSquid said:

If you're asking so nicely, I actually would :D

No Kopernicus here.

Well, thank you very much. In this case, the mystery is solved :)

Regarding the missing "s": This was actually correct for kopernicus for KSP 1.6, back in 2019 when I wrote this patch, I've doubled checked the old kopernicus version on github. So at least I'm not completely dumb and missed a major issue in my own patch, but this need to be changed for KSP 1.8+ to include the "s" :)

6 minutes ago, VoidSquid said:

Similar, but not identical.

Yes, because it was a missing part for you and it is a missing partmodule for @FabioofSpace ;)

Take a close look at the contract requirements: for the probe core, it says:

type = PartUnlocked

but for the solar panels, it is:

type = PartModuleUnlocked

It makes sense to differentiate between parts and partmodules here, since you will have multiple parts which utilize the same partmodule (for the solar panels) but you will always just have a single part with this specific name (for the probe core).

For each contract, CC checks the list of requirements and looks them up in the game database. In your case, it was a missing part since you purged it via JC, in the other case it's the missing partmodule or more specific, the wrong name so CC wasn't able to find it.

Edited by 4x4cheesecake
Link to comment
Share on other sites

Changes and dependencies, who doesn't love it... ;) 

As you obviously know and understand way more of MM stuff than I do, any idea about @FabioofSpace 's error message?

What I found was this

https://github.com/Kopernicus/Kopernicus/issues/451

If I'm not mistaken, this is the exact "s"-error, isn't it?

@4x4cheesecake Excellent! I think the mysteries are solved then:

1. If you purge a part, remove the checks for that part

2. If you're using Kopernicus 1.8+, add a "s" to the respective line in the MM patch :)

Everyday to learn something new and solve another little mystery, thanks :) 

Edited by VoidSquid
Link to comment
Share on other sites

  

1 hour ago, FabioofSpace said:

Well, it seems to now work. Which is great! 

You're welcome, glad we could help :)

  

1 hour ago, FabioofSpace said:

Why do the one star contracts take place in High orbits such as 799.212 km? I have always wondered that.

That would be a question for the mod author. :) 

I think though, that altitude is not a difficult thing to do (just some more dv, isn't it?), correct inclination and LAN are more difficult.

Edited by VoidSquid
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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