Jump to content

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


nightingale

Recommended Posts

I'm not at all familiar with Contract Configurator, so this is more a question about what to expect instead of a bug report. I installed it to go with the StationScience mod and the Bases and Station Contract Pack. linuxgurugamer sent me to this thread to ask questions instead of his release thread for the Bases and Station Contract Pack.

  1. I have the StationScience mod, but I'm not seeing any contracts to actually do any of the science experiments. I was offered contracts that hauled all the parts up to stations around Kerbin and the Mun and now they are sitting idle while I rotate crews and haul fertilizer around the system.
  2. Is there a way to add some realistic time delay (30-60 days) between repeating routine maintenance type contracts? I'm getting sick of 72 hours between crew rotations and supply runs to the same station. I'm not exaggerating, I did the math based on completing times in the persistence.sfs file.
  3. When you refuse a contract is there a way to have it actually go away for a couple game weeks. I keep refusing to do contracts that make no sense (supply run to a base with 7 years of supplies) and the contract will clear, I click available contracts and same contract pops up as the only contract on offer.
  4. If I leave Mission Control open I occasionally see contracts pop up and disappear usually before I have a chance to click on it. One of these is to build a Minmus station that I want to put in place before expanding a base on the surface, but I never get a chance.
  5. How are the significance of contracts determined? Random chance?  I've got my first contract to extract ore and return it to Kerbin from anywhere and it's trivial, but a what should be a routine contracts like a supply run for 10 units of life support is exceptional.
Link to comment
Share on other sites

@nightingale

Ignore this, the problem was with the grey matter between my ears.

I'm having a problem with some contracts, the relevant lines are::

DATA
{
	type = List<CelestialBody>
	easyPlanets = HomeWorld().Children()
	mediumPlanets = OrbitedBodies().Where(b => b.HasSurface()).ExcludeAll(@easyPlanets).Exclude(HomeWorld())
	hardPlanetsTemp = AllBodies().Where(b => b.HasSurface()).ExcludeAll(@mediumPlanets)
	hardPlanets = @hardPlanetsTemp.ExcludeAll(@easyPlanets).Exclude(HomeWorld())
}

DATA
{
    type = CelestialBody
    //planet = Prestige() == Trivial ? @/easyPlanets.Random() : Prestige() == Significant ? @/mediumPlanets.Random() : @/hardPlanets.Random()
    planet = @/easyPlanets.Random() 
}	

And the result is below:

O4PCgQ5.png

The key mediumPlanets is not fulfilled since everything is fulfilled, but because of this, the contract is not being generated.

If I comment out the mediumPlanets and the hardPlanets (since it depends on mediumPlanets), it then generates a contract

 

Edited by linuxgurugamer
Link to comment
Share on other sites

Hey. Cheers for making this great mod!

I'm currently playing with sigma dimensions to scale up the stock system 10x. This has caused some issues with contracts spawning things in the wrong places. Is it possible to write a config to re-scale the lat, lon and alt values for contract waypoints and spawned vessels?

Link to comment
Share on other sites

Is there a way to have a maxCompletions =1 for each planet?  

In other words, when 


    targetBody = @/planet


 	DATA
    {
        type = CelestialBody
		home = HomeWorld()

        planet =  OrbitedBodies().Where(b => b.HasSurface()).Random()
    }	

to have the contract be completable one time for each targetBody?

Link to comment
Share on other sites

20 minutes ago, linuxgurugamer said:

Is there a way to have a maxCompletions =1 for each planet?  

In other words, when 



    targetBody = @/planet


 	DATA
    {
        type = CelestialBody
		home = HomeWorld()

        planet =  OrbitedBodies().Where(b => b.HasSurface()).Random()
    }	

to have the contract be completable one time for each targetBody?

 

I think I have it:

	DATA
	{
		type = CelestialBody
		uniqnessCheck = CONTRACT_ALL

		contractBody = @targetBody
	}

 

Link to comment
Share on other sites

Any chance the debug reload contracts button will get fixed?  I have a pretty big modpack that requires around five to ten minutes to load, so I can't really make contracts for it if I can't load in contract changes while already ingame.

Link to comment
Share on other sites

I dunno if this is the right place to post this, but here it goes:

I'm currently assembling a RSS/RO modpack which includes ContractConfigurator. I chose not to install RP-0 since I don't want many of its features (new tech tree, maintenance costs, etc). However, I'd like to "recycle" the new contracts that come with the mod and use them as a standalone addon.

From what I gathered from other contract packs' configs, contracts don't seem to depend on any specific mods; AFAIK, this can be asserted by the lack of a :NEEDS tag. Example from CleverSat:

