Jump to content

[1.8.x+] Strategia [v1.8.0] [2019-10-22]


nightingale

Recommended Posts

Running in 1.11.2 with a JNSQ build & noticed that Strategia wasn't working (none of the new categories show, only one strategy present at all). As a test, I did a fresh, clean install of 1.11.2 and installed Strategia (along with prereqs) using CKAN. Those are the only mods present to eliminate mod-conflict as a possibility.

Launched a new career & looked at the Admin building; same issue.  This is the first error in the log:

[EXC 10:10:25.239] ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
	System.Reflection.Assembly.GetTypes () (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	ContractConfigurator.ContractConfigurator+<GetAllTypes>d__32`1[T].MoveNext () (at <ef0243a06f2841fe9bf57034a334902e>:0)
	Rethrow as Exception: Error loading types from assembly Strategia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:LogException(Exception)
	ContractConfigurator.LoggingUtil:LogException(Exception)
	ContractConfigurator.<GetAllTypes>d__32`1:MoveNext()
	System.Linq.WhereEnumerableIterator`1:MoveNext()
	ContractConfigurator.ContractConfigurator:RegisterParameterFactories()
	ContractConfigurator.ContractConfigurator:PSystemReady()
	EventVoid:Fire()
	<Start>d__32:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Following that is a plethora of errors from Contract Configurator trying to load the Strategia contracts. Here are the first instances but the rest follow this general pattern:

[ERR 10:10:32.464] ContractConfigurator.ContractType: CONTRACT_TYPE 'STG_BodyProbes': Error parsing type

[EXC 10:10:32.465] ArgumentException: 'StrategiaStrategy' is not a valid type.
	ContractConfigurator.ConfigNodeUtil.ParseTypeValue (System.String name) (at <ef0243a06f2841fe9bf57034a334902e>:0)
	ContractConfigurator.ConfigNodeUtil.ParseSingleValue[T] (System.String key, System.String stringValue, System.Boolean allowExpression) (at <ef0243a06f2841fe9bf57034a334902e>: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, Type, Func`2)
	ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
	ContractConfigurator.ExpressionParser.DataNode:ParseDataNodes(ConfigNode, IContractConfiguratorFactory, Dictionary`2, Dictionary`2)
	ContractConfigurator.ContractType:Load(ConfigNode)
	ContractConfigurator.<LoadContractTypeConfig>d__31:MoveNext()
	ContractConfigurator.<FinalizeContractTypeLoad>d__30:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[ERR 10:10:32.492] ContractConfigurator.ContractType: CONTRACT_TYPE 'STG_BodyProbes': Error parsing title

[EXC 10:10:32.493] Exception: Unknown identifier '@/strategy'.
	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.ConfigNodeUtil:ExecuteDeferredLoads()
	ContractConfigurator.ContractType:Load(ConfigNode)
	ContractConfigurator.<LoadContractTypeConfig>d__31:MoveNext()
	ContractConfigurator.<FinalizeContractTypeLoad>d__30:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[ERR 10:10:32.493] ContractConfigurator.ContractType: CONTRACT_TYPE 'STG_BodyProbes': Error parsing description

All  versions:

Kerbal Space Program 1.11.2.3077

Strategia 1.8.0

Contract Configurator 1.30.5

Custom Barn Kit 1.1.21.0

Module Manager 4.1.4

 

Please let me know if there is further information I can provide.

Edited by Bombaatu
Link to comment
Share on other sites

  • 2 weeks later...

Okay, so this is a pretty minor issue, but I've accidentally discovered that the Mun (Probes) strategy is farmable. I just completed it for the first time, and I'm being offered it again. Even though I've landed on the Mun three times, I did all three with trajectories from LKO straight to a Mun surface intercept and never circularized. So, the strategy prerequisite of "Must not have orbited the Mun" is resulting in the mod still offering me the strategy. Perhaps it should have "Must not have landed on the Mun" instead (or as well)? I suspect this might also be an issue in the other similar strategies.

Link to comment
Share on other sites

On 4/26/2021 at 4:23 PM, HoveringKiller said:
  Reveal hidden contents

 

I just installed everything required (Contract Manager, Module Manager, and Custom Barn Kit) and it's working for me, and that's on a moded game. Have you tried verifying game cache and then installing everything?

It was a brand-new install.

Link to comment
Share on other sites

16 hours ago, kspnerd122 said:

Running KSP 1.7.3, and strategia broke again, I have all the dependencies and everything, so I dont know what happened(im using a older version of strategia, should I update it to the most recent version)

From my understanding, you have to stay on the version most recently updated for *your* version of KSP. if you're on  KSP v1.7.3, it has to be Strategia v1.7.3)

Was it working and then stopped? if you post a link to your whole log, the author or someone else might have some idea of how to help or figure out what the conflict is.

Link to comment
Share on other sites

Hi, just like to confirm that the mod works good so far on 1.11, except for contract slot machine which re-roll the rewards after loading a save (as mentioned in a previous comment)

I'll raise a issue on github as nightingale suggests

