Jump to content

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


nightingale

Recommended Posts

No problem. And if the Tourism pack is part of your plans, head on over and check out this post - I'm looking for feedback on where to go with it to best differentiate it from stock (although to be honest, it already has a fair bit to differentiate it, so I may not change much).

When I get that far I'll surely let you know, though it may be a bit. I didn't install it yet, I wanted to make sure I got a set of stock tourism contracts in first. As soon as I get those, I'll be installing your pack. Probably during or after episode 2.

Link to comment
Share on other sites

Updates for the new version of KSP were required, so grab the new version or you may have issues!

Hopefully this update also covers everything needed for Tourism - expect that to drop in a day or two.

Contract Configurator 1.0.1

  • KSP 1.0.2 fixes (CollectScience was broken by the update).
  • SpawnKerbal and SpawnPassenger now support setting the Kerbal type and gender.
  • Add Gender() method for expressions on Kerbals.
  • Added autoAccept attribute to CONTRACT_TYPE (behaves like the stock World-Firsts record contracts).
  • Added new ToLower and ToUpper string methods.
  • Fixed default value for waypoint proximity trigger for VisitWaypoint.
  • Fixed issues with expressions in WaypointGenerator behaviour.
  • Fixed issue with waypoint distance calculation when not on the surface.
  • Fixed boolean expressions to not try to convert values to a boolean early.

Link to comment
Share on other sites

I think there might be a problem with PartModuleUnlocked requirements

KSS relies on this to not generate the contracts too early... I'm early in the tech tree, have solar panels, but no Docking Ports or Science lab and... CC is showing all 3 requirements as fufilled.

sGbF6e5.pngEPGSzuR.png

Link to comment
Share on other sites

I think there might be a problem with PartModuleUnlocked requirements

KSS relies on this to not generate the contracts too early... I'm early in the tech tree, have solar panels, but no Docking Ports or Science lab and... CC is showing all 3 requirements as fufilled.

http://i.imgur.com/sGbF6e5.pnghttp://i.imgur.com/EPGSzuR.png

Whoops... yeah it's just looking for the part and not checking that it's unlocked, that's silly. :)

