Jump to content

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


nightingale

Recommended Posts

Been trying to make a simple BDA contract that spawns a vessel that you need to go kill. However, I can't seem to get the thing to spawn, and when it tries to spawn, there's apparently a cascade of errors in the log.

Here's the contract config:

  Reveal hidden contents

Here's the errors from the log:

  Reveal hidden contents

Anyone able to tell what I'm doing wrong, by chance?

KSP 1.9.1 with the latest release of CC...

Edited by AccidentalDisassembly
Link to comment
Share on other sites

  On 5/26/2020 at 4:43 AM, kirmie44 said:

Hello. I'm having a glitch where all my contracts completely reset. Like a completely empty archive and I get the "leave the launch pad" mission again. I don't know what's causing it but I this of a contract pack is my best guess. 

KSP Log: https://drive.google.com/file/d/1hzfoj7xVsr-0k0vROBqV08CLG-sZQndK/view?usp=sharing

  Reveal hidden contents

 

Expand  

The only obvious thing I can see in your posted log is the missing agent error, which was mentioned, including a solution, on the previous page of this thread.

  On 5/26/2020 at 7:44 PM, AccidentalDisassembly said:

Been trying to make a simple BDA contract that spawns a vessel that you need to go kill. However, I can't seem to get the thing to spawn, and when it tries to spawn, there's apparently a cascade of errors in the log.

Here's the contract config:

  Reveal hidden contents

Here's the errors from the log:

  Reveal hidden contents

Anyone able to tell what I'm doing wrong, by chance?

KSP 1.9.1 with the latest release of CC...

Expand  

Try adding a height variable to the vessel parameter within the spawn behaviour; might be spawn location issue. Also, try setting deferVesselCreation to false instead - according to the docs, this function may be buggy if set to true.

Link to comment
Share on other sites

  On 5/26/2020 at 8:36 PM, Morphisor said:

The only obvious thing I can see in your posted log is the missing agent error, which was mentioned, including a solution, on the previous page of this thread.

Try adding a height variable to the vessel parameter within the spawn behaviour; might be spawn location issue. Also, try setting deferVesselCreation to false instead - according to the docs, this function may be buggy if set to true.

Expand  

Hmmm, nothing seemed to work - I even created my own agent, just in case, complete with icons and whatnot.

Unless it was set to         deferVesselCreation = true, I could not even accept the contract - clicking on the green check mark at first caused a slight pause (but didn't accept the contract), then clicking on accept a second time made the contract disappear from the offered list, but not appear in the active list. Changing it back to deferVesselCreation = true allowed accepting the contract, but the vessel still doesn't spawn.

I tried spawning using lat = X, lon = <number>, height = whatever, too; no dice. Made a new craft called SpawnTester, simply a drone core, battery, and some structural parts/wings, and that produced a similar error (although it did not then also cascade into BDArmory stuff, it seems):

  Reveal hidden contents

Strange... it appears that either

A) SpawnVessel is just plain broken, it doesn't work at all, or

B) Something with PhysicsRangeExtender and/or BDA is preventing it from working, maybe? I removed any other mods (VesselMover and HyperEdit) that I thought could conceivably have some impact on spawning; the only other mods in the install are Engineer and Editor Extensions Redux.