CONTRACT_TYPE
{
	name = CleverSatConstellation
	title = Work on a Satellite Constellation
	group = CleverSat

	...

This means I could, theoretically, place loose contract .cfg files on the GameData folder and they would be added to the game without further modifications. Nevertheless, there are a couple of contract files on RP-0's folder that do depend on the mod itself; they are mostly modifications to existing stock/mod contracts:

@CONTRACT_TYPE[SCAN_LoRes]:FOR[RP-0]
{
	%maxSimultaneous = 5
	
	@deadline = 365 * @/targetBody1.Multiplier() // 1 year * mult

	...

My question is: can the :FOR tag be safely removed without unwanted effects (possibly in a standalone "zzzContracts" folder)? I'd still have to make sure mod-specific contracts would have a :NEEDS tag.

Edited by Tonas1997
Grammar
Link to comment
Share on other sites

Hi.

RemoteTech has been updated, and it broke Contract Configurators. Trying to purse the matter, I found that there's a new method on the Interface ISatellite, and since CC doesn't implement it, CC is not loaded.

Quote

/Users/lisias/Workspaces/KSP/GIT/net.lisias.kspu/ContractConfigurator/source/CC_RemoteTech/RemoteTechProgressTracker.cs(39,39): Error CS0535: 'RemoteTechProgressTracker.FakeSatellite' does not implement interface member 'ISatellite.PowerShutdownFlag' (CS0535) (CC_RemoteTech)

I just added

			public bool PowerShutdownFlag { get { return false; } set {}; }

on the line 81 of RemoteTechProgressTracker.cs to make things compile. Don't have the slighest idea about what i'm doing, however. :) I will give some feedback later.

 

— POST-EDIT --

It appears to do the trick. Reading the RemoteTech documentation, the new Interface Method signals when the Satellite is under a manual override shutdown.

— POST-POST-EDIT --

A proper fix was published below by PiezPiedPy. :) 

Edited by Lisias
more info + port edit
Link to comment
Share on other sites

On 8/19/2018 at 4:51 PM, Tonas1997 said:

My question is: can the :FOR tag be safely removed without unwanted effects (possibly in a standalone "zzzContracts" folder)? I'd still have to make sure mod-specific contracts would have a :NEEDS tag.

In short: Yes, and for your situation that's exactly what you need to do (explanation below):

You misunderstand what the :FOR tag does. It won't only load those contracts if [mod] is installed (thats what :NEEDS does) - :FOR instead goes: "I am [mod] and here are my configs" - it tells MM that the mod is installed (thats not the only way MM picks up on it, but a :FOR tag will announce that [mod] is installed).

In short: you MUST remove those :FOR tags if  RP-0 will not be installed, otherwise your mod will be advertising that it is RP-0 and MM will adjust it's configs accordingly (which will lead to problems because RP-0 is not installed)

Edited by severedsolo
Link to comment
Share on other sites

@Lisias That's all it needs, you got it nearly right, take out the return false ;)

public bool PowerShutdownFlag { get; set; }

I added the new method to RT for Kerbalism.

Here is a build for those who need it https://www.dropbox.com/s/3vhw8kteydjzwk2/CC_RemoteTech.dll?dl=0

@wartime ;)

@nightingale I've posted a PR to GitHub with the fix

Edited by PiezPiedPy
Link to comment
Share on other sites

On 8/26/2018 at 7:14 PM, PiezPiedPy said:

@Lisias That's all it needs, you got it nearly right, take out the return false ;)


public bool PowerShutdownFlag { get; set; }

I added the new method to RT for Kerbalism.

Here is a build for those who need it https://www.dropbox.com/s/3vhw8kteydjzwk2/CC_RemoteTech.dll?dl=0

@wartime ;)

@nightingale I've posted a PR to GitHub with the fix

Is it an additional file or a replace for the RemoteTech.dll?

Link to comment
Share on other sites

Hey guys, I must be doing something wrong and I am hoping you can help me out

I am writing a simple series of station building contracts, so far I have one to put a core up, no problem.
The trouble comes when I want to remember this station core to be added to in the next contract. The understanding I gained form the wiki was that I should make a VesselParameterGroup parent of all the parameters to do with the core.. then the name I gave in the VesselParameterGroup would be available for the 2nd contract to use in a validvessel requirement

So I made 2 contracts following this logic and the f10 debug says they both load BUT.. the 2nd contract is not visible in the mission control (well its got a red x in the all section), digging in the f10 I see that the validvessel is not deterministic, which fair enough, it wouldn't know at load up. but isn't that the point of the VesselParameterGroup? If this not the way then does any body know the right way to  have ships span multiple contracts?

