Jump to content

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


nightingale

Recommended Posts

Hi,

Ya I did all of that - I am streamin as I write here haha ! I am still at a major loss. No matter where I put these config files I get 'no contract generated' in the debug log. The documentation you mention is of no use and does not explain anything for me sorry. All I have reference is to debug mode; here is my example:

CONTRACT_TYPE

{

name = Break The Bank

// Contract text

title = Break The Bank

description = Break The Bank

synopsis = [content]

completedMessage = You have done it!

// Controls for whether a contract can be declined or cancelled, default is true for both

cancellable = false

declinable = false

// Target Celestial body - controls where the contract must be completed, has some automated

// effects on numeric parameters (increasing science, etc.)

targetBody = Kerbin

// Contract rewards

rewardScience = 5000.0

rewardReputation = 20.0

rewardFunds = 5000000.0

PARAMETER

{

name = AltitudeRecord1

type = AltitudeRecord

altitude = 10000

}

REQUIREMENT

{

name = KSCLanding1

type = KSCLanding

}

}

Help !

cdr zeta

Link to comment
Share on other sites

Hi,

Ya I did all of that - I am streamin as I write here haha ! I am still at a major loss. No matter where I put these config files I get 'no contract generated' in the debug log. The documentation you mention is of no use and does not explain anything for me sorry. All I have reference is to debug mode; here is my example:

<snip>

Help !

cdr zeta

More than likely it's that KSCLanding requirement that's causing you trouble. It's one of the stock "ProgressTracking" items that I only did quick testing on - so I can't tell you *exactly* what needs to be done to meet that requirement other than the seemingly obvious "land something at KSC".

And just so you're clear on what a requirement means, from the documentation:

The REQUIREMENT node defines a contract requirement - the pre-requisites that are required for the contract to be offered.

In other words, you don't need to have any REQUIREMENT nodes - try removing that node to start, and see if that works.

Link to comment
Share on other sites

Hi,

I tried the above and deleted requirement - no work.

What is E, M, and H do in debug? I run these and get no contract generated - what do these letters stand for?

How does contract config dll know where and when to find my cfg files? Do I have to restart the game or can I just add cfg's to the contract config dir?

Thank you...

Zeta

Link to comment
Share on other sites

Greetings Nightingale ☺/

While testing if Scerion`s contract worked, I discoverd that there is a serious conflict between Contract Configurator and tweakscale 1.49.

Custom contracts dissapear and the log file is hammerd with errors :(

I have the logs files uploaded here: https://www.dropbox.com/s/l8z743ppw5bizxn/CC0.3.3-TS1.49-erros.rar?dl=0

I hope you will be able to find a simple fix for it as we have given the "homework" out for it already :blush:

*edit: to clarify: clean install with just Squad/NASA/CC 0.3.3/TS 1.49 on a 32bit clean test install

Thanks for helping Scerion! :D

Edited by Kamuchi
Link to comment
Share on other sites

Hi,

I tried the above and deleted requirement - no work.

What is E, M, and H do in debug? I run these and get no contract generated - what do these letters stand for?

Took me a bit to figure out what E/M/H was all about - they're the buttons in the under the Contracts / Add debug window. These are stock KSP, and I've never used them before. About all I can figure from pressing them is they will attempt to generate a new contract if the conditions are right (but all I could get them to do was generate a message saying "Contract of type <x> was not be generated".)

How does contract config dll know where and when to find my cfg files? Do I have to restart the game or can I just add cfg's to the contract config dir?

Thank you...

Zeta

Not sure if you're a programmer or not, so I'll give you both the programmer and non-programmer answers.

PROGRAMMER: In the Squad provided ConfigNode class there's a method called GetConfigNodes(string) that will get all nodes of a given type from all config files.

NON-PROGRAMMER: Wizardry.

Actually, I had I thought - if you were poking around in the debug menus - one of the current limitations on Contract Configurator is that it can only load up the contract configuration when KSP starts. So if you change anything in the cfg file, you need to restart KSP. I'll probably look at making it reload the config every time you drop back to the main menu (or even on load of a save game) to make this a little easier.

Link to comment
Share on other sites

Greetings Nightingale ☺/

While testing if Scerion`s contract worked, I discoverd that there is a serious conflict between Contract Configurator and tweakscale 1.49.