Poop. :(

Just out of curiosity - I assumed I need these contracts only on game startup? I have been restarting KSP with each change to the config, but wondered if I could avoid having to do that...

Link to comment
Share on other sites

@AccidentalDisassembly I've run out of ideas, myself, too. I tried seeing if I can produce a SpawnVessel contract under different circumstances, borrowing one of Whitecat's asteroid missions and hacking it into my test install (1.8.1 ksp). But that contract threw errors when deferVesselCreation was set to false - and didn't produce the vessel at all when I set it to true. I was getting a different set of errors though, so it may not even be related. Tried several different craft files too, each giving different errors. And this with craft files that load perfectly well in the VAB.

Do you (or anyone else) know of any contracts using SpawnVessel that currently function correctly? That would be the best hope for now.

--

As for restarting KSP, I'm afraid that's a necessity after each change to the files. It loads everything at start and while CC tried to have a reload function from within the game, it never worked properly. So get used to those loading screens if you're doing a lot of contract stuff...

Link to comment
Share on other sites

  On 5/27/2020 at 2:15 PM, Morphisor said:

@AccidentalDisassembly I've run out of ideas, myself, too. I tried seeing if I can produce a SpawnVessel contract under different circumstances, borrowing one of Whitecat's asteroid missions and hacking it into my test install (1.8.1 ksp). But that contract threw errors when deferVesselCreation was set to false - and didn't produce the vessel at all when I set it to true. I was getting a different set of errors though, so it may not even be related. Tried several different craft files too, each giving different errors. And this with craft files that load perfectly well in the VAB.

Do you (or anyone else) know of any contracts using SpawnVessel that currently function correctly? That would be the best hope for now.

--

As for restarting KSP, I'm afraid that's a necessity after each change to the files. It loads everything at start and while CC tried to have a reload function from within the game, it never worked properly. So get used to those loading screens if you're doing a lot of contract stuff...

Expand  

Unfortunately I don't know of any contract packs that spawn vessels... maybe this is why! I did see that Vessel Mover has a method for spawning vessels in the flight scene that works (I tried it), I don't know if maybe that could be incorporated into CC... then remains the problem of figuring out how to get the game to activate BDArmory's autopilot and Wing Commander commands (e.g. telling the plane to go to guard mode and move to a point, attack near a point, etc. like you can when controlling a craft or group of crafts)...

Link to comment
Share on other sites

  On 5/27/2020 at 2:52 PM, AccidentalDisassembly said:

Unfortunately I don't know of any contract packs that spawn vessels... maybe this is why! I did see that Vessel Mover has a method for spawning vessels in the flight scene that works (I tried it), I don't know if maybe that could be incorporated into CC... then remains the problem of figuring out how to get the game to activate BDArmory's autopilot and Wing Commander commands (e.g. telling the plane to go to guard mode and move to a point, attack near a point, etc. like you can when controlling a craft or group of crafts)...

Expand  

Welp, figured I should've looked on Github first thing, but seems it's a genuine CC issue yeah: https://github.com/jrossignol/ContractConfigurator/issues/682

Unfortunately, Nightingale doesn't seem to have time anymore to do anything about this mod, which is a real shame considering how much it could do with all the issues ironed out. We'll have to make the best of it I guess.

Link to comment
Share on other sites

  On 5/27/2020 at 3:15 PM, Morphisor said:

Welp, figured I should've looked on Github first thing, but seems it's a genuine CC issue yeah: https://github.com/jrossignol/ContractConfigurator/issues/682

Unfortunately, Nightingale doesn't seem to have time anymore to do anything about this mod, which is a real shame considering how much it could do with all the issues ironed out. We'll have to make the best of it I guess.

Expand  

Happens to me too with vessel spawning contracts such as BDA-related contracts.

Link to comment
Share on other sites

  On 5/27/2020 at 2:15 PM, Morphisor said:

@AccidentalDisassembly I've run out of ideas, myself, too. I tried seeing if I can produce a SpawnVessel contract under different circumstances, borrowing one of Whitecat's asteroid missions and hacking it into my test install (1.8.1 ksp). But that contract threw errors when deferVesselCreation was set to false - and didn't produce the vessel at all when I set it to true. I was getting a different set of errors though, so it may not even be related. Tried several different craft files too, each giving different errors. And this with craft files that load perfectly well in the VAB.

Do you (or anyone else) know of any contracts using SpawnVessel that currently function correctly? That would be the best hope for now.

--

As for restarting KSP, I'm afraid that's a necessity after each change to the files. It loads everything at start and while CC tried to have a reload function from within the game, it never worked properly. So get used to those loading screens if you're doing a lot of contract stuff...

Expand  

I'm unsure if it currently works correctly, but Kerbal Academy would spawn vessels. You might try it & see if it still works. Notes on the last page say version 1.10 is the latest working version; subsequent versions have issues.

 

Link to comment
Share on other sites

  On 5/29/2020 at 2:23 PM, Bombaatu said:

I'm unsure if it currently works correctly, but Kerbal Academy would spawn vessels. You might try it & see if it still works. Notes on the last page say version 1.10 is the latest working version; subsequent versions have issues.

 

Expand  

Spawning vessels hasn't worked for KACP since 1.6 or 1.7.  When it would spawn the engineering can, it would spawn under ground and blow up or get ejected into space.  I don't think it has worked reliably since 1.4 or so.

Link to comment
Share on other sites

Is it possible to implement a way to randomly select an agency from a subpool of agencies? From what I understand, we can either specify an agent or leave it blank - in which case a random agency will be picked for the contract.

I'm trying to make it so that contract groups have a subset of agencies their children can pick from. For instance, we could have something like this:

Exploration (landings, rovers, flybys, etc.): NASA, ESA, Roscosmos, JAXA, ISRO...

Commercial satellites: Intelsat, Eutelsat, Hispasat, Iridium, Al Yah...

This could be achieved if contracts were able to pick agents at random from a subset of all of the game's agencies (possibly those assigned to a group) vs. the full pool. Is there currently a way to do it, or is it even possible to write this into ContractConfigurator?...

EDIT: looking at the source code, this should be possible by adding a dummy field to an AGENT config node specifying its group. Afterwards, ContractConfigurator could loop through all of the agencies assigned to the contract's group, randomly picking one. Am I correct?

EDIT EDIT: would a simple Random() function applied to a list work?

EDIT^3: why isn't this working?

  Reveal hidden contents

 

Edited by Tonas1997
Link to comment
Share on other sites

Also, possible UI bug: contracts that have have more than a simultaneous instance (maxSimultaneous > 1) will have their HasResource parameter displaying incoherent values:

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 2 weeks later...

Release time.  Get it here, but only for KSP 1.8.

Contract Configurator 1.28.1

  • Added new AgentParser (allows for assigning a random agency through expressions).
  • Merged change to improve accuracy of great circle distance in contract distance calculations (thanks pap1723).
  • Merged change to fix issues with certain celestial body progress requirements not working correctly for the manned/unmanned checks (thanks SirMortimer).
  • Fixed issue with planet packs that renamed Kerbin displaying the name in lower case (thanks TheSpaceDad).
  • Fixed incorrect requirement text when FacilityRequirement and maxLevel are used (thanks histalonia).

So here's the plan.  I did a quick build with the random Agent support requested by @Tonas1997 above against KSP 1.8.1.  I also included a bunch of pull requests, and fixed some easy bugs.  Next step I will compile against KSP 1.9, and see if I can fix some of the issues that are being reported (I'll need to read through a bunch of threads that I've ignored for a while).  Hopefully that will be in the next week.  After that, I'll take a look and see what KSP 1.10 looks like.

Link to comment
Share on other sites

  On 7/2/2020 at 8:20 PM, nightingale said:

@Tonas1997 - I wasn't able to reproduce the issue you posted about the maxSimultaneous/hasResource.  Could you post the contract config that causes the issue?

Expand  

Weirdly enough, neither could I. It seems like a quite random glitch, appearing and disappearing regardless of contract. Don't worry about that :D

Link to comment
Share on other sites

@nightingale I'm running into a pretty significant issue after updating to CC 1.28.1.

My own 'History of Spaceflight' contract pack is no longer loaded ingame, after the update. Meaning, none of its contracts show up. Not even in the debug menu.

It appears related to the new agent parser; it is somehow interfering with loading in certain agents. I suspect a number of contract groups related to these agents therefore fail to load as a result.
The logs give virtually no info on this at all - the only thing I could tell from them in my test install was that it's loading 47 agents. History of Spaceflight defines 65 agents all by itself, so that's a problem.
I have no idea why it won't load some agents while others are fine - it's hard to tell which ones it doesn't load, only process of elimination works here.

HoSf has a lot of groups nested within other groups, and if any sub-nodes fail to parse, the entire lot ends up disabled.

I came to these conclusions after a lot of testing and moving around contract groups, with the help of @severedsolo. Separating the main group from the sub-groups resulted in most of those groups loading, only some still fail - presumably the ones affected. Yet, even the groups that DID load had a warning added to them in the CC debug menu: "providing agent field for all contract_group nodes is highly recommended". Yet they all evidently have defined agent fields.

I hope this is sufficient information, you can have a look at the group and agent definitions here: https://github.com/Frylovespi/History-of-Spaceflight/blob/M_dev/Stock/GameData/ContractPacks/HistoryofSpaceflight/HistoryofSpaceflight.cfg

I'll also add a github issue with this same info to the tracker.

Link to comment
Share on other sites

Thanks for the heads up, @Morphisor.  I've fixed this and re-released, please let me know if you have any more issues.

Contract Configurator 1.28.2

  • Allowed a wider range of Agent names to be parsed by the AgentParser (thanks Morphisor244).
  • Add ModuleManager patch to fix old Agent definitions with a missing title (thanks Tonka Crash).
Link to comment
Share on other sites

  On 7/3/2020 at 2:07 PM, nightingale said:

Thanks for the heads up, @Morphisor.  I've fixed this and re-released, please let me know if you have any more issues.

Contract Configurator 1.28.2

  • Allowed a wider range of Agent names to be parsed by the AgentParser (thanks Morphisor244).
  • Add ModuleManager patch to fix old Agent definitions with a missing title (thanks Tonka Crash).
Expand  

Wow that was quick! Had a quick look and all seems to be well, many thanks!

And now we can rid ourselves of the mandatory agent fix patch for forgotten titles too hehe.

Link to comment
Share on other sites

  On 7/3/2020 at 4:28 PM, Morphisor said:

Wow that was quick! Had a quick look and all seems to be well, many thanks!

And now we can rid ourselves of the mandatory agent fix patch for forgotten titles too hehe.

Expand  

@Morphisor and @nightingale thanks for the update. I was having same problem for EpicSpace Program just tested it. It works fine with new update.

Link to comment
Share on other sites

  On 7/2/2020 at 8:20 PM, nightingale said:

@Tonas1997 - I wasn't able to reproduce the issue you posted about the maxSimultaneous/hasResource.  Could you post the contract config that causes the issue?

Expand  

That problem striked yet again. Here is an example of a contract with incoherent resource requirements. I took the liberty of highlighting the relevant sections.

This is an instance of the problematic contract, as found on the persist.sfs file:

  Reveal hidden contents

And here's the contract root config:

  Reveal hidden contents

Perhaps this is caused by some race condition when CC parses the minQuantity expression...?

 

Edited by Tonas1997
Link to comment
Share on other sites

  On 7/7/2020 at 12:13 AM, HawkEngineer said:

Quick Question:

I am trying to use a conditional OR in a "where" statement.  According to the Wiki, the conditional OR operator is ` but when I use it, I keep getting an error.  Can someone confirm the correct syntax for a conditional OR?

Expand  

Got an example of code where you use it? Nevermind, I found your answer.

 
There are no functions/methods that operator on boolean values.

https://github.com/jrossignol/ContractConfigurator/wiki/Boolean-Type

Where() is a method.

Edited by TranceaddicT
Link to comment
Share on other sites

  On 7/7/2020 at 12:13 AM, HawkEngineer said:

Quick Question:

I am trying to use a conditional OR in a "where" statement.  According to the Wiki, the conditional OR operator is ` but when I use it, I keep getting an error.  Can someone confirm the correct syntax for a conditional OR?

 

Expand  

OR is ||.  Looks like the wiki is a bit messed up, I'll fix it.

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