Jump to content

Crzyrndm

Members
  • Posts

    2,131
  • Joined

  • Last visited

Everything posted by Crzyrndm

  1. other than these lines in the SUBCATEGORY nodes category = Filter by Cross-Section Profile which no longer do anything, the config seems fine (although, doesn't stock already create these categories in which case all you need to do is change the icons?) I'll get the nullref cleaned up shortly
  2. At one point I was working on a UI to manage categories but I didn't really have much motivation for it so it never got particularly far. If someone wanted to make that UI using FE as the back end/framework, the plugin is set up to allow that to happen but I don't have the motivation to do that myself anymore. AFAIK, no one has yet successfully modified the sorting methods inside the categories themselves. There is only a workaround (renaming parts to group them by name) to get parts ordered in a reasonable fashion. Majority of the icons are from KaiserSoze who has adapted them to an appropriate format from a variety of other sources (Black Necro's Part Catalog mod and manufacturers flags for mods, ARP icons (TriggerAu's and Olympic1's) for resources, his own work/other sources for misc icons). My work is entirely limited to the plugin and the configs.
  3. Version 1.9.1 (probably) Fixed bad initialisation. Fixed Pilot Assistant preset window flickering Trying to load the default before creating the default is a really bad idea
  4. The whole reason for RCLite was that the stock chute system will/can not work with how this version of FAR does things. You may want to be more specific about how/why "drogue chutes don't seem to be working" because they do their job of correctly orienting my pod here (a drogue so it won't ever have much impact on the descent speed.)
  5. Proportional response typically dominates integral response at middling to large distances because its strength is linearly related to the size of the error. Kp controls the slope of the linear response so reducing Kp increases the error required to reach a certain output. Integral response is based on a continuous sum of error (the total area bounded by the error function if we weren't bound to discrete measurements). The longer an offset remains, the greater the impact it has. Ki controls the amount of time it takes for a certain error to create a certain level of output (increasing Ki increases the rate at which output will change in response to an error). It is required because proportional response tends to zero as you get closer to a setpoint, causing output to fall to zero. If there is an offsetting force present (ie. asymmetric thrust) this will end with the controller not quite pointing where you told it to go because it can't compensate for the assymmetry with zero error. The integral term allows the required offset to be generated. Note that the integral reduces stability due to it's oscillatory nature which is why it rarely gets used in KSP where asymmetry is rare Derivative response is based on the rate of change of error. It acts against any change causing a reduced response. If you want your object to stop turning further away, you reduce Kp/Ki (less acceleration force) and increase Kd (more braking force). Increasing Derivative action too much causes it to fight it's own movements (move left => Kd pushes right => now moving right => Kd pushes left etc.) because we are limited to discrete time steps so if you see a vessel jerking it's way towards it's goal, you can probably blame Kd being too high Yes and no. The rate of calculation is constant, Tf scales the result such that the rate of action is reduced so if everything was constant, it would take Tf seconds longer for the same result to occur compared to if it didn't exist. The integral is just a continuous sum. When you have a big vessel with a large angle to turn through it could take you tens or hundreds of seconds to get all the way around to your target position. During that time the integral sum will have been adding on that large error and have become very large itself. This will require an opposite error to cancel out and so the vessel will swing right past it's target. The limiter prevents this from occurring to an extreme degree (it's an inherent property of the integral to need to go slightly past it's target) by placing a limit on that sum, reducing the time it takes to bring integral response to the value it actually requires to set dead on your target. Kd will counter your turn speed/acceleration, not Ki/Kp Manually tuning MJ's PID controller was a bit wierd last I used it because Kp/Ki scale with Kd (industrial standard is Ki/Kd scale with Kp which is much easier to work with (IMO) because you typically set Kp first).
  6. ConfigNode is the class which KSP uses to read/write/store the majority of data in .cfg files (eg. PART { ... } is initially read into a ConfigNode) This is probably the one you want RDController.Instance.node_selected
  7. You can see all the stock strategy configurations by opening the file at: <KSP_Install_Dir>/GameData/Squad/Strategies/Strategies.cfg In each STRATEGY node you have a few settings common to the strategy, and then several EFFECT nodes that decide how it will behave STRATEGY { name = StratName [COLOR=#ff0000]//This is the internal strategy name. Must be unique and have no spaces, but otherwise value is irrelevant[/COLOR] title = StratTitle [COLOR=#ff0000]//The name that will show up ingame[/COLOR] description = blah [COLOR=#ff0000]// self explanatory[/COLOR] icon = iconPath [COLOR=#ff0000]// path to the icon file starting from GameData[/COLOR] groupTag = Basic,B [COLOR=#ff0000]// This is for making groups of contracts that you can only have one of active at the same time (so you don't have a funds => science and a science => funds conversion happening at the same time)[/COLOR] [COLOR=#ff0000]//Duration stuff seems irrelevant[/COLOR] initialCost<Currency> = 0 [COLOR=#ff0000]// Fixed cost in <currency> for activating the strategy[/COLOR] initialCost<Currency>Min = 0 [COLOR=#ff0000]// scaling <currency> cost at 0% commitment[/COLOR] initialCost<Currency>Max = 100 [COLOR=#ff0000]// scaling <currency> cost at 100% commitment[/COLOR] [COLOR=#ff0000](cost = Min + Commitment * (Max - Min))[/COLOR] hasFactorSlider = true [COLOR=#ff0000]// allows variable commitment[/COLOR] factorSliderDefault = 0.1 [COLOR=#ff0000]// default commitment %[/COLOR] factorSliderSteps = 10 [COLOR=#ff0000]// number of selectable points between 0 and 100%.[/COLOR] [COLOR=#ff0000]You get a valid position every (100 / steps) %[/COLOR] EFFECT {} EFFECT {} } The CurrencyConverter EFFECT (the rest are mostly just variations on this) EFFECT { name = CurrencyConverter [COLOR=#ff0000]// Effect type. Valid values are CurrencyConverter (input one currency, output another), CurrencyOperation (Add or multiply currency), CurrencyExchanger (converter on existing currency instead of income), or ValueModifier (operations not to do with currency, only documented for recovery %'s[/COLOR] input = Science [COLOR=#ff0000]// input currency[/COLOR] output = Reputation [COLOR=#ff0000]// output currency[/COLOR] minShare = 0.0 [COLOR=#ff0000]// take 0% of all input currency at 0% commitment[/COLOR] maxShare = 1.0 [COLOR=#ff0000]// take 100% of all input currency at 100% commitment[/COLOR] minRate = 0.01656302579767544536 [COLOR=#ff0000]// return 0.016... output currency per 1 input currency converted at 0% commitment[/COLOR] maxRate = 0.02070378224709430670 [COLOR=#ff0000]// return 0.020... output currency per 1 input currency converted at 100% commitment[/COLOR] AffectReasons = ScienceTransmission, VesselRecovery [COLOR=#ff0000]// When to allow the converter to run[/COLOR] effectDescription = gains from field work [COLOR=#ff0000]// description[/COLOR] } You just have to mix and match the elements in a cfg somewhere and it'll get added to the list of available strategies
  8. Version 1.9.0 Added first version of user configurable keybindings Bindings for Pilot Assistant pause, heading toggle, vertical toggle, and throttle toggle are now configurable.
  9. Can I get a picture of "looks like it's enabled" and a log please.
  10. Picture (with things deflected ), craft file, and logs please.
  11. Version 1.8.1 Fixed Pitch and Yaw flight controls remaining locked out under some circumstances Fixed unpausing activating all control systems Pilot Assistant scroll areas are now resizeable
  12. DCPR reduces control inputs based on your current speed and altitude so you don't tear your control surfaces off going low and fast but still have full authority at high altitude/low speed. You may have stalled the surface (right click on it, if the stalled % is above 0 you get reduced force output) or it may have been shielded from the airflow by something else.
  13. From the 1.0 patch notes - Switching SOIs no longer causes the next orbit to change at high time warp rates. - Added a warp speed limit when approaching an SOI transition. It was also explained in an earlier dev note what the cause was (not floating point errors) and how it was fixed if you care to search a bit.
  14. To make it draggable, you need a persistent Rect instead of creating one each time. namespace Testing { [KSPAddon(KSPAddon.Startup.SpaceCentre, false)] public class Testing : MonoBehaviour { Rect windowRect = new Rect(10,10,300,700); public void OnGUI() { windowRect = GUI.Window(1, windowRect, windowFunc, "Title"); } void windowFunc(int id) { GUI.DragWindow(); } } } The window id I don't understand too well myself, expect that two windows with the same id cannot both be drawn at the same time (you can draw one or the other, but not both). I just give them a large arbitrary random number
  15. "Invert = true" takes the result of that block and returns it's inverted state (so a match returns false, a miss returns true). The issue with the disappearing parts is one of grouping. You're saying: I don't want parts manufactured by "x" and I also don't want parts that have "y" in their title (so the manufacturer block gets ALL parts by that manufacturer). To put it into a typical boolean expression: valid = NOT(manufacturer) AND NOT(title) When what you actually wanted to say was: I don't want the parts manufacured by "x" that have "y" in their title valid = NOT(manufacturer AND title) @SUBCATEGORY[Utility]:AFTER[FilterExtension]:NEEDS[UniversalStorage] { @FILTER,* //1 doesn't work either {[INDENT] CHECK { [/INDENT] [INDENT=2] type = check // check types group other checks for their value (yes I know, worst name ever) invert = true [/INDENT] [INDENT] CHECK { type = manufacturer value = New Horizons & Nox Industrial } CHECK { type = title value = Elektron, Sabatier Reactor, Water Purifier, C02 Canister, Food Bag, Hydrogen Tank, Oxygen Tank, Waste Tank, Water Tank, Greywater Tank, Radial Oxygen Tank } } [/INDENT] } } PS The first node is a 0, that's why the 1 didn't work. * is still the best idea though
  16. To get something started in the space center, you're looking at a KSP Addon type plugin (rather than a Part Module). This means inheriting from Monobehaviour and having the class tagged with the KSPAddon attribute. [KSPAddon (KSPAddon.Startup.SpaceCentre, false)] public class YourClass : MonoBehaviour {} This gives you a class for which the methods Awake, Start, Update, FixedUpdate (NOTE: not particularly useful outside the Flight scene), OnGUI and OnDestroy. There are (a lot) more, but those are the ones you will use the most. To draw a window, you want OnGUI public void OnGUI() { GUI.Window(/*some number*/, new Rect(300,500,300,300), windowFunc, "This is a window Title"); // draws a 300x300 window 300 in and 500 down from the top left of the screen. // You have a choice of GUI or GUILayout for most UI objects. GUI you specify the size explictly using a Rect for each object, GUILayout you have formatting functions to shape your layout. Both work, what you use is up to you. } void windowFunc(int id) { // the contents of your window go here. // NOTE: if using GUI functions, the (x,y) coordinates are relative to the top left of the window, not the screen (ie. (0,0) in this function is the top left corner of the window) } The R&D window is an overlay on the space center scene so if you want a window in both there is no special considerations (although you will have to block it for the other buildings that aren't the VAB/SPH if you don't want them showing up). To detect entry to these facilities, we add callbacks to functions for various "OnEnter" and "OnLeaving" events public void Start() { GameEvents.onGUIRnDComplexSpawn.Add(RnDEnteredFunc); GameEvents.onGUIRnDComplexDespawn.Add(RnDLeavingFunc); } public void OnDestroy() //You don't want to leave event subscriptions lying around { GameEvents.onGUIRnDComplexSpawn.Remove(RnDEnteredFunc); GameEvents.onGUIRnDComplexDespawn.Remove(RnDLeavingFunc); } void RnDEnteredFunc() {} void RnDLeavingFunc() {} set a boolean value in those callbacks and gate your OnGUI code behind that check if you only want to show in the RnD complex bool bRnDOverlayVisible = false; void OnGUI() { if (!bRnDOverlayVisible) return; // I prefer return statements for gating as it reduces the level of nesting but you can also wrap everything inside the if statement. Whatever works for you }
  17. It's not a boolean switch that it's selecting but an enumerator (list of states). It just so happens to only have two defined states (FULL=0 and NONE=1) so it can be easily mistaken for a boolean
  18. ...Nope, didn't see that one coming... I'll do the configurable secondary bindings this weekend (if not earlier). This is just getting silly now
  19. Spaces in names for indexing are indicated by '?' characters. eg. @RESOURCE_DEFINITION[EVA?Propellant] - - - Updated - - - Either of these approaches should work @PART [*] { @MODULE[ExConverter] { @INPUT_RESOURCE,0 [COLOR=#ff0000]// first INPUT_RESOURCE node[/COLOR] { @ResourceName = newName } @INPUT_RESOURCE:HAS[#ResourceName[MetalOre]] [COLOR=#ff0000]// HAS/NEEDS work on subnodes, not just the top node[/COLOR] [COLOR=#ff0000](can't index it but there should be no duplicates in this application)[/COLOR] { @ResourceName = newName } } } As it's the first node, just using @INPUT_RESOURCE may also work (but is not recommended)
  20. Great (dev new or dev old? dev new would mean I have some work to do ...) Put this somewhere for now or download the github repo. I still have to check out kcs's issue before puttinga package together @PART[B9_Aero_Wing_Procedural_TypeB]:NEEDS[FerramAerospaceResearch]:AFTER[FerramAerospaceResearch] { @MODULE[FARControllableSurface] { %nonSideAttach = 1 } }
  21. That's not meant to happen... (unless maybe you had it climbing at significantly greater rate than the altitude limiter would allow?)
  22. Did you have one of the Procedural wing parts highlighted (ie. mouse over the part, part turns green, press J) while pressing J? Fixed, turned out to be just a missing parameter in the FAR configs
  23. Nice catch. Will have a look once I sort these control surfaces out
  24. It is an entirely different mode and you will get different numbers showing up in the tuner when you are using one of those modes (numbers which you will have to reduce quite aggressively most of the time)
  25. Ah, the snippet I posted was just the replacement for the "-category = dummy". You still needed the rest of it So we have the exclusion filter to prevent the parts showing in Utility @SUBCATEGORY[Utility]:AFTER[FilterExtension]:NEEDS[ThunderAerospace] { @FILTER,* [COLOR=#ff0000]//[/COLOR] ,0 means the first FILTER node. ,* means all FILTER nodes { CHECK { type = title value = Life Support, TACLS invert = true } } } A new subcategory to put them in //Adds TACLS parts to Life Support subcategory SUBCATEGORY:NEEDS[ThunderAerospace] { name = Life Support icon = StorageLS FILTER { CHECK { type = title value = Life Support, TACLS } } } And add that subcategory to the appropriate category @CATEGORY[Filter?by?Function]:AFTER[FilterExtension] { @SUBCATEGORIES { list = 8,Life Support } } PS MM Tip: don't mix BEFORE, FOR, and AFTER, you only want one of them per patch. FOR is typically used by the mod, BEFORE/AFTER is so you can enforce when your changes happen relative to those if need be (the category edits in particular should be after to make sure something I change doesn't overwrite them). -.-
×
×
  • Create New...