Jump to content

drysle

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by drysle

  1. I put my edited version on github; this commit has the important changes. It doesn't handle every type of requirement, just expression requirements, but that was all that I needed to get bases & stations and field science to work. (I also had to fix a bunch of warnings to get it to compile on Linux, but those shouldn't have affected the actual functionality.)
  2. After investigating the issue further, the problem actually seems to be that each contract type shares the same data nodes, so when Contract Configurator tries to generate another contract of a type, it's changing the value of expressions for all contracts of that type. That's why contracts that were fine when they were generated are suddenly failing their requirements. Having a contract with a random expression in a data node and requirements that use that expression won't work unless the requirements are always satisfied, or only one contract of that type is allowed to be offered at a time. I have no idea how to fix the underlying problem, but I was able to work around it by modifying ExpressionRequirement to always return true for contracts that are in the offered state. That at least makes the Bases and Stations pack usable.
  3. I've been trying to look into this issue, because it's making the Bases and Stations pack almost unplayable for me. It seems like the expressions inside of data nodes are constantly being re-evaluated when I'm inside the mission control screen, and this is causing the requirements to fail on contracts that have already been offered but not accepted. For instance, the "Launch a new Space Station" contract uses this expression: targetBody1 = OrbitedBodies().Where(body => @/stations.Where(v => v.CelestialBody() == body).Count() == 0).SelectUnique() the SelectUnique function is picking a new random target body several times per second, and when it happens to pick the sun, the contract's requirement fails and the contract gets withdrawn. All of the Bases and Station contracts that are giving me problems are using some kind of random function in their expressions. So maybe expressions are not supposed to be evaluated more than once? or maybe the random functions should be seeded for each contract? It's not clear from the ContractConfigurator documentation when expressions are supposed to be evaluated.
×
×
  • Create New...