Jump to content

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


nightingale

Recommended Posts

@CaptKordite & @WuphonsReach - I've raised ContractPack-Tourism#22 to look at increasing the rewards for that contract, but keep the following in mind:

  1. You're really meant to be using the 16-Kerbal crew cabins (as if I remember correctly they're by far the lowest mass per Kerbal) to make it economical
  2. The hotel variant pays far less than the casino variant (by a factor of 4, if I remember correctly)
  3. It's not really balanced to take LS requirements into consideration

Also, I'm happy to continue this discussion - but let's more it to the correct thread.

@linuxgurugamer - Data nodes in contract groups are kind of a weird thing - you can think of them as just being copied into each contract in that group.  There's probably a good argument for defaulting requiredValue to false there - but that would break contract pack backwards compatibility.

@DarkonZ - In #550 I plan on making it open to whatever tab was last open - this should hopefully make everyone happy.

@linuxgurugamer (again!) - Raised #551.  I'll need to dig into this one deeper tomorrow.  There is some logic to "copy" parameter completion data to child craft on undocking, so what you're doing should've worked.  But there may be exceptional cases with ReachState or VesselParameterGroup that I'm forgetting.

@SilverlightPony - As others have mentioned, 1.12.1 is the latest version for KSP 1.1.2.  I touch too many different bits of KSP - it's extremely rare that Contract Configurator doesn't break on KSP updates.

@EliasDanger - Nope.  I'd try Contract Reward Modifier.  I don't think it supports what you're looking for, but that's the most logical place, and @DMagic may be willing to add functionality around deadlines.

Link to comment
Share on other sites

Now all is working without any issue (i found no). Just the spacetux conrtacts are not working for me.

 

Is there any option to show just active contracts and/or non active contracts in the tracking station?

i have shown 20-25 contracts and its confused to find the right one

Link to comment
Share on other sites

6 hours ago, nightingale said:

@linuxgurugamer - Data nodes in contract groups are kind of a weird thing - you can think of them as just being copied into each contract in that group.  There's probably a good argument for defaulting requiredValue to false there - but that would break contract pack backwards compatib

I understand, although they are also acting as requirements;  at a minimum, I think you need to update the documentation to reflect that.

I wonder if I'm using the DATA groups in ways others aren't;  I'm setting lots of variables in a single group.  It works, but, in the case of (for example) a list, what happens if there are several lists in the group, and some have values and some don't?

6 hours ago, nightingale said:

linuxgurugamer (again!) - Raised #551.  I'll need to dig into this one deeper tomorrow.  There is some logic to "copy" parameter completion data to child craft on undocking, so what you're doing should've worked.  But there may be exceptional cases with ReachState or VesselParameterGroup that I'm forgetting.

I hope I'm not abusing you :D

Figuring out that one was a bear, because when I tried creating a test install and testing, it would work.  I don't know how I realized it was related to the root part, but I do remember the light coming on.  I was slowly working my way through about 200 mods trying to find the conflicts.

Really, I am very impressed by the new release, and hope to help you with these reports.  Thank you

Edited by linuxgurugamer
Link to comment
Share on other sites

I have one question.

Is possible to use a boolean to choose between different experiments according top target body?

I can do this with no problem for strings with the descriptions using the ? : structure, but If I try to do it with the experimenter names it fails.

My try was like this:

 

PARAMETER
	{
		name = CollectScience
		type = CollectScience

		location = Space

		experiment = @isMun ? CactEyePlanetaryMun : CactEyePlanetaryMinmus
		recoveryMethod = Transmit
	}	

But it gives error with the @isMun (which is a boolean defined in other structure that works fine)

If this is impossible I will have to duplicate the contracts...but with so many planets/moon I want to know if that is the case before redoing all the contracts.

EDIT: forgot to give thanks in advance

Edited by KaiserSoze
Link to comment
Share on other sites

