Jump to content

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


nightingale

Recommended Posts

Emm were is the Function Reference Guide on the Wiki. I can't find it anywere;.; Or something replace it?

EDIT: Just find it individualy. But there's a part that still saying that that exist. You should delete that part

Thanks, it's been fixed. I'm about half-way through refactoring a bunch of stuff on the wiki, so there's still some little issues like that. Once it's all done, all the parameters will list out all the types for each attribute, and it will have a link to the appropriate expression page (see the very first attribute on VesselParameterGroup to see what it will look like when it's done).

If it still seems necessary when all is done, I'll also potentially look at a page that indexes everything.

Link to comment
Share on other sites

Also I've been looking for the Spawn Vessel Behaviour on the wiki and it wasn't on the side list of behaviour. (I found it on the all pages zone) so you shold add it to the behaviour side list:D

GitHub wiki is terrible - if you edit a page inline, it'll move the file back to the root when you check it in - which breaks the sidebar indexing. I need to make sure to stop accidentially doing quick edits directly in the wiki. :)

Thanks for the heads up!

Link to comment
Share on other sites

Not much to say about this release - bug fixes and a couple toys for contract modders. Download now!

Contract Configurator 1.5.2

  • Allow multiple parts to be specified in the PartValidation parameter.
  • Added CelestialBody.RemoteTechCoverage() method for expressions.
  • Added CelestialBody.Mass() and CelestialBody.RotationalPeriod() for expressions.
  • Added KSCLocation() function for expressions.
  • Enhancements to Timer parameter.
  • Fixed issue in BiomeTracker when uninstalling a previously installed planet pack (thanks herman and xEvilReeperx).
  • Fixed possible exception in VisitWaypoint (thanks AlphaAsh).
  • Fixed bug in PartValidation where using FILTER would prevent the parameter from completing.
  • Fixed ReachSpecificOrbit so it outputs the orbit details in a note (thanks FinnishGameBox).
  • Fixed VesselNotDestroyed firing for debris.
  • Minor bug fixes.

Link to comment
Share on other sites

Could this be a update bug. Aircraft builder contracts don't work any more. This why there should be a debug option that forces contracts to complete. it sure would make updating a lot easier.

EDIT: Oh spooky stuff! It did clear down after quite a pause. When in VAB for a while and when I came out the mission was done. Interesting behavior but not a bug. User error caused by a lack of patience :blush: .

0D484B3EDE79C66C59B7F505D22EC750534CD41E

Edited by nobodyhasthis
i am stupid
Link to comment
Share on other sites

Ok, I'm getting sick of certain types of contracts popping up all the time (looking at you tourists!), I hear tell you can use contract configurator to just disable certain types of contract and change the max amount offered? How might I go about this?

Link to comment
Share on other sites

Have a look at this page. Grab the whole CONTRACT_CONFIGURATOR section, and copy that into a file in your GameData named "disableContracts.cfg" (or whatever you want, as long as it ends with .cfg. Remove lines for any contract types that you actually want to keep.

Link to comment
Share on other sites

Excellent, thanks for that.

To answer the second part of my question myself, I found the following from searching around:

This is easy :)

If you go into your GameData folder then /Squad/Contracts/ there will be a contracts.cfg - One of the very first options will be how many contracts you are offered (Default 10) I bumped that up to 25 myself.

Link to comment
Share on other sites

Okay the rework on the wiki is all done. Everything's been split out into separate pages, all the types are explicitly called out and there's better cross-linking between pages.

Let me know if you see any usability issues with the wiki in its current form.

Link to comment
Share on other sites

Okay the rework on the wiki is all done. Everything's been split out into separate pages, all the types are explicitly called out and there's better cross-linking between pages.

Let me know if you see any usability issues with the wiki in its current form.

This is great. Just a small report: The Data Node page still refering to the Data Type page (on the list of the Data Node page)

Link to comment
Share on other sites

FinnishGameBox: PM sal_vager or KasperVld or Supernovy and ask to have your name changed. Soooper-doooper-power moderators can do that. :)

