Jump to content

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


nightingale

Recommended Posts

That was the thing. I was using the same numbers for putting a SCANSat in orbits around Kerbal, Mun and Minmus and even then, the difference in reward is huge. I've since calculated it manually.

Putting a 50k reward on a polar orbit satellite seems fine for kerbin, that became 156k for Minmus!

Link to comment
Share on other sites

heyas Nightingale :)

So been trying out this spawn kerbal stuff :)

So I completed my contract and recovered my kerbal, but afterwards he wasn't available in my save to select as a kerbal for more missions :(

Also I'm not setting an expiration time for my contracts yet they have expiration times in the admin building when showing up

Link to comment
Share on other sites

I'm not sure if these have changed or are completely accurate (I think a lot of the values below are truncated), but I figured the multipliers for each planet at each prestige level a long time ago:

I was curious about the multipliers used for setting rewards and penalties for contracts so I just printed out results from each body with all values set at 1.

If you set a Celestial Body in the methods for this (setFunds, setScience, etc...) it multiplies whatever number you put in a by a certain value. I don't know if these numbers are stored somewhere like the science multipliers, that would be nice for people who want to reduce rewards.

Edit: Actually, they are affected by contract prestige too.

Those values are:


Prestige: Trivial Significant Exceptional
Sun: 4 5 6
Kerbin: 1 1 2
Mun: 2 2 3
Minmus: 2 3 4
Moho: 7 9 10
Eve: 5 6 8
Duna: 5 6 8
Ike: 5 6 8
Jool: 6 8 9
Laythe: 8 10 12
Vall: 8 10 12
Bop: 8 10 12
Tylo: 8 10 12
Gilly: 6 8 9
Pol: 8 10 12
Dres: 6 8 9
Eeloo: 10 12 15

The actual multiplier governing celestial bodies specifically is the RecovereryValue found in the CelestialBodyScienceParams (CelestialBody.scienceValues for each body) class. This is the value used to determine the science amount for returning a vessel from that body. There is an additional prestige multiplier (I think trivial is 1), and a bunch of other multipliers that can affect rewards, penalties, etc..., but the celestial body multiplier is the primary one. It's easy to change this using my [thread=80220]Celestial Body Science Multiplier Editor[/thread], if you really want to.

Link to comment
Share on other sites

Contract Configurator 0.5.2 is out with a quick fix to a RemoteTech issue that affects the contract pack. Download it now!

Contract Configurator 0.5.2

- Fixed issue with HasAntenna using ActiveTarget (was breaking the RemoteTech contract pack). Huge thanks to Bluemoon for pointing this one out.

- - - Updated - - -

heyas Nightingale :)

So been trying out this spawn kerbal stuff :)

So I completed my contract and recovered my kerbal, but afterwards he wasn't available in my save to select as a kerbal for more missions :(

Also I'm not setting an expiration time for my contracts yet they have expiration times in the admin building when showing up

Let me check out the spawned kerbal disappearing - that wasn't expected. The expiration time I knew about, but it's so low priority I never even raised it on GitHub. Now it's there, so at least I won't forget about it.

I'm not sure if these have changed or are completely accurate (I think a lot of the values below are truncated), but I figured the multipliers for each planet at each prestige level a long time ago:

The actual multiplier governing celestial bodies specifically is the RecovereryValue found in the CelestialBodyScienceParams (CelestialBody.scienceValues for each body) class. This is the value used to determine the science amount for returning a vessel from that body. There is an additional prestige multiplier (I think trivial is 1), and a bunch of other multipliers that can affect rewards, penalties, etc..., but the celestial body multiplier is the primary one. It's easy to change this using my [thread=80220]Celestial Body Science Multiplier Editor[/thread], if you really want to.

That is awesome!! I actually read through that whole thread when I first started Contract Configurator, but forgot you'd posted that. It'll make my life much easier when I document it.

Link to comment
Share on other sites

Need the full log file please. What those errors mean is that the RemoteTech integration code failed to load for some reason - the error for that should've been further up in the log. I see you're on Contract Configurator 0.5.2, but can you confirm your RemoteTech version for me?

- - - Updated - - -