@M4ssler - Not at the moment, it's something I'll be looking at in a future release.  Note that there is a stock way to disable them (set the following lines to False in GameData/Squad/Contracts.cfg):

	DisplayOfferedOrbits = True // Display inactive contract orbits in the Tracking Station
	DisplayOfferedWaypoints = True // Display inactive contract waypoints in the Tracking Station

@linuxgurugamer - If there's several items and you want to set the requiredValue or other attributes differently, then you need to use multiple DATA nodes.  And yup, it's a good bug report - it's just that it's a long weekend here so I'm somewhat time-limited. :)

@KaiserSoze - Most likely you need to do @/isMun instead of @isMun.  

Link to comment
Share on other sites

2 hours ago, nightingale said:

@M4ssler - Not at the moment, it's something I'll be looking at in a future release.  Note that there is a stock way to disable them (set the following lines to False in GameData/Squad/Contracts.cfg):


	DisplayOfferedOrbits = True // Display inactive contract orbits in the Tracking Station
	DisplayOfferedWaypoints = True // Display inactive contract waypoints in the Tracking Station

@linuxgurugamer - If there's several items and you want to set the requiredValue or other attributes differently, then you need to use multiple DATA nodes.  And yup, it's a good bug report - it's just that it's a long weekend here so I'm somewhat time-limited. :)

@KaiserSoze - Most likely you need to do @/isMun instead of @isMun.  

thank you very much for your effort to help me.

Link to comment
Share on other sites

Mid-way through a career game, I've suddenly hit a bug where contracts (from a bunch of different mods - SETI, Historical Progression, Historic Contracts, at least) which should only be offered once keep being offered as repeats. It seems like it's not blocking the progression though (e.g. subsequent contracts that require the previous one completed are still getting unlocked)

EDIT: Wait a minute...I think this might be the work of a pair of rogue module manager dlls...

Edited by baldamundo
Link to comment
Share on other sites

@EliasDanger Contract Reward Modifier has a slider for adjusting the duration of contracts, it can't be set to infinite, but its max of 10X standard should be effectively the same thing.

I haven't tested it with newer versions of CC, but in theory it should allow for setting the duration of all different types of CC contracts in addition to standard contracts.

Link to comment
Share on other sites

I'm using Realism Overhaul with Realistic Progression Zero. I'm using the latest version of Contract Configurator (1.16.2), and the latest versions of the other mods. When I start a new career, contracts are shown in the "All" tab, but there are no available contracts in the "Available" tab. If I exit to the main menu and reload the save, the contracts are then available. This has been reported by others in the RP-0 thread as well. But given that Contract Configurator works based on config files, and the contracts work fine after reloading the save, I'm guessing this is a bug more with Contract Configurator than with RP-0.

Link to comment
Share on other sites

I'm also pretty certain this mod is the cause of a 1 second or so freeze every 5 seconds or so, which is extremely annoying.

At first I thought it was the garbage collection issue, but I've since installed MemGraph and enabled its padding, and that didn't solve the problem. Memgraph also isn't showing anything that would indicate GC is causing the problem.

 

Edit: As it turns out, Mod is the Alt key, not CTRL. And MemGraph's graph needed to be adjusted to show the lag spikes. It is indeed GC, and not this mod.

Edited by RageMode
Link to comment
Share on other sites

1 hour ago, RageMode said:

I'm using Realism Overhaul with Realistic Progression Zero. I'm using the latest version of Contract Configurator (1.16.2), and the latest versions of the other mods. When I start a new career, contracts are shown in the "All" tab, but there are no available contracts in the "Available" tab. If I exit to the main menu and reload the save, the contracts are then available. This has been reported by others in the RP-0 thread as well. But given that Contract Configurator works based on config files, and the contracts work fine after reloading the save, I'm guessing this is a bug more with Contract Configurator than with RP-0.

I've experienced this as well.

1 hour ago, DMagic said:

@EliasDanger Contract Reward Modifier has a slider for adjusting the duration of contracts, it can't be set to infinite, but its max of 10X standard should be effectively the same thing.

I haven't tested it with newer versions of CC, but in theory it should allow for setting the duration of all different types of CC contracts in addition to standard contracts.

