blowfish Posted December 14, 2016 Share Posted December 14, 2016 48 minutes ago, uNiverselEgacy said: Is there a more detailed documentation of usage and examples than the GitHub wiki? I don't think so, unfortunately. This might help though: each file contains a node, a patch, and what the expected result of that patch should be. https://github.com/sarbian/ModuleManager/tree/master/Tests 47 minutes ago, uNiverselEgacy said: Anyway I have a question about multiple nodes with the same name such as the keys in atmosphereCurve. Is there an easy way to replace it with my own list of keys? I tried -atmosphereCurve{} to remove it and add a new atmosphereCurve afterwards but it doesn't seem to work very well. In some cases it worked as I intended but in other cases I got an Isp of 0 in game. That should work. Does everything look as it should in ModuleManager.ConfigCache? (that file contains the final state of all the configs in the game database after MM has patched them). If you show the patch you're using, we could take a look Quote Link to comment Share on other sites More sharing options...
paul23 Posted December 14, 2016 Share Posted December 14, 2016 (edited) Is there a way to run a patch if a part "contains either of these modules", ie: @PART[Tac*]:HAS[@RESOURCE[Food]|@RESOURCE[Water]|@RESOURCE[Oxygen]|@RESOURCE[Waste]|@RESOURCE[WasteWater]|@RESOURCE[CarbonDioxide]]:AFTER[ThunderAerospace] This runs fine on the parts that contain a food resource, whoever the resources that contain (say) oxygen but no food simply don't run this patch? Edited December 14, 2016 by paul23 Quote Link to comment Share on other sites More sharing options...
uNiverselEgacy Posted December 15, 2016 Share Posted December 15, 2016 6 hours ago, blowfish said: That should work. Does everything look as it should in ModuleManager.ConfigCache? (that file contains the final state of all the configs in the game database after MM has patched them). If you show the patch you're using, we could take a look I tried again and it worked this time. No idea why it didn't work yesterday. Good to know that I can just check that file to see the end result. Quote Link to comment Share on other sites More sharing options...
Alpha_Mike_741 Posted December 15, 2016 Share Posted December 15, 2016 So i'm doing some modifications to the mk1 pod and again i've run into some problems @mass+=0.210 // Instead of adding 210 kg to the part's mass i got 290 kg in editor! isn't += supposed to be like var=var+value ? Also += doesn't work with title and name, again instead of appending my string it replaces the original value for example somepart{ name=foo title= foo example part } @PART[somepart] { @name+=test @title+=improved } //both replace originals instead of appending , why? Quote Link to comment Share on other sites More sharing options...
Phineas Freak Posted December 15, 2016 Share Posted December 15, 2016 @Alpha_Mike_741 the first MM patch should work. Have you checked that the value of the mass of the original part is not modified by something else? The "+" math parameter also works only for...math. If you want to merge a string value to another then you need to use the following: @name ^=:$: Your Name String Value Goes Here @title ^=:$: Your Title String Value Goes Here Quote Link to comment Share on other sites More sharing options...
Alpha_Mike_741 Posted December 15, 2016 Share Posted December 15, 2016 (edited) @Nimrod I was playing around with Juno jet engine and i found this PROPELLANT { name = IntakeAir ignoreForIsp = True //THIS ratio = 22 } Haven't tested it though ---------------------------------------------- Can i use characters like \n in the description property? (Like description=line1 \n line2) Edited December 15, 2016 by Alpha_Mike_741 Had a question Quote Link to comment Share on other sites More sharing options...
ThePhoenixSol Posted December 19, 2016 Share Posted December 19, 2016 How come this is not putting the following parts in the node i specified? (the node is there, and works, the only issue is the parts not appearing) @Part[wingShuttle*|wingStrake] { @TechRequired = shuttleTech } Just now, ThePhoenixSol said: How come this is not putting the following parts in the node i specified? (the node is there, and works, the only issue is the parts not appearing) @Part[wingShuttle*|wingStrake] { @TechRequired = shuttleTech } oh my god. never mind, i just noticed the issue as i hit submit Quote Link to comment Share on other sites More sharing options...
alaykitty Posted December 21, 2016 Share Posted December 21, 2016 Hope I'm posting in the right thread... I can't for the life of me get this to actually perform correctly. I'm trying to select all parts by their given author property. @PART[*]:HAS[#author[Tantares],RESOURCE[LiquidFuel]]:FINAL { @RESOURCE[LiquidFuel] { @amount *= 2 @maxAmount *= 2 } } @PART[*]:HAS[#author[Tantares],RESOURCE[Oxidizer]]:FINAL { @RESOURCE[Oxidizer] { @amount *= 2 @maxAmount *= 2 } } Did I miss something obvious? Quote Link to comment Share on other sites More sharing options...
blowfish Posted December 21, 2016 Share Posted December 21, 2016 1 hour ago, alaykitty said: Hope I'm posting in the right thread... I can't for the life of me get this to actually perform correctly. I'm trying to select all parts by their given author property. Did I miss something obvious? For starters, you need @RESOURCE in the HAS block Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted December 21, 2016 Share Posted December 21, 2016 (edited) 3 hours ago, blowfish said: For starters, you need @RESOURCE in the HAS block Actually he can remove the resource check completely And put everything in a single patch Edited December 21, 2016 by Sigma88 Quote Link to comment Share on other sites More sharing options...
paul23 Posted December 21, 2016 Share Posted December 21, 2016 Is it possible to specify -or at least know- the order of patches within a single folder? Quote Link to comment Share on other sites More sharing options...
Numberyellow Posted December 21, 2016 Share Posted December 21, 2016 with 183 pages, i have no idea if this has been asked yet or not.. Installed ModuleManager, because KAX said it needed it. KAX works fine, except for a few little things i need to ask about in the KAX thread. My thing is this: Is it normal for ModuleManager to change vanilla stuff on it's own? I built a plane, before installing MM, i loaded the plane for launch after installing MM, and the engines fell off, and the plane bowed in the middle, like it was made of pool noodles. The parts in question are the Goliath engine, and the Structural fuselage, both vanilla parts. I was going to upload a log, but the log i'm supposed to upload (output log) hasn't been updated since February of last year (not sure what's up with that) Quote Link to comment Share on other sites More sharing options...
Jacke Posted December 21, 2016 Share Posted December 21, 2016 (edited) 1 hour ago, Numberyellow said: with 183 pages, i have no idea if this has been asked yet or not.. You should at least read the first post of a topic. Your answers are all in the first few lines. On 2013-10-25 at 7:01 AM, sarbian said: No logs => No support What is ModuleManager ModuleManager is mod that let you write patch file that edit other part at load time. With is you can edit squad (and other mod) part without overwriting their file. Module Manager doesn't change anything without having patch files ("something.cfg") written and put in GameData for it to read at KSP startup and change the data structures KSP loads from text config files loaded from GameData. However, almost every mod includes one or more of those patch files. It's likely KAX has them too. And follow the logs link to find out where to find the log files to upload. And if your log files aren't being written to, there's something wrong either with your KSP install or where you're think those log files should be. Edited December 21, 2016 by Jacke Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted December 21, 2016 Share Posted December 21, 2016 (edited) 1 hour ago, paul23 said: Is it possible to specify -or at least know- the order of patches within a single folder? if you read the log it contains a list of every applied patch (you might need to delete the cache and re-run KSP so that MM is forced to reapply all patches) the order of patches is defined by the parameters: :BEFORE[XXX] :FOR[XXX] :AFTER[XXX] :FINAL (and a few others that I will omit for simplicity) all patches without any of those tags will be applied first, then all patches that one of those tag will be applied with XXX ordered alphabetically (where XXX is usually the name of the mod) so if you have two patches, one with XXX = AwesomeMod and another with XXX = BadMod the one with AwesomeMod will run before and the one with BadMod will run after (because A comes before B) XXX is not case sensitive so AwesomeMod and AwEsOmEmOd are the same thing and of course, :BEFORE[AwesomeMod] will run before :FOR[AwesomeMod] which will run before :AFTER[AwesomeMod] and :FINAL will run last this is true for all patches, regardless of their position in GameData when two patches have the same tag (:AFTER[AwesomeMod]) they will be applied in alphabetical order depending on their address inside gamedata so. patches in GameData/CoolMod/CoolMod.cfg will run before patches in GameData/DecentMod/DecentMod.cfg (when they share the same tag) configs in a folder will run before configs in a subfolder, so: GameData/ExcellentMod/ExcellentMod.cfg will run before GameData/ExcellentMod/FabulousMod/FabulousMod.cfg be careful that linux and windows order upper case and lower case differently (I wasted a lot of time for this issue) also, please, don't ever call your mod AwEsOmEmOd Edited December 21, 2016 by Sigma88 Quote Link to comment Share on other sites More sharing options...
paul23 Posted December 21, 2016 Share Posted December 21, 2016 But there's no way to make two patch files -independently of other patches (it doesn't need those)- run in your own specified order? Say I have: stock_balances.cfg and extra_stock_balances.cfg - the extra balancing builds upon the standard balancing (IE it doubles some values where the main balancing sets initial costs). I'd have to prefix those names with something to make them ordered correctly? That's a shame, but I can live with that I guess. Quote Link to comment Share on other sites More sharing options...
Numberyellow Posted December 21, 2016 Share Posted December 21, 2016 (edited) 1 hour ago, Jacke said: You should at least read the first post of a topic. Your answers are all in the first few lines. Module Manager doesn't change anything without having patch files ("something.cfg") written and put in GameData for it to read at KSP startup and change the data structures KSP loads from text config files loaded from GameData. However, almost every mod includes one or more of those patch files. It's likely KAX has them too. And follow the logs link to find out where to find the log files to upload. And if your log files aren't being written to, there's something wrong either with your KSP install or where you're think those log files should be. I did read the first post. What you quoted doesn't answer my question. I was looking for information on the behavior of the plugin, to see if it was possible that either it did something it wasn't supposed to, or i had installed something incorrectly. KAX does have a CFG file for MM....it's a handful of lines, for compatibility with FAR. As to the logs thing....i do actually look around for information before i ask questions, because i prefer to figure things out for myself...And because i hate people assuming i'm unintelligent, because i'm asking a "stupid question". Edited December 21, 2016 by Numberyellow missing words Quote Link to comment Share on other sites More sharing options...
Jacke Posted December 21, 2016 Share Posted December 21, 2016 54 minutes ago, paul23 said: But there's no way to make two patch files -independently of other patches (it doesn't need those)- run in your own specified order? Say I have: stock_balances.cfg and extra_stock_balances.cfg - the extra balancing builds upon the standard balancing (IE it doubles some values where the main balancing sets initial costs). I'd have to prefix those names with something to make them ordered correctly? You'll have to test this, but I think this might work: In stock_balances.cfg, on the first level instructions ("@PART...") include: :FOR[stock_balances] which identifies changes with that :FOR tag as being part of the mod "stock_balances". And in extra_stock_balances.cfg, include: :AFTER[stock_balances] which flags changes with that :FOR tag to take effect after mod "stock_balances". Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted December 21, 2016 Share Posted December 21, 2016 1 hour ago, paul23 said: But there's no way to make two patch files -independently of other patches (it doesn't need those)- run in your own specified order? Say I have: stock_balances.cfg and extra_stock_balances.cfg - the extra balancing builds upon the standard balancing (IE it doubles some values where the main balancing sets initial costs). I'd have to prefix those names with something to make them ordered correctly? That's a shame, but I can live with that I guess. use different tags, or use different names for the files so that they run in the order you intend them to Quote Link to comment Share on other sites More sharing options...
Numberyellow Posted December 21, 2016 Share Posted December 21, 2016 I checked the 7 mods i have installed for MM config files, found nothing about modifying stock parts, so i decided to comb through the config files that MM generated in the gamedata folder. In the ModuleManager.ConfigCache file, i found this: } UrlConfig { name = Mk1FuselageStructural type = PART parentUrl = Squad/Parts/Structural/mk1Parts/mk1Structural url = Squad/Parts/Structural/mk1Parts/mk1Structural/Mk1FuselageStructural PART { name = Mk1FuselageStructural module = Part author = Porkjet rescaleFactor = 1 node_stack_top = 0.0, 0.9375, 0.0, 0.0, 1.0, 0.0 node_stack_bottom = 0.0, -0.9375, 0.0, 0.0, -1.0, 0.0 node_attach = 0.0, 0.0, -0.625, 0.0, 0.0, 1.0, 1 TechRequired = generalConstruction entryCost = 2500 cost = 380 category = Structural subcategory = 0 title = Structural Fuselage manufacturer = C7 Aerospace Division description = A standard fuselage. Carries no fuel; is there merely as a structural element. As such, it's lighter and more solid due to reinforcements. attachRules = 1,1,1,1,0 mass = 0.1 dragModelType = default maximum_drag = 0.2 minimum_drag = 0.3 angularDrag = 2 crashTolerance = 10 breakingForce = 50 breakingTorque = 50 maxTemp = 2000 fuelCrossFeed = True bulkheadProfiles = size1, srf tags = aircraft airplane hollow jet mk1 pipe plane tube DRAG_CUBE { cube = Default, 2.418281,0.7749683,0.6994118, 2.418281,0.7749683,0.6994118, 1.213026,0.9717144,0.1341177, 1.213026,0.9717144,0.1341177, 2.418281,0.7723047,0.6994124, 2.418281,0.7723256,0.6994124, 0,0,0, 1.25,1.937501,1.250001 } MODEL { model = Squad/Parts/Structural/mk1Parts/StructuralHollow } } This is one of the parts that is now acting wonky. Now, again, i'm trying to understand how this plugin works...so bear with me. It patched 210 nodes..now is this something it does all on it's own, when it runs for the first time? It seems to have catalogued and patched ALL the parts in my install. I also found an entry for the J-90 turbofan (the engine that simply fell off on the runway) How do the values in this entry, differ from the stock values? Why does MM do this, and why does it generate a physics file? There's also a ModuleManager.ConfigSHA file, which has a list of parts, followed by a string of hexadecimal numbers...what does this file do? what does it all mean? Quote Link to comment Share on other sites More sharing options...
Jacke Posted December 21, 2016 Share Posted December 21, 2016 (edited) 1 hour ago, Numberyellow said: What you quoted doesn't answer my question. They did. The Module Manager topic first post explains what Module Manager does. Skimming the last few pages of this topic would show no problems with Module Manager itself. Module Manager itself is mature stable functional code. The problem isn't Module Manager. The "How to get support for modded installs" topic first post covers a lot of the common sources of problems and describes where the logs are. If you're running KSP under Windows, one of either the 32-bit or the 64-bit output log will be updated every time you run KSP. The logs are needed to have any certain hope of tracking down what happened and why things went wrong. As your problem is with a specific craft, the .craft file may be needed too. Your craft likely fell apart because adding in Module Manager caused another mod's config script to run and the changes broke it. Or something is broken in your KSP install, perhaps another mod, and it just showed up when you loaded your craft. The logs could help narrow down where the problem is. If you need more assistance, you can PM me with some more details of your KSP install and I'll try to help you track down the problems you're having, including no sound from the engines. Edited December 21, 2016 by Jacke Quote Link to comment Share on other sites More sharing options...
Jacke Posted December 21, 2016 Share Posted December 21, 2016 (edited) 55 minutes ago, Numberyellow said: I checked the 7 mods i have installed for MM config files, found nothing about modifying stock parts, so i decided to comb through the config files that MM generated in the gamedata folder. .... what does it all mean? That's Module Manager doing its job: to read the .cfg files from other mods. Those other mods want to change the numbers or other information in KSP or other KSP mods. Instead of modifying the original files in GameData, added .cfg scripts give instructions on how to change the values as they are stored in memory. That leads to 210 nodes being changed, "patched", by the changes those other mods want. In the process, Module Manager writes out bookkeeping files for its own use. For example, ModuleManager.ConfigCache is used by MM to store its internal record of all those changes it read. On the next load of KSP, if none of the MM .cfg scripts (provided in other mods) have changed, instead of scanning all those scripts, MM loads its cache of the changes and uses it, which is a lot faster. All those parts got changed by MM because at least one of the other 7 mods provided a MM script to do so. At least one of them should list MM as a required mod for it to work. Edited December 21, 2016 by Jacke Quote Link to comment Share on other sites More sharing options...
Numberyellow Posted December 21, 2016 Share Posted December 21, 2016 45 minutes ago, Jacke said: They did. The Module Manager topic first post explains what Module Manager does. Skimming the last few pages of this topic would show no problems with Module Manager itself. Module Manager itself is mature stable functional code. The problem isn't Module Manager. The "How to get support for modded installs" topic first post covers a lot of the common sources of problems and describes where the logs are. If you're running KSP under Windows, one of either the 32-bit or the 64-bit output log will be updated every time you run KSP. The logs are needed to have any certain hope of tracking down what happened and why things went wrong. As your problem is with a specific craft, the .craft file may be needed too. Your craft likely fell apart because adding in Module Manager caused another mod's config script to run and the changes broke it. Or something is broken in your KSP install, perhaps another mod, and it just showed up when you loaded your craft. The logs could help narrow down where the problem is. If you need more assistance, you can PM me with some more details of your KSP install and I'll try to help you track down the problems you're having, including no sound from the engines. I managed to fix the sound issue...turns out i dropped the bits from the mod in the wrong place (stupid mistake). Though, there's another weird sound issue with that mod...but yeah, i'll save that for PM. Thanks for offering to help me out, i appreciate that, and i'll send you a PM tomorrow, as i will be needing to go to bed soon (i work nights). Lemme know exactly what details you'd want, and i'll send them over to you, and perhaps we can figure this one out. as to the logs...man, that's the weird bit. KSP/KSP_Data/Output_log.txt The file properties say it hasn't been updated since 25 FEB, 2015. Looking at the contents, it's still listing an old unity engine version, and my old video card, that i had at the time.KSP.log, in the root KSP folder, though, IS updating whenever i play...however, it doesn't contain the same data as the output log. Not sure what's up with that. Was going over the mods again...it's possible one of the config files from KPBS (which i missed earlier) may have broken my plane. ugh...Yeah, I'll send you a PM. Quote Link to comment Share on other sites More sharing options...
Numberyellow Posted December 21, 2016 Share Posted December 21, 2016 32 minutes ago, Jacke said: That's Module Manager doing its job: to read the .cfg files from other mods. Those other mods want to change the numbers or other information in KSP or other KSP mods. Instead of modifying the original files in GameData, added .cfg scripts give instructions on how to change the values as they are stored in memory. That leads to 210 nodes being changed, "patched", by the changes those other mods want. In the process, Module Manager writes out bookkeeping files for its own use. For example, ModuleManager.ConfigCache is used by MM to store its internal record of all those changes it read. On the next load of KSP, if none of the MM .cfg scripts (provided in other mods) have changed, instead of scanning all those scripts, MM loads its cache of the changes and uses it, which is a lot faster. All those parts got changed by MM because at least one of the other 7 mods provided a MM script to do so. At least one of them should list MM as a required mod for it to work. So then, the config cache file is just an index of modified values, and MM sideloads it, in place of the stock values, at startup? The only mod that i saw having a dependency on MM, was KAX, which was the only reason i installed it. I'm starting to regret that, as the parts KAX provides, while cool, aren't worth this headache. The plane i'm salty about, took me over 20 hours to design, build, test, and tweak...it was ready for it's intended mission, and now it's essentially a balloon animal. Quote Link to comment Share on other sites More sharing options...
Jacke Posted December 21, 2016 Share Posted December 21, 2016 (edited) After this, please PM me, @Numberyellow. This is starting to get away from Module Manager. 1 hour ago, Numberyellow said: KSP/KSP_Data/Output_log.txt The file properties say it hasn't been updated since 25 FEB, 2015. Looking at the contents, it's still listing an old unity engine version, and my old video card, that i had at the time.KSP.log, in the root KSP folder, though, IS updating whenever i play...however, it doesn't contain the same data as the output log. Not sure what's up with that. That's the KSP Windows 32-bit log. If you're running 64-bit (KSP_x64.exe), the active log is KSP_x64_Data/output_log.txt. Prior to KSP 1.1, the Window 64-bit program was full of stock bugs and almost unusable. You were probably running 32-bit back in 2015 and 64-bit now. 1 hour ago, Numberyellow said: So then, the config cache file is just an index of modified values, and MM sideloads it, in place of the stock values, at startup? Exactly, except I think the cache is the patches to stock KSP and stock mods. KSP loads the stock values, then MM gets its pass. Using the cache of patches is a lot faster, but MM can only use it when it checks that all *.cfg files in GameData (outside of PluginData subdirectories) are unchanged. Any of them changed (like a mod's own config file it didn't call anything but .cfg or hide away in its PluginData subdirectory) and it reads and processes all those .cfg files, which takes a while. Quote The only mod that i saw having a dependency on MM, was KAX, which was the only reason i installed it. I'm starting to regret that, as the parts KAX provides, while cool, aren't worth this headache. The plane i'm salty about, took me over 20 hours to design, build, test, and tweak...it was ready for it's intended mission, and now it's essentially a balloon animal. I looked at KAX and I think you've called it right. It only got a KSP 1.2.x version out today, and it has a few issues already noted. I suspect there's more, especially with all the big changes that happened in KSP 1.2 (and maybe some from 1.1 that KAX didn't properly deal with yet). Edited December 21, 2016 by Jacke Quote Link to comment Share on other sites More sharing options...
captinjoehenry Posted December 22, 2016 Share Posted December 22, 2016 Is there anyway to check if a part has module a but does not have module b with this? I want to add an ablator module to every part that has a ModuleLiftingSurface but if a part also has a ModuleAblator already I do not want to add the new ablator to that part. 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.