Nevermind the logs - the latest 1.6 build of RemoteTech broke it again. :(

- - - Updated - - -

Found the issue - they changed some namespaces. I can't fix it without breaking support for 1.5.2, which is their current stable release. Until further notice, Contract Configurator doesn't work with pre-release RemoteTech - I'll release the fix once their 1.6 branch gets officially released as stable.

Link to comment
Share on other sites

Another possible issue Nightingale?

I have a long title on a optional part of a contract and its bleeding onto a second line, however, I'm seeing "incomplete" at the end of each line. Not sure its anything you can resolve if its the game side.

DxVUftG.png?1

Also is there

a) any way to do line breaks

B) any way to comment out large sections easier than adding // before each line? For example, when removing a requirements to test the contract.

c) an ability to generate several orbits within one contract?

d) ability to add "accepted contract xyz" as a requirement?

Edited by DBT85
Link to comment
Share on other sites

Another possible issue Nightingale?

I have a long title on a optional part of a contract and its bleeding onto a second line, however, I'm seeing "incomplete" at the end of each line. Not sure its anything you can resolve if its the game side.

http://i.imgur.com/DxVUftG.png?1

Seems like a display issue in the Squad code. Not much I can do here, sorry.

Also is there

a) any way to do line breaks

Line breaks in the description work with \n. They may need to be escaped with another slash like \\n. If this isn't working too, its maybe not supported.

Should work with just '\n' in the text - should work for most text fields although if you do it it will also affect the contracts app in flight.

B) any way to comment out large sections easier than adding // before each line? For example, when removing a requirements to test the contract.

None that I'm aware of.

c) an ability to generate several orbits within one contract?

Sure can, just have multiple FIXED_ORBIT or RANDOM_ORBIT nodes within your OrbitGenerator.

d) ability to add "accepted contract xyz" as a requirement?

Completed, yes. Accepted no. I'll log a github issue.

Link to comment
Share on other sites

Ahh ok thanks :)

I'e just started on GitHub and have struggled through trying to learn what I need to eventually do something with this. Took me a few hours but I'm getting there.

EDIT:

Me again,

Any option to set a "destroy" parameter?

Thinking about having a de orbit option on a contract to bring down an old satellite but the item would get destroyed. Maybe the best I can do is to use the Reach Situation parameter.

I've been tinkering with it and wonder what I'm doing wrong. I've specified which craft to deorbit (option 1 in this code) but when in the game it doesn't mention Maxwell I apart from in the title which obviously isn't actually being checked.

Could it because Maxwell I doesn't exist in this save yet (I've not run the contract that puts Maxwell I unto orbit) that the game doesn't know about it and so isn't including it?


// Any suggestions or corrections? Send me a note on http://forum.kerbalspaceprogram.com/members/118151-DBT85
// This contract only work with Contract Configurator and SCANsat 9.0


name = ScanKerbinMultispectral


// Contract text
title = Multispectral Scan of Kerbin
description = Thanks to your grand effors in collecting science so far, the folk in R&D have managed to whip together a SCAN Multispectral Sensor from some old toilet rolls and some sticky backed plastic. Time to test it out and at the same time, retire the old Maxwell 1 Altimetry scanner we launched all those weeks/days/hours/minutes ago!
synopsis = Send an unkerbaled vessel into orbit, reach a 495.2km orbit with an 79.78 decgree inclination and scan Kerbin's surface with the SCAN Multispectral Sensor. You'll see a suggested orbit in the Tracking Station, but feel free to just hit the targets below. \n\nAlso, deorbit Maxwell 1 and let it burn up in the atmosphere.
completedMessage = Stunning, through the advances with this scanner we have identified 9 different biomes for further study. I wonder if Mun has biomes?


// Target Celestial body - controls where the contract must be completed, has some automated
// effects on numeric parameters (increasing science, etc.)
targetBody = Kerbin

// Always offered by the R&D department
agent = Research & Development Department

// Contract rewards, Kerbin multiplies by 1.25 on Normal mode.
advanceFunds = 10000
rewardScience = 10.0
rewardReputation = 10.0
rewardFunds = 10000.0


// Can only be done once
maxCompletions = 1
maxSimultaneous = 1

// Prestige level 2
prestige = Significant

// very likely to be chosen
//weight = 10.0