Nice, thank you. I might try that. Is there any conflict you know of with contract reward modifier and anything in RO/RSS/RP-0?

Link to comment
Share on other sites

1 hour ago, RageMode said:

I'm using Realism Overhaul with Realistic Progression Zero. I'm using the latest version of Contract Configurator (1.16.2), and the latest versions of the other mods. When I start a new career, contracts are shown in the "All" tab, but there are no available contracts in the "Available" tab. If I exit to the main menu and reload the save, the contracts are then available. This has been reported by others in the RP-0 thread as well. But given that Contract Configurator works based on config files, and the contracts work fine after reloading the save, I'm guessing this is a bug more with Contract Configurator than with RP-0.

Some more info on reproducing this. It only seems to happen once. Afterwards, you're able to create a new save game and contracts work as expected without reloading the save.

Example:

Create a new install.

Add mods.

Create new career mode game.

Contracts are not available as they should be.

Exit to main menu and reload the save.

Contracts are now available.

Exit the game.

Start a new career mode game.

Contracts should be available as expected.

Link to comment
Share on other sites

Hello,

I want to know how is the DATA_NODE inside the CONTRACT_GROUP intended to be used.
I've the following data inside my contract's group :

DATA
{
	type = int
	maxUnlockedTechLevel = MaxTechLevelUnlocked()
}

but when I want to use it into my contract (to implement progression) :

DATA
{
	type = string
	satContractPrestige = @/maxUnlockedTechLevel >= @/comSatPrestigeLevel.ElementAt(0) ? "Trivial" : @/maxUnlockedTechLevel >= @/comSatPrestigeLevel.ElementAt(1) ? "Significant" : "Exceptional"
}
prestige = ContractPrestige(@/satContractPrestige)

I get the following error message :

[ERR 12:37:08.720] ContractConfigurator.ContractType: CONTRACT_TYPE 'ComSatFirst': Error parsing satContractPrestige

[EXC 12:37:08.721] Exception: Unknown identifier '@/maxUnlockedTechLevel'.
        UnityEngine.Debug:LogException(Exception)^M
        ContractConfigurator.LoggingUtil:LogException(Exception)^M
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, String, Func`2)^M
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Func`2)^M
        ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1)^M
        System.Reflection.MethodBase:Invoke(Object, Object[])^M
        ContractConfigurator.ConfigNodeUtil:ExecuteDeferredLoads()^M
        ContractConfigurator.ContractType:Load(ConfigNode)^M
        ContractConfigurator.<LoadContractConfig>d__26:MoveNext()^M
        ContractConfigurator.ContractConfigurator:Update()
[ERR 12:37:08.722] ContractConfigurator.ContractType: CONTRACT_TYPE 'ComSatFirst': Error parsing prestige

So it appears that the data introduced into a contract group is ignored. That is a bug or I'm doing something wrong?

Thanks for your help

EDIT : The CONTRACT_TYPE of this example is declared inside another one. I want to use inheritance of data along different contract groups.

Edited by hargn
Link to comment
Share on other sites

4 hours ago, hargn said:

Hello,

I want to know how is the DATA_NODE inside the CONTRACT_GROUP intended to be used.
I've the following data inside my contract's group :


DATA
{
	type = int
	maxUnlockedTechLevel = MaxTechLevelUnlocked()
}

but when I want to use it into my contract (to implement progression) :


DATA
{
	type = string
	satContractPrestige = @/maxUnlockedTechLevel >= @/comSatPrestigeLevel.ElementAt(0) ? "Trivial" : @/maxUnlockedTechLevel >= @/comSatPrestigeLevel.ElementAt(1) ? "Significant" : "Exceptional"
}
prestige = ContractPrestige(@/satContractPrestige)

I get the following error message :


[ERR 12:37:08.720] ContractConfigurator.ContractType: CONTRACT_TYPE 'ComSatFirst': Error parsing satContractPrestige

