Jump to content

[1.10.1+] Contract Configurator [v1.30.5] [2020-10-05]


nightingale

Recommended Posts

5 minutes ago, linuxgurugamer said:

I'm having a problem with the following code:


CONTRACT_TYPE
{
	name = FirstImpact_@/STGUnmannedMissions:UnmannedMissionPlanet
	group = STGUnmannedMissions

....
}

CONTRACT_TYPE
{
	name = Targeted @STGUnmannedMissions:UnmannedMissionPlanet Impact
	group = STGUnmannedMissions

....
    REQUIREMENT
    {
        name = CompleteContract_3
        type = CompleteContract

        contractType = FirstImpact_@/STGUnmannedMissions:UnmannedMissionPlanet
    }
}

I'm getting the following error:


[ERR 10:52:36.328] ContractConfigurator.CompleteContractRequirement: contractType 'FirstImpact_' must either be a Contract sub-class or ContractConfigurator contract type


I have tried variations without the "@/", but still get the same error.

I'm wondering if the contractType can't parse variables?

Thanks in advance

The contract type name must be a static and globally unique string.  No expressions allowed.  Looks like what you need is an enhancement to CompleteContract where you could say something like:

    REQUIREMENT
    {
        type = CompleteContract

        contractType = FirstImpact_UnmannedMissionPlanet
        targetBody = @targetBody
    }

Of course, that actually doesn't work well, because what ends up happening is the contract generator would pick a body and then fail the contract requirement (and end up very rarely generate a contract.  So better would be:

@targetBody = AllBodies.Where(cb => cb.ContractCompleteForBody(FirstImpact_Unmanned)).Random()

If that's the way you'd like to go, raise an enhancement request.

Link to comment
Share on other sites

8 minutes ago, nightingale said:

I know the stock contracts for recovery have a lot of smarts (it looks at planet radius, atmosphere depth and the highest peak), so you're set there.  For Contract Configurator stuff...  I'd just trust to the authors as Contract Configurator should give them the tools they need to avoid hard-coding altitudes and such.

That's all I needed to know :)

Thanks!

Link to comment
Share on other sites

12 minutes ago, nightingale said:

The contract type name must be a static and globally unique string.  No expressions allowed.  Looks like what you need is an enhancement to CompleteContract where you could say something like:


    REQUIREMENT
    {
        type = CompleteContract

        contractType = FirstImpact_UnmannedMissionPlanet
        targetBody = @targetBody
    }

Of course, that actually doesn't work well, because what ends up happening is the contract generator would pick a body and then fail the contract requirement (and end up very rarely generate a contract.  So better would be:


@targetBody = AllBodies.Where(cb => cb.ContractCompleteForBody(FirstImpact_Unmanned)).Random()

If that's the way you'd like to go, raise an enhancement request.

Ok.  Let me think on it for a while.  Maybe I can try this with a persistent list of bodies which have been visited instead.

Link to comment
Share on other sites

Ok, I'm trying this now:

    BEHAVIOUR
    {
        name = Expression
        type = Expression
        
        CONTRACT_COMPLETED_SUCCESS
        {
            type = List<CelestialBody>
            
            impactedPlanets = $impactedPlanets.Add(@STGUnmannedMissions:UnmannedMissionPlanet)
        }
    }

    REQUIREMENT
    {
        name = Expression_3
        type = Expression

        expression = $impactedPlanets.Contains(@STGUnmannedMissions:UnmannedMissionPlanet) == true
    }

 

and this is generating the following error:

[ERR 14:37:48.897] ContractConfigurator.ExpressionRequirement: CONTRACT_TYPE 'Targeted  Impact', REQUIREMENT 'Expression_3' of type 'Expression': Error parsing expression

