inigma Posted August 16, 2016 Share Posted August 16, 2016 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 } Quote Link to comment Share on other sites More sharing options...
pap1723 Posted August 16, 2016 Share Posted August 16, 2016 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 } Quote Link to comment Share on other sites More sharing options...
inigma Posted August 16, 2016 Share Posted August 16, 2016 (edited) 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 August 16, 2016 by inigma Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 16, 2016 Author Share Posted August 16, 2016 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. Quote Link to comment Share on other sites More sharing options...
inigma Posted August 16, 2016 Share Posted August 16, 2016 (edited) 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 August 16, 2016 by inigma Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 16, 2016 Author Share Posted August 16, 2016 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). Quote Link to comment Share on other sites More sharing options...
inigma Posted August 16, 2016 Share Posted August 16, 2016 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. Quote Link to comment Share on other sites More sharing options...
Norcalplanner Posted August 17, 2016 Share Posted August 17, 2016 Congratulations on the new gig, @nightingale! Well done! Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 17, 2016 Author Share Posted August 17, 2016 6 hours ago, inigma said: im not sure thats clear in the wiki. might help others to think of it in that way. Good idea, wiki has been clarified. Quote Link to comment Share on other sites More sharing options...
hargn Posted August 17, 2016 Share Posted August 17, 2016 Fine, all my data are now working fine. I'll start to test the contracts I developp Thanks a lot for your quick responses @nightingale Quote Link to comment Share on other sites More sharing options...
gamerscircle Posted August 17, 2016 Share Posted August 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 17, 2016 Author Share Posted August 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
gamerscircle Posted August 17, 2016 Share Posted August 17, 2016 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? Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 17, 2016 Author Share Posted August 17, 2016 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). Quote Link to comment Share on other sites More sharing options...
Eiktyrner Posted August 17, 2016 Share Posted August 17, 2016 (edited) 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 August 17, 2016 by Eiktyrner Quote Link to comment Share on other sites More sharing options...
gamerscircle Posted August 17, 2016 Share Posted August 17, 2016 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.. Quote Link to comment Share on other sites More sharing options...
gamerscircle Posted August 18, 2016 Share Posted August 18, 2016 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? Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 18, 2016 Author Share Posted August 18, 2016 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. Quote Link to comment Share on other sites More sharing options...
hargn Posted August 18, 2016 Share Posted August 18, 2016 (edited) 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 messageUnknown 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 August 18, 2016 by hargn Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 18, 2016 Author Share Posted August 18, 2016 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 messageUnknown 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. Quote Link to comment Share on other sites More sharing options...
hargn Posted August 18, 2016 Share Posted August 18, 2016 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. Quote Link to comment Share on other sites More sharing options...
nightingale Posted August 18, 2016 Author Share Posted August 18, 2016 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). Quote Link to comment Share on other sites More sharing options...
hargn Posted August 18, 2016 Share Posted August 18, 2016 1 minute ago, nightingale said: Yup, it's exactly that (keeping in mind that the start node is level 0). Ok, I'll investigate what's wrong in my code. Thanks Quote Link to comment Share on other sites More sharing options...
Eiktyrner Posted August 18, 2016 Share Posted August 18, 2016 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. Quote Link to comment Share on other sites More sharing options...
Maxsimal Posted August 19, 2016 Share Posted August 19, 2016 @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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.