PARAMETER
{

// Named for the Scottish physicist who predicted the existence of electromagnetic waves.
name = GeoEye1
type = VesselParameterGroup


define = GeoEye I
disableOnStateChange = false

PARAMETER
{
name = HasCrew1
type = HasCrew
maxCrew = 0
minCrew = 0
}

PARAMETER
{
name = HasPart1
type = HasPart

part = SCANsat_Scanner24
minCount = 1
}

PARAMETER
{
title = Achieve an orbit with the following parameters
name = Orbit
type = Orbit
targetBody = Kerbin
minApA = 492204
maxApA = 498314
minPeA = 492101
maxPeA = 498106
minEccentricity = 0.0
maxEccentricity = 0.00214
minInclination = 79.28
maxInclination = 80.28
disableOnStateChange = false
}

// Once all of the above are complete, start the countdown.
PARAMETER
{
name = Duration
type = Duration


duration = 1d 3h


preWaitText = We need a stable orbit for at least
waitingText = Orbit acquired, monitoring.
completionText = Stable orbit confirmed!
}
}

PARAMETER
{
name = SCANsatCoverage1
type = SCANsatCoverage
targetBody = Kerbin

// Get 50% coverage to complete
coverage = 50.0
scanType = Biome
}

PARAMETER
{
name = Option1
type = VesselParameterGroup


title = (Optional 1) De-orbit Maxwell 1, our first SCANSAT satellite
optional = True
vessel = Maxwell I

// Parameter rewards
rewardScience = 10.0
rewardReputation = 10.0
rewardFunds = 10000.0

PARAMETER
{
name = orbitend
type = ReachSituation
targetBody = Kerbin
situation = SUB_ORBITAL
}

}


//REQUIREMENT
//{
// name = PartUnlocked1
// type = PartUnlocked
//
// Part name that needs to be unlocked.
// part = SCANsat_Scanner24
//}

REQUIREMENT
{
name = SCANsatCoverage2
type = SCANsatCoverage


targetBody = Kerbin


// Maximum coverage that must be reached before the contract is valid.
maxCoverage = 49.9
minCoverage = 0.0


// The type of scan to perform. Valid values are from SCANdata.SCANtype.
scanType = Biome
}

BEHAVIOUR
{
name = OrbitGenerator1
type = OrbitGenerator


// Use this to generate an orbit with specific parameters
FIXED_ORBIT
{
// Body for the orbit - defaulted from the contract if not supplied
targetBody = Kerbin


// Actual orbit details. Note that REF represents the reference
// body - but will be overriden by the targetBody.

ORBIT
// Kerbin surface is SMA = 600000
{
SMA = 1095200
ECC = 0.00016
INC = 79.78
LPE = 70
LAN = 15
MNA = 1.55872660382504
EPH = 31.3999999999994
REF = 1
}
}
}

}


CONTRACT_TYPE:NEEDS[SCANsat]{

EDIT2: AHAHAH, sorted it :)

And it worked! Wooo.

Edited by DBT85
Link to comment
Share on other sites

Snap release to fix it with RemoteTech 1.6 now that it's out. Download it now!

Note if you're using RemoteTech that this version is not backwards compatible with RemoteTech 1.5. Either update both RemoteTech and Contract Configurator, or none at all!

Contract Configurator 0.5.3

  • Extensions to PartValidation to handle more varied scenarios.
  • Added ReachState parameter. Deprecated ReachAltitudeEnvelope, ReachBiome, ReachDestination, ReachSituation and ReachSpeedEnvelope.
  • Fixed to work with additional changes in RemoteTech 1.6.
  • Minor bug fixes.

Link to comment
Share on other sites

The game freezes when I hover over the contracts window in flight or from the tracking station.

The same thing used to happen with the previous version as well, but it only took ~10 seconds until the game finished calculating the contract progress. This time I waited like 3 minutes and gave up.

I'm using the RemoteTech contract pack, and I updated both RemoteTech and this mod.

Link to comment
Share on other sites

The game freezes when I hover over the contracts window in flight or from the tracking station.

The same thing used to happen with the previous version as well, but it only took ~10 seconds until the game finished calculating the contract progress. This time I waited like 3 minutes and gave up.

I'm using the RemoteTech contract pack, and I updated both RemoteTech and this mod.

It's something to do with the stock contracts app. Seems the more parameters (more specifically, the more state changes) there are, the worse it gets. I'll what I can do to improve it.

Link to comment
Share on other sites

Thanks a lot!

And by the way, the workaround is to use Contracts Window + and NOT TOUCH THE STOCK app... but I will figure out a fix... soon. :)

- - - Updated - - -

Yeah, it's definitely the stock app. I have a test contract where it takes about 10 seconds to unfreeze after clicking the contracts bar. I added a loop to fire an event (onParameterChange) 10 times more than usual, and it took over to 3 minutes to come back. So it doesn't even scale linearly. :huh:

Link to comment
Share on other sites

