Jump to content

nightingale

Members
  • Posts

    4,137
  • Joined

  • Last visited

Everything posted by nightingale

  1. It really shouldn't affect older saves differently... but if it's working on the newest update I'm afraid I'll have to just shrug that part off... The X's were always intended behaviour... but I don't believe they were working correctly for HasCrew until recently. It makes a lot more sense for stuff like the RemoteTech connectivity parameter, where having the X gives the player a very clear cue as to what's wrong (when it can be one of about 5 different things). But yeah, in the name of consistency, I'd like to keep HasCrew the same even though it doesn't fit quite as well.
  2. In the screenshot you included, the contract isn't actually failed - if you switch back to another vessel that meets it, the check should come back. The intention is to show the state of the parameter for the current vessel. If the contract line is turning red, you're getting a failure message in the top right corner (with associated penalties) or the Crew line gets an X, then those are all problems. Otherwise this seems like it's working correctly.
  3. Nope, problem is between the keyboard and the chair.... I never looked that closely at the DATA node expression we'd come up with from before. This should also work, and be a bit cleaner: DATA{ type = Vessel requiredValue = false targetVessel = LKOStation } REQUIREMENT { name = NoStation type = Expression expression = (!@/targetVessel.IsOrbiting()) }
  4. Okay, I'll test this out tomorrow evening and see where the problem is. Edit: Actually, if you can send me the contract definition that may help, in case the problem is something else.
  5. Basically, if the expression in a requirement returns true, the contract can be offered, otherwise it can't. This should work as well - if it's not then it sounds like something wrong on my end. REQUIREMENT { name = NoStation type = Expression expression = @/targetVessel.IsOrbiting() invertRequirement = true }
  6. Gotcha, it's all clicking in place now. I think you may have mentioned a few days ago when we were looking at the expression requirement, but I never put the two together. The requiredValue attribute you're referring to doesn't work the way you think it does. Here's the quick and dirty truth table to make it plain as day (also I improved the description in the wiki): [TABLE=width: 500] [TR] [TD]requiredValue?[/TD] [TD]Expression is null?[/TD] [TD]Result[/TD] [/TR] [TR] [TD]false[/TD] [TD]false[/TD] [TD]Contract is offered[/TD] [/TR] [TR] [TD]false[/TD] [TD]true[/TD] [TD]Contract is offered[/TD] [/TR] [TR] [TD]true[/TD] [TD]false[/TD] [TD]Contract is offered[/TD] [/TR] [TR] [TD]true[/TD] [TD]true[/TD] [TD]Contract is not offered[/TD] [/TR] [/TABLE] So, a few ways to get this working the way you want, but here's what I'd suggest: DATA { type = Vessel requiredValue = false targetVessel = [COLOR=#333333][ LKOStation ].Where(v =>v.IsOrbiting() && v.CelestialBody() == Kerbin).Random[/COLOR][COLOR=#333333]()[/COLOR] } REQUIREMENT { name = NoStation type = Expression expression = !(@/targetVessel.IsOrbiting()) } Your two scenarios: LKOStation exists. @/targetVessel gets set, DATA node passes. Requirement fails, because vessel is in orbit. LKOStation doesn't exist. @/targetVessel is null, but DATA node passes because requiredValue = falase. Requirement passes, because a null vessel returns false. In future, I think I'll add a null check, maybe via something like '@/targetVessel == null' to make this a little bit simpler.
  7. New version out, quick update for the problem SpaceNomad reported. Download now! ContractPack-RemoteTech 1.1.1 Fixed issue where 4-satellite version of Kerbin contract would complete early (thanks SpaceNomad).
  8. Funny thing is, when I was thinking of ideas for my own April fool's mod alteration, I wondered if I'd be able to "turn on" Sarbian's Nyan cat via reflection. I dug a bit, but the way he was checking for it made it so it wouldn't be possible. This was probably less than 2 weeks ago and at the time the date check code wasn't there. Sadly I think too few people have updated to the latest module manager, as INSULINt's is the only post I've seen about this all day! - - - Updated - - - Honestly, I wish the Nyan cat was there all year round (maybe I should start using 64bit....). Also, blizzy needs to bring back the beauty that was sh.png.
  9. The DATA node needs to be under the CONTRACT_TYPE. If you put them somewhere else, they will be silently ignored (raised [#174] to output a warning and save you from yourself). When you say, "it doesn't have any effect", what do you mean? Do you mean it's never offered? Head to the Contract Configurator debug menu (alt-F10), find your contract type and hover over it. That should show the config node details on the right hand side. Slide the mouse over carefully (I know, it's a pain, I'll make it better one of these days) and scroll down in that second area. You should see some details about the values for the attributes after expressions have been expanded. Throw a screenshot of that up and I can take a closer look (although seeing it yourself may make things click if the issue is in the contract type....) - - - Updated - - - Definitely sounds like a symptom of a bigger problem. When a contract throws an exception when loading from the save file, it'll kill the contract system, effectively wiping out all your contract history. No contract history is one good reason why you'll see contracts that are supposed to be one time only offered again and again. Alternate explanation would be that the scenario module that tracks your launch history (ProgressTracking, I think) is crashing in a similar way. Seen that happen when you fire Kerbals (one of Claw's bug fix modules is for that exact scenario). Regardless, post up a KSP.log and I can have a quick peek.
  10. In my Tourism contract pack there's a contract for setting up a station with multiple asteroids for tourists to visit. One thing I learned while testing is to be careful and fear the Kraken. Basically, save often, and keep multiple saves, because I found myself getting into situations where one of the multiple vessels I was working with (station, tug, asteroid) would suddenly go into crazy mode (basically seemed to decide it had zero velocity, and started crashing away towards Kerbin).
  11. If you read through this thread (page 2 or 3, you'll see it mentioned). Hint: believe nothing anyone with a green name says. EDIT: Oh right, sal_vager is the blue mod. Well don't believe HIM.
  12. I'm a little sad.... With all the "lol I'm a moderator" stuff there was only one mention of the Waypoint Manager April fools joke, and NONE for what Sarbian did in Module Manager. Does anybody on this forum still PLAY KSP?
  13. It was probably Sarbian. That guy loves his Nyan Cats.
  14. Definitely no nyancats in my install.
  15. Waiting patiently for 85 more rep to get to light green!
  16. A special treat for Nyan day from Mr. Scott Manley!
  17. [ LKOStation ].where(v =>v.IsOrbiting() && v.CelestialBody() == Kerbin).Random () Hope that came out right, on mobile. For more details, have a look at the function reference wiki page.
  18. If you want the contract to show up even when targetVessel is null then you would use requiredValue = false (ie. "target vessel is not a required value for the contract to show up"). Is that what you mean?
  19. No problem, although there was a little grief with updates today. Re-reading your original post on this, the expression (even my corrected one) is actually useless.... the DATA node already checks for a "null" value and fails the requirement test if it is null. The exception is when you set requiredValue to false (which you have not done). So you should get the same behaviour regardless of the expression.
  20. Good chance that you hit the same issue - hopefully 0.7.7 does the trick for you.
  21. Another hotfix inbound! Download now! Contract Configurator 0.7.7 Hotfix for loading saves from 0.7.4 or older (thanks SpaceNomad).
  22. None expected, in fact some of the fixes are targeted towards those (I'm hoping there won't be any more issues with "losing" track of the station in KSS).
×
×
  • Create New...