Jump to content

nightingale

Members
  • Posts

    4,137
  • Joined

  • Last visited

Everything posted by nightingale

  1. That's a tough one. Your only choices that I can really see are the "don't use on existing save" or to change the later contracts to not be based on contract progression, but on other attributes (ie. make them available if the player has done a flyby of the planet but not a landing). Right now the dialog boxes are pretty one-way. Eventually the player will be able to answer "multiple choice" questions (and have the answer stored somewhere), but that probably won't be in 1.7.0. I'll test this out and get back to you.
  2. Alrighty, if you can grab the new monolith craft file here, put it in GameData/ContractPacks/AnomalySurveyor/Monolith/ and give it another go it would be greatly​ appreciated!
  3. Got a bug report for you. This happens when going from Main Menu => Loading a game => Main Menu (at least some of the time, haven't confirmed if it's always): [EXC 21:33:13.505] NullReferenceException: Object reference not set to an instance of an object ScienceChecklist.ScienceChecklistAddon.Start () [EXC 21:33:13.514] NullReferenceException: Object reference not set to an instance of an object ScienceChecklist.ScienceChecklistAddon.Update () [EXC 21:33:13.757] NullReferenceException: Object reference not set to an instance of an object ScienceChecklist.ScienceChecklistAddon.OnGUI () [EXC 21:33:13.758] NullReferenceException: Object reference not set to an instance of an object ScienceChecklist.ScienceChecklistAddon.OnGUI () <repeat the last exception forever> The KSPAddon seems to have issues (I never trust the onlyOnce flag to actually work). The problem is that the bulk of the code in your Awake() (which in Unity is akin to a static initializer) code is for initializing the instance - so it really needs to go into Start() (which is equivalent to a constructor). Or if you want to ensure that it's a singleton, you can store the instance and do a DestroyImmediate in Start() if Instance is already set.
  4. You'll want to be careful with putting that type of stuff under the contract group - you may want to consider using requiredValue = false: [TABLE=width: 640] [TR=bgcolor: #F8F8F8] [TD=align: left]requiredValue[/TD] [TD=align: left](Optional, default = true) If true, the expression needs to return a valid (non-null) value for the contract to be offered. If false, the contract will be offered even if the expression returns null[/TD] [/TR] [/TABLE] What that doesn't say is it'll also fail if a list of values is empty. So because that node is in the group, it applies to all contracts within that group.
  5. Couple things: You shouldn't use it as a child to the Orbit parameter - as the orbit parameter won't care about its child parameters. The way it's supposed to work, is the Duration counter will start counting down after every sibling above it in the list is completed. So you should be able to do it like this: VesselParameterGroup Orbit Duration ReturnHome If that doesn't work, post up the config and I'll take a look.
  6. Cool, well at least that's one less thing to look at when I get home. Actually, I think I have a guess as to the problem: [Part]: PartModule indexing mismatch at mega.monolith, index 0.Node 'ModuleTripLogger' found in loaded data, but 'ModuleAGX' is defined in prefab. Looking for ModuleTripLogger in other indices... ...no ModuleTripLogger module found on part definition. Skipping... Monolith loaded! RemoteTech: SatelliteManager: OnVesselCreate(15a37be4-1030-42be-b78e-2e20449e992b, Monolith) NullReferenceException: Object reference not set to an instance of an object at Part.ModulesOnStart () [0x00000] in <filename unknown>:0 at Part+.MoveNext () [0x00000] in <filename unknown>:0 There's the Action Groups Extended error, but I think that can be ignored. I'm guessing the TripLogger not found is the real issue, and it stems from me cleaning up the monolith part (it used to be a command pod for no good reason) without fixing up the .craft file. So I suspect if I clean up the craft file to remove the modules that shouldn't be there it'll fix this (although I'm not sure why I wasn't able to reproduce this last time I tried).
  7. Got a bug to report (from this thread): KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,ITargetable].get_Item (System.String key) [0x00000] in <filename unknown>:0 at Rotate.VehicleRotator.FixedUpdate () [0x00000] in <filename unknown>:0 The issue happens when spawning a vessel with Contract Configurator. I can point you to the code (but it's a massive ugly mess with 100 different code paths due to user configurable options). If you want to reproduce it, the best way would be to grab Contract Configurator and the Anomaly Surveyor contract pack, go to the Contract Configurator debug menu (alt-f10) and uncheck the REQUIREMENT lines from the AnomalySurveyor/AS_Jool_Monolith contract (this will make the contract show up without meeting its pre-requisites). Accept the contract and you should see the exceptions when going into flight view.
  8. Excellent, I'll take a look and see what I can find. The angle will likely change with the time of day/year - it's likely not rotated relative to any reference point. It looks to be centered on the launch pad where a ship would normally be spawned, which is probably somehow relevant. - - - Updated - - - I don't think that it's the cause of the issue, but it sure makes PersistentRotation unhappy: KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,ITargetable].get_Item (System.String key) [0x00000] in <filename unknown>:0 at Rotate.VehicleRotator.FixedUpdate () [0x00000] in <filename unknown>:0 - - - Updated - - - Actually I don't know what Unity does if a FixedUpdate call fails - it may be preventing something else from running to clean up the monolith. Are you able to do a quick test without PersistentRotation to see if the issue then goes away?
  9. Yeah, even if there doesn't seem to be anything of value I'll take the logs - it might help me reproduce it. It's either an odd interaction with some other mod, or you just need the right circumstances to make it happen. Surprised I didn't have this one in the tracker, raised [#301].
  10. I've had this reported a couple times, but have never reproduced it and have never gotten those valuable delicious logs from anyone. Ball is in your court Enceos... perhaps you can succeed where all others have failed? - - - Updated - - - Actually, while you're at it, can you confirm if it's actually there or just a "ghost". Ie - does it show up at KSC in the tracking station, and can you crash into it? From what I've gathered the answer will be no for both those questions, but would be good to get confirmation.
  11. First off, I'll point you to the How-To page on the wiki. It has a couple sections that are crucial for someone using Contract Configurator for the first time - in particular using the debug window, which will most likely have the error message that lets you know what the problem here is. Now, if you meant that it's not even showing up in the debug menu, then there's a couple things to check for (neither appear to be the problem here): Make sure the root CONTRACT_TYPE node is correctly spelled - if it's not then it'll just be silently ignored Make sure all your {} braces match up correctly. KSP's config file loader sometimes silently drops stuff if you miss an end brace. That being said, I suspect when you load up the debug window I suspect you'll at least find an error for your CompleteContract requirement (the contractType is blank). EDIT: Double ninja'd!!! But do check the debug window... it'll be invaluable as you continue to develop contracts. - - - Updated - - - It's allowed, but not recommended, as then you can't do @ContractGroup:someAttrtibute. It's actually why the displayName attribute was added: [COLOR=#333333][I]CONTRACT_GROUP[/I][/COLOR] [COLOR=#333333][I]{ [/I][/COLOR] name[B] = SandDInkerbalized[/B] [COLOR=#333333][I] displayName = Search and Destroy InKerbalized[/I][/COLOR] [COLOR=#333333][I] minVersion = 0.7.4[/I][/COLOR] [COLOR=#333333][I] maxSimultaneous = 30[/I][/COLOR] [COLOR=#333333][I]}[/I][/COLOR] And since I'm looking at that... maxSimultaneous of 30 might as well be a million, as a player can't have more than 10-15 contracts without editing the Contracts.cfg.
  12. ActiveContract is the preferrred way of handling this. Assuming that you are using different vessel identifiers for the two contracts, you can use the IsNotVessel parameter to make them mutually exclusive. If the parameters are similar enough though, it may cause trouble for the user, as they'll be unable to "choose" which of the two contracts the vessel should apply to (it'll mostly be the one that gets checked first, which will be the one that was accepted first... probably). So better than using IsNotVessel is finding some way to add a parameter that differentiates the two contracts. Can't give specific advice without more info, but HasCrew and PartValidation are good possibilities. - - - Updated - - - Oh, another option... if you want them to choose between both contracts, and then have the second one re-offered only when the first one's vessel gets defined you could do something like this (untested): Contract1: REQUIREMENT { type = Any // Contract2 has not been accepted REQUIREMENT { type = AcceptContract [COLOR=#333333][FONT=Consolas]contractType = Contract2 [/FONT][/COLOR] minCount = 0 maxCount = 0 } // Vessel2 has been defined REQUIREMENT { type = Expression expression = VesselIdentifier(Vessel2) != null } } (Contract2 would be the same as Contract1, but mirrored)
  13. Well #$%&. If I had known about that I wouldn't have gone and built something myself. @pauladam316 - I'd highly recommend looking at what diamedea linked to. Although what I wrote supports your requirements that you requested, SoundTrack Editor has a LOT more features.
  14. Nope, you've stumbled on a bug. I've got it fixed now, it'll be released in 1.7.0 (ETA... maybe a week?). If you want to test it out now, you can grab the dev dll.
  15. Yup, but the perfectionist in me refuses to allow you to name a variable that holds a list of planets as moonorbitedcount​.
  16. That or a Module Manager patch specifically tailored towards your contract pack are your best options. Depending on what you're going for, you can also try dividing up the planets in other ways without naming them (eg. all children of the homeworld, or everything with an sma less than the homeworld, etc.).
  17. Something like this? DATA { type = List<CelestialBody> orbitedmoons = HomeWorld().Parent() == Sun ? HomeWorld().Children() : HomeWorld().Parent().Children().Where(cb => cb.IsHomeWorld() == false) allMoonsWithSomething = @orbitedmoons.Where(cb => cb.HasLanded()) } Or if you meant check in a requirement, then you can do something along these lines: REQUIREMENT { type = expression expression = @/orbitedmoons.Count() == @/allMoonsWithSomething.Count() } (or for a marginal efficiency improvement, reverse the allMoonsWithSomething's check, and then check whether it has a Count() of 0 in your expression. - - - Updated - - - Careful of those late edits - you edited well after I read your original post. There isn't a better way - the contract system requires at least one parameter or it will fail. So to have "no" parameters, you need some sort of dummy parameter (and you can change the title to make it look better). Timer seems as good a choice as any. I can't think of a way to make a contract that doesn't reappear if declined - mainly because the contract system doesn't store declined contracts (otherwise the save file would become massive). [#298] is coming up in 1.7.0 that will allow expressions to be fired when a contract is offered. You could hypothetically use that to set a flag and then prevent the contract from being offered again if that flag is set. But what'll likely happen is that the player will never see the contract - it'll come up and be withdrawn while they're timewarping and it'll never show up again.
  18. Okay, initial beta release of Music Replacer is up, you can get it here. Documentation is on the main GitHub page. Right now it supports: Replacing the single music samples for various scenes (main menu, tracking station, etc.) Adding samples to the construction or space (flight) lists Replacing the construction or space lists entirely Adding samples that will be played in space/flight under specific conditions (currently supports celestial body and altitude filters). Automatic crossfade when changing music mid-stream There's a bunch of debug still in this version in case something goes wrong - just provide a KSP.log if you have an issue to report. Let me know if there's other features you need (specifically other conditions you want to check for to provide replacement music. Let me know when you're ready to release, and I'll turn this into a formal release with a thread, etc. on the forums.
  19. What's output in the log and what actually ends up happening after that log message is output are two different things. Have a look at the config cache or do a database dump to see what's actually happening and you should expect to see this: [COLOR=#333333]PART [/COLOR]{ RESOURCE:NEEDS[asdfasdfasdf] { name = LiquidFuel amount = 32000 maxAmount = 32000 } } Of course, in my test it was being done right in the original config node definition, and not in a @ patch node, so that's another possible difference. The issue appears to be that when a NEEDS check passes on an outer node where there was an inner node that previously failed a NEEDS check, the inner node ends up being added back in (module manager syntax and all). In the example above, the stock code just ignores the unrecognized node, but in the original Contract Configurator issue that this was raised for, it actually prevents the contract in question from being loaded.
  20. I have an older 6-core AMD machine... which is about the worst possible CPU choice for KSP. So that news (which I'm still taking with a grain of salt) is also very exciting.
  21. There's a lot of FUD about the new Unity GUI. It's been around since Unity 4.6, which is what KSP 1.0.x uses. So the new UI is already there. What may break is if you are using some of the third-party plugins that Squad has used (stuff like EZGui), as Squad is moving away from those and they may very well be removed from KSP 1.1. So although you're using what Unity considers the legacy GUI, I wouldn't worry too much about it, have a read of this page (emphasis mine): So because Unity would need to re-write their own tools before they can drop support for the legacy GUI, I don't think that's it's something that anyone needs to worry about for KSP. They might hypothetically drop it in Unity 6.0, but that's not even a thing that exists today, and I doubt by the time it does that there's any economic incentive for Squad to port KSP to another Unity major version upgrade. My personal opinion of the new Unity UI system is that it's next to worthless for KSP modders. By design it's meant to be used through the Unity tools by creating "proper" unity prefabs and objects. Doing it through the scripting interface is... ugly to say the least. The only example in the wild of the new UI in use by a KSP mod is one of DMagic's modlet (source here, you can read a little bit of his opinion on the new UI here). The only thing that may change around this for KSP 1.1 is that Squad may release their own wrappers/classes to make doing Unity GUIs through scripting simpler. But even then, the performance benefits of the new UI are really only seen with big GUIs with complex layouts with relative positioning/sizing of elements (see Mechjeb). In your case, if you were to port what you're doing the new UI, I suspect the only noticeable difference I'd expect is that you'd have a really bad headache after it's done. Sorry about the long rant on your thread... Short version of what I was trying to say is keep rockin' on and don't worry too much about what KSP 1.1 will bring.
  22. Quick update. I had a chance to start this tonight, and got the bones of the plugin in place. Right now it can replace any stock music, except the in-flight stuff (which is where the bulk of the complexity comes from). But got it loading the settings from a config file, so that side of things is basically done. I'll probably need one more night on it and then I'll put a pre-release on GitHub. My current thinking is that I will release it as a standalone mod, but you can bundle it as part of your mod. I won't formally release it until you're ready to go on your side, in case you find bugs or have additional feature requests. That work for you?
  23. Can't say why this would cause contract issues, but you've got this error about a million times in your log file: IsolatedStorageException: Could not find a part of the path "D:\SteamLibrary\steamapps\common\Kerbal Space Program\GameData\CIT\ActiveStruts\Plugins\ActiveStruts.cfg". at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 at System.IO.File.Open (System.String path, FileMode mode) [0x00000] in <filename unknown>:0 at ConfigNode.Save (System.String fileFullName, System.String header) [0x00000] in <filename unknown>:0 at ConfigNode.Save (System.String fileFullName) [0x00000] in <filename unknown>:0 at ActiveStruts.Util.Config._initialSave () [0x00000] in <filename unknown>:0 at ActiveStruts.Util.Config..ctor () [0x00000] in <filename unknown>:0 at ActiveStruts.Util.Config.get_Instance () [0x00000] in <filename unknown>:0 at ActiveStruts.Addons.ActiveStrutsAddon._processUpdate () [0x00000] in <filename unknown>:0 at ActiveStruts.Addons.ActiveStrutsAddon.Update () [0x00000] in <filename unknown>:0 Could be that's the problem, or could be the real issue is hiding somewhere in the log but too hard to find because of all the log spam. Either way I'd try reinstalling/removing active struts.
×
×
  • Create New...