nightingale

[1.6.x+] Contract Configurator [v1.27.1] [2018-12-28]

Recommended Posts

9 minutes ago, nightingale said:

Contract types don't need a group (although it's highly recommended for various reasons).  So it could be you didn't put the group on your CONTRACT_TYPE.

I managed to understand this, now it's grouped well.

Unfortunately, as soon as i try to add to my basic structure, even while looking at similar stuff, i end up messing up something. The debug tells me that i do not have parameters, but i do. I guess it's a very simple bracket mistake or something, but i tried all the configuration i could think of.

If you do not mind having a look, that would be really great.

Spoiler

CONTRACT_TYPE
{
    name = Zoologikal Society
    title = Zoological Society: Test
    group = Zoologikal Society
    synopsis = Prof. Karwin would like some help in his research on the origin of life on Kerbin.
    description = It is rumored that water might be the primordial source of life. Let's check!!!
    completedMessage = Gimme some time to mess with the samples... errrr... Analyse the data.
    minExpiry = 1
    maxExpiry = 7
    deadline = 500
    cancellable = true
    declinable = true
    autoAccept = false
    prestige = Significant
    targetBody = Kerbin
    maxCompletions = 1
    maxSimultaneous = 1
    rewardScience = 0
    rewardReputation = 5
    rewardFunds = Random(5000.0, 10000)
    failureReputation = 1
    failureFunds = 5000.0
    advanceFunds = 2500
BEHAVIOUR
{
    name = DIALOG_BOX
    type = DialogBox
    
        DIALOG_BOX
    {
        title = test
        condition = CONTRACT_ACCEPTED
        position = LEFT
        width = 1.0
        titleColor = #BADA55
        TEXT
        {
            text = Does it works?
            fontSize = 20
            textColor = #BADA55
        }
        IMAGE
        {
 
            url = ContractPacks/Zoologikal Society/Images/MadFlag.png
            characterName = Madscientist
            textColor = #BADA55
        }
            PARAMETER
{
    name = CollectScience
    type = CollectScience
    situation = SrfSplashed
    experiment = surfaceSample
    targetBody = Kerbin
    recoveryMethod = Recover
    }
    REQUIREMENT
{
    name = Facility
    type = Facility
    facility = ResearchAndDevelopment
    minLevel = 2
    maxLevel = 3
}
}

So, where do i bug my stuffs? lol

 

EWdit: The debug either tells me that i do not have parameters, or the they do not recognise them cause the are child to my behavior. If it can help.

Edited by Madscientist16180

Share this post


Link to post
Share on other sites
3 minutes ago, Madscientist16180 said:

I managed to understand this, now it's grouped well.

Unfortunately, as soon as i try to add to my basic structure, even while looking at similar stuff, i end up messing up something. The debug tells me that i do not have parameters, but i do. I guess it's a very simple bracket mistake or something, but i tried all the configuration i could think of.

If you do not mind having a look, that would be really great.

<snip>

So, where do i bug my stuffs? lol

Your behaviour is missing the closing bracket.  Coder's protip: always, always indent properly.  So instead of this:

CONTRACT_TYPE
{
    name = foo
PARAMETER
{
    name = foo2
something = bla
}
}

Do this:

CONTRACT_TYPE
{
    name = foo

    PARAMETER
    {
        name = foo2
        something = bla
    }
}

That makes it far easier to spot missed brackets (which KSP does NOT handle nicely in its parsing, it ends up just dropping a whole bunch of stuff with no warnings).  Picking up an editor that has either autoindent or easy indenting is helpful.  I don't have too much in the way of recommendations here (I use vim, which is not very beginner friendly).  I know a lot of people use Notepad++, so that probably means it's a good choice. :) 

Share this post


Link to post
Share on other sites

All is green and working, i have my dialogue box appearing when i accept the contract and all!

Tks for you help in getting started. I guess i'll be back when it does not work again lol

Share this post


Link to post
Share on other sites

New RemoteTech release breaks things.

 

Exception occured while loading contract 'RemoteTech.RT_KerbinRelay_4sat': System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'. at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0

Share this post


Link to post
Share on other sites
24 minutes ago, kerrigan778 said:

New RemoteTech release breaks things.

 

Exception occured while loading contract 'RemoteTech.RT_KerbinRelay_4sat': System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'. at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0

I'm experiencing a similar error. https://vgy.me/u6NcqB.png (not embedded because the image is rather large)

Share this post


Link to post
Share on other sites

Updated, download here.

Contract Configurator 1.11.5

  • Fixed exception when recovering vessel (thanks BluK).
  • Recompile to RemoteTech 1.7.0.

Share this post


Link to post
Share on other sites

Hello All,

I seem to be having a very strange error when recovering a vessel which seems to be related to Contract Configurator. When trying to recover the vessel, the recovery window shows up only for the kerbal in the pod, and I only get the reputation for recovering the kerbal, no science or funds from the pod.

If I go back to the tracking station, the pod is still there, and if I switch to it, the kerbal is back in the pod, as though nothing happened.

I am seeing the following errors:

http://pastebin.com/Z1Buyw4V


Interestingly enough, this sounded like an issue with generating a stock contract, so I used CC to disable *all* of the stock contracts. This fixed the recovery issue, but I do still get some nullref spam in the logs:

http://pastebin.com/GPShgCyY

This is using the latest contract configurator (1.11.5), but I was seeing the same issue with the previous version as well. I would really prefer not to be stuck with *all* of the stock contracts disabled, and while I could always disable them before recovering a vessel, this deletes all of my active contracts. Any ideas?

Edited by Chris97b
Fixed log links

Share this post


Link to post
Share on other sites
56 minutes ago, Chris97b said:

Hello All,

I seem to be having a very strange error when recovering a vessel which seems to be related to Contract Configurator. When trying to recover the vessel, the recovery window shows up only for the kerbal in the pod, and I only get the reputation for recovering the kerbal, no science or funds from the pod.

If I go back to the tracking station, the pod is still there, and if I switch to it, the kerbal is back in the pod, as though nothing happened.

I am seeing the following errors:

http://pastebin.com/Z1Buyw4V


Interestingly enough, this sounded like an issue with generating a stock contract, so I used CC to disable *all* of the stock contracts. This fixed the recovery issue, but I do still get some nullref spam in the logs:

http://pastebin.com/GPShgCyY

This is using the latest contract configurator (1.11.5), but I was seeing the same issue with the previous version as well. I would really prefer not to be stuck with *all* of the stock contracts disabled, and while I could always disable them before recovering a vessel, this deletes all of my active contracts. Any ideas?

Looks to me like both Contract Configurator and stock are falling over on a messed up part module.  Check all your mods are correctly updated to 1.1.2 versions, as it is likely a part mod causing this issue.  If you want me to look further, please post a the full log file.

Share this post


Link to post
Share on other sites
46 minutes ago, nightingale said:

Looks to me like both Contract Configurator and stock are falling over on a messed up part module.  Check all your mods are correctly updated to 1.1.2 versions, as it is likely a part mod causing this issue.  If you want me to look further, please post a the full log file.

Yeah, I figured as much. I'm definitely not convinced that CC is at fault here, since initially I tried removing CC and that made no difference. Problem is, I have nearly 100 mods at play and reducing it down to the bare minimum didn't seem to make any difference, I was still seeing the issues with the stock contracts system. I sort of suspected that perhaps something had set a flag in the savegame which was confusing the contracts system, but I'm just guessing at this point.

That's interesting that a part mod may be at fault, I hadn't considered that. I don't really understand the stock contracts system all that well, but I assumed that parts didn't really matter to contracts much, other than the whole "must have an antenna and be able to generate EC" types of stuff. I recently added a crapload of parts, and that would make sense.

I initially didn't post the full logs because they're freaking huge, but if you want to take a look, here they are:


https://www.dropbox.com/s/vdsutw0x2x16fp3/KSP.log?dl=0

https://www.dropbox.com/s/yeq38tabp4bnw88/output_log.txt?dl=0


Thanks very much for your help, I've been bashing my head on this one for 3 days lol

Share this post


Link to post
Share on other sites

@Chris97b - More than likely it's Mark 2 Expansion:

[LOG 19:35:54.270] PartLoader: Compiling Part 'Mk2Expansion/Parts/Utility/LandingLeg/part/M2X_RadialLeg'
[EXC 19:35:54.277] NullReferenceException: Object reference not set to an instance of an object
	ModuleWheels.ModuleWheelSubmodule.OnAwake ()
	PartModule.Awake ()
	UnityEngine.GameObject:AddComponent(Type)
	Part:AddModule(String)
	Part:AddModule(ConfigNode)
	PartLoader:ParsePart(UrlConfig, ConfigNode)
	<CompileParts>c__Iterator4A:MoveNext()

 

Share this post


Link to post
Share on other sites

So, just loaded up my save after updating to the newest CC version through CKAN and was met with the following error, along with the instruction to copy it and share it here:

Exception occured while loading contract 'RemoteTech.RT_KerbinRelay_4sat':
System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'.
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

This contract was apparently working before the update as my last play session is when I accepted it.

Edited by SpacedInvader

Share this post


Link to post
Share on other sites
2 minutes ago, SpacedInvader said:

So, just loaded up my save after updating to the newest CC version through CKAN and was met with the following error, along with the instruction to copy it and share it here:


Exception occured while loading contract 'RemoteTech.RT_KerbinRelay_4sat':
System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'.
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

This contract was apparently working before the update as my last play session is when I accepted it.

You'll need to update RemoteTech to 1.7.0

Share this post


Link to post
Share on other sites
Just now, nightingale said:

You'll need to update RemoteTech to 1.7.0

I'll give that a try... didn't realize it was updated... is there anything special I need to do to preserve the contract?

Share this post


Link to post
Share on other sites
7 minutes ago, SpacedInvader said:

I'll give that a try... didn't realize it was updated... is there anything special I need to do to preserve the contract?

Shouldn't be anything special needed.

Share this post


Link to post
Share on other sites
2 minutes ago, nightingale said:

Shouldn't be anything special needed.

Looks like you were right on both counts... Was a little worried because the error text made it seem like the contract was already deleted because of the error.

Share this post


Link to post
Share on other sites

I got: 

Exception occured while loading contract 'RemoteTech.RT_KerbinRelay_4sat':
System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'.
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

I am running RemoteTech 1.7.0. Checked, re-copied both this mod and RemoteTech, checked .version of RemoteTech, definitely the case. Thing is, I finished this contract already. Can I safely ignore it?

Edit: I tried to ignore it, and it gave me the failure conditions.

Edited by larkvi

Share this post


Link to post
Share on other sites
26 minutes ago, larkvi said:

I got: 


Exception occured while loading contract 'RemoteTech.RT_KerbinRelay_4sat':
System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'.
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0 
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0 

I am running RemoteTech 1.7.0. Checked, re-copied both this mod and RemoteTech, checked .version of RemoteTech, definitely the case. Thing is, I finished this contract already. Can I safely ignore it?

Edit: I tried to ignore it, and it gave me the failure conditions.

Send logs please.

Share this post


Link to post
Share on other sites
Just now, nightingale said:

Send logs please.

I re-copied the game from the master for this save, re-upgraded RemoteTech and Contract Configurator and could not replicate the problem. Everything seems to be working this time.

Share this post


Link to post
Share on other sites
On 06/05/2016 at 9:13 PM, nightingale said:

Picking up an editor that has either autoindent or easy indenting is helpful.  I don't have too much in the way of recommendations here (I use vim, which is not very beginner friendly).  I know a lot of people use Notepad++, so that probably means it's a good choice.

@Madscientist16180 I personally use Notepad++ it doesn't autoindent by default (but there is probably a plugin to do so) but what it does do, is highlight corresponding opening/closing braces.

So what you can do, is go to the end of your contract file, and check whether the last brace turns red. - if it does, you can go to the top and check the first brace is also red (If it isn't. you've missed one somewhere. Look for the opening brace that turns red to find it)

If it doesn't (goes a sort of purply colour instead), you have closed early (and can then trace your closing braces back to find the one that is closing the first brace, as above).

Share this post


Link to post
Share on other sites

So apparently I tried to be clever and CC didn't like it.

Here's the situation - I have a contract that can end one of a few ways (parameters with mutually exclusively requirements, depending on the result of a random number roll).

I want a contract to generate if one of those endings comes up on a specific vessel, so I tried to store that vessel in the persistent data store, but only if the specific parameter completes.

CC doesn't like this at all, and is throwing a null ref exception:

Logs: https://www.dropbox.com/s/kx7gh1e88mhggmj/KSP.log?dl=0

https://www.dropbox.com/s/ivrtklna104p7ty/output_log.txt?dl=0

Contract: https://github.com/severedsolo/CleverSat/blob/master/CleverSatProbeMalfunction.cfg

The bit that it doesn't like is this (it's the only thing that's changed)

	BEHAVIOUR
{
    name = BadSat
    type = Expression
	PARAMETER_COMPLETED
    {
		type = VesselIdentifier
		badSat = @/malSat
	}

}

 

Share this post


Link to post
Share on other sites

This is what I get with latest version (posted in RT contract pack thread as well):

 

Exception occured while loading contract 'RemoteTech.RT_EverythingSat':
System.Exception: No ContractRequirement with type = 'CelestialBodyCoverage'.
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ContractRequirement.LoadRequirement (.ConfigNode configNode) [0x00000] in <filename unknown>:0
  at ContractConfigurator.ConfiguredContract.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0

Share this post


Link to post
Share on other sites
5 hours ago, severedsolo said:

So apparently I tried to be clever and CC didn't like it.

Here's the situation - I have a contract that can end one of a few ways (parameters with mutually exclusively requirements, depending on the result of a random number roll).

I want a contract to generate if one of those endings comes up on a specific vessel, so I tried to store that vessel in the persistent data store, but only if the specific parameter completes.

CC doesn't like this at all, and is throwing a null ref exception:

Logs: https://www.dropbox.com/s/kx7gh1e88mhggmj/KSP.log?dl=0

https://www.dropbox.com/s/ivrtklna104p7ty/output_log.txt?dl=0

Contract: https://github.com/severedsolo/CleverSat/blob/master/CleverSatProbeMalfunction.cfg

The bit that it doesn't like is this (it's the only thing that's changed)


	BEHAVIOUR
{
    name = BadSat
    type = Expression
	PARAMETER_COMPLETED
    {
		type = VesselIdentifier
		badSat = @/malSat
	}

}

 

Definitely a bug, but no idea what is wrong at a glance.  Can you raise a GitHub issue.

On an aside, I leave tonight for a 2 week business trip, so support is going to be sporadic for the next little bit.

Share this post


Link to post
Share on other sites
7 hours ago, severedsolo said:

@Madscientist16180 I personally use Notepad++ it doesn't autoindent by default (but there is probably a plugin to do so) but what it does do, is highlight corresponding opening/closing braces.

That's already what i use on your advice from your pack thread.

It's going well in fact. I guess the first will have been the hardest, now i do not only copy and hope it'll work, i'm actually slowly but surely understanding what i'm really doing.

One thing i'd like to do but can't seem to find how is: have a contract spawn a vessel somewhere, have the player repair it (will require KIS/KAS), and then need to use that particular vessel to complete the contract. 

Is this possible?

 

 

 

Share this post


Link to post
Share on other sites
8 minutes ago, Madscientist16180 said:

One thing i'd like to do but can't seem to find how is: have a contract spawn a vessel somewhere, have the player repair it (will require KIS/KAS), and then need to use that particular vessel to complete the contract.

What you are looking for is the Spawn Vessel behaviour (for the repairing you'll have to be imaginative, but it will do the rest)

Share this post


Link to post
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.