Jump to content

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


nightingale

Recommended Posts

help me understand sortKey?

I have several contract groups under the main GAP contract group. How to sort them in my own order?

 

For example I want SSI Aerospace to show first, then SSI Aerospace Market, then Kerbal Aircraft Builders:

 

CONTRACT_GROUP
{
    name = Giving Aircraft a Purpose 1.3
    displayName = Giving Aircraft a Purpose
    minVersion = 1.17.0
    agent = GAP
    tip = Giving aircraft a purpose...
    sortKey = 
    
    CONTRACT_GROUP
    {
        name = SSI Aerospace-Economy
        displayName = SSI Aerospace Market
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
        
    }
    
    CONTRACT_GROUP
    {
        name = SSI Aerospace
        displayName = SSI Aerospace Contracts
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
    }
    
    CONTRACT_GROUP
    {
        name = Kerbal Aircraft Builders
        displayName = Kerbal Aircraft Builders
        minVersion = 1.17.0
        agent = Kerbal Aircraft Builders
        maxSimultaneous = 1
        maxCompletions = 0
    }

Link to comment
Share on other sites

3 minutes ago, inigma said:

help me understand sortKey?

I have several contract groups under the main GAP contract group. How to sort them in my own order?

 

For example I want SSI Aerospace to show first, then SSI Aerospace Market, then Kerbal Aircraft Builders:

 

CONTRACT_GROUP
{
    name = Giving Aircraft a Purpose 1.3
    displayName = Giving Aircraft a Purpose
    minVersion = 1.17.0
    agent = GAP
    tip = Giving aircraft a purpose...
    sortKey = 
    
    CONTRACT_GROUP
    {
        name = SSI Aerospace-Economy
        displayName = SSI Aerospace Market
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
        
    }
    
    CONTRACT_GROUP
    {
        name = SSI Aerospace
        displayName = SSI Aerospace Contracts
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
    }
    
    CONTRACT_GROUP
    {
        name = Kerbal Aircraft Builders
        displayName = Kerbal Aircraft Builders
        minVersion = 1.17.0
        agent = Kerbal Aircraft Builders
        maxSimultaneous = 1
        maxCompletions = 0
    }

So you have your main CONTRACT_GROUP of Giving Aircraft a Purpose, that does not get a sortKey, it is not needed.

Each group underneath it does get one however and you can put them in any order you want. My rule of thumb has been to separate them by 5 so that if I add contract groups later, I can insert it wherever I want without having to change a bunch of other values.

CONTRACT_GROUP
    {
        name = SSI Aerospace-Economy
        displayName = SSI Aerospace Market
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
        
    }
    
    CONTRACT_GROUP
    {
        name = SSI Aerospace
        displayName = SSI Aerospace Contracts
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
		sortKey = 1
    }
    
    CONTRACT_GROUP
    {
        name = Kerbal Aircraft Builders
        displayName = Kerbal Aircraft Builders
        minVersion = 1.17.0
        agent = Kerbal Aircraft Builders
        maxSimultaneous = 1
        maxCompletions = 0
		sortKey = 6
    }

 

Link to comment
Share on other sites

16 minutes ago, pap1723 said:

So you have your main CONTRACT_GROUP of Giving Aircraft a Purpose, that does not get a sortKey, it is not needed.

Each group underneath it does get one however and you can put them in any order you want. My rule of thumb has been to separate them by 5 so that if I add contract groups later, I can insert it wherever I want without having to change a bunch of other values.


CONTRACT_GROUP
    {
        name = SSI Aerospace-Economy
        displayName = SSI Aerospace Market
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
        
    }
    
    CONTRACT_GROUP
    {
        name = SSI Aerospace
        displayName = SSI Aerospace Contracts
        minVersion = 1.17.0
        agent = SSI Aerospace
        maxSimultaneous = 0
        maxCompletions = 0
		sortKey = 1
    }
    
    CONTRACT_GROUP
    {
        name = Kerbal Aircraft Builders
        displayName = Kerbal Aircraft Builders
        minVersion = 1.17.0
        agent = Kerbal Aircraft Builders
        maxSimultaneous = 1
        maxCompletions = 0
		sortKey = 6
    }

 

hmm... i did that (put sortKey in the child groups, each unique as above), restarted KSP, no effect. no errors in log (no mention in debug log concerning sortKey)... hmmm. Is sorting working? It still sorts alpahbetical no matter the numbers. Or did I read this was a bug a few posts back?

 

Edit: looks like @nightingale said he fixed it in the next release... so I'm gonna test it using his dev version.


Edit2: confirmed fixed in dev version. Thanks @nightingale !

Edited by inigma
Link to comment
Share on other sites

6 minutes ago, inigma said:

hmm... i did that (put sortKey in the child groups, each unique as above), restarted KSP, no effect. no errors in log (no mention in debug log concerning sortKey)... hmmm. Is sorting working? It still sorts alpahbetical no matter the numbers. Or did I read this was a bug a few posts back?

 

Edit: looks like @nightingale said he fixed it in the next release... so I'm gonna test it using his dev version.

Yup, new release should come out in the next couple days, was going to mention that bug when you mentioned sortKey. :)

Link to comment
Share on other sites

8 minutes ago, nightingale said:

Yup, new release should come out in the next couple days, was going to mention that bug when you mentioned sortKey. :)