Custom contracts dissapear and the log file is hammerd with errors :(

I have the logs files uploaded here: https://www.dropbox.com/s/l8z743ppw5bizxn/CC0.3.3-TS1.49-erros.rar?dl=0

I hope you will be able to find a simple fix for it as we have given the "homework" out for it already :blush:

*edit: to clarify: clean install with just Squad/NASA/CC 0.3.3/TS 1.49 on a 32bit clean test install

Thanks for helping Scerion! :D

Wow, just wow. From those errors, I wouldn't have believed you when you said it was because of Tweakscale if I hadn't just reproduced it myself. No promises on an ETA on this one... from my quick googling I see a lot of people complaining of this error with Unity. My best guess from that is that it's some issue with an mis-referenced... something... in Tweakscale, which is breaking reflection across the board.

Link to comment
Share on other sites

Wow, just wow. From those errors, I wouldn't have believed you when you said it was because of Tweakscale if I hadn't just reproduced it myself. No promises on an ETA on this one... from my quick googling I see a lot of people complaining of this error with Unity. My best guess from that is that it's some issue with an mis-referenced... something... in Tweakscale, which is breaking reflection across the board.

While trying to narrow it down in my play install and finding it, I was actually stumped aswell as I was expecting it to be Regolith? as a gut feeling :huh:

Seeing it happen in a clean install with just TS... :confused:

Have had enough expiriencing bug tracking the past months, wouldn`t have come here if I wasn`t 63527694% sure :wink:

I have no idea if to take it to the TS thread, personally, all the issues because of the autoscale since 1.46 :/

Thanks for confirming I wasn`t nuts and looked into it! :D

Link to comment
Share on other sites

While trying to narrow it down in my play install and finding it, I was actually stumped aswell as I was expecting it to be Regolith? as a gut feeling :huh:

Seeing it happen in a clean install with just TS... :confused:

Have had enough expiriencing bug tracking the past months, wouldn`t have come here if I wasn`t 63527694% sure :wink:

I have no idea if to take it to the TS thread, personally, all the issues because of the autoscale since 1.46 :/

Thanks for confirming I wasn`t nuts and looked into it! :D

I'm pretty sure the problem is on TS's end, so I raised it on their GitHub. However, I can think of a way to make it less fragile on my end - so I'll try to get that workaround coded up.

Link to comment
Share on other sites

I'm pretty sure the problem is on TS's end, so I raised it on their GitHub. However, I can think of a way to make it less fragile on my end - so I'll try to get that workaround coded up.

Much appriciated Nightingale! #FailedThumbsUpSmiley :)

Link to comment
Share on other sites

Nightingale I borked things again :( Not sure what I changed but all I get is spammed in the log file, and no contracts in the admin building

ContractConfigurator: Generated a contract: ContractType[KSABKHW141220]

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Tested on a new save.

contract: http://pastebin.com/ridKKg0N

Link to comment
Share on other sites

Nightingale I borked things again :( Not sure what I changed but all I get is spammed in the log file, and no contracts in the admin building

ContractConfigurator: Generated a contract: ContractType[KSABKHW141220]

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Tested on a new save.

contract: http://pastebin.com/ridKKg0N

The usual helpful response: it worked for me! :cool:

The only thing unusual I got was a warning about not finding the Agency (which is normal considering I don't have the customized agency). But perhaps that's where your problem is - try removing the agency in your contract and see if that changes things.

Oh, and I probably should've mentioned this when I saw it back when you posted your full configuration - the way you're setting up your agency is wrong - if I'm not mistaken you can just create your own .cfg file in your own directory with the agency details (rather than overwriting the .cfg in the Squad directory).

Link to comment
Share on other sites

The usual helpful response: it worked for me! :cool:

The only thing unusual I got was a warning about not finding the Agency (which is normal considering I don't have the customized agency). But perhaps that's where your problem is - try removing the agency in your contract and see if that changes things.

Oh, and I probably should've mentioned this when I saw it back when you posted your full configuration - the way you're setting up your agency is wrong - if I'm not mistaken you can just create your own .cfg file in your own directory with the agency details (rather than overwriting the .cfg in the Squad directory).

Hmm weird, I have the custom agency in there :(

And dangit see I knew there was something like that out there. I was thinking it might be a modulemanager edit but I couldn't find anyone that did it before. Hmm so I just need to create my own cfg with details from the squad one minus squad stuff...well that's way easier if so :)

Hmm wonder what's going on in my game causing me problems. Shall wipe and try again.

Link to comment
Share on other sites

Hello,

I know Tweakscale causes a few problems with one, 2 or more other mods I forget; MODS tend to do that and since I have a ton of MODS I dont know why I didnt think of scrapping mine to test Configurator here; I am workin on it today because I like the idea of making my own.

I will probly look at MCE Mission Extended again just because I said I would; dont get me wrong it's a great program I just had problems with it crashing earlier versions.

I like the idea of using other parameters that are more technical...eccentricity etc - I thought MCE had done this I could be wrong.

Yes it makes sense that you cant load these config files on the fly but you can with the persistent/quicksaves - IE just reload the mission not restart the whole game!

Another question maybe you can help is how does the game know 'WHEN' to load a specific contract; it looks like there is a sequence and it is pretty rigid and logical.

I was wondering about say if you had done all of the 48-7s on Kerbin; are there contracts that repeat all the sequence for every body in the solar system (?!) AND even present contracts that CANT be done FORCING cancellation and loss of funds (like finding resources that aint there.

Yeah I dabble in programming in fact I will be trying to port over AIML speech language to Python and/or Java to make a chatbot run faster; I dont program that much tho but I have a minor in computer science and understand basic, fortran, some pascal, and versions of C structured programming.

I will be streaming later this morning in a few hours but I need to read up on posts. Now I see that your cfg files probly have to start with 'Game Starts'; that is probly ok, but as I recall not as flexible as MCE dont quote me and I am not trying to say your program isnt good an all; I couldnt write such a thing and MODDERS are what make KSP exceed beyond expectations here or I probly wouldnt be playing it.

Edit: Also I am guessing one can add all their contracts to one config file, then maybe use a different file per agent etc to keep them straight.

Edit: I added scerion's cfg - mine are showing up his isnt ! and I have one cfg with 2 missions lol so I am making progress; something in scerions file is missing in mine; his was after mine but when I get it sorted I will get back - defintely a game restart for now but I am checking 'mission-only' restarts as this SHOULD work you would think.

Edit: I loaded quicksave 1 (out of 10) and even without the cfg file in the game it loaded 4 versions of my 1 cfg file; 2 in quicksave 9 with different agents; agent picking may be random. Also quicksaves may be causing some issues I will keep chuggin away...

Edit: Wow okay heres what happened (I need to leave for an hour or so...)...I added scerion's file; it worked on 'mission load' but it crashed my mission. I loaded my quicksave and the mission wasnt there; I had 2 many missions maybe...cancelled some missions it is there now. I will get back to you. (Everthing is ok with his cfg I even dropped the :needs info on contract_type; I will add what was missing and try it; defintely game restarts required to add these cfg's; dont need to use debug that was my error.

Zeta

Edited by Cdr_Zeta
addendum
Link to comment
Share on other sites

I like the idea of using other parameters that are more technical...eccentricity etc - I thought MCE had done this I could be wrong.

Right now I'm working on integrating the orbits parameters that FinePrint introduced in 0.90. If that's too rigid I am considering later adding individual parameters for different orbital values such eccentricity, inclination, etc.

Yes it makes sense that you cant load these config files on the fly but you can with the persistent/quicksaves - IE just reload the mission not restart the whole game!

I'll probably change it to load at a few set points (main menu, load of game) as well as just giving a hotkey that will force-reload anything. Will make testing a lot easier.

Another question maybe you can help is how does the game know 'WHEN' to load a specific contract; it looks like there is a sequence and it is pretty rigid and logical.

In stock, each contract type has hard-coded logic in MeetsRequirement that determine whether it is available to be offered to the player, but it's different for each. Part test contracts start showing after you reach space, the FinePrint satellite contracts need you to have researched a few key bits (probe cores and power). After that it's pretty random, when it wants to generate a contract it'll just cycle through the list trying each one until one generates. I assume that it goes through the list in a random order or something like that so that each contract has a roughly equal chance of coming up.

Contract Configurator is slightly different - it is only one contract type, but it will "reskin" it when it's offered to look like many different ones. But it applies the same concepts with the REQUIREMENT node to make it work the same. There is also a weight parameter that can weight the choice more heavily towards or away from a CC contract type - but it only works within the ContractConfigurator contracts (ie. it won't make a Part Test less likely to come up).

Edit: Also I am guessing one can add all their contracts to one config file, then maybe use a different file per agent etc to keep them straight.

Yup - the general idea is you can organize them however makes sense to YOU. :)

Edit: I loaded quicksave 1 (out of 10) and even without the cfg file in the game it loaded 4 versions of my 1 cfg file; 2 in quicksave 9 with different agents; agent picking may be random. Also quicksaves may be causing some issues I will keep chuggin away...

Correct - agent picking is random (unless you specify an agency in your CONTRACT_TYPE). If you don't want your contract to show up multiple times, look at the maxSimultaneous attribute on CONTRACT_TYPE.

Link to comment
Share on other sites

Hi,

The section that says Prestige Level was removed so it didnt lock in when the contract should show up; removing enough contracts also makes it appear ahead of any others (I think).

The only problem I had and am not sure of is that it crashed my main mission and I had to load a quicksave; I am not sure what caused this I am still runnin a few tests.

The funds multiplier problem I had works only for new contracts as well not the ones already on the board so things are working; I can create missions and even make 1 or 2 new agents.

I will probly use this to troubleshoot; I am not totally confident on using it in a permanent mission series yet; I can solve some of my other game problems not that this is working for me thanks !!

Edit: Still somehow it is sending the game back to the beginning; I may have to create a quicksave prior to adding the missions then load the quicksaves.

Zeta

Edited by Cdr_Zeta
Link to comment
Share on other sites

Hi,

The section that says Prestige Level was removed so it didnt lock in when the contract should show up; removing enough contracts also makes it appear ahead of any others (I think).

The only problem I had and am not sure of is that it crashed my main mission and I had to load a quicksave; I am not sure what caused this I am still runnin a few tests.

The funds multiplier problem I had works only for new contracts as well not the ones already on the board so things are working; I can create missions and even make 1 or 2 new agents.

I will probly use this to troubleshoot; I am not totally confident on using it in a permanent mission series yet; I can solve some of my other game problems not that this is working for me thanks !!

Zeta

you were able to get new agents created? How so? :) I haven't tested yet trying to make my own cfg file yet.

Also thanks for testing my contract Zeta! :D

Link to comment
Share on other sites

This question seems to come up enough that I added a section in the wiki: Creating an Agency

Awesome!! :D

Getting close to getting these 0.90 features integrated... how 'bout a sneak peek?

Waypoints and orbits, oh my!

More Awesome :D

Request/Suggestion: is it/would it be possible to block out stock contracts? Would be nice to insert into a career and only have custom contracts enabled.

Link to comment
Share on other sites

Request/Suggestion: is it/would it be possible to block out stock contracts? Would be nice to insert into a career and only have custom contracts enabled.

No need to suggest it, that was brought in for version 0.3.0! See this wiki page for the details. I'll have to update the wiki to list the new ones as well in case people want it as a reference.

Link to comment
Share on other sites

No need to suggest it, that was brought in for version 0.3.0! See this wiki page for the details. I'll have to update the wiki to list the new ones as well in case people want it as a reference.

Seriously. Quit being so awesome Nightingale.

No...not really... but you've done some amazing work :D Thank you so much.

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