And thanks so much for all the work you're doing on RP-0 contracts! (And to nightingale for powering them! )

Link to comment
Share on other sites

I'm trying to detect whether a vessel has a thermometer or not through an expression, but it always comes up as not having one even though I have two. Am I doing something wrong? Relevant code:

DATA

{

type = bool

hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0

}

No errors in the debug screen, but it shows FALSE instead of TRUE. Thanks in advance for any help.

Link to comment
Share on other sites

I'm trying to detect whether a vessel has a thermometer or not through an expression, but it always comes up as not having one even though I have two. Am I doing something wrong? Relevant code:

DATA

{

type = bool

hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0

}

No errors in the debug screen, but it shows FALSE instead of TRUE. Thanks in advance for any help.

    DATA
{
type = Vessel
targetVessel = AllVessels().First()
}

DATA
{
type = bool
hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0
}

I just threw the above into a contract, started a new save, put a pod+2 therms on the pad, forced contract generation and it had TRUE for hasTherm. So it seems to be working correctly.

  1. What value does targetVessel have in the debug menu (aside - I'll fix it to display the proper name next release)?
  2. Are you checking while in-game or on the main menu (the vessel won't exist on the main menu, seems obvious, but I have to ask).
  3. Perhaps no attempts have been made to generate the contract since you put the vessel on the pad. In the Squad debug menu, go to contracts and do a "Clear Current Contracts" (maybe even a couple times). Does it work then?

Link to comment
Share on other sites

Thanks so much for going so far to look into it. Clearing the contracts multiple times seems to have kicked it into gear. For the record:

1. It used to just display the vessel name, when it started working it showed the cockpit name and the the vessel name in parenthesis.

2. I was in-game.

3. I had a vessel out and took and completed the contract many times over, but this fixed it.

- - - Updated - - -

Maybe one last question for the night? Trying to check if there is a Scientist on the vessel through an expression.

DATA

{

type = bool

hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == Scientist).Count() > 0

}

Seems almost the same as the last one, but this gets an error. "Can't parse identifier for type System.String"

Link to comment
Share on other sites

Thanks so much for going so far to look into it. Clearing the contracts multiple times seems to have kicked it into gear. For the record:

1. It used to just display the vessel name, when it started working it showed the cockpit name and the the vessel name in parenthesis.

2. I was in-game.

3. I had a vessel out and took and completed the contract many times over, but this fixed it.

- - - Updated - - -

Maybe one last question for the night? Trying to check if there is a Scientist on the vessel through an expression.

DATA

{

type = bool

hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == Scientist).Count() > 0

}

Seems almost the same as the last one, but this gets an error. "Can't parse identifier for type System.String"

It's because the ExperienceTrait is a string, and strings are handled a little bit differently in the expression language. Anyway, easy fix:

[COLOR=#333333]DATA[/COLOR]
[COLOR=#333333]{[/COLOR]
[COLOR=#333333] type = bool[/COLOR]
[COLOR=#333333] hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == [/COLOR][COLOR=#ff0000]"[/COLOR][COLOR=#333333]Scientist[/COLOR][COLOR=#ff0000]"[/COLOR][COLOR=#333333]).Count() > 0[/COLOR]
[COLOR=#333333]}

Link to comment
Share on other sites

I have tried just this thing and I got the error that it was not expecting to see a ". I got around errors by subbing in Kerbal(Bob Kerman).ExperienceTrait(), but that doesn't seem like the most robust way of getting the job done, since I think some mods allow for renaming Kerbals.

Link to comment
Share on other sites

You sure you had it exactly like I did? I just tried it - no errors.

EDIT: Also, just in case, make sure you're on Contract Configurator 1.5.2... I think I fixed one or two parser bugs from 1.5.1.

Edited by nightingale
Link to comment
Share on other sites

Looks like Kerbal(Bob Kerman).ExperienceTrait() fails to validate on starting up the game, though it succeeds if you reload the contract. Changed back to:

hasScientist = @/targetVessel.Crew().Where(k => k.ExperienceTrait() == "Scientist").Count() > 0

and still get the error about the "

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