[EXC 14:37:48.901] MissingMethodException: Cannot find method 'Contains' for class 'Boolean'.
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].GetCalledFunction (System.String functionName, Function& selectedMethod, Boolean isFunction)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].ParseMethod[Boolean] (ContractConfigurator.ExpressionParser.Token token, Boolean obj, Boolean isFunction)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].ParseDataStoreIdentifier (ContractConfigurator.ExpressionParser.Token token)
    Rethrow as Exception: Error parsing statement.
    Error occurred near '*':
    $impactedPlanets.Contains(@STGUnmannedMissions:UnmannedMissionPlanet) == true
    ..........................* <-- HERE
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode)
    ContractConfigurator.ConfigNodeUtil.ParseSingleValue[Boolean] (System.String key, System.String stringValue, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue[Boolean] (.ConfigNode configNode, System.String key, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue[Boolean] (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, Boolean defaultValue, System.Func`2 validation)
    UnityEngine.Debug:LogException(Exception)
    ContractConfigurator.LoggingUtil:LogException(Exception)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Boolean, Func`2)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
    ContractConfigurator.ExpressionRequirement:Load(ConfigNode)
    ContractConfigurator.ContractRequirement:GenerateRequirement(ConfigNode, ContractType, ContractRequirement&, IContractConfiguratorFactory)
    ContractConfigurator.ContractType:Load(ConfigNode)
    ContractConfigurator.<LoadContractConfig>d__1e:MoveNext()
    ContractConfigurator.ContractConfigurator:Update()


which doesn't make sense, since the error seems to be saying that $impactedPlanets is a boolean, when it is declared as a list.

or did I just run up against a limitation in the persistent data store?

 

Link to comment
Share on other sites

7 minutes ago, linuxgurugamer said:

Ok, I'm trying this now:


    BEHAVIOUR
    {
        name = Expression
        type = Expression
        
        CONTRACT_COMPLETED_SUCCESS
        {
            type = List<CelestialBody>
            
            impactedPlanets = $impactedPlanets.Add(@STGUnmannedMissions:UnmannedMissionPlanet)
        }
    }

    REQUIREMENT
    {
        name = Expression_3
        type = Expression

        expression = $impactedPlanets.Contains(@STGUnmannedMissions:UnmannedMissionPlanet) == true
    }

 

and this is generating the following error:


[ERR 14:37:48.897] ContractConfigurator.ExpressionRequirement: CONTRACT_TYPE 'Targeted  Impact', REQUIREMENT 'Expression_3' of type 'Expression': Error parsing expression

[EXC 14:37:48.901] MissingMethodException: Cannot find method 'Contains' for class 'Boolean'.
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].GetCalledFunction (System.String functionName, Function& selectedMethod, Boolean isFunction)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].ParseMethod[Boolean] (ContractConfigurator.ExpressionParser.Token token, Boolean obj, Boolean isFunction)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].ParseDataStoreIdentifier (ContractConfigurator.ExpressionParser.Token token)
    Rethrow as Exception: Error parsing statement.
    Error occurred near '*':
    $impactedPlanets.Contains(@STGUnmannedMissions:UnmannedMissionPlanet) == true
    ..........................* <-- HERE
    ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Boolean].ParseExpression (System.String key, System.String expression, ContractConfigurator.ExpressionParser.DataNode dataNode)
    ContractConfigurator.ConfigNodeUtil.ParseSingleValue[Boolean] (System.String key, System.String stringValue, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue[Boolean] (.ConfigNode configNode, System.String key, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue[Boolean] (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, Boolean defaultValue, System.Func`2 validation)
    UnityEngine.Debug:LogException(Exception)
    ContractConfigurator.LoggingUtil:LogException(Exception)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Boolean, Func`2)
    ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
    ContractConfigurator.ExpressionRequirement:Load(ConfigNode)
    ContractConfigurator.ContractRequirement:GenerateRequirement(ConfigNode, ContractType, ContractRequirement&, IContractConfiguratorFactory)
    ContractConfigurator.ContractType:Load(ConfigNode)
    ContractConfigurator.<LoadContractConfig>d__1e:MoveNext()
    ContractConfigurator.ContractConfigurator:Update()

which doesn't make sense, since the error seems to be saying that $impactedPlanets is a boolean, when it is declared as a list.

or did I just run up against a limitation in the persistent data store?

 

Same as before (sometime last week it came up, I think) - the data-type determination for $global variables is very limited.  In this case, to hit it over the face with the type, you could try this:

    DATA
    {
        type = List<CelestialBody>
        impactedPlanets = $impactedPlanets
    }

    REQUIREMENT
    {
        name = Expression_3
        type = Expression

        expression = @/impactedPlanets.Contains(@STGUnmannedMissions:UnmannedMissionPlanet)
    }

 

Link to comment
Share on other sites

10 minutes ago, nightingale said:

Same as before (sometime last week it came up, I think) - the data-type determination for $global variables is very limited.  In this case, to hit it over the face with the type, you could try this:


    DATA
    {
        type = List<CelestialBody>
        impactedPlanets = $impactedPlanets
    }

    REQUIREMENT
    {
        name = Expression_3
        type = Expression

        expression = @/impactedPlanets.Contains(@STGUnmannedMissions:UnmannedMissionPlanet)
    }

 

That works, thanks.

Link to comment
Share on other sites

Progress, I'm now getting contracts for the correct bodies.

However, I have a very strange issue.  As soon as I accept a contract and go into the VAB, the contract is failed.

It's probably simple, but I'm just done with a 2 day business convention, and am bleary eyed.  So I'll look for a response tomorrow,

Here are the parameters for the simplest one:

    PARAMETER
    {
        name = Sequence_1
        type = Sequence
        title = Flyby @STGUnmannedMissions:UnmannedMissionPlanet

        PARAMETER
        {
            name = VesselParameterGroup_1
            type = VesselParameterGroup

            completeInSequence = true

            PARAMETER
            {
                name = HasCrew_1
                type = HasCrew
                maxCrew = 0
                minCrew = 0
            }
            PARAMETER
            {
                name = ReachState_1
                type = ReachState
                // maxAltitude = 50000
                targetBody = @STGUnmannedMissions:UnmannedMissionPlanet
            }
            PARAMETER
            {
                name = ReachState_Escaping_1
                type = ReachState
                situation = ESCAPING
                targetBody = @STGUnmannedMissions:UnmannedMissionPlanet
            }
        }
    }

 

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Progress, I'm now getting contracts for the correct bodies.

However, I have a very strange issue.  As soon as I accept a contract and go into the VAB, the contract is failed.

It's probably simple, but I'm just done with a 2 day business convention, and am bleary eyed.  So I'll look for a response tomorrow,

Here are the parameters for the simplest one:


    PARAMETER
    {
        name = Sequence_1
        type = Sequence
        title = Flyby @STGUnmannedMissions:UnmannedMissionPlanet

        PARAMETER
        {
            name = VesselParameterGroup_1
            type = VesselParameterGroup

            completeInSequence = true

            PARAMETER
            {
                name = HasCrew_1
                type = HasCrew
                maxCrew = 0
                minCrew = 0
            }
            PARAMETER
            {
                name = ReachState_1
                type = ReachState
                // maxAltitude = 50000
                targetBody = @STGUnmannedMissions:UnmannedMissionPlanet
            }
            PARAMETER
            {
                name = ReachState_Escaping_1
                type = ReachState
                situation = ESCAPING
                targetBody = @STGUnmannedMissions:UnmannedMissionPlanet
            }
        }
    }

 

Nothing looks particularly bad there - toss up a full contract with a log into GitHub and I'll dig into this one.

Link to comment
Share on other sites

15 hours ago, Sigma88 said:

That's all I needed to know :)

Thanks!

Can't speak for other authors, but I personally always try and get the game to provide the figure, rather than the other way round. It makes life easier for me (and makes it compatible with rescale mods as nightingale said).

Here's a good example: the Station Core Mission of by Bases and Stations pack requires the station to be in Low Orbit. So I just use SpaceAltitudeThreshold() - and the figure is automatically populated. Doesn't matter if it's Kerbin, Duna, or Oohdiflarrt.

Edited by severedsolo
Link to comment
Share on other sites

44 minutes ago, severedsolo said:

Can't speak for other authors, but I personally always try and get the game to provide the figure, rather than the other way round. It makes life easier for me (and makes it compatible with rescale mods as nightingale said).

Here's a good example: the Station Core Mission of by Bases and Stations pack requires the station to be in Low Orbit. So I just use SpaceAltitudeThreshold() - and the figure is automatically populated. Doesn't matter if it's Kerbin, Duna, or Oohdiflarrt.

yeah that seems a good way to do it, I'm not really familiar with ContractConfigurator (or the stock contracts for that matter) so I thought to ask just in case :D

Link to comment
Share on other sites

5 hours ago, nightingale said:

Nothing looks particularly bad there - toss up a full contract with a log into GitHub and I'll dig into this one.

Here you go, thanks

https://drive.google.com/file/d/0Bzid7e3pW1k7bm1pNlV1SlBxOW8/view?usp=sharing

This zip contains the log, the save file and the complete directory for Spacetux, including the assets.  I deleted all the extra contract packs, just left the first one which is the simplest.

This is a major rework of the UnmannedMissions pack, using all that I've learned to reduce the number of contract from over 200 to just 5 or so, and is compatible (I hope) with Kopernicus and New Horizons

Edited by linuxgurugamer
Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

Here you go, thanks

https://drive.google.com/file/d/0Bzid7e3pW1k7bm1pNlV1SlBxOW8/view?usp=sharing

This zip contains the log, the save file and the complete directory for Spacetux, including the assets.  I deleted all the extra contract packs, just left the first one which is the simplest.

This is a major rework of the UnmannedMissions pack, using all that I've learned to reduce the number of contract from over 200 to just 5 or so, and is compatible (I hope) with Kopernicus and New Horizons

CONTRACT_TYPE
{
	name = FirstUnmanned @STGUnmannedMissions:UnmannedMissionPlanet Flyby
    ...
}

Expressions are not supported in the contract type name.

Edited by nightingale
Link to comment
Share on other sites

4 minutes ago, nightingale said:

CONTRACT_TYPE
{
	name = FirstUnmanned @STGUnmannedMissions:UnmannedMissionPlanet Flyby
    ...
}

Expressions are not supported in the contract type name.

Ok, I'll try it without.

Thanks

Edit: I'm at work, so just did a very quick test, and yes, changing the name to a static string fixed the problem

Thanks

Edited by linuxgurugamer
Link to comment
Share on other sites

44 minutes ago, linuxgurugamer said:

Simple question:  This revamp of the UnmannedMissions I'm working on will be reducing the total number of contracts from (literaly) hundreds of files/contracts to two files and 5 or so contracts.  Is it a safe assumption that this will reduce the load on CC and KSP?

Hard to say, the answer is complex.  The number of files is not terribly relevant (I'd expect 100 contracts in 1 file to perform pretty much the same as 100 contract in 100 files).  Less contracts is probably better, even if those contracts have complex expressions in them.  So I guess I would say it will reduce the load on CC and KSP - but I don't know if I would say that the difference would be significant/noticeable.

Link to comment
Share on other sites

Two steps forward, one step back:

The small contract in the attached link has the following DATA node, read the comments I put in there for a description of the problem:

// The following DATA node seems to prevent this contract from being created, even though it is 
// a do-nothing statement
// When commented out, contracts do get generated, but when uncommented as it is now, they don't.
// Once this is working, i can uncomment the following BEHAVIOUR and REQUIREMENT nodes to properly
// control the contract
	DATA
	{
		type = List<CelestialBody>
		localPlanetsFlybys = $planetsFlybys
	}

https://www.dropbox.com/s/hneav5gy9pjobvl/UnmannedContracts.cfg?dl=0

The contact in the link has all the problem nodes commented out except for this one, I've also tried it with all uncommented with no change.

Not sure if you remember, but this was your suggestion to deal with the persistent data store not getting the right datatype for a list

I should also point out that there are no errors in the log.

Edited by linuxgurugamer
Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Two steps forward, one step back:

The small contract in the attached link has the following DATA node, read the comments I put in there for a description of the problem:


// The following DATA node seems to prevent this contract from being created, even though it is 
// a do-nothing statement
// When commented out, contracts do get generated, but when uncommented as it is now, they don't.
// Once this is working, i can uncomment the following BEHAVIOUR and REQUIREMENT nodes to properly
// control the contract
	DATA
	{
		type = List<CelestialBody>
		localPlanetsFlybys = $planetsFlybys
	}

https://www.dropbox.com/s/hneav5gy9pjobvl/UnmannedContracts.cfg?dl=0

The contact in the link has all the problem nodes commented out except for this one, I've also tried it with all uncommented with no change.

Not sure if you remember, but this was your suggestion to deal with the persistent data store not getting the right datatype for a list

I should also point out that there are no errors in the log.

See the Data Node documentation - there is an attribute called requiredValue on DATA nodes that defaults to true.  Because $planetsFlybys is null, it stops the contract from generating.  If you need it to still generate, then set requiredValue to false.

Link to comment
Share on other sites

29 minutes ago, nightingale said:

See the Data Node documentation - there is an attribute called requiredValue on DATA nodes that defaults to true.  Because $planetsFlybys is null, it stops the contract from generating.  If you need it to still generate, then set requiredValue to false.

ah.  ok, thanks

and now it works.

Hope to release this update over the weekend, once I've finished testing it

Edited by linuxgurugamer
Link to comment
Share on other sites

bleh:

Any idea what this means, this happened when I went into the VAB, and then when I restarted:

Exception occured while loading contract 'First Unmanned Flyby':
System.InvalidOperationException: Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ExpressionParser.BaseParser.NewParser (System.Type type) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

log and contracts in this file:  https://www.dropbox.com/s/qho9n1hj36fcgp8/exception.zip?dl=0

Also am getting this:

Exception occured while loading ScenarioModule 'ContractConfiguratorSettings':
System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.ContractDisabler.IsEnabled (System.Type contract) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractConfiguratorSettings+StockContractDetails..ctor (System.Type contractType) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractConfiguratorSettings.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

 

 

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

bleh:

Any idea what this means, this happened when I went into the VAB, and then when I restarted:


Exception occured while loading contract 'First Unmanned Flyby':
System.InvalidOperationException: Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ExpressionParser.BaseParser.NewParser (System.Type type) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.Behaviour.Expression.OnLoad (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractBehaviour.Load (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractBehaviour.LoadBehaviour (.ConfigNode configNode, ContractConfigurator.ConfiguredContract contract) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

log and contracts in this file:  https://www.dropbox.com/s/qho9n1hj36fcgp8/exception.zip?dl=0

Also am getting this:


Exception occured while loading ScenarioModule 'ContractConfiguratorSettings':
System.NullReferenceException: Object reference not set to an instance of an object
  at ContractConfigurator.ContractDisabler.IsEnabled (System.Type contract) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractConfiguratorSettings+StockContractDetails..ctor (System.Type contractType) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ContractConfiguratorSettings.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

 

 

First off, this:

		CONTRACT_COMPLETED_SUCCESS
		{
			type = List<CelestialBody>

			@/localPlanetFlybys = @/localPlanetFlybys.Add(@/unmannedMissionPlanet)
			$planetFlybys = @/localPlanetFlybys
		}

Will not do what you want - you can't put expressions like that on the left hand side.  What you probably want is:

		CONTRACT_COMPLETED_SUCCESS
		{
			type = List<CelestialBody>

			$planetFlybys = @/localPlanetFlybys.Add(@/unmannedMissionPlanet)
		}

... but that won't work either, for the following reasons:

  1. List.Add isn't actually adding it when the input list is empty.  I've fixed that in the dev version.
  2. Lists aren't actually supported in the global variables.  They're not explicitly not supported (which is why you don't get a nice clean error), but I'll need to write a bunch of code to make it work.  Raise an enhancement request and I'll try to get it for you in 1.9.4
Link to comment
Share on other sites

I'll raise it.  But this was supposed to be instead of the last enhancements request I did, about having a function to return if the contract was completed for the current body.  So this one will supercede that one, since this is more general.  

In the meantime, I'll have to try to come up with some other logic to at least emulate this to some degree

Link to comment
Share on other sites

12 minutes ago, linuxgurugamer said:

I'll raise it.  But this was supposed to be instead of the last enhancements request I did, about having a function to return if the contract was completed for the current body.  So this one will supercede that one, since this is more general.  

In the meantime, I'll have to try to come up with some other logic to at least emulate this to some degree

My recommendation is to base it off of the player's progression - that way even if your contract pack is installed in an existing save they will get offered contracts that are logical to where they are at.  Also, same thing for if they skip a contract (maybe because it didn't get offered to them).

Link to comment
Share on other sites

48 minutes ago, nightingale said:

My recommendation is to base it off of the player's progression - that way even if your contract pack is installed in an existing save they will get offered contracts that are logical to where they are at.  Also, same thing for if they skip a contract (maybe because it didn't get offered to them).

Good point.  I now have to read up on the wiki all about the players progression

 

Thnks

Link to comment
Share on other sites

So, there seems to be most of what I need in the progression requirements, except for the following:

  1. The flyby and orbit requirements don't seem to have a way to enforce that the flyby and/or orbit was done by an unmanned vehicle.  Not a big deal, I can live with this
  2. There doesnt' seem to be a way to detect that a ship has crashed on a planet (ie:  the successive impact missions need this).  This is more important.
Link to comment
Share on other sites

1 minute ago, linuxgurugamer said:

So, there seems to be most of what I need in the progression requirements, except for the following:

  1. The flyby and orbit requirements don't seem to have a way to enforce that the flyby and/or orbit was done by an unmanned vehicle.  Not a big deal, I can live with this

See [#420].  This functionality was actually introduced by KSP 1.0.5 - I just haven't exposed it through Contract Configurator yet.

1 minute ago, linuxgurugamer said:

2. There doesnt' seem to be a way to detect that a ship has crashed on a planet (ie:  the successive impact missions need this).  This is more important.

Can't really help there - the game doesn't track that.

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