Link to comment
Share on other sites

Hi all,

Maybe i don't understand the wiki of strategia "creating new strategies" => i try to create a own strategy "KerbinProgram" with contract land/splash at all biomes (more effects planned)

I wasn't able to setup it fine.   Only if I reuse a original strategia strategy it looks fine.

=> is it possible to include new strategies? If yes, any idea where my fail?

Strategy:

Spoiler

 

// Strategy for kerbin biome probes
STRATEGY_LEVEL_EXPAND:NEEDS[CustomBarnKit]
{
    //name = KerbinProgram
    name = FreeIceCream
    title = KerbinProgram
    desc = How many biomes will Kerbin have?
    department = KerbinProgram
    icon = Strategia/icons/FreeIceCream

    groupTag = KerbinProgram
    
    minLeastDuration = 600
    maxLeastDuration = 600
    minLongestDuration = 1200
    maxLongestDuration = 1600
    
    requiredReputation = 10
    initialCostFunds   = 500
    initialCostReputation = 0.0
    initialCostScience = 0.0
    
    hasFactorSlider = False
    factorSliderDefault = 0.10
    factorSliderSteps = 1

    EFFECT
    {
        name = ContractEffect

        contractType = STG_KerbinProgram

        synopsis = Land probes all biomes on Kerbin.
        completedMessage = You've successfully performed an automated exploration of Kerbin!
        failureMessage = Your space program has failed to put enough probes onto Kerbin!

       advanceFunds = 250000.0
        rewardReputation = 100
        rewardFunds = 250000

        failureReputation = 500
        failureFunds = 1500000
    }
}

 


Contract:

Spoiler

 

// Contract for kerbin biome probes


CONTRACT_TYPE
{
    name = STG_KerbinProgram
    group = Strategia

    genericTitle = KerbinProgram
    genericDescription = This is a Strategia contract that is automatically accepted when the pre-requisite strategy is taken.
    
    title = KerbinProgram //@strategy
    description = How many biomes will Kerbin have? //@strategy.description()
    synopsis = Land probes all biomes on Kerbin. //@strategy.synopsis()
    completedMessage = You have successfully performed an automated exploration of Kerbin //@strategy.completedMessage()

    agent = Strategia

    targetBody = Kerbin

    //autoAccept = true
    //cancellable = false

    maxSimultaneous = 1

    prestige = Exceptional

    // Contract rewards
    advanceFunds = 250000.0 //@strategy.advanceFunds() / ContractMultiplier()
    rewardFunds = 100 //@strategy.rewardFunds() / ContractMultiplier()
    rewardReputation = 250000 //@strategy.rewardReputation() / ContractMultiplier()
    failureReputation = 500 //@strategy.failureReputation() / ContractMultiplier()
    failureFunds = 1500000 //@strategy.failureFunds() / ContractMultiplier()

    DATA
     {
        title = data0
        type = StrategiaStrategy
        // requiredValue = false
        // title = The pre-requisite strategy must be taken
        hidden = false
        strategy = ActiveStrategies().Where(s => s.contractType() == @name).First()
    }

    DATA
    {
        title = data1
        type = string
        uniquenessCheck = CONTRACT_ALL
        hidden = false

        strategyName = @/strategy.Name()
    }

    DATA
    {
        title = data2
        type = List<StrategiaStrategy>
        strategies = ActiveStrategies()
        hidden = false
    }
    DATA
    {
        title = data3
        type = List<Biome>
        biomes = @targetBody.Biomes()
        hidden = false
    }

    PARAMETER
    {
        type = AtLeast

        count = 6
        title = Land probes at all biomes on @/targetBody

        PARAMETER
        {
            type = ReachState

            title = @biome.Name()

            targetBody = @/targetBody
            situation = LANDED
            situation = SPLASHED
            disableOnStateChange = true
            hideChildren = true

            ITERATOR
            {
                type = Biome
                biome = @/biomes
            }
        }
    }
}

 

 

Link to comment
Share on other sites

  • 2 weeks later...

I'm using this on 1.11.2 and it's working mostly fine but noticed that the "To Boldly Go" strategy isn't working. I'm not receiving any bonus funds even though I've transmitted science from brand-new biomes.

Link to comment
Share on other sites

I posted an issue on the Github repo about this over a year ago, but I'll repost it here into the thread for posterity's sake.

With a specific combination of strategies, you can get free money for launching rockets.

Private Industry decreases launch costs by a flat percentage, increasing with level. Private Industry 3 decreases launch prices by 75%.

Media Coverage also decreases launch costs by a flat percentage, increasing with level. Media Coverage 3 decreases launch prices by 30%.

Now, in the mod, all bonus seem to be added together into one big bonus. So, as a result, having PI3 and MC3 leads to a total price decrease of 105%. With every launch, you'll be receiving 5% of your rocket's cost, for free, as well as your rocket being fully paid by the strategies!

Pretty broken. Once you get these two strategies you'll have no problems with money, at all.

Link to comment
Share on other sites

  • 4 weeks later...