Raised [#200].

Link to comment
Share on other sites

Question: CC is capable of spawning stuff in orbits, right?

BEHAVIOUR
{
name = SpawnVessel
type = SpawnVessel

// The VESSEL node indicates a vessel to spawn and can be specified
// multiple times.
VESSEL
{
// The ORBIT node indicates the orbit the vessel is in. The
// easiest way to get this information is to create the orbit
// you want in KSP (using HyperEdit or good old fashioned
// rocket science), and save your game. In the persistant.sfs
// file, search for your craft, and find the ORBIT node.
//
// Note that REF represents the reference body - but will be
// overriden by the targetBody.
//
// The ORBIT node is not used for landed vessels.
ORBIT
{
SMA = 1449999.99996286
ECC = 1.07570816555399E-05
INC = 0
LPE = 270.690311604893
LAN = 1.93635924563296
MNA = 1.55872660382504
EPH = 31.3999999999994
REF = 1
}

Is there a way to generate them randomly but with some degree of control? I want to spawn some stuff in orbits with periapsides within a certain range (say -50km to 0), but all other parameters can be randomly generated. AFAICT, it'd always be spawned on those parameters. Now I do see the way to generate orbits, but again, as far as I can tell, this would be for stuff like the stock satellite deliveries, right?

So unless I misunderstand things, I can't spawn a thing on those random orbits.. right?

Link to comment
Share on other sites

Question: CC is capable of spawning stuff in orbits, right?

BEHAVIOUR
{
name = SpawnVessel
type = SpawnVessel

// The VESSEL node indicates a vessel to spawn and can be specified
// multiple times.
VESSEL
{
// The ORBIT node indicates the orbit the vessel is in. The
// easiest way to get this information is to create the orbit
// you want in KSP (using HyperEdit or good old fashioned
// rocket science), and save your game. In the persistant.sfs
// file, search for your craft, and find the ORBIT node.
//
// Note that REF represents the reference body - but will be
// overriden by the targetBody.
//
// The ORBIT node is not used for landed vessels.
ORBIT
{
SMA = 1449999.99996286
ECC = 1.07570816555399E-05
INC = 0
LPE = 270.690311604893
LAN = 1.93635924563296
MNA = 1.55872660382504
EPH = 31.3999999999994
REF = 1
}

Is there a way to generate them randomly but with some degree of control? I want to spawn some stuff in orbits with periapsides within a certain range (say -50km to 0), but all other parameters can be randomly generated. AFAICT, it'd always be spawned on those parameters. Now I do see the way to generate orbits, but again, as far as I can tell, this would be for stuff like the stock satellite deliveries, right?

So unless I misunderstand things, I can't spawn a thing on those random orbits.. right?

Short answer - all those things are possible.

You may have noticed all the cool different random orbits that are available in OrbitGenerator that are not available in the other things with orbits. That's because it's the FinePrint logic that's generating those cool orbits, and I think it was non-trivial to make those available elsewhere. It's always been the plan to do that at some point, but just haven't gotten around to it yet. Raised [#201] so I don't forget.

I almost answered that you would want to use expressions (see: Expression-Syntax). Expression give you the ability to add in a function/derivation instead of constant value for anywhere within the contract config. There's only one or two exceptions for where this can be done... and one of those exceptions is the ORBIT node, as I use KSP's methods for loading it. :( So that gives us [#202].

Tried to come up with another workaround, but couldn't think of anything. So I'll try to get either of the two above done for you in the next release so you have at least one option open to you.

Link to comment
Share on other sites

Tried to come up with another workaround, but couldn't think of anything. So I'll try to get either of the two above done for you in the next release so you have at least one option open to you.

Thank you ever so much! Really appreciate it. Mind if I PM you my ideas for a contract pack? I'd like to know how much is possible. There's no major rush for it, so no worries if you're busy.

Link to comment
Share on other sites

Thank you ever so much! Really appreciate it. Mind if I PM you my ideas for a contract pack? I'd like to know how much is possible. There's no major rush for it, so no worries if you're busy.

Of course not, PM away!

Link to comment
Share on other sites

Hey,

I released the full SETI-Contracts as a seperate mod in addition to the InitialContracts mod (which might need updating in the future).

The SETI-Contracts offer a rebalanced contract progression designed for unmanned starts, though they work with tech trees offering manned starts as well, like the stock tech tree.

Download: SETI-Contracts for KSP 1.0.2

Link to comment
Share on other sites

I got this:

Exception occured while saving contract contract 'DrawingBoard':
System.NullReferenceException: Object reference not set to an instance of an object
at ContractConfigurator.Behaviour.SpawnKerbal.OnSave (.ConfigNode configNode) [0x00000] in <filename unknown>:0
at ContractConfigurator.ContractBehaviour.Save (.ConfigNode configNode) [0x00000] in <filename unknown>:0
at ContractConfigurator.ConfiguredContract.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

From this:

CONTRACT_TYPE {
name = DrawingBoard
title = Back to the Drawing Board
agent = Research & Development Department
topic = prototype
subject = KerbinSrf
motivation = rescue
synopsis = Retrieve a stranded technician.
completedMessage = Welcome the newest member of the astronaut corps. (The R&D department doesn't want them back.)
minExpiry = 0.0
maxExpiry = 0.0
prestige = Trivial
maxCompletions = 1
maxSimultaneous = 1
rewardScience = 5.0
rewardReputation = 0.5
rewardFunds = 1000.0
failureReputation = 0.1
failureFunds = 500.0
advanceFunds = 500.0
weight = 8.0

BEHAVIOUR {
name = DrawingBoardKerbal
type = SpawnKerbal
KERBAL {
name = Lellen Kerman
kerbalType = Crew
gender = Female
owned = False
addToRoster = True
lat = -0.16769918580325
lon = 285.352839573331
alt = 66.5987950620474
}
}
PARAMETER {
name = DrawingRecover
type = RecoverKerbal
name = Lellen Kerman
}
BEHAVIOUR {
name = DrawingBoardProto
type = SpawnVessel
VESSEL {
craftURL = /NotTerrible/Ships/PrototypeX221.craft
flagURL = /Squad/Flags/spheres
owned = False
targetBody = Kerbin
lat = -0.17064431309352
lon = 285.354411648
}
}
}

Link to comment
Share on other sites

Hey,

I released the full SETI-Contracts as a seperate mod in addition to the InitialContracts mod (which might need updating in the future).

The SETI-Contracts offer a rebalanced contract progression designed for unmanned starts, though they work with tech trees offering manned starts as well, like the stock tech tree.

Download: SETI-Contracts for KSP 1.0.2

Thanks Yemo, I've updated the first post, let me know if I got anything wrong!

I got this:

Exception occured while saving contract contract 'DrawingBoard':
System.NullReferenceException: Object reference not set to an instance of an object
at ContractConfigurator.Behaviour.SpawnKerbal.OnSave (.ConfigNode configNode) [0x00000] in <filename unknown>:0
at ContractConfigurator.ContractBehaviour.Save (.ConfigNode configNode) [0x00000] in <filename unknown>:0
at ContractConfigurator.ConfiguredContract.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

From this:


name = DrawingBoard
title = Back to the Drawing Board
agent = Research & Development Department
topic = prototype
subject = KerbinSrf
motivation = rescue
synopsis = Retrieve a stranded technician.
completedMessage = Welcome the newest member of the astronaut corps. (The R&D department doesn't want them back.)
minExpiry = 0.0
maxExpiry = 0.0
prestige = Trivial
maxCompletions = 1
maxSimultaneous = 1
rewardScience = 5.0
rewardReputation = 0.5
rewardFunds = 1000.0
failureReputation = 0.1
failureFunds = 500.0
advanceFunds = 500.0
weight = 8.0

BEHAVIOUR {
name = DrawingBoardKerbal
type = SpawnKerbal
KERBAL {
name = Lellen Kerman
kerbalType = Crew
gender = Female
owned = False
addToRoster = True
lat = -0.16769918580325
lon = 285.352839573331
alt = 66.5987950620474
}
}
PARAMETER {
name = DrawingRecover
type = RecoverKerbal
name = Lellen Kerman
}
BEHAVIOUR {
name = DrawingBoardProto
type = SpawnVessel
VESSEL {
craftURL = /NotTerrible/Ships/PrototypeX221.craft
flagURL = /Squad/Flags/spheres
owned = False
targetBody = Kerbin
lat = -0.17064431309352
lon = 285.354411648
}
}
}
CONTRACT_TYPE {

You are missing a targetBody at either the CONTRACT_TYPE or BEHAVIOUR level. Looks like the validation for that was broken, I've fixed it for the next release.

Link to comment
Share on other sites

Cross posted from KSS:

Would there be any interest in a lite version?

Basically it would keep the default squad missions, but once you have built the station, you would get the maintenance missions from KSS for each station you build. I could even expand it to bases too

Link to comment
Share on other sites

Hello,

I have latest CC and am not getting 'Part Tests' for Science - I needed this badly to do my tech tree...as it stands now my tree is dead in the water...no Science in any contract missions...:(

Cmdr Zeta

Link to comment
Share on other sites

Not sure if you're saying they're not there or are there but don't have enough science. As of KSP 1.0, most contracts give little or no science (part test contracts seem to generally be in the 1-10 science range). The only thing Contract Configurator can change is to allow the stock Part Test contracts to be disabled, but there are no mods/contract packs in the wild that I'm aware of that do that.

Link to comment
Share on other sites

How does TargetDestroyed determine if a target is actually destroyed? I'm running 5dim's (and making my own) pack and I've certainly put many targets out of commission but they're never really counted as destroyed.

Is there perhaps a way I can define a custom parameter, instead? Maybe some way I can check to see if the craft has less than 40% of its parts attached or something?

Link to comment
Share on other sites

How does TargetDestroyed determine if a target is actually destroyed? I'm running 5dim's (and making my own) pack and I've certainly put many targets out of commission but they're never really counted as destroyed.

Is there perhaps a way I can define a custom parameter, instead? Maybe some way I can check to see if the craft has less than 40% of its parts attached or something?

It looks for the onVesselWillDestroy event from KSP - so I don't have a good answer, it's whatever KSP decides "destroyed" is.

To extend Contract Configurator, check out the wiki page on Extending Parameters. That being said, in this case it may be better for you to just make changes to TargetDestroyed if you want to make it work better for everyone. I do accept pull requests.

Link to comment
Share on other sites

It looks for the onVesselWillDestroy event from KSP - so I don't have a good answer, it's whatever KSP decides "destroyed" is.

I was playing around with 5dims mod yesterday too and noticed similar behavior. It have the feeling that if the command pod is destroyed first TargetDestroyed is immediate triggered, but if another part overheats first and splits the command pod off the remaining (but now passive) stuff is set to debris and renamed, but the mod starts to track this. In the contract window the goal destroy 'drone-x' changed to destroy 'drone-x debris' for me. So at least for 5dims mission pack it would likely be more useful if such a reclassification would be detected and be enough to trigger the goal.

Link to comment
Share on other sites

I was playing around with 5dims mod yesterday too and noticed similar behavior. It have the feeling that if the command pod is destroyed first TargetDestroyed is immediate triggered, but if another part overheats first and splits the command pod off the remaining (but now passive) stuff is set to debris and renamed, but the mod starts to track this. In the contract window the goal destroy 'drone-x' changed to destroy 'drone-x debris' for me. So at least for 5dims mission pack it would likely be more useful if such a reclassification would be detected and be enough to trigger the goal.

That's a simple enough suggestion. Raised [#206].

Link to comment
Share on other sites

Contract Configurator 1.0.3 is out! Lots of little bug fixes/enhancements and a few new toys for modders. Download now!

Contract Configurator 1.0.3

  • Waypoints now disappear once related contract requirements are met.
  • More warnings for unexpected values in configuration (helps authors catch bugs).
  • Add expression functions for selecting Celestial Bodies based on player progression.
  • TargetDestroyed checks for target being marked as debris (thanks chlue).
  • Can now use expressions in ORBIT nodes.
  • Verified and recompiled against RemoteTech 1.6.4
  • Fix PartModuleUnlockedRequirement that was always returning as met (thanks severedsolo).
  • Fix validation for targetBody on some behaviours (thanks rhoark).
  • Fix scenario where optional parameters weren't working as expected (thanks Valiant).
  • Fix for negative timer values being displayed for count-down parameters (thanks Enceos).
  • Fix/workaround for "ghost" issue from exceptions when spawning some vessels (thanks odin_spain).
  • Fix for reflection load issue in CompleteContractRequirement when bad assemblies present (thanks Szara).
  • Minor bug fixes.

Link to comment
Share on other sites

Hello,

Can anyone confirm that Squad Contracts is where part testing origninates? I dont know where else to ask.

In level 2 my science nodes have values of 250/500 each - doing up a lab in space and waiting 100 days to get 500 Science isnt going to cut it for me; I am gonna mess with Squad contracts and beef up Science x10; I need to start somewhere as I dont really want to revert to 90.

If Squad contracts orginate part testing I dont see that in their contracts. EDIT: I may be getting a confirmation...Test Contracts are near the end in the Squad Contract list...so I think 'Test' means part test??? I may as well ask here as well.

Cmdr Zeta

Edited by Cdr_Zeta
Link to comment
Share on other sites

Hello,

Can anyone confirm that Squad Contracts is where part testing origninates? I dont know where else to ask.

In level 2 my science nodes have values of 250/500 each - doing up a lab in space and waiting 100 days to get 500 Science isnt going to cut it for me; I am gonna mess with Squad contracts and beef up Science x10; I need to start somewhere as I dont really want to revert to 90.

If Squad contracts orginate part testing I dont see that in their contracts. EDIT: I may be getting a confirmation...Test Contracts are near the end in the Squad Contract list...so I think 'Test' means part test??? I may as well ask here as well.

Cmdr Zeta

Part test contracts are part of stock KSP. Keep in mind that this is the second time you've asked that in this thread and had it answered - in future the appropriate place to ask is in the Gameplay Questions sub-forum.

- - - Updated - - -

In other news, severedsolo put together a new and improved SCANsat contract pack. Check out SCANsat Lite!

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