Lisias Posted May 30, 2023 Share Posted May 30, 2023 Just now, R-T-B said: Intel's Thread Director tech and the windows scheduler should do that automatically. Should, but it's doing it? And how? KSP predates all this stuff, so any protocol to communicate the system the best way to be handled just isn't there, and so ITD will need to: Guess Use a lookup table to decide So it appears Windows users need to read some Intel documentation to be sure. I don't have any machine with this e/p cores stunt* so I just can't help on this one. *well, I have… my Android mobile, but I doubt it will be of help. Quote Link to comment Share on other sites More sharing options...
R-T-B Posted May 30, 2023 Share Posted May 30, 2023 (edited) 5 hours ago, Lisias said: Should, but it's doing it? And how? KSP predates all this stuff Shouldn't matter, it's literally designed to detect gaming workloads that were developed before this architecture was made. Of course, there is theory, and then there is practice... How well it works, I can't say. I've heard mixed reports... heh. If it's basing it on a strong singlecore load though, KSP might actually trigger it. Edited May 30, 2023 by R-T-B Quote Link to comment Share on other sites More sharing options...
Padrone Posted June 5, 2023 Share Posted June 5, 2023 Greetings to the brain trust here. I have failed after several hours of labor to crack how a particular type of patch gets done. I'm hoping someone can find a moment to offer some help other than check the help threads, etc. (Believe me, part of why I'm hours into this is going thru the various wiki/thread help offerings. I'm just unable to understand how to apply the information to my case) The code is in an existing mod, and it botches up the ISP on a number of engines. I want to patch it back to working. The (abbreviated) MM Code I'm trying to patch: Spoiler PART { ...snipped out... MODULE { name = ModuleEnginesFX ...snipped out... atmosphereCurve { key = 0 240 key = 1 120 key = 4 0.001 } UPGRADES { UPGRADE { name__ = ca-upgrade-isp1 description__ = ISP Boosted to 245/110 atmosphereCurve { key = 0 245 key = 1 110 key = 3 0.001 } } UPGRADE { name__ = ca-upgrade-isp2 description__ = ISP Boosted to 250/1105 atmosphereCurve { key = 0 250 key = 1 105 key = 3 0.001 } The issue is the key = 4 in the atmosphere curve for the engine module and the entries for key = 3 in the upgrades. From what I can tell they're messing with the ISP so badly that the engine consumes thousands of units of fuel in a split second. What I'm trying to do is remove the key = 4 in atmosphere curve of the engine, and the two key= 3 entries in their respective upgrade atmosphereCurve blocks. I'm guessing the atmosphereCurve used to be something other than 0 = vacuum, 1 = Kerbin sea level. I was able to cobble a patch that removes the engines atmosphereCurve and re-adds it, but that's rather inelegant. And I'm just unable to get 'inside' the atmosphereCurve segments in the upgrades. I wish to learn to patch it the right way. TIA! Quote Link to comment Share on other sites More sharing options...
Tahvohck Posted June 15, 2023 Share Posted June 15, 2023 Can someone PLEASE collate the information in this thread and update the wiki? It's so out of date it's not even funny. Is there any syntax that can match "has this node this many times"? I'm trying to write a patch that deletes nodes that have been double-applied and being able to say @Part:HAS[Node:count>2] { -Node,1 } instead of having to list every part with a duplicate node would be really helpful. Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted June 16, 2023 Share Posted June 16, 2023 9 hours ago, Tahvohck said: Can someone PLEASE collate the information in this thread and update the wiki? It's so out of date it's not even funny. Is there any syntax that can match "has this node this many times"? I'm trying to write a patch that deletes nodes that have been double-applied and being able to say @Part:HAS[Node:count>2] { -Node,1 } instead of having to list every part with a duplicate node would be really helpful. Sometimes it helps to break things down into multiple passes and try working around the problem. I haven't tested this, but I think something like this might work: Spoiler @PART:HAS[@NODE] { @NODE,* { %temporaryWorkingIndex = 2 // add a temporary value to all matched NODEs } } @PART:HAS[@NODE] { @NODE,0 { %temporaryWorkingIndex = 1 // reset only the first NODEs index } } @PART:HAS[@NODE[#temporaryWorkingIndex[>1]]] { !NODE:HAS[#temporaryWorkingIndex[>1]],* {} // remove all higher indexed NODEs } @PART:HAS[@NODE] { @NODE { !temporaryWorkingIndex = delete // clean up temporary values } } Obviously, @NODE will need to be replaced with whatever you're trying to affect. Quote Link to comment Share on other sites More sharing options...
Tahvohck Posted June 16, 2023 Share Posted June 16, 2023 (edited) I think that will work perfectly, thanks. EDIT: Okay, that was a pain, I'm apparently really rusty with module manager patches; had to debug with the dump command... Here's a patch for Modular Fuel Tanks that gets rid of an issue they have where one of their files has duplicate entries for... everything, as far as I can tell. This is most obvious when you're using CryoTanks, since it would give it two switcher dialogues. @PART[*]:HAS[@MODULE[ModuleFuelTanks]]:AFTER[modularFuelTanks] { @MODULE[ModuleFuelTanks],* { %FlagForDeletion = yes } } @PART[*]:HAS[@MODULE[ModuleFuelTanks]]:AFTER[modularFuelTanks] { @MODULE[ModuleFuelTanks],0 { %FlagForDeletion = no } } @PART[*]:HAS[@MODULE[ModuleFuelTanks]]:AFTER[modularFuelTanks] { -MODULE[ModuleFuelTanks]:HAS[#FlagForDeletion[yes]],* {} } @PART[*]:HAS[@MODULE[ModuleFuelTanks]]:AFTER[modularFuelTanks] { @MODULE[ModuleFuelTanks] { -FlagForDeletion = delete } } Edited June 16, 2023 by Tahvohck Patch worked yay Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 3, 2023 Author Share Posted July 3, 2023 Version 4.2.3 Fix the dll hashing when the dll is already opened. by @linuxgurugamer Fix for MM loading the wrong physics file when when when using the faulty PDLauncher workaround. @siimav ModuleManager-4.2.3.zip ModuleManager.4.2.3.dll Quote Link to comment Share on other sites More sharing options...
jediKatana Posted August 1, 2023 Share Posted August 1, 2023 Minor problem here, but I don't have the mental energy to search 304 pages for the answer. How do you edit all instances of a node? I'm trying to alter multiple copies of RCS modules (Bluedog Design Bureau often has more than one RCS per part) but the handbook just doesn't seem to explain it, or maybe I'm just too oblivious to comprehend. Quote Link to comment Share on other sites More sharing options...
mateusviccari Posted August 1, 2023 Share Posted August 1, 2023 (edited) 17 hours ago, jediKatana said: Minor problem here, but I don't have the mental energy to search 304 pages for the answer. How do you edit all instances of a node? I'm trying to alter multiple copies of RCS modules (Bluedog Design Bureau often has more than one RCS per part) but the handbook just doesn't seem to explain it, or maybe I'm just too oblivious to comprehend. I think this is what you need: @PART[*]:HAS[@MODULE[ModuleRCS*]:HAS[@PROPELLANT[MonoPropellant]]]:FOR[YourModName] { @MODULE[ModuleRCS*],* { //DoSomething } } The * after the comma targets all modules. You could also target by module order, like @MODULE[ModuleRCS*],0 or @MODULE[ModuleRCS*],1 Edited August 1, 2023 by mateusviccari Quote Link to comment Share on other sites More sharing options...
Astra Infinitum Posted August 4, 2023 Share Posted August 4, 2023 (edited) Sorry is this is a stupid question but is there a way that I can re-load edited/changed modulemanager configs in-game without having to exit and restart the entire game. To be clear lets say i have a patch im testing for tweakscale and i try a first option using xx module type, and that didnt work, so i re-write that patch using a xx module type and want to test if that takes care of the problem i need, but instead of having to save my game, exit, and close out KSP and then open and reload everything...... any way i can force my ksp to reload the config while i stay in the editor..... ya know... to save like 20 damn minutes lol. Let me also state that I have tried the CTRL+ALT F10 modmgr menu but it never seems to really workj right. Sooo... any ideas?? And for anyone that may post a reply or fix, will that work for any type of config using modulemanager syntax? As in, for any mod i can write configs/patches for using module manager syntax? What about Kopernicus? Or is that a whole other ballgame? Tbh I'd love to be able to refresh and reload stars and planets i work on without having to reboot game everytime Edited August 5, 2023 by Astra Infinitum Quote Link to comment Share on other sites More sharing options...
Starwaster Posted August 5, 2023 Share Posted August 5, 2023 @Astra Infinitum alt-F11 reload database is the way to do it, IIRC. Except that there was an issue where it messed up R&D configs. And even some part's might not re-initialize properly. It was enough of an issue that personally I just restarted my game. It's been quite awhile though so maybe the issues were resolved. (they were stock issues, not MM issues) Quote Link to comment Share on other sites More sharing options...
mateusviccari Posted August 5, 2023 Share Posted August 5, 2023 @Astra Infinitum You don't necessarily have to wait for the whole game to load. You can open ModuleManager.configCache from GameData as soon as the patches finish applying, then alt+f4 and look for one of the parts you are modifying. Even with heavy modded installs it shouldn't take than long to save the cache. Still not ideal but way less time consuming than waiting for the whole game to load. Quote Link to comment Share on other sites More sharing options...
Monniasza Posted August 26, 2023 Share Posted August 26, 2023 How do I get properties from a FSfuelSwitch module in a part? The following code does not work: @MODULE[FSfuelSwitch],*{ %testqty = #$resourceNames[0]$ @testqty = #$testqty[0,;]$ } @title = #$title$ $/MODULE[FSFuelSwitch]/resourceNames$ Quote Link to comment Share on other sites More sharing options...
Lisias Posted August 26, 2023 Share Posted August 26, 2023 6 minutes ago, Monniasza said: How do I get properties from a FSfuelSwitch module in a part? The following code does not work: @MODULE[FSfuelSwitch],*{ %testqty = #$resourceNames[0]$ @testqty = #$testqty[0,;]$ } @title = #$title$ $/MODULE[FSFuelSwitch]/resourceNames$ Well, module manager complained about: [ModuleManager] ERROR: Error - Cannot parse variable search when editing key title = #$title$ $/MODULE[FSFuelSwitch]/resourceNames$ So we know WHERE the problem is. Looking carefully on the pinpointed line, and knowing that MM didn't managed to parse the variable, besides the value being present on the Module, the problem should be so on the definition of the module - where I found you mistyped FSfuelSwitch to FSFuelSwitch. Fixing the typo will solve the problem (from the configcache): PART { name = FSdropTank <yada yada yada> title = FS3FD Fuel Drop Tank LiquidFuel;Oxidizer;MonoPropellant;ElectricCharge <yada yada yada> } MODULE { name = FSfuelSwitch resourceNames = LiquidFuel;Oxidizer;MonoPropellant;ElectricCharge resourceAmounts = 50;50;60;200 basePartMass = 0.25 tankMass = 0.5;0;0.1 testqty = LiquidFuel } Cheers! Quote Link to comment Share on other sites More sharing options...
Mancher Posted December 29, 2023 Share Posted December 29, 2023 Hello I am trying to edit this mod Science - Full Transmit @PART[*]:HAS[@MODULE:HAS[#experimentID[*]&#xmitDataScalar[<1]]] { @MODULE:HAS[#experimentID[*]&#xmitDataScalar[<1]] { // For each Module with an experimentID and a transmit penalty, adjust xmitDataScalar to eliminate the penalty. @xmitDataScalar = 1.0 } } It looks like it just takes any xmitDataScalar that's less than 1 and makes it 1, what I'd like to do is only apply this to experiments with an xmitDataScalar that's less than 1 AND greater than 0, that way it doesn't affect experiments that can't be transmitted at all like surface samples. Is there any way to do a double inequality like that? I couldn't find anything about it on the module manager wiki. Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted December 30, 2023 Share Posted December 30, 2023 (edited) On 12/29/2023 at 7:20 AM, Mancher said: Hello I am trying to edit this mod Science - Full Transmit It looks like it just takes any xmitDataScalar that's less than 1 and makes it 1, what I'd like to do is only apply this to experiments with an xmitDataScalar that's less than 1 AND greater than 0, that way it doesn't affect experiments that can't be transmitted at all like surface samples. Is there any way to do a double inequality like that? I couldn't find anything about it on the module manager wiki. You can just chain the conditions to get a range. @PART[*]:HAS[@MODULE:HAS[#experimentID[*]&#xmitDataScalar[>0]&#xmitDataScalar[<1]]] { @MODULE:HAS[#experimentID[*]&#xmitDataScalar[>0]&#xmitDataScalar[<1]] { // For each Module with an experimentID and a transmit penalty, adjust xmitDataScalar to eliminate the penalty. @xmitDataScalar = 1.0 } } Edit: NB Surface samples have a default xmitDataScalar value of 0.25 and so would still be affected by this patch. If you have another mod/patch that changes their xds to 0 then you may need to check the patch ordering to make sure that it is not overridden. Edited December 31, 2023 by Aelfhe1m added note about surface samples Quote Link to comment Share on other sites More sharing options...
Mancher Posted December 31, 2023 Share Posted December 31, 2023 @Aelfhe1m Works perfectly thanks a lot, good point about the surface sample though. Maybe I'll change that or just make the minimum transmission rate a little higher, doesn't need to be exactly zero I suppose. Either way thanks for the help. Quote Link to comment Share on other sites More sharing options...
Constel4cion Posted February 7 Share Posted February 7 Hi guys! Im trying to make a MM patch for a specific mod, engines are under performing using RSS mod, but the patch is messing with other mods and parts, so please can someone tell me how to fix this, this is what i got so far: Spoiler // Simple patch to scale thrust . @PART[*]:HAS[@MODULE[ModuleEngines*]]:NEEDS[BlueSteel]:FINAL { @MODULE[ModuleEngines*] { @maxThrust *= 1.7 @atmosphereCurve { @key[1, ] *= 1.7 @key,1[1, ] *= 1.7 @key,2[1, ] *= 1.7 } } } Thanks :^) Quote Link to comment Share on other sites More sharing options...
Kerb24 Posted February 7 Share Posted February 7 @Constel4cion The way your patch is written, the NEEDS:[BlueSteel] means that if BlueSteel is installed, it will apply the patch to ALL parts, not just the ones from BlueSteel. What you should do is check if the parts in BlueSteel have part names (not in game titles) that start with the same word (Like how all Bluedog Design Bureau part names start with bluedog) and then use a wild card. Example: Spoiler @PART[BlueSteel*]:HAS[@MODULE[ModuleEngines*]]:NEEDS[BlueSteel]:FINAL ---Rest of Patch This would theoretically apply the patch to all BlueSteel parts, if the part names started with BlueSteel. Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted February 8 Share Posted February 8 4 hours ago, Kerb24 said: @Constel4cion The way your patch is written, the NEEDS:[BlueSteel] means that if BlueSteel is installed, it will apply the patch to ALL parts, not just the ones from BlueSteel. What you should do is check if the parts in BlueSteel have part names (not in game titles) that start with the same word (Like how all Bluedog Design Bureau part names start with bluedog) and then use a wild card. Example: Hide contents @PART[BlueSteel*]:HAS[@MODULE[ModuleEngines*]]:NEEDS[BlueSteel]:FINAL ---Rest of Patch This would theoretically apply the patch to all BlueSteel parts, if the part names started with BlueSteel. Took a quick look at the Commonwealth Aeronautics "Blue Steel" mod on GitHub and the engines all seem to be named "blue_steel_engine_<whatever>" so the edit to the patch should be: Spoiler @PART[blue_steel_engine_*]:HAS[@MODULE[ModuleEngines*]]:NEEDS[BlueSteel]:FINAL ---Rest of Patch Quote Link to comment Share on other sites More sharing options...
Constel4cion Posted February 8 Share Posted February 8 21 hours ago, Kerb24 said: @Constel4cion The way your patch is written, the NEEDS:[BlueSteel] means that if BlueSteel is installed, it will apply the patch to ALL parts, not just the ones from BlueSteel. What you should do is check if the parts in BlueSteel have part names (not in game titles) that start with the same word (Like how all Bluedog Design Bureau part names start with bluedog) and then use a wild card. Example: Hide contents @PART[BlueSteel*]:HAS[@MODULE[ModuleEngines*]]:NEEDS[BlueSteel]:FINAL ---Rest of Patch This would theoretically apply the patch to all BlueSteel parts, if the part names started with BlueSteel. 17 hours ago, Aelfhe1m said: Took a quick look at the Commonwealth Aeronautics "Blue Steel" mod on GitHub and the engines all seem to be named "blue_steel_engine_<whatever>" so the edit to the patch should be: Hide contents @PART[blue_steel_engine_*]:HAS[@MODULE[ModuleEngines*]]:NEEDS[BlueSteel]:FINAL ---Rest of Patch Oh boy works just fine! Thanks a lot guys :^) Quote Link to comment Share on other sites More sharing options...
KspNoobUsernameTaken Posted April 9 Share Posted April 9 Hello, I am trying to access value 2 of a list, but there are multiple versions of the list itself, eg, (list, 1, 2), where we are looking for the second value in the first list. Can I chain together indices like that? For reference, this is the full patch: Spoiler @PART:HAS[@MODULE[ModuleB9PartSwitch]:HAS[#baseVolume,#baseVolume[>0]]]:FINAL { TEMPSTORAGE { v = #$../MODULE[ModuleB9PartSwitch,0]/baseVolume$ , #$../MODULE[ModuleB9PartSwitch,0]/baseVolume$ v = #$../MODULE[ModuleB9PartSwitch,1]/baseVolume$ , #$../MODULE[ModuleB9PartSwitch,1]/baseVolume$ v = #$../MODULE[ModuleB9PartSwitch,2]/baseVolume$ , #$../MODULE[ModuleB9PartSwitch,2]/baseVolume$ } @TEMPSTORAGE:HAS[#v[0],*[>0]] { @v:HAS[#v,0][>0]] { #v,0 -= 1 } -#v:HAS[v,0=0] MMPatchLoop {} } capacityFactor = #$../TEMPSTORAGE/v,1$ } Where I am trying to find the highest baseVolume value from all ModuleB9PartSwitch modules. Quote Link to comment Share on other sites More sharing options...
Delta 86 Posted April 10 Share Posted April 10 So I've found a patch to try and change a fuel cell from LF/OX to CRP's Hydrogen and Oxygen. Spoiler @PART[benjee10_shuttle_midFuselage]:NEEDS[CommunityResourcePack]:AFTER[Benjee10_shuttleOrbiter] { @MODULE[ModuleResourceConverter] { //Using FlowMode STAGE_PRIORITY_FLOW allows for a future EDO or using Universal Storage parts @INPUT_RESOURCE[LiquidFuel] { @ResourceName = Hydrogen @Ratio = 0.010 @FlowMode = STAGE_PRIORITY_FLOW } @INPUT_RESOURCE[Oxidizer] { @ResourceName = Oxygen @Ratio = 0.005 @FlowMode = STAGE_PRIORITY_FLOW } @OUTPUT_RESOURCE[ElectricCharge] { @Ratio = 7 @DumpExcess = false } OUTPUT_RESOURCE { ResourceName = Water Ratio = 0.000006599 DumpExcess = true } } } But for whatever reason, the only thing that changes is that the water output gets added, while neither the resources or ratios of the converter get changed. Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted April 10 Share Posted April 10 4 hours ago, Delta 86 said: So I've found a patch to try and change a fuel cell from LF/OX to CRP's Hydrogen and Oxygen. [SNIP] But for whatever reason, the only thing that changes is that the water output gets added, while neither the resources or ratios of the converter get changed. Try this instead: Spoiler @PART[benjee10_shuttle_midFuselage]:NEEDS[CommunityResourcePack]:AFTER[Benjee10_shuttleOrbiter] { @MODULE[ModuleResourceConverter] { //Using FlowMode STAGE_PRIORITY_FLOW allows for a future EDO or using Universal Storage parts @INPUT_RESOURCE:HAS[#ResourceName[LiquidFuel]] { @ResourceName = Hydrogen @Ratio = 0.010 @FlowMode = STAGE_PRIORITY_FLOW } @INPUT_RESOURCE:HAS[#ResourceName[Oxidizer]] { @ResourceName = Oxygen @Ratio = 0.005 @FlowMode = STAGE_PRIORITY_FLOW } @OUTPUT_RESOURCE:HAS[#ResourceName[ElectricCharge]] { @Ratio = 7 @DumpExcess = false } OUTPUT_RESOURCE { ResourceName = Water Ratio = 0.000006599 DumpExcess = true } } } The @NODE[value] selector is shorthand for @NODE:HAS[#name[value]]. If the identity field is called anything except "name" then the longer version is needed. NOTE: I only fixed the syntax in the patch and have not tested it. Quote Link to comment Share on other sites More sharing options...
Delta 86 Posted April 11 Share Posted April 11 43 minutes ago, Aelfhe1m said: The @NODE[value] selector is shorthand for @NODE:HAS[#name[value]]. If the identity field is called anything except "name" then the longer version is needed. NOTE: I only fixed the syntax in the patch and have not tested it. It worked like a charm, many thanks! At some point I grew desperate and just edited the parts themselves. Now I can adapt this to patch other parts. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.