-
Posts
611 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Warezcrawler
-
I'm trying to manipulate with AirIntakes, and I need to change the values in the module "ModuleResourceIntake". I have created a new module for IntakeSwitch which have my new values I wish to inject into the "ModuleResourceIntake". I think confignode is the way to go, but I just can't figure out, how the manipulate with specific value/nodes in a specific module. I've tried to outline the structure of a part and my new module. In GTI_IntakeSwitch under resourceNames I have the list of alternative resource I at runtime want to be able to inject into the module ModuleResourceIntake. Node structure PART { name = XXX MODULE { name = ModuleResourceIntake resourceName = IntakeAir checkForOxygen = true ###other values### } MODULE { name = GTI_IntakeSwitch resourceNames = IntakeAir, IntakeAtm ###other target values### } RESOURCE { name = IntakeAir amount = 2 maxAmount = 2 } } I would really like to understand: How do I control which node i work in. Replace a node How to change a value in a node How to read a specific value How the get the changes to take effect So basically how the confignode construct works. I have searched around a lot, but it is just not coming to together for me. I have a node replacement working, but that kind of copy paste, and I don't undertand to inner working of it, otherwise I would guess I had figured this out by now.
-
This mod have moved to the released section of the forums Ever wished the stock MultiModeEngine could handle more than 2 modes for engines? GTI Multi Mode Engine does exactly this. The purpose is to introduce an alternative way to switch engine configuration (propellants and other properties). The key source of inspiration comes from InterstellarFuelSwitch by FreeThinker. I find that supplementing it by versatile engines is a great asset. I've added simple intake switching, so intake atm is more attractive, and the days of adding two intake modules to an intake can be over. Pictures Features: GTI MultiModeEngine: Multiengine switch (conceptually what InterstellarFuelSwitch does, just for engines) Select which engine ID to affect Availability (Flight, Editor) Propellants, Ratios, IgnoreForISP, DrawGauge Custom naming of Engine configuration Set Engine Type [LiquidFuel, Nuclear, SolidBooster, Turbine, MonoProp, ScramJet, Electric, Generic, Piston] Thrust Heat production Curves: atmosphereCurve, velCurve, atmCurve Technology needed can be defined (currently not working) Engine Exhaust Effect switches when engine is switched UI Override of individual engine Activate, Shutdown and KSPFields in the right click menu UI_CHOOSEOPTION for switching between engine configurations Next/Previous Action Possibility of 8 Individual actions for engine, i.e. first 8 configurations can be accessed directly through actions (custom button defined in VAB or through AGX) Multi Mode Intakes: Switch intake resources on the fly current resource will be reset to zero (intended) Other setting will remain unchanged for now. Only one intake should be present in any one part. Only the first one is changed. How: (There are no parts added with GTI Utilities, this is intended for use in other mods) List of Atmosphere Curve in the Kerbol system. Very nice when deciding on form of the curves for the engines. Download: Download from GitHub (including the source code) Dependencies: Module Manager by sarbian which is under a "CC share-alike license" Changelog: Credits and sources of code inspiration: kerbokatz - Afterburner mod FreeThinker - Interstellar Fuel Switch blowfish - advice on UI_ functions Crzyrndm - advice on ConfigNode coding NathanKell - for coding advise in the forums sarbian - Module Manager & advice Licence: https://opensource.org/licenses/MIT
-
ExceptionDetector 1.1 [KSP ANY VERSION]
Warezcrawler replied to godarklight's topic in KSP1 Mod Releases
Yep..... Does not work with KSP 1.1 yet.... Hopefully will soon ) -
Engine propellant switching
Warezcrawler replied to Warezcrawler's topic in KSP1 C# Plugin Development Help and Support
Another issue I've run into. Since changing propellant should change ISP (atmCurve and velCurve) as well, I figured I'd replace these as well. So I have these defined in my module as they are defined in the engine module. MODULE { name = EngineClassSwitch //engineID = "NOT IMPLEMENTED" //engineNames = "NOT IMPLEMENTED" propellantNames = LiquidFuel;LiquidFuel,Oxidizer;MonoPropellant propellantRatios = 100;45,55;100 propellantIgnoreForIsp = false;false,false;false //default = false stagingEnabled = false availableInFlight = false availableInEditor = true velCurve { key = 0 1 0 0.08333334 key = 1 0.98 0.42074 0.42074 } atmCurve { key = 0 0 0 0 key = 1 1 7.914787 7.914787 } } The value in the curves are just for testing. Now I need to load them, and I currently do that like this [KSPField] public FloatCurve[] velCurve; [KSPField] public FloatCurve[] atmCurve; I'm not sure that is correct. Next I need to transfer these curves into the engine when I change the propellant. I just can't figure out how to manipulate those curves. I've tried ConfigNode, but they did not seem to update like the propellant. I've tried something like this, but it does NOT work. foreach (var moduleEngine in ModuleEngines) { //moduleEngine.velCurve = velCurve; Debug.LogError("moduleEngine.velCurve.ToString " + moduleEngine.velCurve.ToString()); Debug.LogError("moduleEngine.atmCurve.ToString " + moduleEngine.atmCurve.ToString()); //moduleEngine.velCurve.Curve. int i = 0; foreach(var key in moduleEngine.velCurve.Curve.keys) { Debug.LogError("Key[" + i + "]: " + key.time + " " + key.value + " " + key.inTangent + " " + key.outTangent); i++; } //moduleEngine.velCurve.Curve.AddKey(0, 1, 0, 0); //moduleEngine.atmCurve = atmCurve; ConfigNode newVelCurveNode = new ConfigNode(); ConfigNode Node = newVelCurveNode.AddNode("velCurve"); Node.AddValue("key", "0 1 1 1"); Node.AddValue("key", "0.2 0.98 2 2"); moduleEngine.Load(Node); i = 0; foreach (var key in moduleEngine.velCurve.Curve.keys) { Debug.LogError("Key[" + i + "]: " + key.time + " " + key.value + " " + key.inTangent + " " + key.outTangent); i++; } I hope someone out there can help me figure this thing out.... -
Engine propellant switching
Warezcrawler replied to Warezcrawler's topic in KSP1 C# Plugin Development Help and Support
OK, next issue. When changing the propellants I want to activate drawgauge for the new propellant. Now this happens like this propNode.AddValue("DrawGauge", true); However, KSP does not remove the gauge of past propellants like when using the engineswitch on the rapier. How do I get it to reset the gauges? I've tried this before updating the propellants, but it doesn't have an effect. foreach (var localPropellant in moduleEngine.propellants) { localPropellant.drawStackGauge = false; } If I quicksave and reload, the gauges are perfectly aligned to the propellant setup. So I figure it just a matter of forcing KSP to update the gauges. -
Engine propellant switching
Warezcrawler replied to Warezcrawler's topic in KSP1 C# Plugin Development Help and Support
Thank you so much. I've used days on the web trying to figure this one out. I'm not home yet, but this was a mayor help! -
Engine propellant switching
Warezcrawler replied to Warezcrawler's topic in KSP1 C# Plugin Development Help and Support
That's great. And my testing just showed that it does delete the old nodes for propellants at the same tid. It does not save with the game through. So am I forced to load the configuration of the engine each time the module loads? -
Engine propellant switching
Warezcrawler replied to Warezcrawler's topic in KSP1 C# Plugin Development Help and Support
OK... Sorry but I've never used ConfigNode before. So how does it work. How do if declare it correctly and find the node I wish to process, i.e. the part which have my module, and the player have just right clicked in order to do their thing? -
Engine propellant switching
Warezcrawler replied to Warezcrawler's topic in KSP1 C# Plugin Development Help and Support
Thanks wasml, will try that! EDIT: After testing I can say that PartResourceLibrary.Instance.GetDefinition(string) does give me access to the propellant (resource id), and can be changed. However, I still don't know how to delete existing ones. => I stuck to the amount of propellents there are initially... -
I'm working on a mod for engines. One basic function is supposed to be switching the propellant on an engine, like fuelswitch does for fueltanks. It is supposed to function as an alternative to the engine switch like on rapiers. I aim at integrating against tech level, and maybe inflight upgrading by EVA or something. Now, my current issue is, I cannot get the propellant switch to work. I can change the name of the propellant, but that does not change the propellant. A copy of the full C# module in it's current state can be obtained here. I think I need to change the ".id" of the propellant to get the game to recognise the change. If this is what I need to do, then I do not know how to obtain the resource ID's other than through the error logs in KSP. I've tried "PartResourceLibrary.GetDefinition(string)" but I get an error I simply cannot figure out how to fix. --> "An object reference is required for the non-static field, method, or property 'PartResourceLibrary.GetDefinition(string)'." I reality I would really like to be able to delete the old propellants and replace them by new ones. Can anyone help?
-
[1.0.5]AutoRove - autonomous rovermovement in the background
Warezcrawler replied to Wotano's topic in KSP1 Mod Releases
WOW... this is something many of us have been waiting on for a long time. Integration with Waypoint Manager would be an excellent addition- 139 replies
-
- rover
- automation
-
(and 1 more)
Tagged with:
-
[1.0.5] T.I.M. - Thrust Indication Module v1.1
Warezcrawler replied to wrcsubers's topic in KSP1 Mod Releases
wow... amazing..... Simple og rather usefull! Love it. -
[1.3.1] Docking camera (KURS) (14.feb.18)
Warezcrawler replied to DennyTX's topic in KSP1 Mod Releases
Great mod! Maybe you could add Module Manager for other docking ports like Universal Docking Ports from KIP Engineering? I made this MM for it -
Is it possible to get the flight computer to stage when running out of fuel?
-
Just a bit of help, guys (x64)
Warezcrawler replied to drswagboss's topic in KSP1 Technical Support (PC, modded installs)
It must be some compbination of your mods. Plus I noticed that you are running at least two mods, which does not operate under win64. FAR and KJR are blocked from running on win64, like coded into the dll files, and there might be more of those. Try removing the non-win64 enabled mods first.... I can say that the win64 runs fine, but when modding like crazy (which I do too), issues often come from mods not supporting each other... good luck finding the issue.