xD-FireStriker Posted June 1, 2016 Share Posted June 1, 2016 8 hours ago, blowfish said: 2.6.20 was the last version for 1.0.5. You can find it here. thanks Quote Link to comment Share on other sites More sharing options...
chrisl Posted June 4, 2016 Share Posted June 4, 2016 If you wanted to delete all resources from a part, shouldn't "!RESOURCE[*]{}" work? Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 4, 2016 Share Posted June 4, 2016 1 hour ago, chrisl said: If you wanted to delete all resources from a part, shouldn't "!RESOURCE[*]{}" work? I think that would only remove the first resource. !RESOURCE,* {} should work Quote Link to comment Share on other sites More sharing options...
dboi88 Posted June 4, 2016 Share Posted June 4, 2016 Hello, I'm having a little trouble working out how to create a new part using an MM patch. I want to duplicate the two Ore Holding Tanks and then change the resource it holds. So in game i'll have the two ore tanks PLUS two copies that hold a different resource. Is this possible? Cheers Quote Link to comment Share on other sites More sharing options...
Enceos Posted June 4, 2016 Share Posted June 4, 2016 (edited) @sarbian I have a patch which was working nicely with MM 2.6.24, but version 2.6.25 says that it has errors: My patch: @PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel]] { %node_stack_root = #$node_attach$ @attachRules = 1,1,0,0,1 @bulkheadProfiles = size1, srf } The excerpt from the outputlog.txt [ModuleManager] Errors in patch prevents the creation of the cache [ModuleManager] ModuleManager: 10689 patches applied, found 7 errors 7 errors related to GameData/_MyMods_/AttachmentNodes.cfg Is there something I can do to make it work? Edited June 4, 2016 by Enceos Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted June 4, 2016 Share Posted June 4, 2016 6 minutes ago, Enceos said: @sarbian I have a patch which was working nicely with MM 2.6.24, but version 2.6.25 says that it has errors: My patch: @PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel]] { %node_stack_root = #$node_attach$ @attachRules = 1,1,0,0,1 @bulkheadProfiles = size1, srf } The excerpt from the outputlog.txt [ModuleManager] Errors in patch prevents the creation of the cache [ModuleManager] ModuleManager: 10689 patches applied, found 7 errors 7 errors related to GameData/_MyMods_/AttachmentNodes.cfg How do I make my patch work? That part of the log is useless But I bet your error stems from the fact that you want to copy "node_attach" but you don't check if that value actually exists Try using this: @PART[*]:HAS[#node_attach[*],@MODULE[ModuleDeployableSolarPanel]] Not sure if the underscore might mess it up tho Quote Link to comment Share on other sites More sharing options...
DStaal Posted June 4, 2016 Share Posted June 4, 2016 I'm trying to read something from one place and put it into another, and getting errors about interpolating variables. Simplified example case: // File 1 PART { // Standard part stuff MODULE { name = Container_Solids objectNames = Kontainer baseVolume = 160000 } } // File 2 @PART[*]:HAS[@MODULE[Container_Solids]] { @MODULE[Container_Solids] { &halfVolume = #$baseVolume$ // No errors here @halfVolume *= 0.5 } MODULE { name = testing_module objectNames = #$/@MODULE[Container?Solids]/objectNames$ // Error interpolating value here. } } I've also tried with an underscore, and using `#$/Container_Solids/objectNames$`, as well as using relative paths (`../`) instead of absolute. Is there a way to do this? Quote Link to comment Share on other sites More sharing options...
DarkonZ Posted June 4, 2016 Share Posted June 4, 2016 Unfortunately, I've read enough stuff on MM and it doesn't seem to be making much sense. My only defense here is that I'm a newbie or just plain dumb. I'd go with the latter. My question refers to parts and how that's handled. I'll also refer to these two mods in particular Kerbalism + Universal Storage (<- this is tied to TACLS). Granted, US is well known and famous, but Kerbalism just showed up on the LS playing field. Within Kerbalism is a profile system that lets users pick and choose how the mod behaves (All of which follow MM protocal). Currently, mod devs are supporting only the Kerbalism default profile, and that is how it should be, but things go awry when using any other profile. I'll try and keep this as brief as possible: So when I have kerbalism with the 'realism' profile as well as US, the food bag doesn't show up. I'd assume its because of this line in US part config: (Part name is US_1R320_Wedge_Food) PART:NEEDS[TacLifeSupport|IFILifeSupport|Snacks|USILifeSupport] < It's at the very top of the file. Is there any way I can bypass that line and make the part show up regardless of its needs? Maybe some way to make it happen before US kicks in? Or is altering the US part file the only way to do this? Also, I don't want to use MM trickery with @Kerbalism:FOR[TacLifeSupport] {}, cuz that opens up a huge can of worms. None of which Kerbalism deals with properly. Any suggestions appreciated, Thanks Quote Link to comment Share on other sites More sharing options...
Enceos Posted June 4, 2016 Share Posted June 4, 2016 6 hours ago, Sigma88 said: That part of the log is useless But I bet your error stems from the fact that you want to copy "node_attach" but you don't check if that value actually exists Try using this: @PART[*]:HAS[#node_attach[*],@MODULE[ModuleDeployableSolarPanel]] Not sure if the underscore might mess it up tho You know what, that totally works. And you're awesome! Quote Link to comment Share on other sites More sharing options...
chrisl Posted June 5, 2016 Share Posted June 5, 2016 23 hours ago, blowfish said: I think that would only remove the first resource. !RESOURCE,* {} should work Thanks. It seems like that is working for me. Quote Link to comment Share on other sites More sharing options...
DStaal Posted June 5, 2016 Share Posted June 5, 2016 11 hours ago, DStaal said: I'm trying to read something from one place and put it into another, and getting errors about interpolating variables. Simplified example case: // File 1 PART { // Standard part stuff MODULE { name = Container_Solids objectNames = Kontainer baseVolume = 160000 } } // File 2 @PART[*]:HAS[@MODULE[Container_Solids]] { @MODULE[Container_Solids] { &halfVolume = #$baseVolume$ // No errors here @halfVolume *= 0.5 } MODULE { name = testing_module objectNames = #$/@MODULE[Container?Solids]/objectNames$ // Error interpolating value here. } } I've also tried with an underscore, and using `#$/Container_Solids/objectNames$`, as well as using relative paths (`../`) instead of absolute. Is there a way to do this? Oh, just to add the relevant line from the log appears to be: [LOG 15:21:42.730] [ModuleManager] Error - Cannot parse variable search when inserting new key objectNames = #$/@MODULE[Container?Solids]/objectNames$ I can post more of the log if you want, but as far as I can tell that's the only place it mentions anything on this. (Besides the line saying there was 1 error in $hugenum$ patches.) Quote Link to comment Share on other sites More sharing options...
sarbian Posted June 6, 2016 Author Share Posted June 6, 2016 You don't need the @ here. #$/MODULE[Container?Solids]/objectNames$ Quote Link to comment Share on other sites More sharing options...
DStaal Posted June 6, 2016 Share Posted June 6, 2016 6 hours ago, sarbian said: You don't need the @ here. #$/MODULE[Container?Solids]/objectNames$ Thanks. I didn't want to keep trying things at random. Quote Link to comment Share on other sites More sharing options...
dboi88 Posted June 11, 2016 Share Posted June 11, 2016 On 6/4/2016 at 11:21 AM, dboi88 said: Hello, I'm having a little trouble working out how to create a new part using an MM patch. I want to duplicate the two Ore Holding Tanks and then change the resource it holds. So in game i'll have the two ore tanks PLUS two copies that hold a different resource. Is this possible? Cheers Hi guy's i still can't work this out. Does anyone know if this is possible? Quote Link to comment Share on other sites More sharing options...
Starwaster Posted June 11, 2016 Share Posted June 11, 2016 On 6/4/2016 at 6:21 AM, dboi88 said: Hello, I'm having a little trouble working out how to create a new part using an MM patch. I want to duplicate the two Ore Holding Tanks and then change the resource it holds. So in game i'll have the two ore tanks PLUS two copies that hold a different resource. Is this possible? Cheers +PART[PartName] { // You must rename the new part @name = NewPartName // Delete the Ore resource !RESOURCE[Ore]{} // Add your new resources here } Quote Link to comment Share on other sites More sharing options...
CoriW Posted June 11, 2016 Share Posted June 11, 2016 Quick question, would this work? @PART[part1,part2,part3] { ...do stuff... } Quote Link to comment Share on other sites More sharing options...
Starwaster Posted June 11, 2016 Share Posted June 11, 2016 2 hours ago, CoriW said: Quick question, would this work? @PART[part1,part2,part3] { ...do stuff... } I don't know if commas work there but I know that | does work: @PART[part1|part2|part3] { ...do stuff... } Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted June 11, 2016 Share Posted June 11, 2016 32 minutes ago, Starwaster said: I don't know if commas work there but I know that | does work: @PART[part1|part2|part3] { ...do stuff... } even if commas worked that would require the part to have name = part1 AND name = part2 AND name = part3 Quote Link to comment Share on other sites More sharing options...
Vermil Posted June 11, 2016 Share Posted June 11, 2016 Tell me if I understand this correctly: If I use this Modulemanager.2.6.25.dll, it won't work together with the KSP 64-bit client, right? Only with the 32-bit client, right? Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 11, 2016 Share Posted June 11, 2016 4 minutes ago, Vermil said: Tell me if I understand this correctly: If I use this Modulemanager.2.6.25.dll, it won't work together with the KSP 64-bit client, right? Only with the 32-bit client, right? 64 bit is fine now. But MM never disabled itself entirely on 64 bit, whereas some other mods did. Quote Link to comment Share on other sites More sharing options...
CoriW Posted June 11, 2016 Share Posted June 11, 2016 5 hours ago, Starwaster said: I don't know if commas work there but I know that | does work: @PART[part1|part2|part3] { ...do stuff... } Oh, yeah I suppose that'd make more sense than using "and" due to the issue @Sigma88 mentioned. So by using | I'll be able to edit multiple parts at the same time in the "...do stuff..." part of that, correct? Quote Link to comment Share on other sites More sharing options...
Starwaster Posted June 11, 2016 Share Posted June 11, 2016 18 minutes ago, CoriW said: Oh, yeah I suppose that'd make more sense than using "and" due to the issue @Sigma88 mentioned. So by using | I'll be able to edit multiple parts at the same time in the "...do stuff..." part of that, correct? Yes, exactly as I did it in that example. part1, part2 and part3 would all have the same config applied to them. I don't know if there are any real limits as to how many parts you can do at once but there are practical limits in that you might find it inconvenient do cram too many on one line. Quote Link to comment Share on other sites More sharing options...
CoriW Posted June 11, 2016 Share Posted June 11, 2016 How complex can math get in ModuleManage configs? I'd like to use this equation in an SRB config to input the burn time for the SRB, but I just want to make sure that first of all MM can do these kinds of equations in configs and secondly I'm unsure how exactly to convert this equation into something MM will understand. (As it'll need to check several of the properties of the SRB in order to do the calculation) (TotalMass - DryMass) / (N / (Isp * 9.81)) Also assuming that this can be done, I would like the output to be put into a floatCurve in the config... Can you do calculations in floatCurve keys? Or somehow output the result of a calculation into a floatCurve key? Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted June 12, 2016 Share Posted June 12, 2016 17 minutes ago, CoriW said: How complex can math get in ModuleManage configs? I'd like to use this equation in an SRB config to input the burn time for the SRB, but I just want to make sure that first of all MM can do these kinds of equations in configs and secondly I'm unsure how exactly to convert this equation into something MM will understand. (As it'll need to check several of the properties of the SRB in order to do the calculation) (TotalMass - DryMass) / (N / (Isp * 9.81)) Also assuming that this can be done, I would like the output to be put into a floatCurve in the config... Can you do calculations in floatCurve keys? Or somehow output the result of a calculation into a floatCurve key? if you show me where those values are I can make a cfg example for you. Quote Link to comment Share on other sites More sharing options...
CoriW Posted June 12, 2016 Share Posted June 12, 2016 (edited) 36 minutes ago, Sigma88 said: if you show me where those values are I can make a cfg example for you. Alright, thank you. Slight change in the calculation as it didn't occur to me that SRB's don't have a mentioned total mass, just dry mass. Since SolidFuel weighs in at 7.5kg / unit we can just use that accompanied with fuel amount, located here: So amount * 7.5 will give us the fuel mass, then we'll also need the Newtons of thrust, as well as the Isp, both of which are located here: Now the maxThrust is listed in kN, so we'll have to multiply it by 1000 in order to convert to N, so maxThrust * 1000. As for the Isp, that can be located in the first key in the atmosphereCurve... I'm not sure how you'd go about reading that key so for sake of putting together a reference calculation I'll just call it "key" for now. Alright so with all of that we now have our calculation, which is referencing parts of the config. (amount * 7.5) / ((maxThrust * 1000) / (key * 9.81)) , in this case it would be (140 * 7.5) / ((192 * 1000) / (165 * 9.81)) = 8.8519921875 and I would need that key to be put into a floatCurve as a key value. For clarity sake, I'll also provide the part of the cfg where I need the calculation to be placed. MODULE { name = TestFlightReliability_EngineCycle ratedBurnTime = (CALCULATION)*1.5 cycle { key = 0 15.0 key = 5 1.0 -0.8 0 key = ((CALCULATION)*1.5)+5 1.0 0 0 key = (((CALCULATION)*1.5)+5)*1.5 100 0 0 } } Edited June 12, 2016 by CoriW 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.