The sort key is still alphabetical though purely since if I list:

1

10

2

3

4

5

6

7

8

9

 

The 10 sortKey is sorted at the top after 1 and before 2. Any chance you could have sortKey recognize numerical order as well? I think that's pap's actual issue since he says he's spacing them by 5, which means since sortKey is still using alphabetical order and not allowing for numerical order, even after he updates to the current dev build he will still have the issue.

Edited by inigma
Link to comment
Share on other sites

4 minutes ago, inigma said:

The sort key is still alphabetical though purely since if I list:

1

10

2

3

4

5

6

7

8

9

 

The 10 sortKey is sorted at the top after 1 and before 2. Any chance you could have sortKey recognize numerical order as well? I think that's pap's actual issue since he says he's spacing them by 5, which means they are going to appear in alphabetical order and not numerical order, even after he updates to the current dev build.

Nope, it's actually a huge pain to do that, because it is a string and can have non-numbers in there.  If you want them to be numerical, then give a sufficient prefix, such as "01, 02, 03, 04".  Or make it alphabetical: "A, B, C...".  The main reason for this limitation is that the sortKey defaults to the title (hence why the default sort is alphabetical).

Link to comment
Share on other sites

1 minute ago, nightingale said:

Nope, it's actually a huge pain to do that, because it is a string and can have non-numbers in there.  If you want them to be numerical, then give a sufficient prefix, such as "01, 02, 03, 04".  Or make it alphabetical: "A, B, C...".  The main reason for this limitation is that the sortKey defaults to the title (hence why the default sort is alphabetical).

im not sure thats clear in the wiki. might help others to think of it in that way. :)

Link to comment
Share on other sites

Can I ask a very dumb question?  I ask that, because I am making an assumption and perhaps I am going about something incorrectly.

I have been attempting to do a Historical Career (To the best of my ability and time permitting); however KSP and it' save file keeps getting in the way and the only fix I know is to start a new career with the same mods and time warp through the contracts and use the debug menu to complete the ones that I have already done.

Is there a preferred way or ?

Thanks, I ask only because I don't know the inner working of what could happen with accelerating time and force completing the task vs actually doing it... again.

Link to comment
Share on other sites

2 hours ago, gamerscircle said:

Can I ask a very dumb question?  I ask that, because I am making an assumption and perhaps I am going about something incorrectly.

I have been attempting to do a Historical Career (To the best of my ability and time permitting); however KSP and it' save file keeps getting in the way and the only fix I know is to start a new career with the same mods and time warp through the contracts and use the debug menu to complete the ones that I have already done.

Is there a preferred way or ?

Thanks, I ask only because I don't know the inner working of what could happen with accelerating time and force completing the task vs actually doing it... again.

