Jump to content

Contract Packs for Contract Configurator - General Thread


nightingale

Recommended Posts

Okay, I came up with another question: is there a way to check if cargo is on board the craft? Not just having a cargo bay via PartValidation, but some sort of cargo inside the bay during flight? (I suspect the answer is no, but want to be sure.)

Link to comment
Share on other sites

Okay, I came up with another question: is there a way to check if cargo is on board the craft? Not just having a cargo bay via PartValidation, but some sort of cargo inside the bay during flight? (I suspect the answer is no, but want to be sure.)

Definite no on that one, rather tricky to do.

Link to comment
Share on other sites

Thanx for the heads-up, nightingale... I wish I knew how to do it, or I would give it a try... Oddly, I dont even know how well Figaro (or ANY GPS setup) will/would work on other planets/moons...Especially smaller ones...i havent explored outside of Kerbin SOI yet...lol So I dont even know if it would be limited to K-SOI or not...

Link to comment
Share on other sites

I successfully completed my own contract. It worked, thanks to you!

I was wondering if I’ve got the following right or not. The basic idea is, the contract shouldn’t complete until the craft comes to an undestroyed stop on the KSC runway. Here are the parameters I set up for that:

 

 
        PARAMETER
        {
            name = Land
            title = Land safely on the KSC runway
            type = ReachState
            situation = LANDED
            biome = Runway
            maxSpeed = 1
            PARAMETER
            {
                type = VesselNotDestroyed
            }
            completeInSequence = true
            hideChildren = true
        }

 

Is there a better way to enforce those specific conditions, or is that about the size of it? Anything I botched?

Edited by meyerweb
Cleaned up forum migration errors (Unicode and hyperlinking were both botched—sigh)
Link to comment
Share on other sites

I successfully completed my own contract. It worked, thanks to you!

I was wondering if I’ve got the following right or not. The basic idea is, the contract shouldn’t complete until the craft comes to an undestroyed stop on the KSC runway. Here are the parameters I set up for that:


PARAMETER
{
name = Land
title = Land safely on the KSC runway
type = ReachState
situation = LANDED
biome = Runway
maxSpeed = 1
PARAMETER
{
type = VesselNotDestroyed
}
completeInSequence = true
hideChildren = true
}

Is there a better way to enforce those specific conditions, or is that about the size of it? Anything I botched?

Looks good to me. The other approach is to use a Waypoint, but I think what you did is probably the simplest option.

Link to comment
Share on other sites

  • 2 weeks later...

A related question: in the alt-F12 debug dialogs, the Contracts/Add pane has E/M/H buttons. What do those mean? All I can think is Easy/Medium/Hard but I don’t see what that would have to do with adding contracts. What I’m doing now when I want to get a contract to spawn in the Administration Building is open that pane and then click the E/M/H buttons a few times each for the ContractConfigurator contracts (since there’s no way to tell which is which) until I get a contract to spawn. Is that what I should be doing, or...?

Edited by meyerweb
Cleaned up forum migration errors (Unicode and hyperlinking were both botched—sigh)
Link to comment
Share on other sites

A related question: in the alt-F12 debug dialogs, the Contracts/Add pane has E/M/H buttons. What do those mean? All I can think is Easy/Medium/Hard but I don’t see what that would have to do with adding contracts. What I’m doing now when I want to get a contract to spawn in the Administration Building is open that pane and then click the E/M/H buttons a few times each for the ContractConfigurator contracts (since there’s no way to tell which is which) until I get a contract to spawn. Is that what I should be doing, or...?

Easy/Medium/Hard = 1/2/3 star. Those buttons aren't that useful for Contract Configurator, because there's only one contract "type" as far as KSP's concerned. What I usually do is hit the "Clear All Contracts" button to re-generate the entire list. Usually hitting that one a few times gets the one I want to show up.

Link to comment
Share on other sites

Makes sense. I should probably set up a separate save where I can just do that without having to worry about messing up my actual career game.

Speaking of which, once I iron out the last few wrinkles and come up with an actual agency and flag, I should be ready to release my contract pack. Is the best way to do that to post it to GitHub and give you a heads-up? And is there a pack you would recommend I emulate in terms of the file/directory structure? Right now my contracts are just a folder in GameData but I suspect that’s not the preferred strategy.

Edited by meyerweb
Cleaned up forum migration errors (Unicode and hyperlinking were both botched—sigh)
Link to comment
Share on other sites

Makes sense. I should probably set up a separate save where I can just do that without having to worry about messing up my actual career game.

Speaking of which, once I iron out the last few wrinkles and come up with an actual agency and flag, I should be ready to release my contract pack. Is the best way to do that to post it to GitHub and give you a heads-up? And is there a pack you would recommend I emulate in terms of the file/directory structure? Right now my contracts are just a folder in GameData but I suspect that’s not the preferred strategy.

No heads up required - when I see it posted in the forums I'll add it to the Contract Configurator thread (although if I miss it a heads up might be nice).

The file/directory structure is up to you, but if you want a good example check out Field Research. Typically I do one file per contract - I find it's easier to maintain. I put the contract files in the "main" mod directory, and create sub-directories for other things. I also recommend putting the overall mod in it in a sub-directory of GameData/ContractPacks, but that's not required.

Link to comment
Share on other sites

  • 10 months later...

Hi! I'm trying to make my first contract

It requires player to visit 4 different biomes. 3 of them should be random, and one preselected.

I'm stuck with determining the list of biomes. here is how I'm trying to do that:

 

DATA
{
	type = List<Biome>
	hidden = true
	biomestovisit1 = HomeWorld().Biomes()
	biomestovisit2 = @/biomestovisit1.Where(s => !s.IsKSC())
	biomestovisit3 = @/biomestovisit2.Where(s => s != “Poles”)
	biomestovisit4 = @/biomestovisit3.Random(3) 
	biomestovisit = [@/biomestovisit2, “Poles”]
}
PARAMETER
{
	Name = Measure Temperature
	type = CollectScience
	experiment = temperatureScan
	recoveryMethod = RecoverOrTransmit
   		
	ITERATOR
	{
		type = Biome
		biome = @/biomestovisit
	}
}

It returns me a big number of exceptions.

[Exception]: DataStoreCastException: Cannot cast from System.Collections.Generic.List`1[ContractConfigurator.Biome] to ContractConfigurator.Biome.

[Warning]: ContractConfigurator.ConfigNodeUtil: Got an unexpected exception trying to load 'biomestovisit2' as a list:

[Exception]: NullReferenceException: Object reference not set to an instance of an object

 

And so on. I have tried to solve this problem in other ways (defining it through ScienceSubjects for example) But I always get something like :incorrect method for class Biome" or "exception when defining biome as a list"

 

What am I doing wrong? :(

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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