Hyphen Posted July 28, 2013 Share Posted July 28, 2013 I have a question.Is there any way for ModuleManager to outright prevent a part from loading?For example: To get rid rid of unused stock parts, without having to pick through KSP_win/GameData/Squad every time an update is installed. Link to comment Share on other sites More sharing options...
Frederf Posted July 28, 2013 Share Posted July 28, 2013 I have a question.Is there any way for ModuleManager to outright prevent a part from loading?For example: To get rid rid of unused stock parts, without having to pick through KSP_win/GameData/Squad every time an update is installed.Ooooooo. That's clever. If not loading a part means lowering the memory footprint having a simple text-only "part library management" tool is possible. Link to comment Share on other sites More sharing options...
somnambulist Posted July 28, 2013 Share Posted July 28, 2013 (edited) I have a question.Is there any way for ModuleManager to outright prevent a part from loading?For example: To get rid rid of unused stock parts, without having to pick through KSP_win/GameData/Squad every time an update is installed.Not at my home computer so I can't test it, but I wonder if something as simple as@PART[partname]{ !mesh}would keep the game from loading the mesh and therefore the part.EDIT. OK tested it. The above does not work. The following will remove the part from the parts list but the game still loads the mesh@PART[part]{!mesh = model.mu MODEL { // model path can be blank or point somewhere else. model = }}If you want to just de-clutter your parts list, this will work but it won't do anything about RAM use. Edited July 28, 2013 by somnambulist !!SCIENCE!! Link to comment Share on other sites More sharing options...
Frederf Posted July 28, 2013 Share Posted July 28, 2013 Textures are likely the largest source of RAM usage. Link to comment Share on other sites More sharing options...
somnambulist Posted July 29, 2013 Share Posted July 29, 2013 Textures are likely the largest source of RAM usage.It's still loading the texture as well. Link to comment Share on other sites More sharing options...
Llorx Posted August 1, 2013 Share Posted August 1, 2013 I read somewhere that part loader first will try to load "model.mu" as default, altough is not defined as mesh, and "model.mu" has the textures too (in an external file most of the times, but loads them). Link to comment Share on other sites More sharing options...
Crater Posted August 1, 2013 Share Posted August 1, 2013 I read somewhere that part loader first will try to load "model.mu" as default, altough is not defined as mesh, and "model.mu" has the textures too (in an external file most of the times, but loads them).Current behaviour is that the part loader recursed through GameData (and the legacy folders), loading all DLLs, Sounds, Textures, Models, Config files. All in that order. It then compiles the part-configs and builds the catalog in memory.This is in accordance with how Mu described it, and can also be plainly seen if you take a look at KSP_Win\KSP.log after loading the game up.Basically, it will suck in anything and everything in those folders that has a file extension that it recognises, whether it is going to be needed or not.So the only way to reduce memory footprint (at the moment) would be to delete the files from disk so they never load.Pity, coz it would be awesome to be able to do it with MM. Link to comment Share on other sites More sharing options...
Llorx Posted August 1, 2013 Share Posted August 1, 2013 (edited) Current behaviour is that the part loader recursed through GameData (and the legacy folders), loading all DLLs, Sounds, Textures, Models, Config files. All in that order. It then compiles the part-configs and builds the catalog in memory.This is in accordance with how Mu described it, and can also be plainly seen if you take a look at KSP_Win\KSP.log after loading the game up.Basically, it will suck in anything and everything in those folders that has a file extension that it recognises, whether it is going to be needed or not.So the only way to reduce memory footprint (at the moment) would be to delete the files from disk so they never load.Pity, coz it would be awesome to be able to do it with MM.Now I remember where I read it. In PartTools post for the version 0.15, yeah, a bit outdated lol: http://forum.kerbalspaceprogram.com/showthread.php/10346-0-15-PartTools-New-model-toolsBtw, yes, it loads all the models before loading configs so I told nothing. Thanx for clarifying. Edited August 1, 2013 by Llorx Link to comment Share on other sites More sharing options...
AlmightyR Posted August 2, 2013 Share Posted August 2, 2013 You can absolutely do this, but you have to replace all the values instead of adding new ones. You'd do the following:@MODULE[TracksMain] { @TorqueCurve { @key,0 = -15 -1 // changed from -20 0 @key,1 = -12 -0.5 // changed from -10 0.5 @key,2 = 10 0 // changed from 0 15 @key,3 = 15 0.5 // changed from 10 0.5 @key,4 = 30 1 // changed from 40 0 } }Ohhh! Thanks for the enlightenment! I will put it to good use! *goes off on a caterpillar tracks mod customization rampage* Link to comment Share on other sites More sharing options...
Benzschwagel Posted August 10, 2013 Share Posted August 10, 2013 ialdabaoth, I'd like to make a request that the initial post be updated to confirm current KSP version compatibility as well as other relevant items, such as the new licensing. Please? Thank you. Link to comment Share on other sites More sharing options...
CreationMe Posted August 12, 2013 Share Posted August 12, 2013 Is there maybe a way to change all parts instead of the selected ones? I want to add a module to pretty much all parts and since I have a lot of them I don't feel like making hundreds of @parts[], or is there a quicker way. (New to this mod) Link to comment Share on other sites More sharing options...
Crater Posted August 12, 2013 Share Posted August 12, 2013 Is there maybe a way to change all parts instead of the selected ones? I want to add a module to pretty much all parts and since I have a lot of them I don't feel like making hundreds of @parts[], or is there a quicker way. (New to this mod)Kind of - there is an extension to ModuleManager that allows the use of wildcards.http://forum.kerbalspaceprogram.com/showthread.php/41616-Extension-for-ModuleManager-with-wildcard-and-conditional-v0-2-24-july-2013?highlight=modulemanager+wildcardWith that, you could specify "all parts", or "everything with a command pod" or "every fuel tank that doesn't have RCS"It is seriously powerful. Link to comment Share on other sites More sharing options...
CreationMe Posted August 12, 2013 Share Posted August 12, 2013 Thank you very much for you quick reply =] I'll check it out. For those interesting to know, I am adding the grab/attach from KAS to all my parts so I can make a ship or anything basically I want in EVA. Useful if you forgot to add something to your rocket as I often do. Or if a connection failed after lading but not destroyed the part =] Link to comment Share on other sites More sharing options...
Starwaster Posted August 13, 2013 Share Posted August 13, 2013 Thank you very much for you quick reply =] I'll check it out. For those interesting to know, I am adding the grab/attach from KAS to all my parts so I can make a ship or anything basically I want in EVA. Useful if you forgot to add something to your rocket as I often do. Or if a connection failed after lading but not destroyed the part =]Yeah, who needs VAB! Link to comment Share on other sites More sharing options...
Van Disaster Posted August 16, 2013 Share Posted August 16, 2013 An issue with the current core version: MODEL{} nodes don't have name entries ( nor do ATTACH{} nodes? ), example here:MODEL{ model = Extraplanetary Launchpads/Parts/smelter/model position = 0, -1.2, 0 scale = 1.83, 1.83, 1.83 rotation = 0, 0, 0 texture = model000, model001} Having read the source, there's no way to match that. The model is the unique key. I am also wondering about the syntax to match the "Ore = 3" line in here - this may not actually be unique to the entire module entry and technically it's in a sub-part anyway?MODULE{ name = KethaneConverter InputRates { Ore = 3 ElectricChage = 10 } OutputRatios { Metal = 0.699431 }}@MODULE[KethaneConverter]{??? @Ore = 2}I can't see how to step down the nesting there. Deleting the entire module entry & adding a new one seems the only way to do it at the moment.Am I missing something? Link to comment Share on other sites More sharing options...
Starwaster Posted August 18, 2013 Share Posted August 18, 2013 (edited) An issue with the current core version: MODEL{} nodes don't have name entries ( nor do ATTACH{} nodes? ), example here:MODEL{ model = Extraplanetary Launchpads/Parts/smelter/model position = 0, -1.2, 0 scale = 1.83, 1.83, 1.83 rotation = 0, 0, 0 texture = model000, model001} Having read the source, there's no way to match that. The model is the unique key. I am also wondering about the syntax to match the "Ore = 3" line in here - this may not actually be unique to the entire module entry and technically it's in a sub-part anyway?MODULE{ name = KethaneConverter InputRates { Ore = 3 ElectricChage = 10 } OutputRatios { Metal = 0.699431 }}@MODULE[KethaneConverter]{??? @Ore = 2}I can't see how to step down the nesting there. Deleting the entire module entry & adding a new one seems the only way to do it at the moment.Am I missing something?@MODULE[KethaneConverter]{ @InputRates { @Ore = 2 }}I think that should do it.Also, for the first one, just do:@MODEL{ @model = something} Edited August 18, 2013 by Starwaster Link to comment Share on other sites More sharing options...
Van Disaster Posted August 19, 2013 Share Posted August 19, 2013 @MODEL{ @model = something}That is either going to change every MODEL node or just the first ( I'm having to pretend C# is some version of C-like I know, so I'm not really sure what it's doing yet ); there's no indexing for nodes, just tags, so you can't pick a specific node unless it has a name entry. I'll try the second with a complicated node structure & see if that works. Link to comment Share on other sites More sharing options...
Starwaster Posted August 19, 2013 Share Posted August 19, 2013 There is no every MODEL. Each part only has one. That is supposed to go inside @PART{...}Sorry I thought that was understood.If there were multiples though @MODEL,0 might work... that's how you handle extra keys.Edit: the plugin might be C# but this isn't. Think of this as an interpreted script. Link to comment Share on other sites More sharing options...
Van Disaster Posted August 19, 2013 Share Posted August 19, 2013 You can have multiple MODEL entries: this mod makes full use of that. I still don't think indexing nodes is going to work ( or if it does you'd have to put the entire node contents in rather than modifying part of the contents ), but I'll go and investigate the API more before anything else about that.I know the config files aren't C#, I've been trying to decypher the plugin source. Link to comment Share on other sites More sharing options...
johnsonwax Posted August 20, 2013 Share Posted August 20, 2013 Is there a straightforward/preferred way to disable a part from loading? For example, I've got at least 3 separate sets of fairings from different mods, but I really only want to use procedural fairings, so I'd like to stop the others from loading without having to physically disrupt the module sets.If there isn't a clear way to do that, is that a feature you could add? Link to comment Share on other sites More sharing options...
Frederf Posted August 20, 2013 Share Posted August 20, 2013 From discussion before it's possible to make a part not listed in the VAB but it will still load the assets which has the penalties of loading time and RAM usage. Link to comment Share on other sites More sharing options...
Van Disaster Posted August 20, 2013 Share Posted August 20, 2013 Is there a straightforward/preferred way to disable a part from loading? For example, I've got at least 3 separate sets of fairings from different mods, but I really only want to use procedural fairings, so I'd like to stop the others from loading without having to physically disrupt the module sets.If there isn't a clear way to do that, is that a feature you could add?To summarise: resources are loaded, and then cfgs, and then the part is built. If you unreference resources ( like images ) from cfgs they'll still be in memory - your best bet is to make/persuade someone to build an out-of-game tool to disable particular parts. I'm not sure if you can unload resources once the game is running - I assume not because I'm sure someone would have made a mod to dump currently unused resources by now - so I don't think there's much point in being able to do it in game.I've been doing it by making frankenstein ships of parts I don't want, saving them as subassembly craft files and then parsing those to find out which cfg/mu/image files to rename. Good for doing multiple parts, not so good for one at a time. Link to comment Share on other sites More sharing options...
johnsonwax Posted August 20, 2013 Share Posted August 20, 2013 your best bet is to make/persuade someone to build an out-of-game tool to disable particular parts.Ok. Was hoping to avoid that. I'll probably write it then. In order to avoid breakage, I'd probably hang off the same format as used by ModuleManager and simply zip the contents of the part folders I don't want loaded. That way modules will still update cleanly. I would just need to run my tool after each update. Link to comment Share on other sites More sharing options...
KerbMav Posted August 26, 2013 Share Posted August 26, 2013 (edited) Is there a straightforward/preferred way to disable a part from loading? Delete them ... ?But I have a question myself: Does this ModMan - as far as I read it does? - only add a call to the parts a mod would change, adding the needed modules to them, so that if the part changing mod is updated ModMan still works without updating the dll? Edited August 26, 2013 by KerbMav Link to comment Share on other sites More sharing options...
Starwaster Posted August 29, 2013 Share Posted August 29, 2013 Delete them ... ?But I have a question myself: Does this ModMan - as far as I read it does? - only add a call to the parts a mod would change, adding the needed modules to them, so that if the part changing mod is updated ModMan still works without updating the dll?Correct. Ialdabaoth has stated that barring any breakage due to future KSP updates or discovery of show stopping bugs, there will be no further updates to ModuleManager. Link to comment Share on other sites More sharing options...
Recommended Posts