Sokar408 Posted October 26, 2015 Share Posted October 26, 2015 I can't see anything syntactically wrong (though obviously there must be something wrong) however I'm wondering why you're setting the maxAmount, and then multiplying it by 2? Why not just set it to the multiplied by 2 amount?If I had to guess, I'd say that's the problem. Maybe ModuleManager doesn't expect you to reference the same variable twice.Well thats because the code comes from the original TACLS add resources file. That file that adds life support supplies to all capsules (but because Mk3-9 doubles as pod, has a minimum crew = 0, which eliminates it from passing TACLS's check, and does doesn't get resources by default). Heres that code:@PART[*]:HAS[#CrewCapacity[>0],@MODULE[ModuleCommand]:HAS[#minimumCrew[>0]],!RESOURCE[Food]]:FOR[TacLifeSupport]{ RESOURCE { name = Food amount = 1.097 maxAmount = 1.097 @amount *= #$/CrewCapacity$ @maxAmount *= #$/CrewCapacity$ } RESOURCE { name = Water amount = 0.725 maxAmount = 0.725 @amount *= #$/CrewCapacity$ @maxAmount *= #$/CrewCapacity$ } RESOURCE { name = Oxygen amount = 111.038 maxAmount = 111.038 @amount *= #$/CrewCapacity$ @maxAmount *= #$/CrewCapacity$ } RESOURCE { name = CarbonDioxide amount = 0 maxAmount = 95.913 @maxAmount *= #$/CrewCapacity$ } RESOURCE { name = Waste amount = 0 maxAmount = 0.1 @maxAmount *= #$/CrewCapacity$ } RESOURCE { name = WasteWater amount = 0 maxAmount = 0.924 @maxAmount *= #$/CrewCapacity$ }}Now changing the conditions at the top, to nothing but @PART[mk3-9pod]:FINAL and having nothing happen, I assumed the "#$/CrewCapacity$" might be the problem, due to the mk3-9's minimum crew = 0, and changed it to "2" as thats the pods crew capacity. Still nothing. Heres the code I'm using now, and its still not working:@PART[mk3-9pod]:FINAL{ RESOURCE { name = Food amount = 2.194 maxAmount = 2.194 } RESOURCE { name = Water amount = 1.450 maxAmount = 1.450 } RESOURCE { name = Oxygen amount = 222.076 maxAmount = 222.076 } RESOURCE { name = CarbonDioxide amount = 0 maxAmount = 191.826 } RESOURCE { name = Waste amount = 0 maxAmount = 0.2 } RESOURCE { name = WasteWater amount = 0 maxAmount = 1.848 }} Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted October 26, 2015 Share Posted October 26, 2015 Have you tried keeping the original :FOR[TacLifeSupport] instead of :FINAL ?I have vague memories of people suggesting not using :FINAL if you could avoid it in any possible way, and instead always use the :FOR clause instead. Quote Link to comment Share on other sites More sharing options...
Sokar408 Posted October 26, 2015 Share Posted October 26, 2015 Have you tried keeping the original :FOR[TacLifeSupport] instead of :FINAL ?I have vague memories of people suggesting not using :FINAL if you could avoid it in any possible way, and instead always use the :FOR clause instead.I believe I added the ":FINAL", again because things weren't working. I'll give it a try now. On another topic. Is there a way to delete a "module" from a part? I have been trying various things, but nothing seem to be working. (Trying to delete the Orbital Survey module from the SurveyScanner. I'm using Scansat, so I won't need the Orbital Survey part)EDIT:just tried the following, with no luck@PART[mk3-9pod]:FOR[TacLifeSupport]{ RESOURCE { name = Food amount = 2.194 maxAmount = 2.194 } RESOURCE { name = Water amount = 1.450 maxAmount = 1.450 } RESOURCE { name = Oxygen amount = 222.076 maxAmount = 222.076 } RESOURCE { name = CarbonDioxide amount = 0 maxAmount = 191.826 } RESOURCE { name = Waste amount = 0 maxAmount = 0.2 } RESOURCE { name = WasteWater amount = 0 maxAmount = 1.848 }} Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted October 26, 2015 Share Posted October 26, 2015 I believe I added the ":FINAL", again because things weren't working. I'll give it a try now. On another topic. Is there a way to delete a "module" from a part? I have been trying various things, but nothing seem to be working. (Trying to delete the Orbital Survey module from the SurveyScanner. I'm using Scansat, so I won't need the Orbital Survey part)EDIT:just tried the following, with no luck@PART[mk3-9pod]:FOR[TacLifeSupport]{ RESOURCE { name = Food amount = 2.194 maxAmount = 2.194 } RESOURCE { name = Water amount = 1.450 maxAmount = 1.450 } RESOURCE { name = Oxygen amount = 222.076 maxAmount = 222.076 } RESOURCE { name = CarbonDioxide amount = 0 maxAmount = 191.826 } RESOURCE { name = Waste amount = 0 maxAmount = 0.2 } RESOURCE { name = WasteWater amount = 0 maxAmount = 1.848 }}Potentially stupid questionHave you checked that the name of the part is correct? ModuleManager is case sensitive Quote Link to comment Share on other sites More sharing options...
Sokar408 Posted October 26, 2015 Share Posted October 26, 2015 Potentially stupid questionHave you checked that the name of the part is correct? ModuleManager is case sensitiveNo I found the problem, and its quite embarrassing. There was a "}" missing from a previous entry. I figured something like that had to be the problem, as yet another seemingly perfect modification didn't work. Live and learn I guess Quote Link to comment Share on other sites More sharing options...
Sokar408 Posted October 26, 2015 Share Posted October 26, 2015 I have another question. I want to make a drill, using the stock drill, that extracts MetalicOre, but also changes its textures, so its visually different. This is my attempt;// Make Stock Drill for EPL //+PART[RadialDrill]:NEED[ExtraplanetaryLaunchpads]{ @name = RadialMetalicDrill -mesh = TriBitDrill.mu @title = 'Drill-O-Matic' Metalic Ore Excavator MODEL { model = Squad/Parts/Resources/RadialDrill/TriBitDrill texture = PersonalChanges/MetalicDrill } @MODULE[ModuleResourceHarvester] { @ResourceName = MetalOre @StartActionName = Start Metalic Ore Harvester @StopActionName = Stop Metalic Ore Harvester }}Functionally its working, but the texture does change. I have tried saving the texture both as png, and dds, but it doesn't work either way. Naturally I have made sure the pathing and names are correct. Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted October 26, 2015 Share Posted October 26, 2015 I have another question. I want to make a drill, using the stock drill, that extracts MetalicOre, but also changes its textures, so its visually different. This is my attempt;// Make Stock Drill for EPL //+PART[RadialDrill]:NEED[ExtraplanetaryLaunchpads]{ @name = RadialMetalicDrill -mesh = TriBitDrill.mu @title = 'Drill-O-Matic' Metalic Ore Excavator MODEL { model = Squad/Parts/Resources/RadialDrill/TriBitDrill texture = PersonalChanges/MetalicDrill } @MODULE[ModuleResourceHarvester] { @ResourceName = MetalOre @StartActionName = Start Metalic Ore Harvester @StopActionName = Stop Metalic Ore Harvester }}Functionally its working, but the texture does change. I have tried saving the texture both as png, and dds, but it doesn't work either way. Naturally I have made sure the pathing and names are correct.I think you need to define the name of the texture like this:MODEL{ model = [COLOR=#333333]Squad/Parts/Resources/RadialDrill/TriBitDrill texture = [/COLOR][COLOR=#ff0000]original_texture_name[/COLOR][COLOR=#333333], [/COLOR][COLOR=#333333]PersonalChanges/MetalicDrill}I did it like that in my mini mods and it works Quote Link to comment Share on other sites More sharing options...
Sokar408 Posted October 26, 2015 Share Posted October 26, 2015 I think you need to define the name of the texture like this:MODEL{ model = [COLOR=#333333]Squad/Parts/Resources/RadialDrill/TriBitDrill texture = [/COLOR][COLOR=#ff0000]original_texture_name[/COLOR][COLOR=#333333], [/COLOR][COLOR=#333333]PersonalChanges/MetalicDrill}I did it like that in my mini mods and it works Yes that worked like a charm! However now the problem is my texture is all weird. I took the original texture, re-saturated it (so it became blue), and saved it with photoshop. Do I have to do some middle step, in order to make sure the game knows how to load the texture probably? Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted October 26, 2015 Share Posted October 26, 2015 Yes that worked like a charm! However now the problem is my texture is all weird. I took the original texture, re-saturated it (so it became blue), and saved it with photoshop. Do I have to do some middle step, in order to make sure the game knows how to load the texture probably?idk about that, I would need to see the old texture compared to the new one Quote Link to comment Share on other sites More sharing options...
Sokar408 Posted October 26, 2015 Share Posted October 26, 2015 idk about that, I would need to see the old texture compared to the new oneBasically its the same, except all the brown has turned blue. But I noticed the MKS is already config'd to work with both NFT and EL, so I have no need to dabble in making a drill myself. On another note though. If I wanted to change the electrical input needed for a drill with the code:MODULE{ name = ModuleResourceHarvester HarvesterType = 0 Efficiency = 1 ResourceName = Substrate ConverterName = Substrate Drill StartActionName = Start Substrate Drill StopActionName = Stop Substrate Drill INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 6 }}MODULE{ name = ModuleResourceHarvester HarvesterType = 0 Efficiency = 1 RecipeInputs = ElectricCharge,6 ResourceName = MetallicOre ConverterName = MetallicOre Drill StartActionName = Start MetallicOre Drill StopActionName = Stop MetallicOre Drill INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 6 }} MODULE{ name = ModuleResourceHarvester HarvesterType = 0 Efficiency = 1 RecipeInputs = ElectricCharge,6 ResourceName = Uraninite ConverterName = Uraninite Drill StartActionName = Start Uraninite Drill StopActionName = Stop Uraninite Drill INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 6 }}But only change, say the Uraninite drill process. How would I go about changing it? I'm assuming I'll have to check for the "uraninite", or define that its the 3th module I want to change, the question is how though. My efforts has only allowed me to change the first one, that is the substract, doing the following;@PART[MKS_DRILL_*]:NEED[ExtraplanetaryLaunchpads]:FINAL{ @MODULE[ModuleResourceHarvester] { @RecipeInputs = ElectricCharge,10 @INPUT_RESOURCE { @Ratio = 10 } }} Quote Link to comment Share on other sites More sharing options...
sebi.zzr Posted October 26, 2015 Share Posted October 26, 2015 Simply,define resource name.@MODULE[ModuleResourceHarvester] { [color=red]@ResourceName = Uraninite[/color] @RecipeInputs = ElectricCharge,10 @INPUT_RESOURCE { @Ratio = 10 } } Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted October 29, 2015 Share Posted October 29, 2015 I have a question for you, which will be applied first?:FOR[Ao] or :FOR[A+] Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted October 30, 2015 Share Posted October 30, 2015 Is it possible to insert a new module into a specific index in the part.cfg file with MM? (It states so in the instructions, but I have not been able to get it working).I am needing this for a partModule that has functions that need to run before other modules initialize (specifically, it needs to populate models and transforms prior to moduleEngines initializing and grabbing its transforms; hence my module needs to be inserted before the moduleEngines).for example:+PART[partName]{ @name = exampleClonedPart MODULE,0 { name = insertedModuleName //rest of the inserted module fields } //rest of the patch}results in a URL/database dump of (excerpted for brevity)PART{ name = exampleClonedPart //all the other stuff from the original file + patches are here, and exactly as they are supposed to be, except... //then, at the end of the file, it inserts the new/inserted module.... with the index value still attached, which does not load properly MODULE,0 { name = insertedModuleName //the rest of the module fields are intact and correct }}I did a fairly extensive search on the thread regarding this issue, and all I came across were multiple posts with the syntax examples saying that it is possible/supported. Is this in error, or is my patch structure incorrect, or?(https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax#insert)Thanks for your help and understanding. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted October 30, 2015 Share Posted October 30, 2015 Is it possible to insert a new module into a specific index in the part.cfg file with MM? (It states so in the instructions, but I have not been able to get it working).I am needing this for a partModule that has functions that need to run before other modules initialize (specifically, it needs to populate models and transforms prior to moduleEngines initializing and grabbing its transforms; hence my module needs to be inserted before the moduleEngines).I did a fairly extensive search on the thread regarding this issue, and all I came across were multiple posts with the syntax examples saying that it is possible/supported. Is this in error, or is my patch structure incorrect, or?(https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax#insert)Thanks for your help and understanding.I haven't used that feature myself. From comparing your example with the syntax article, it looks like it should work.I tried it out myself and I couldn't get it to work either. I even tried cloning the part without inserting the module during a :FIRST pass and then going back and inserting it in a :FINAL pass (just in case there's some weird issue with doing it in a cloning operation) and that didn't work either.... so it looks like a bug to me. Unless the article itself is wrong. Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted October 30, 2015 Share Posted October 30, 2015 I haven't used that feature myself. From comparing your example with the syntax article, it looks like it should work.I tried it out myself and I couldn't get it to work either. I even tried cloning the part without inserting the module during a :FIRST pass and then going back and inserting it in a :FINAL pass (just in case there's some weird issue with doing it in a cloning operation) and that didn't work either.... so it looks like a bug to me. Unless the article itself is wrong.Okay, thanks for your quick response and confirmation.I suppose I'll have to see if I can work around this on the plugin end of things then. Quote Link to comment Share on other sites More sharing options...
DuoDex Posted November 2, 2015 Share Posted November 2, 2015 (edited) Interesting bug occurs : Place a '/' in any [#author] field for something to not load. Log file. EDIT : whee im dumb. Player.logAnd the patch I'm doing it with @PART[*]:HAS[#author[BahamutoD],HAS[#author[LORDPrometheus],HAS[#author[LORDPrometheus/ BahamutoD],HAS[#author[Harpwner],HAS[#author[VintageXP],HAS[#author[Max Simm],[!MODULE[BDAdjustableLandingGear],!MODULE[ModuleWheel],!MODULE[Animated*]]:AFTER[BDArmory]:NEEDS[BDArmory]{ @category = none}yey i read the op after posting ooo Edited November 2, 2015 by DuoDex Quote Link to comment Share on other sites More sharing options...
sarbian Posted November 2, 2015 Author Share Posted November 2, 2015 You have a space after the /. That would be even more evil in MM eyes.edit :[LOG 17:53:31.318] Config(RESOURCE_DEFINITION) BDArmory/Resources/Countermeasures/CMChaff[LOG 17:53:31.318] Config(@PART[*]:HAS[#author[bahamutoD],HAS[#author[LORDPrometheus],HAS[#author[LORDPrometheus/) BDArmorySorting/BDArmorySorting/@PART[*]:HAS[#author[bahamutoD],HAS[#author[LORDPrometheus],HAS[#author[LORDPrometheus/[LOG 17:53:31.318] Config(PART) BahaSP/Parts/125vectorjet/part/bd125vectorjetLine cut at space ! Quote Link to comment Share on other sites More sharing options...
DuoDex Posted November 2, 2015 Share Posted November 2, 2015 You have a space after the /. That would be even more evil in MM eyes.Yes, but this is intended. :/ Quote Link to comment Share on other sites More sharing options...
sarbian Posted November 2, 2015 Author Share Posted November 2, 2015 Replace the space with a "?" Quote Link to comment Share on other sites More sharing options...
DuoDex Posted November 2, 2015 Share Posted November 2, 2015 (edited) Replace the space with a "?"Tried per logfile's suggestion, still won't load, but with a different error, logfile on request.EDIT : Okay, so there were two spaces. Sue me . This why I don't code, and need to take a course entitled "Introductory Lessons on Not Being A Stupid Jackass". Thanks for your help! EDIT 2 : I'm back, with 100% more stupidity! It still wont' load ;_; Edited November 2, 2015 by DuoDex Quote Link to comment Share on other sites More sharing options...
sarbian Posted November 2, 2015 Author Share Posted November 2, 2015 You are welcome doctor. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted November 2, 2015 Share Posted November 2, 2015 (edited) EDIT 2 : I'm back, with 100% more stupidity! It still wont' load ;_;In addition to the space, there is a mismatching number of brackets. For every [ there must be a matching ]The syntax there also looks a bit screwy; not sure it's legal to separate HAS[] with commas... I'm still trying to wade through that lineEdit: Maybe if you describe what the desired and expected result is? Edited November 2, 2015 by Starwaster Quote Link to comment Share on other sites More sharing options...
DuoDex Posted November 3, 2015 Share Posted November 3, 2015 (edited) In addition to the space, there is a mismatching number of brackets. For every [ there must be a matching ]The syntax there also looks a bit screwy; not sure it's legal to separate HAS[] with commas... I'm still trying to wade through that lineEdit: Maybe if you describe what the desired and expected result is?I was hoping to remove the category from every part with those authors excepting the parts with the mentioned modules. @PART[*]:HAS[#author[BahamutoD],!MODULE[BDAdjustableLandingGear],!MODULE[ModuleWheel],!MODULE[Animated*]]:AFTER[BDArmory]:NEEDS[BDArmory]{ @category = none} works, but I'm not sure how to expand it. Edited November 3, 2015 by DuoDex Quote Link to comment Share on other sites More sharing options...
Kerbas_ad_astra Posted November 3, 2015 Share Posted November 3, 2015 I don't think there's a way to get "or" with HAS blocks. If you can catch all authors with a single regular expression, that would do it, but you're probably better off making separate patches for every author. Quote Link to comment Share on other sites More sharing options...
blowfish Posted November 4, 2015 Share Posted November 4, 2015 Is there a quick way to create a value if it doesn't exist but leave it alone if it does? I can do it using multiple patches with HAS, but it's somewhat inefficient. 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.