17 hours ago, FabioofSpace said:

Apparently crashing a probe on the surface of the Mun with the Mun Probe strategy active ends up fulfilling the requirements of the strategy about landing in at least 3 places. Is this normal? I recently discovered this in JNSQ

parts mast have landed in more then 3 biomes :D

Link to comment
Share on other sites

So maybe this is a question I shouldn't ask but I'm curious. Since 1.12 is the last official update to ksp 1, will there be a final version update to Strategia sometime in the future? I know the compatibility with 1.11 has been said to have been a little inconsistent from what I can see, and I've been wanting to play with Strategia again, but have been nervous to try it with any update past 1.10 since that's what its listed for in Ckan

Link to comment
Share on other sites

Oooookay - so. I found my problem with Strategia not loading: it's because I had it on my D: drive instead of my C: drive. I checked the source code and saw this in the dependencies (Strategia.csproj):

Quote
<Reference Include="ContractConfigurator, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Kerbal Space Program\GameData\ContractConfigurator\ContractConfigurator.dll</HintPath>
    </Reference>

The error I got when running from my D: drive was this:

Quote

[ERR 10:17:09.045] ADDON BINDER: Cannot resolve assembly: ContractConfigurator, Culture=neutral, PublicKeyToken=null

[ERR 10:17:09.045] ADDON BINDER: Cannot resolve assembly: ContractConfigurator, Culture=neutral, PublicKeyToken=null

[ERR 10:17:09.050] AssemblyLoader: Exception loading 'Strategia': System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at AssemblyLoader.LoadAssemblies () [0x000e6] in <a5c262f7fe724eb9918d4487db8b635e>:0 

Additional information about this exception:

 System.IO.FileNotFoundException: Could not load file or assembly 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

 System.IO.FileNotFoundException: Could not load file or assembly 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'ContractConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

This is despite CC loading (it appears higher in the log & is processing)

I copied this install to my C: drive & it worked fine.

@sarbian Can the hint path just be relative? "..\ContractConfigurator\ContractConfigurator.dll"

Link to comment
Share on other sites

On 6/4/2021 at 12:28 PM, bigyihsuan said:

... With a specific combination of strategies, you can get free money for launching rockets ... Once you get these two strategies you'll have no problems with money, at all.

There are other ways to exploit strategies. With discounts you can put a rocket on the pad, don't launch, and immediately recover for free money. KSP offers so many other ways to "cheat"(*) without Strategia, though, that I don't fault the mod author for not fixing this. As players we can avoid the economic glitches by making different in-game choices.

(*) IMO, cheating is fine in a single player sandbox game like KSP.

Link to comment
Share on other sites

  • 1 month later...
On 7/17/2021 at 10:29 AM, Bombaatu said:

Oooookay - so. I found my problem with Strategia not loading: it's because I had it on my D: drive instead of my C: drive. I checked the source code and saw this in the dependencies (Strategia.csproj):

The error I got when running from my D: drive was this:

This is despite CC loading (it appears higher in the log & is processing)

I copied this install to my C: drive & it worked fine.

@sarbian Can the hint path just be relative? "..\ContractConfigurator\ContractConfigurator.dll"

This is not what csproj files do. They just tell msbuild where to find important build assets. Those references don't do anything at runtime. There are some games that only work on the C drive but this is not something I've experienced with KSP or strategia. In copying the files to another location, you did something that fixed your issue.

Link to comment
Share on other sites

On 9/7/2021 at 11:29 AM, whitespacekilla said:

This is not what csproj files do. They just tell msbuild where to find important build assets. Those references don't do anything at runtime. There are some games that only work on the C drive but this is not something I've experienced with KSP or strategia. In copying the files to another location, you did something that fixed your issue.

Except that it was a direct copy - no changes from one location to the other. Install worked on C:, didn't work on D:. Only explanation I can find is inside that source file. If there is another explanation, I'm all ears. 

Link to comment
Share on other sites

33 minutes ago, Bombaatu said:

Except that it was a direct copy - no changes from one location to the other. Install worked on C:, didn't work on D:. Only explanation I can find is inside that source file. If there is another explanation, I'm all ears. 

Did the file ownership and permissions stay the same? Are both drives formatted NTFS? Any NTFS settings changed on either?

Link to comment
Share on other sites

On 9/8/2021 at 1:43 PM, lordcirth said:

Did the file ownership and permissions stay the same? Are both drives formatted NTFS? Any NTFS settings changed on either?

That looks like it was the problem - D: was exFAT and not NTFS. Put it on my E: drive which is NTFS and it worked. Thanks.

Link to comment
Share on other sites

On 6/3/2021 at 2:40 PM, jaxmed said:

I'm using this on 1.11.2 and it's working mostly fine but noticed that the "To Boldly Go" strategy isn't working. I'm not receiving any bonus funds even though I've transmitted science from brand-new biomes.

I was about to say that its working fine for me; got bonuses playing just last night. But then I noticed you said 1.11.2; I'm on 1.12.2. I slightly doubt that is the difference, but it could be.

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