Akira_R Posted March 7, 2015 Share Posted March 7, 2015 Is there a way to get an output of every change made by MM? I am running into a very frustrating issue with certain contract types not spawning, specifically part test contracts. At this point I believe it is due to a MM patch changing the contracts config to make them either not show up or show EXTREMELY infrequently. The thing is I have no idea where exactly said MM patch would be and at game load it is loading around 9302 patches Trying to figure out why I am not getting my part test contracts has been driving me nuts for this last week, any help I can get would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
BudgetHedgehog Posted March 7, 2015 Share Posted March 7, 2015 The output log lists the location of patches applied and what to and the ConfigCache (I believe) contains every cfg in full including their patches. Between the two of them, you should be able to find where the patch is and what it's doing. Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 7, 2015 Author Share Posted March 7, 2015 I am running into a very frustrating issue with certain contract types not spawning, specifically part test contracts. At this point I believe it is due to a MM patch changing the contracts config to make them either not show up or show EXTREMELY infrequently. The thing is I have no idea where exactly said MM patch would be and at game load it is loading around 9302 patches Let me guess : You have TextureReplacer but do not have ATM installed ? If yes you get the bug I noticed where TR corrupt the game DB. I posted in the thread but had no replies. I guess I'll have to write the part for TR myself. Quote Link to comment Share on other sites More sharing options...
Crzyrndm Posted March 7, 2015 Share Posted March 7, 2015 The output log lists the location of patches applied and what to and the ConfigCache (I believe) contains every cfg in full including their patches. Between the two of them, you should be able to find where the patch is and what it's doing.Let me guess : You have TextureReplacer but do not have ATM installed ? If yes you get the bug I noticed where TR corrupt the game DB. I posted in the thread but had no replies. I guess I'll have to write the part for TR myself.Else, open the config cache as suggested above (using any text editor) and search for "MaximumExistent" (better yet, if you have Notepad++, search for "Test\r\n\t\t{" which will take you straight to the part test contracts)This is what my config looks like for that sectionTest{ MaximumExistent = 9999 Expiration { MinimumExpireDays = 1 MaximumExpireDays = 3 DeadlineDays = 426 } Funds { MaximumBaseFunds = 500 } Science { RewardMultiplier = 0.3 } Reputation { RewardMultiplier = 40 FailureMultiplier = 30 }} Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 8, 2015 Author Share Posted March 8, 2015 Fixing the cache is a band aid. I need to find the actual source and for that I need to know if TextureReplacer is installed and ATM is not. Quote Link to comment Share on other sites More sharing options...
ThorBeorn Posted March 8, 2015 Share Posted March 8, 2015 Regarding the cost balancing I was talking about earlier, I still don't understand the correct syntax it seems.This is an example part, LV-909: PART{ cost = 750 mass = 0.5 MODULE { name = ModuleEngines minThrust = 0 maxThrust = 50 PROPELLANT { name = LiquidFuel ratio = 0.9 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 1.1 } atmosphereCurve { [COLOR="#FF0000"][B]key = 0 390[/B] // How do I make MM find this? [/COLOR]key = 1 300 // and this while we're at it? } }}Say I want cost = 10 * mass * atmosphereCurve, key,0. How do I make MM fetch the value for key, 0 (390)?This is what I've got.@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer]],!MODULE[MultiModeEngine]]:FOR[CostBalanceProjectLOL]{ @cost = 10 @cost * = #$mass$ [COLOR="#FF0000"]@cost * = #$../../atmosphereCurve/key,0$[/COLOR] // well this is not working}Now cost equals 10*mass, but my attempt at getting the key, 0 is not correctly written. I appreciate all help I can get. Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 8, 2015 Author Share Posted March 8, 2015 This is the complex case Doc reminder :Now the value itself :ratio // gets you the value called ratioratio,1 // gets you the second value called ratioratio[2] gets you the third comma separated field ( so if the value is "1,2,4,8,16" you get 4 )ratio[2, ] gets you the third space separated field ratio[2,/] gets you the third / separated field (you get it now I hope)so it should be: @cost * = #$../../atmosphereCurve/key,0[1, ]$ Key first occurrence, second space separated field. (I guess you want the 390 ?) Quote Link to comment Share on other sites More sharing options...
ThorBeorn Posted March 8, 2015 Share Posted March 8, 2015 Though I now understand what "space separated, comma separated etc" means, the syntax (that is how you use that word right?) you provided still doesn't make vacuum ISP a factor for cost. Cost is still just 10*mass.Ps. Yes I wanted the 390, although now I can use any key I want as long as this works at all in the first place Edit: MM gives me 53 errors in that patch still btw. Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 8, 2015 Author Share Posted March 8, 2015 I see I missed something in your post. it is "*= " (no space) not "* =" Quote Link to comment Share on other sites More sharing options...
ThorBeorn Posted March 8, 2015 Share Posted March 8, 2015 Well removing spaces still gives the same result.KSP.log says this about every engine:[LOG 17:32:54.970] [ModuleManager] Applying node /CostBalance/@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer]],!MODULE[MultiModeEngine]]:FINAL to SXT/Parts/Engine/NERVA/part/SXTNERVA[LOG 17:32:54.972] [ModuleManager] Cannot parse variable search when editing key cost = #$../../atmosphereCurve/key,0[1, ]$ Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 8, 2015 Author Share Posted March 8, 2015 @cost *= #$/MODULE[ModuleEngines]/atmosphereCurve/key,0[1, ]$ Quote Link to comment Share on other sites More sharing options...
ThorBeorn Posted March 8, 2015 Share Posted March 8, 2015 @cost *= #$/MODULE[ModuleEngines[COLOR="#FF0000"]*[/COLOR]]/atmosphereCurve/key,0[1, ]$Thank you very much Sarbian. That finally did it! I'll probably be back in this thread again, if not this time, definately when I try to balance RF engines taking ullage, ignition times, throttle capabilities and ModuleEngineConfigs stuff etc into consideration. Quote Link to comment Share on other sites More sharing options...
mreadshaw Posted March 8, 2015 Share Posted March 8, 2015 Is it possible to use OR in the HAS[] portion? I've tried HAS[module[1]|module[2]] and HAS[module[1|2]] and some others that I was sure wouldn't work. I can get AND working just fine so it seems like it should be possible. At the moment I'm just making multiple copies for each module but it would be nice to clean it up a bit. Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 9, 2015 Author Share Posted March 9, 2015 Nope. No OR Quote Link to comment Share on other sites More sharing options...
FreeThinker Posted March 9, 2015 Share Posted March 9, 2015 Question, is it posible to execute a MM script when a certain part is not found? Quote Link to comment Share on other sites More sharing options...
Starwaster Posted March 9, 2015 Share Posted March 9, 2015 Question, is it posible to execute a MM script when a certain part is not found?There's no set of conditionals that would match such a state.Also, MM by its very nature exists to modify ConfigNodes such as PART, MODULE, INTERNAL, etc. Those are the only places a MM patch executes. It doesn't arbitrarily execute anything outside of such a node. Quote Link to comment Share on other sites More sharing options...
FreeThinker Posted March 9, 2015 Share Posted March 9, 2015 (edited) There's no set of conditionals that would match such a state.Also, MM by its very nature exists to modify ConfigNodes such as PART, MODULE, INTERNAL, etc. Those are the only places a MM patch executes. It doesn't arbitrarily execute anything outside of such a node.What about detecting the exisitng of a subfolder inside a Mod folder. For example "UmbraSpaceIndustries\WarpDrive". Could this somehow work?what about the Dll inside a mod. Could I filter on the existance of a "WarpEngine.dll" or "WarpEngine"If your mod includes a DLL put all your MM patch nodes in the :FOR[yourMod] pass.Assuming WarpEngine.dll does not exist, does that mean the following MM code should work?@PART[MyPart]:NEEDS[!WarpEngine]{..} Edited March 9, 2015 by FreeThinker Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 9, 2015 Author Share Posted March 9, 2015 What about detecting the exisitng of a subfolder inside a Mod folder. For example "UmbraSpaceIndustries\WarpDrive". Could this somehow work?No. It does not work with subfolders and I will not make it work with subfolders. I hate the ModderOrCompany/ModName convention.Assuming WarpEngine.dll does not exist, does that mean the following MM code should work?@PART[MyPart]:NEEDS[!WarpEngine]{..}Yes, it should. Quote Link to comment Share on other sites More sharing options...
FreeThinker Posted March 9, 2015 Share Posted March 9, 2015 Thanks Quote Link to comment Share on other sites More sharing options...
Mecripp Posted March 9, 2015 Share Posted March 9, 2015 (edited) Need help lol can someone tell me what's wrong with my cfg trying to replace the sound with the launch clamp but it's not working here is what, I have tryed @PART[launchClamp1]:AFTER[squad]{ !sound_decoupler_fire {} Have tryed DELETE here also sound_dcp_clamp_bullettarp_v0100 = activate}@PART[launchClamp1]:AFTER[squad]{ !sound_decoupler_fire {} Have tryed DELETE here also A.R.P/Sounds/sound_dcp_clamp_bullettarp_v0100 = activate}@PART[launchClamp1]:AFTER[squad]{ @fx_gasBurst_white = 0.0, 1.354437, 0.8369194, 0.0, 0.0, 1.0, activate !sound_decoupler_fire {} Have tryed DELETE here also %A.R.P/Sounds/sound_dcp_clamp_bullettarp_v0100 = activate}From looking at the debug menu the sounds are loaded. Edited March 9, 2015 by Mecripp2 Quote Link to comment Share on other sites More sharing options...
funk Posted March 10, 2015 Share Posted March 10, 2015 When I edit a part, is@part[]:FOR[Mymod]:AFTER[mod1] checking if mod1 exists? Or is the part patched even, if it doesn't exist? So i'll have to write @part[]:FOR[mymod]:AFTER[mod1]:NEEDS[mod1]? Quote Link to comment Share on other sites More sharing options...
futrtrubl Posted March 10, 2015 Share Posted March 10, 2015 When I edit a part, is@part[]:FOR[Mymod]:AFTER[mod1] checking if mod1 exists? Or is the part patched even, if it doesn't exist? So i'll have to write @part[]:FOR[mymod]:AFTER[mod1]:NEEDS[mod1]?I don't believe FOR and AFTER can be used together. FOR tells it to do the patch during Mymod's time while the AFTER is telling it to do it right after mod1's time.But AFTER still runs even if mod1 is not detected. So it needs NEEDS. Quote Link to comment Share on other sites More sharing options...
Mecripp Posted March 10, 2015 Share Posted March 10, 2015 And don't forget to CAP @PART Quote Link to comment Share on other sites More sharing options...
funk Posted March 10, 2015 Share Posted March 10, 2015 (edited) I don't believe FOR and AFTER can be used together. Ah, ok if that is correct, that means no one can tell to @PART:wink: after mymod. It would be just :FINAL?So what would be the correct expression, if for example mod1 tells his parts to use technodes of Community Tech Tree, but mymod tells, that's unresearchable. Now there comes SETI and want to change the technode too and I've my personal cfg with FINAL. Edited March 10, 2015 by funk Quote Link to comment Share on other sites More sharing options...
sarbian Posted March 10, 2015 Author Share Posted March 10, 2015 Don't use FINAL in a mod. It is for users customization. Explain your use case. 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.