[EXC 12:37:08.721] Exception: Unknown identifier '@/maxUnlockedTechLevel'.
        UnityEngine.Debug:LogException(Exception)^M
        ContractConfigurator.LoggingUtil:LogException(Exception)^M
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, String, Func`2)^M
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Func`2)^M
        ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1)^M
        System.Reflection.MethodBase:Invoke(Object, Object[])^M
        ContractConfigurator.ConfigNodeUtil:ExecuteDeferredLoads()^M
        ContractConfigurator.ContractType:Load(ConfigNode)^M
        ContractConfigurator.<LoadContractConfig>d__26:MoveNext()^M
        ContractConfigurator.ContractConfigurator:Update()
[ERR 12:37:08.722] ContractConfigurator.ContractType: CONTRACT_TYPE 'ComSatFirst': Error parsing prestige

So it appears that the data introduced into a contract group is ignored. That is a bug or I'm doing something wrong?

Thanks for your help

EDIT : The CONTRACT_TYPE of this example is declared inside another one. I want to use inheritance of data along different contract groups.

It might help if you posted the complete contract group and the contract types so we can see it all

Link to comment
Share on other sites

@RageMode, @RickKermen - I've raised #552 for the RP-0 issue.

@hargn - Agree with @linuxgurugamer, will probably need to see the full contract config.  In particular:

4 hours ago, hargn said:

EDIT : The CONTRACT_TYPE of this example is declared inside another one. I want to use inheritance of data along different contract groups.

CONTRACT_TYPE nodes within CONTRACT_TYPE nodes is not a thing.  The other thing to note is you need to reference the contract group name in the variable when using it (so you probably want something like:

@MyContractGroup:maxUnlockedTechLevel

 

Link to comment
Share on other sites

I'm trying to update the contracts I worked on last year and am running into a error that doesn't really make sense.

[ERROR] ContractConfigurator.ExpressionParser.DataNode: CONTRACT_TYPE 'CloseFlyBy': validTarget: The field 'title' is required in for data node values where 'requiredValue' is true.  Alternatively, the attribute 'hidden' can be set to true (but be careful - this can cause player confusion if all lines for the contract type show as 'Met' and the contract isn't generating).

The data node it is talking about is this:


	DATA
	{
		type = CelestialBody
		uniquenessCheck = CONTRACT_ACTIVE
		validTarget = AllBodies().Where(cb => cb.SemiMajorAxis() < @/smamax && cb.SemiMajorAxis() > @/smamin && cb.IsPlanet() && cb.HaveReached() == false && cb.IsHomeWorld() == false).Random()
	}

I'm confused because I've looked any a bunch of other contracts (like your Remotetech one) and I see no title anywhere, nor do I see the hidden attribute. So I must be missing something or doing something wrong.

The funny thing is the log does show Laythe as being a valid target, so it seems to be working partially.

Any ideas?

Link to comment
Share on other sites

@Nori - There's definitely examples where I've used it (see here).  It will only throw that error if requiredValue is true (the default) and if the value is non-deterministic (ie. can't be generated at parse time at the main menu).  Now, there's should be another error pushing you towards using SelectUnique() instead, but you may also want to consider using a DATA_EXPAND node for this one instead (which would remove the need for a title or uniquenessCheck).  That would look something like this:

	DATA_EXPAND
	{
		type = CelestialBody
		validTarget = AllBodies().Where(cb => cb.SemiMajorAxis() < @/smamax && cb.SemiMajorAxis() > @/smamin && cb.IsPlanet() && cb.IsHomeWorld() == false)
	}
          
    REQUIREMENT
    {
        type = FlyBy
        targetBody = @/validTarget
    }

 

Link to comment
Share on other sites

I've had this persistent problem that my contract list keeps getting emptied. It's not on every game load, but every few times I fire up the game, they're all gone. If I'm lucky, I can re-select some of them from the contracts on offer, but often not. Also it seems to lose the history of contracts I've done.

I'm not saying this is Contract Configurator's fault (I have a lot of mods installed) but it's the most likely culprit unless you have any better ideas :-)

What can I do to look into this more, or help you look into this more?

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