And by the way, the workaround is to use Contracts Window + and NOT TOUCH THE STOCK app... but I will figure out a fix... soon. :)

- - - Updated - - -

Yeah, it's definitely the stock app. I have a test contract where it takes about 10 seconds to unfreeze after clicking the contracts bar. I added a loop to fire an event (onParameterChange) 10 times more than usual, and it took over to 3 minutes to come back. So it doesn't even scale linearly. :huh:

I was actually using your Wider Contracts App :)

Yeah, I did what you said and it works. Weird. I'm sorry for thinking that it's your mod's fault, I honestly didn't expect to be able to complete the RemoteTech contract I was working on, but it works as long as I don't check the stock contracts app.

Link to comment
Share on other sites

I was actually using your Wider Contracts App :)

Yeah, I did what you said and it works. Weird. I'm sorry for thinking that it's your mod's fault, I honestly didn't expect to be able to complete the RemoteTech contract I was working on, but it works as long as I don't check the stock contracts app.

Well, it is my mod's fault in a sense... I do lots of fun things to stress the contract system out - creating lots of child parameters, tracking across vessels and changing the parameter value to match the "appropriate vessel, etc. The sooner you get that stock contract window displayed, the better it'll be. I'm pretty sure it can just queue and queue and queue... and then when you display it, all of a sudden it tries to catch up with all the updates.

Anyway, I'm close to a fix... but I need to test to make sure there aren't other side effects, since the fix is very.... aggressive.

Link to comment
Share on other sites

I've had freezes and crashes caused by the stock contracts app without any mods installed chap, so yeah, you're fighting a bug Squad really needs to fix.

Sigh... you're right of course. And my attempts at creating a hack-around are getting increasingly bad in terms of what they are doing (and are not resulting in success). I'll raise a bug on Squad's public bugtracker and keep my fingers crossed for 0.91.

Link to comment
Share on other sites

Crazy thought, but would it be possible to use Contract Configurator to ask for a bombing contract using BDArmory? E.g. "go drop a bomb on this spot" or, though I imagine it wouldn't have to do with this mod per se, maybe go destroy this ship/object/something that gets spawned at a certain location...

Link to comment
Share on other sites

Crazy thought, but would it be possible to use Contract Configurator to ask for a bombing contract using BDArmory? E.g. "go drop a bomb on this spot" or, though I imagine it wouldn't have to do with this mod per se, maybe go destroy this ship/object/something that gets spawned at a certain location...

About the closest I can get to "go drop a bomb on this spot" at the moment is... "this spot". :) So it supports the waypoint system and letting you identify a location, but not much else that would be of interest for BDArmory. I've been putting off the VesselSpawner behaviour for far too long - so I'll try and get that one in to 0.6.0 as a fairly high priority. I can also look at some sort of VesselDestroyed parameter - I figure that would be fairly easy. With those pieces I think you'd probably be able to make something fairly decent even without specific BDArmory integration. So check back in a couple weeks, and the pieces may be there - you'll just have to find someone other than me to put them together. :D

- - - Updated - - -

Raised the lag issue on Squad's bugtracker:

http://bugs.kerbalspaceprogram.com/issues/3964

All my attempts at hack fixes have failed. I've got one last one that I can do (but it's more work and isn't perfect). I'll try it out and see how much of an impact it makes.

Link to comment
Share on other sites

When I use this, it seems I can't get science, or new contracts when I complete missions, it is only when I have this installed, none of the other mods so far as far as I can tell that triggers this.

Please send your output_log.txt file and make sure you're on the latest version. Most likely it's a NullReference issue somewhere that's putting the game into an odd state, although the logic was tightened up in 0.5.1 or 0.5.2 to prevent most of that. Either way, I can't do much without logs.

- - - Updated - - -

0.5.4 is out, with a couple nice fixes. Download it now!

Contract Configurator 0.5.4

  • Workaround for stock contracts app lag issue (#3964 on Squad bugtracker).
  • Fixed NullReference issue in HasAntenna when loading a vessel with no antennas (thanks t0chas).

Link to comment
Share on other sites

0.5.4 is out, with a couple nice fixes. Download it now!

Contract Configurator 0.5.4

  • Workaround for stock contracts app lag issue (#3964 on Squad bugtracker).
  • Fixed NullReference issue in HasAntenna when loading a vessel with no antennas (thanks t0chas).

You actually did it! It works great.

I looked for a "donate" button but couldn't find one :/

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