Jump to content

nightingale

Members
  • Posts

    4,137
  • Joined

  • Last visited

Everything posted by nightingale

  1. Well, the short answer is no - it works within the stock contract generation system. Contract Configurator has its own contract class (just one) that it inserts into the stock system. Actually, it inserts it multiple times based on the number of CONTRACT_TYPE nodes that have been loaded to try and keep a statistical balance between Contract Configurator and "normal" contracts. Now, if you are writing contracts using Contract Configurator there are a few things you can do that go beyond the stock system (like assigning a weight to a CONTRACT_TYPE - which Contract Configurator will use when making a weighted selection of which contract type to offer). So it's a little bit better than just the stock system, but still has a lot of the issues (incessantly checking whether a contract is still valid, generating in order from 1 star to 3 star when filling the list, off the top of my head). Did that answer the question?
  2. Yup, definitely possible with Contract Configurator. In fact the Tourism Plus contract pack has some of the logic in contracts for bringing tourists to visit stations (this one). The basic idea is to use an expression to find a vessel that meets your criteria for the contract, like so: DATA { type = Vessel targetVessel = AllVessels().Where(v => v.VesselType() == Station && v.CelestialBody() == @targetBody && v.IsOrbiting() && v.EmptyCrewSpace() > @/SpawnPassengers/count).Random() } You can then reference it like this: PARAMETER { name = VesselParameterGroup type = VesselParameterGroup vessel = @/targetVessel duration = 4h PARAMETER { name = HasPassengers type = HasPassengers } }
  3. Let's see... biome for a given location I don't have the code for, but SCANsat does, something along these lines. Terrain height at a given location would be: public static double TerrainHeight(double latitude, double longitude, CelestialBody body) { // Sun and Jool - bodies without terrain if (body.pqsController == null) { return 0; } // Figure out the terrain height double latRads = Math.PI / 180.0 * latitude; double lonRads = Math.PI / 180.0 * longitude; Vector3d radialVector = new Vector3d(Math.Cos(latRads) * Math.Cos(lonRads), Math.Sin(latRads), Math.Cos(latRads) * Math.Sin(lonRads)); return Math.Max(body.pqsController.GetSurfaceHeight(radialVector) - body.pqsController.radius, 0.0); } Altitude of sea level at a given location would be (I assume you must've meant something different though ): public static double SeaLevel(double latitude, double longitude, CelestialBody body) { return 0.0; }
  4. Don't know what this is due to - Contract Configurator doesn't start loading anything until it hits the main menu. I think KSS does add a part, so I suppose it could be somehow related to that, but that still seems odd.
  5. Yup, this. One day I'll get around to converting stuff in my mods to .dds, but it's just not a priority, and there's no reason it should be forced. Contract Configurator, for example, has exactly three 16x16 PNGs... I doubt it will have a noticeable impact on anyone's load time if I never get around to DDSing those.
  6. Well, my first advice would be to not do random descriptions, because that's reinventing the wheel and you should use the TextGen logic (possibly with Coherent Contracts and/or customized text). Now, if you still want to go that route, what you have looks close (although you haven't shown the actual error in the first block, so I can't be 100% sure). But the problem I see is you have List when you need List<string>. That being said, there's some oddities with the string parsing that [#191] is meant to solve. I'll see if I can potentially get that into the next release, but no promises. Until then I have a feeling that what you have above may not work correctly (the list parsing will fail in weird ways when it switches over to try parsing a string).
  7. Wait. Wait. Wait. There are cookies?
  8. Hello all, my name is nightingale and I have 1001 posts. I never posted an introduction thread, so I figure it's better late than never. I meant to post this as post #1000... but I got carried away elsewhere and realized my post count was already up there. I've been playing KSP for a couple years, but it wasn't until about 12 months ago that I started installing mods. Then finally signed up on the forum (for more improved lurking) back in August. My first mod was released in late November... and it's been crazy times ever since. Here's to the next 1000 posts, and a few mod ideas that I have floating in my head that may come to fruition in the coming months.
  9. Assuming that you don't have any exceptions in your log, and that the contracts are supposed to be coming up (ie. their requirements are met), the easiest way to get them offered is to just cancel other contracts to make "room" in the list. A screenshot of the contract configurator debug window with one of the RemoteTech contracts expanded may help here.
  10. Please post your questions in one thread only. I'll answer it in the Contract Configurator thread.
  11. Well, I see no reason why what I've got so far wouldn't work for mod planets or edited biomes. Anyway, I think I've got it past the first post - I can now use Contract Configurator to generate random valid subjects (for some values of valid. ) and then throw that into a CollectScience: Next up I've got to add a bunch of stuff around it so that it's actually controllable in a meaningful way (ie. genering for specific situations/experiments, filtering specific things, only generating where current science is zero or below a threshold, etc.). Then I'll put together the documentation, release and throw up some example contracts to get you started, arkie.
  12. How far are you in your career? The RemoteTech contracts start showing up once you've researched a couple things (probe cores, solar panels and batteries, I think it was). You can also check the Contract Configurator debug menu (alt-f10) and hit the "Force Check Requirement) to see if any of the contracts are meeting their requirements (if they are all green, it should be able to generate).
  13. I thought it was possible to get splashed down everywhere on Kerbin (although not necessarily easily). I was sure I'd seen a thread/post or something about it somewhere. The closest I found was this one that gives a few examples: - - - Updated - - - And an update on the Contract Configurator enhancements - spent most of the weekend with the kids, so little progress, but slowly pulling stuff from xEvilReeperx's code post a few pages back. Shouldn't take too long to get something workable, and then I'll worry about if there's anything I can do about the difficult combinations in CC.
  14. Sounds like you're looking at a contract for DMagic's orbital science mod.
  15. Probably better to ask on the Tourism Plus thread, but no matter. Anyway, the same thing cropped up over there: So basically - send log files, please.
  16. Everytime I look at the science stuff I have to re-learn what the difference between a subject/experiment/experimentID/etc. are... that code helps tremendously, xEvilReeperx. Big rep for you!
  17. I'll look into the first two issues and see what I can come up with. The exceptions though are a stock problem. I've worked around them as best as possible so that they shouldn't cause problems. They show up until you save/load or change scenes when a vessel is spawned.
  18. Yeah, it does feel a bit much, I suspect you'll start to see fewer when you start getting more part tests, satellite contracts, etc. You have the correct setting, lowering it should lower the number of contracts you get.
  19. The marker is certainly possible (via a waypoint), but that's for a specific location. A biome is a big blob - you'd need some other way to mark it. xEvilReeperx - I'll take a look at that code shortly, but looks good.
  20. Raised [#34]. I'll look into it, but not sure if it's feasible.
  21. Not without editing the config files, but there's some stuff I can do on my end. Can you give me a screenshot of your contracts list as well a list of the contract packs that you have installed? I'm wondering if I need to tweak down how many Contract Configurator contracts are generated across the board. Also, looks like I have the max contracts for tourism set to 5.... I can definitely turn that down to 3 or 4.
  22. New version up - download now! I missed one when fixing the orbit/fly-by contracts... but you shouldn't miss this one, since it's one of the highest payouts in the contract pack. ContractPack-Tourism 1.1.3 Fix gas giant moon flyby contract so they are a fly by and not orbit.
  23. That's just not how Contract Configurator works - but there's alternatives for most of what you're after. Pretty much have a look at anything/everything in the REQUIREMENT nodes. A requirement is a pre-requisite for a contract to show up. So if you had a contract for Minmus, you could have "orbited Minmus" as the requirement for the contract to be offered. If you're trying to ensure that a contract for the same thing isn't offered multiple times, there's other ways to do this. Setting maxSimultaneous=1 is the simplest. Doable. You may be better off having them as separate contract types, then you can further differentiate them (have additional parameters, different contract text, etc.) As above, I'd treat these as totally different contract types. Building a list on the fly is somewhat problematic, but doable if you set a max limit (albeit ugly). Check out the gas-giant tourism contract from Tourism Plus as an example of this. Basically all possible, but the control flow is different. It would be more like: Select a CelestialBody with biomes that have science to be done. targetBody = LandedBodies().Where(cb => cb.BunchOfStuffThatINeedToComeUpWithToCheckForScience()).Random() Select a biome from the celestial body that has science to be done. biome = @targetBody.AllBiomes().Where(b => b.SomeCheckForScience()).Random() Build a list of experiments experiments = biome.SomeOtherFunctionToGetExperiments().Where(exp => exp.SomeFunctionForCheckingIfScienceAvailable()) Dump the experiments into a bunch of CollectScience parameters (as was done in the gas-giant contract above). Automatic. You're welcome! Hopefully once you get the hang of it you'll be willing to continue down this route - it's not as rigid as I'm making it out to be... once you adjust your thinking. - - - Updated - - - I'll have to think about that one... can probably come up with something, but it may not be bullet proof.
  24. Alright, got a new feature coming for you in the next version of Contract Configurator. The DATA node now supports a uniqueValue flag. Set it to true, and it will prevent any contract from showing up with a duplicate value for the given field (across active/offered contracts). DATA { type = CelestialBody requiredValue = true uniqueValue = true targetBody1 = OrbitedBodies().Random() }
  25. Not specifically, will be figuring it out as I go along. Off the top of my head: Need a method to get the list of valid experiments for a given biome/situation. Need a method to get the amount of science done/remaining for a given experiment/biome/situation Probably need a way to easily sum across experiments and/or situations (so you can more easily generate the contract for a biome/situation where there is more than X science available to be done). Once I have that I'll see how it looks... as I dig into it I may see more that's needed. Or once I toss it over to you, you may start to ask "how do I do X?", which will result in more stuff. Anyway, hopefully all the above is done in 3-4 days maybe?
×
×
  • Create New...