That would be the preferred way - force completing just fires the contract completion event (just like if you'd completed the parameters yourself).  So if the contracts have any special logic for completion it would fire then.

Link to comment
Share on other sites

5 hours ago, nightingale said:

That would be the preferred way - force completing just fires the contract completion event (just like if you'd completed the parameters yourself).  So if the contracts have any special logic for completion it would fire then.

Could there be a negative side to it?  Could a forcing a contact like this perhaps cause another contract not to show up?

Link to comment
Share on other sites

21 minutes ago, gamerscircle said:

Could there be a negative side to it?  Could a forcing a contact like this perhaps cause another contract not to show up?

It would not behave any differently than if you completed it the normal way.  It could hypothetically cause another contract to show up, if the contract pack was configured that way (I don't know of too many that use that functionality though, so you're probably fine).

Link to comment
Share on other sites

How can I change the contract limits? All I can find is that they were increased in 1.15.4 but I'd like to edit them myself.

This is something that is really needed, especially if you have lots of contracts of the type "enter and maintain proper order for X days" where X is really high. 

Edited by Eiktyrner
Link to comment
Share on other sites

1 hour ago, nightingale said:

It would not behave any differently than if you completed it the normal way.  It could hypothetically cause another contract to show up, if the contract pack was configured that way (I don't know of too many that use that functionality though, so you're probably fine).

okay.. again thank you for the reply, help to understand when you don't know what goes on under the hood.  err.. umm.. 

Link to comment
Share on other sites

It is me again, I am pretty sure that I can't mess up accelerating time in the game, checking mission control, accepting contracts and then using the debug menu to complete them.

However, when I look through the Historical Missions contacts mod by @Whitecat106 , I can see contacts that I think I should have been offered and haven't?  Also I think time is broken?  I am getting contacts from the 70s and Shuttle at the same.  Is there anything that I can share to help shed some light on this?

Link to comment
Share on other sites

9 hours ago, Eiktyrner said:

How can I change the contract limits? All I can find is that they were increased in 1.15.4 but I'd like to edit them myself.

This is something that is really needed, especially if you have lots of contracts of the type "enter and maintain proper order for X days" where X is really high. 

I'll likely add a setting around this in a future release - for the moment there is no way to customize it.

50 minutes ago, gamerscircle said:

It is me again, I am pretty sure that I can't mess up accelerating time in the game, checking mission control, accepting contracts and then using the debug menu to complete them.

However, when I look through the Historical Missions contacts mod by @Whitecat106 , I can see contacts that I think I should have been offered and haven't?  Also I think time is broken?  I am getting contacts from the 70s and Shuttle at the same.  Is there anything that I can share to help shed some light on this?

That's getting into territory that @Whitecat106 will have to address.  I don't know the specific details of his contract pack, but I though he'd put some stuff in so that you could skip to later eras of contracts.

Link to comment
Share on other sites

Hello,
It seems that the fix for the data node in child groups has broken something.


I just have tried the last dev ContractConfigurator.dll with contracts and I get the error message
Unknown identifier '@/ComSatContracts:maxUnlockedTechLevel'.
while my config file contains :
@ComSatContracts:maxUnlockedTechLevel
The presence of the @/ is realy weird, it does appear anywhere in my contract.

Here are my log and config file if you want ot investigate it : https://drive.google.com/file/d/0B2RjcW4lKwZLRlhPV1F1ZUhMS1k/view?usp=sharing

Thanks

Edited by hargn
Link to comment
Share on other sites

6 hours ago, hargn said:

Hello,
It seems that the fix for the data node in child groups has broken something.


I just have tried the last dev ContractConfigurator.dll with contracts and I get the error message
Unknown identifier '@/ComSatContracts:maxUnlockedTechLevel'.
while my config file contains :
@ComSatContracts:maxUnlockedTechLevel
The presence of the @/ is realy weird, it does appear anywhere in my contract.

Here are my log and config file if you want ot investigate it : https://drive.google.com/file/d/0B2RjcW4lKwZLRlhPV1F1ZUhMS1k/view?usp=sharing

Thanks

The extra / is just a display issue - the problem is that maxUnlockedTechLevel doesn't actually exist in the ComSatContracts group.cfg file that you sent.

Link to comment
Share on other sites

3 hours ago, nightingale said:

The extra / is just a display issue - the problem is that maxUnlockedTechLevel doesn't actually exist in the ComSatContracts group.cfg file that you sent.

You're right, apologies.
I've cleaned the files to help to find the previous issues and I forgot to reset all of my stuff.
All is working well now.

But if I may ask a question (because what I want to do is not working now), what does the function MaxTechLevelUnlocked() function ?
I thought it was the depth of the deepest unlocked tech node in the tech graph, but I'm not sure of that anymore.
That is to implement some kind of progression : more the player is advanced into the tech tree, less the prestige of the contract is great.

Link to comment
Share on other sites

1 minute ago, hargn said:

But if I may ask a question (because what I want to do is not working now), what does the function MaxTechLevelUnlocked() function ?
I thought it was the depth of the deepest unlocked tech node in the tech graph, but I'm not sure of that anymore.
That is to implement some kind of progression : more the player is advanced into the tech tree, less the prestige of the contract is great.

Yup, it's exactly that (keeping in mind that the start node is level 0).

Link to comment
Share on other sites

15 hours ago, nightingale said:

I'll likely add a setting around this in a future release - for the moment there is no way to customize it.

It would be great to have an option for it, even if it's just a config file. I just compiled my own copy for now.

Link to comment
Share on other sites

@nightingale

Hi there.  We've got a bit of a minithread in the RP0 forum going trying to figure out the source of major stutter due /memory allocation & garbage collection that happens in career mode but not nearly as much in sandbox when you play RP0.  For instance, right now I have GC stutter every 5-6 seconds in career, and its 10x less frequent in sandbox

Do you know if there's a good way for us to rule in/rule out CC, without removing the mod completely?  RP0 doesn't like having CC not available.  Also, do you think there might be an issue when there are a lot of contracts both as potential contracts (due to a pack like historical missions) and also completed (my save is >10MB due mainly to data from completed contracts.) 

I realize this is highly speculative and we don't know for sure what's causing it, it may not have anything to do with contracts at all, but any insight would be appreciated.

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