Jump to content

Crzyrndm

Members
  • Posts

    2,131
  • Joined

  • Last visited

Everything posted by Crzyrndm

  1. Arm doesn't do anything without activating one of the axis controls. If you're using the toggles to activate individual axes, it will use the current vessel state as the values. If you want it to activate with specific values, you need to use the buttons on the right of the text fields. If one of the above is not happening for you, I need logs and detailed steps that will allow me to replicate the behaviour you are experiencing
  2. You can get all active cameras using Camera.allCameras. Compare the camera names between flight view and IVA view and see which ones activate/deactivate. Then you can grab a reference to the camera that activates for IVA by name using this Unity function when entering the flight scene. You'll want to make a copy of that camera for your window, probably increase the depth so it sits on top and modify the rect to resize/position it. You will also probably need to manually activate the IVA view component of the part
  3. If you want to do this yourself, the basis of it is gating functionality behind a node state check if (ResearchAndDevelopment.Instance.GetTechState(nodeID).state == RDTech.State.Available)
  4. Fixed that error, if you could test again with this version
  5. That sounds like something failed in the code. Logs please
  6. Version 2.4.0 kerbas_ad_astra: Added "square4" and "proc" bulkhead profiles Changed: All shipped mod categories now include a subcategory for parts with "category = none" Fixed: subcategory type check now has a depth limit and cannot result in an infinite loop Fixed: Empty subcategories are now always removed the first time the editor is entered Fixed: Small memory leak triggered entering the main menu for the first time squashed Improvement: Added a subcategory override for the global setting "show unpurchased parts" Improvement: Added custom type filter for unpurchased parts Improvement: Added a category override for applying the category template to subcategories Improvement: General code polishing, optimisation, and improvement To exclude a subcategory from the category template, add ",dont template" to the subcategory when listed. eg. @CATEGORY[Squad] { @SUBCATEGORIES { list = Not Squad, dont template } } To override the global hiding of unpurchased parts, add the field "showUnpurchased = true" to the subcategory node SUBCATEGORY { /// showUnpurchased = true /// } To check for an unpurchased part, use the custom type with the value "purchased". Will return true if the part is purchased, add "invert = true" to see unpurchased parts CHECK { type = custom value = purchased }
  7. Had a chance to sit down a test this today. Part of the issue is probably the defaults for just about all of the controllers assuming a fairly high speed/power craft, which your prop plane is well below average for. The solution is to decrease both the maximum vertical speed (altitude controller limit), and the maximum angle of attack (VSpeed controller limit). Pulling them back to 15 m/s and 5 degrees (defaults are 50 and 15 respectively) helps enourmously. I also see that the bump on changing target is much more violent than is really acceptable so I've made a few tweaks that should make it somewhat better. Added a new test craft to the fleet as well so I can see this happening myself in future NOTE: I was using FAR, may not work as well in stock (although it should still be an improvement) { name = low speed prop HdgBankController { PGain = 1 IGain = 0 DGain = 0 MinOut = -30 MaxOut = 30 ClampLower = -0.5 ClampUpper = 0.5 Scalar = 1 Ease = 0.2 } HdgYawController { PGain = 0 IGain = 0 DGain = 0 MinOut = -2 MaxOut = 2 ClampLower = -0.5 ClampUpper = 0.5 Scalar = 1 Ease = 1 } AileronController { PGain = 0.4 IGain = 0.08 DGain = 0.2 MinOut = -1 MaxOut = 1 ClampLower = -1 ClampUpper = 1 Scalar = 1 Ease = 1 } RudderController { PGain = 0.1 IGain = 0.08 DGain = 0.05 MinOut = -1 MaxOut = 1 ClampLower = -1 ClampUpper = 1 Scalar = 1 Ease = 1 } AltitudeController { PGain = 0.15 IGain = 0.01 DGain = 0 MinOut = -15 MaxOut = 15 ClampLower = 0 ClampUpper = 0 Scalar = 1 Ease = 20 } AoAController { PGain = 1.5 IGain = 0.4 DGain = 2 MinOut = -5 MaxOut = 5 ClampLower = -5 ClampUpper = 5 Scalar = 1 Ease = 10 } ElevatorController { PGain = 0.05 IGain = 0.01 DGain = 0.1 MinOut = -1 MaxOut = 1 ClampLower = -1 ClampUpper = 1 Scalar = 2 Ease = 1 } SpeedController { PGain = 0.2 IGain = 0 DGain = 0 MinOut = -10 MaxOut = 10 ClampLower = -10 ClampUpper = 10 Scalar = 1 Ease = 10 } AccelController { PGain = 0.2 IGain = 0.08 DGain = 0 MinOut = -1 MaxOut = 0 ClampLower = -1 ClampUpper = 1 Scalar = 1 Ease = 1 } } CraftPreset { name = Plane 6 SC pilot = low speed prop }PIDPreset I kinda doubt you're stuck for what the mod can do, the functionality on the whole is not hugely complex. It's the configuration / making things behave where things get complicated. Some proper documentation would be nice though... The sort of experience that started it all...
  8. It means that for users with FAR installed, if the FAR version is 15.3.0 or older, I can guarantee that your vehicle will experience "phantom" yaw caused by port facing wings appearing larger to those FAR versions than starboard facing wings.
  9. No, that wasn't what I was trying to say. Take this code: public void Update() { foreach(Vessel v in vessels) { foreach(Part battery in v.parts) { if(battery.Resources.Contains("ElectricCharge")) { if(ElectricChargeTotals.ContainsKey(v.GetName())) { ElectricChargeTotals[v.GetName()] += battery.Resources["ElectricCharge"].amount; } else { ElectricChargeTotals.Add(v.GetName(), battery.Resources["ElectricCharge"].amount); } } } } }Dictionary<string, double> ElectricChargeTotals = new Dictionary<string, double>(); If you only do that, then the totals will continuously increase because each pass you make (once per rendered frame for Update) is added to the total from the previous frame (and the frame before that...) public void Update() { [B][COLOR=#ff0000] ElectricChargeTotals.Clear(); [/COLOR][COLOR=#008000]// discard old pass totals[/COLOR][/B] foreach(Vessel v in vessels) { foreach(Part battery in v.parts) { if(battery.Resources.Contains("ElectricCharge")) { if(ElectricChargeTotals.ContainsKey(v.GetName())) { ElectricChargeTotals[v.GetName()] += battery.Resources["ElectricCharge"].amount; } else { ElectricChargeTotals.Add(v.GetName(), battery.Resources["ElectricCharge"].amount); } } } } }Dictionary<string, double> ElectricChargeTotals = new Dictionary<string, double>(); This sets you back to having no EC recorded for any vessel before each pass
  10. Are you clearing the totals before running the sum each time? If "ElectricChargeTotals" is a global variable and you are running this in Update or similar, you need to clear the dictionary somehow before starting. //vessels is a List<Vessel> //ElectricChargeTotals is Dictionary<string, double> ElectricChargeTotals = new Dictionary<string, double>(); // or ElectricChargeTotals.Clear(); // or foreach (KeyValuePai<string, double> kvp in ElectricChargeTotals) kvp.Value = 0;
  11. Found the problem, and it's not the part category this time, but a simple syntax error. There is not a valid subcategory for those parts (all only shows everything in the subcategories, not everything that passes the category template. I will consider whether that should be changed, but for now...) Replace the KAS/KIS category definition with this CATEGORY:NEEDS[KAS|KIS] { name = KAS & KIS icon = KAS colour = #FFF0F0F0 all = true SUBCATEGORIES { list = 0,KAS parts list = 1,KIS parts } } SUBCATEGORY { name = KAS parts icon = KAS FILTER { CHECK { type = folder value = KAS } } } SUBCATEGORY { name = KIS parts icon = KIS FILTER { CHECK { type = folder value = KIS } } } - - - Updated - - - Or possibly a more generic alternative SUBCATEGORY { name = Undefined icon = default FILTER { CHECK { type = category value = None } } } @CATEGORY [*]:HAS[@FILTER[]] { @SUBCATEGORIES { list = Undefined } } I'm not sure if that MM HAS syntax is actually valid but it isn't particularly necessary anyway
  12. Hmm, will do some further testing then What it comes down to is that any parts with an invalid category name (ie. not pods,Propulsion,fuel tanks, etc.) were never meant to be visible prior to 0.90 and the changes to the filters. For the most part, this is still the case, although as more authors create their own categories it is slowly changing. To prevent the intentionally hidden parts (asteroid, EVA kerbals, flag, procedural parts upgrades, etc, etc.) from being visible in the parts list, filtering out the "category = none" parts used to be all that was required. FE is not *meant* to be using that any more but it seems like there are some locations where that change is not being fully applied.
  13. A code sample would be helpful. What you're trying to achieve is not immediately clear from your explanation, and the problems you are experiencing are unlikely to be due to the number of vessels involved (Lists can take millions of items before failing). What I think you're trying to do is establish a sum of each resource across all vessels in a list of some sort [COLOR=#008000]// 'vessels' is the list/array of all the relevant vessels you are looking at // keep the resource totals in a dictionary for easy reference[/COLOR] Dictionary<string, double> resourceTotals = new Dictionary<string, double>(); for (int i = 0; i < vessels.Count; i++) { Vessel v = vessels[i]; for (int j = 0; j < v.Parts.Count; j++) { Part p = v.Parts[j]; for (int k = 0; k < p.Resources.Count; k++) { PartResource r = p.Resources[k]; [COLOR=#008000] // add the resource amount in this part to the relevant resource total, or create a new total if no previous part had this resource[/COLOR] if (resourceTotals.ContainsKey(r.name)) resourceTotals[r.name] += r.amount; else resourceTotals.Add(r.name, r.amount); } } }
  14. Positions are almost always transform.position (and if not, almost always transform.localPosition), but I haven't done anything with the RnD view so I don't know specifics. Have you looked at the code for the old tech tree mods and seen how they position things? 1) Triple check the log for errors when entering the editor scenes. That callback is very fragile and an error from any of the subscribed functions is enough to bring it to a grinding halt 2) Tried manually refreshing the category UI? Click on Filter by Function to close it and then open it again
  15. You may find Steam Gauges adequately covers the UI elements requested
  16. Just write a text file with the .cfg extension and use a unique node type for your settings. eg. [COLOR=#008000]// inside GameData/test/testSettings.cfg[/COLOR] TestSettingsNode { setting_test_a = A Value } Module manager doesn't care what node type it's patching. PART just happens to be the most commonly used You can retrieve the module manager patched node using ConfigNode node = GameDatabase.Instance.GetConfigNodes("TestSettingsNode").FirstOrDefault(); Debug.log(node.GetValue("settings_test_a"));[COLOR=#008000] // prints "A Value" to the log[/COLOR] [COLOR=#008000]// note: there is also a GameDatabase.Instance.GetConfigNode method that uses a GameData relative path to fetch the node. I can just never remember the path to use[/COLOR]
  17. Good point. I was being slightly lazy there as the line was only to give the ME variable some context. Answer modified for future reference
  18. Just how much TWR are you planning on using... (plane parts already have increased thermal ceilings and planes shouldn't be flying fast enough low enough to matter anyway). Inline parachutes would be nice
  19. ModuleEngines e = part.Modules.FirstOrDefault(m => m is ModuleEngines); if (e != null) { float pressureCorrectedThrust = e.maxThrust * e.realISP / e.atmosphereCurve.Evaluate(0); // ratio of current to vacuum thrust is the pressure modifier float machDensityCorrectedThrust = pressureCorrectedThrust * flowMultiplier; // flowMultiplier is the velCurve * atmCurve result float currentRequestedThrust = machDensityCorrectedThrust * (thrustPercentage / 100) * e.vessel.ctrlState.mainThrottle; // thrust percentage is the engine % limiter }
  20. Thanks Dynamic Deflection v1.1.3 Fixed: Control surfaces forward of the CoM (canard style) inverting the roll control response NOTE: Re-save any vessels that this could affect. The fix won't take effect if you just jump to the runway.
  21. @funk Can you test with this version please. I think I found the issue, but I can't download your .craft (continuous "connecting to server") and my test case just so happened to have the roll controls disabled so I don't know if it was actually broken in the first place...
  22. The top level of that folder is a whole lot of resources/subcategories predefined for use. Removing both subfolders will result in no extra changes being made (everything is stock except for the Filter by Manufacturer tab, which is part of the plugin) RE: Documentation I know. It's downright awful and I'm not particularly happy with myself over it (I'm also not amazingly happy with the concept of doing it, which is why it hasn't been done yet...)
  23. Ok, I was under the assumption you had the default configs available. From what you're saying, this is not the case. Copy these two .cfg's (1, 2) somewhere and try again with the .cfg's from my previous post and your first .cfg from here. PS Manual or CKAN install (and if CKAN, which components)? CKAN should have the required cfg's being distributed with the plugin unless I'm mistaken.
  24. The syntax where the subcategory set the category links is pre version 2.0, the current syntax is the one without the category reference. Adding a new TACLS subcategory to Filter by Function SUBCATEGORY { name = TACLS icon = StorageLS FILTER { CHECK { type = manufacturer value = Thunder Aerospace Corporation } } } @CATEGORY[Filter?by?Function] { @SUBCATEGORIES { list = TACLS // note: this is the name field for the subcategory. Insert a position index if needed } } Your filter to exclude the parts from the Utility category looks correct to me so I'm not sure why that didn't work. To see if it is a Module Manager syntax error or an issue with FE, open up the ModuleManager.ConfigCache file with a text editor and search for the Utility subcategory (name = Utility will probably be fastest) to see what it ends up looking like RE: subcategories added by other mod .dlls They are always added after FE is done with the category. You get all the indexed FE subcategories, all the unindexed FE subcategories, and then any subcategories added by another mod.
×
×
  • Create New...