Thanks

First Contract https://pastebin.com/2xUYTFPV
Second https://pastebin.com/f9hTPbAv

Link to comment
Share on other sites

Since I upgraded to KSP 1.4.5 I always have this issue with CC / Kerbalism during MM patching (was not like that with KSP 1.4.3):

[ModuleManager] Exception while processing node : Kerbalism/Support/ContractConfigurator/@CONTRACT_TYPE[*]
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

NullReferenceException: Object reference not set to an instance of an object
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyToRecursive (.ConfigNode node, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at ConfigNode.CopyTo (.ConfigNode node, System.String newName) [0x00000] in <filename unknown>:0 
  at ModuleManager.MMPatchLoader.ModifyNode (ModuleManager.Collections.ImmutableStack`1 original, .ConfigNode mod, PatchContext context) [0x00000] in <filename unknown>:0 
  at ModuleManager.PatchApplier.ApplyPatches (System.String stage, IEnumerable`1 patches) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception)
ModuleManager.Logging.UnityLogger:Exception(String, Exception)
ModuleManager.Logging.ModLogger:Exception(String, Exception)
ModuleManager.Logging.ExceptionMessage:LogTo(IBasicLogger)
ModuleManager.<ProcessPatch>d__33:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename:  Line: -1)

[ModuleManager] Processed node was
Kerbalism/Support/ContractConfigurator/@CONTRACT_TYPE[*]
  @CONTRACT_TYPE[*]
  {
    @PARAMETER[*]:HAS[#partModule[ModuleScienceLab]]
    {
      @partModule = Laboratory
    }
    @PARAMETER[*]
    {
      @PARAMETER[*]:HAS[#partModule[ModuleScienceLab]]
      {
        @partModule = Laboratory
      }
      @PARAMETER[*]
      {
        @PARAMETER[*]:HAS[#partModule[ModuleScienceLab]]
        {
          @partModule = Laboratory
        }
        @PARAMETER[*]
        {
          @PARAMETER[*]:HAS[#partModule[ModuleScienceLab]]
          {
            @partModule = Laboratory
          }
        }
      }
    }
    @REQUIREMENT[*]:HAS[#partModule[ModuleScienceLab]]
    {
      @partModule = Laboratory
    }
    @REQUIREMENT[*]
    {
      @REQUIREMENT[*]:HAS[#partModule[ModuleScienceLab]]
      {
        @partModule = Laboratory
      }
      @REQUIREMENT[*]
      {
        @REQUIREMENT[*]:HAS[#partModule[ModuleScienceLab]]
        {
          @partModule = Laboratory
        }
        @REQUIREMENT[*]
        {
          @REQUIREMENT[*]:HAS[#partModule[ModuleScienceLab]]
          {
            @partModule = Laboratory
          }
        }
      }
    }
  }

 

So no MM cache is created and somehow the game is borked from the beginning...

Full log and stuff (after reaching main menu):
https://www.dropbox.com/s/uu6ty0iux34isn0/2018-09-16_1 KSP.log and stuff.7z?dl=1

Link to comment
Share on other sites

1 hour ago, Gordon Dry said:

[ModuleManager] Exception while processing node : Kerbalism/Support/ContractConfigurator/@CONTRACT_TYPE[*]

That filepath would appear to suggest the issue occurs while MM is processing a file supplied by Kerbalism; it's certainly not a file that's included in CC, and I don't have that error when I load my game (which does not include Kerbalism.) As such, you might have better luck asking in the Kerbalism thread.

Link to comment
Share on other sites

4 hours ago, PiezPiedPy said:

I don't get any errors with CC and Kerbalism though, KSP1.4.5 and latest mods :/

tbh looks like an MM call that has the error, nothing to do with CC as there are no calls from or to CC in that exception.

I'd suspect not a MM or CC bug itself, but that a MM script in Kerbalism was matching against some 4th mod that @Gordon Dry has.  Maybe something to do with a mod that has or mods ModuleScienceLab.  Also, the form of the node reported, is that saying it was matching against multiple and nested ModuleScienceLab's ?  Considering there's edge case bugs like the one below, could be something similar.

 

Link to comment
Share on other sites

@Jacke @PiezPiedPy What confuses me is that the error always occurs after

[ModuleManager] Applying update Kerbalism/Support/ContractConfigurator/@CONTRACT_TYPE[*] to ContractPacks/HistoryofSpaceflight/Missions/SovietMissions/Kosmos/Kosmos 1-40/Kosmos-27/CONTRACT_TYPE

while MM patching - but this ContractPack has no single iteration of ModuleScienceLab mentioned anywhere ...

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