Tonka Crash Posted July 5, 2020 Share Posted July 5, 2020 @blowfish Is there a syntax to do something after a mod only if that mod exists, but other wise work normally. I have a case where the patch contents don't change, but I need to delay only if another mod is installed. If I use :AFTER[myMod] and myMod isn't installed the patch is deleted by MM, so it looks like I have to duplicate patches one for if the mod is there and one without. I'd like to avoid this as the contents of the patches are identical. Right now the only way I can see to do it is have two sets of patches which I'd like to avoid: @PART[??]:AFTER[myMod] { do stuff } @PART[??]:NEEDS[!myMod] { copy of do stuff } I'm trying to sort out some compatibility issues between Missing History and ReStock/ReStockPlus for a PR to MH. MH creates several parts as rescales of existing parts. Currently these are all based on the stock models. What I would like to happen is for MH to wait until after ReStock patches in it's models, but only if RS/RS+ is installed. if ReStock is not installed MH can run normally. In my local install I just change the MH patches and add the :AFTER[ReStock] to each part, but this doesn't work for the case where ReStock isn't installed, so isn't suitable for distribution. Quote Link to comment Share on other sites More sharing options...
blowfish Posted July 5, 2020 Share Posted July 5, 2020 6 hours ago, Tonka Crash said: @blowfish Is there a syntax to do something after a mod only if that mod exists, but other wise work normally. I have a case where the patch contents don't change, but I need to delay only if another mod is installed. There's no way for patch order to change based on the list of installed mods. Pick a pass that's always after the thing you want it to be after and have it always run there. Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted July 5, 2020 Share Posted July 5, 2020 1 hour ago, blowfish said: There's no way for patch order to change based on the list of installed mods. Pick a pass that's always after the thing you want it to be after and have it always run there. He could call :AFTER[SquadExpansion] right? Quote Link to comment Share on other sites More sharing options...
blowfish Posted July 7, 2020 Share Posted July 7, 2020 On 7/5/2020 at 4:24 PM, TranceaddicT said: :AFTER[SquadExpansion] would work, yes, or anything that's lexicographically after Restock Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 7, 2020 Author Share Posted July 7, 2020 New version to fix a bug with LAST[modx] when modx is not present and some code cleanups. ModuleManager-4.1.4.zip ModuleManager.4.1.4.dll Quote Link to comment Share on other sites More sharing options...
Wyzard Posted July 7, 2020 Share Posted July 7, 2020 2 hours ago, sarbian said: New version The thread title says 1.8.x-1.10.x — I take it that's still true of this new build? (Just checking since I'm sticking with 1.9 until ReStock updates.) (On a related note, please consider adding a .version file to the zip download.) Quote Link to comment Share on other sites More sharing options...
gamerscircle Posted July 7, 2020 Share Posted July 7, 2020 Hi @sarbian , I am curious .. what was your inspiration / reason for making the Module Manager? I have read that most mod authors make mods that 'they' want. I know that this question is out of the blue, just thought I would ask. Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 7, 2020 Author Share Posted July 7, 2020 6 minutes ago, gamerscircle said: Hi @sarbian , I am curious .. what was your inspiration / reason for making the Module Manager? I have read that most mod authors make mods that 'they' want. I know that this question is out of the blue, just thought I would ask. MM was created by @ialdabaoth but with far less functionalities. The purpose was to easily change the value of part. At that time you could only edit part by name and make simple change to the value. It could be used to make a quick adjustment to the difficulty. I wanted to apply the same changes to a lot of parts (Most likely to add Mechjeb to all pods at that time) so I created an extension for MM that could edit more than one part with one patch. My mod to the mod was successful and I took over MM. It quickly became a monster with an dubious syntax that could do a lot. Then @blowfish came along and rewrote most of the code into something clean that could be extended with less hassle. More function were added, threaded patching made things a lot faster and of course there were cats. lot of cats. And drama because of the cats. Twice a year. Which reminds me that I need to add more cats. Quote Link to comment Share on other sites More sharing options...
GDJ Posted July 7, 2020 Share Posted July 7, 2020 6 hours ago, sarbian said: New version to fix a bug with LAST[modx] when modx is not present and some code cleanups. ModuleManager-4.1.4.zip ModuleManager.4.1.4.dll As usual, thank you for your ongoing efforts. Much appreciated. ps. More cats. Quote Link to comment Share on other sites More sharing options...
gamerscircle Posted July 8, 2020 Share Posted July 8, 2020 52 minutes ago, sarbian said: MM was created by @ialdabaoth but with far less functionalities. The purpose was to easily change the value of part. At that time you could only edit part by name and make simple change to the value. It could be used to make a quick adjustment to the difficulty. I wanted to apply the same changes to a lot of parts (Most likely to add Mechjeb to all pods at that time) so I created an extension for MM that could edit more than one part with one patch. My mod to the mod was successful and I took over MM. It quickly became a monster with an dubious syntax that could do a lot. Then @blowfish came along and rewrote most of the code into something clean that could be extended with less hassle. More function were added, threaded patching made things a lot faster and of course there were cats. lot of cats. And drama because of the cats. Twice a year. Which reminds me that I need to add more cats. Well - that is so cool! I have seen peeps get burned out on modding, it is a thankless business. I sure do appreciate you going into details like that and sharing that too. Thank you for the continued support. Quote Link to comment Share on other sites More sharing options...
Monniasza Posted July 8, 2020 Share Posted July 8, 2020 15 hours ago, sarbian said: New version to fix a bug with LAST[modx] when modx is not present and some code cleanups. ModuleManager-4.1.4.zip ModuleManager.4.1.4.dll Was UbioZur Welding Continued bug fixed here? Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 8, 2020 Author Share Posted July 8, 2020 5 minutes ago, Monniasza said: Was UbioZur Welding Continued bug fixed here? I do not know what this bug is. I will not search the forum to know what this bug is. So either ask them or link something relevant. Quote Link to comment Share on other sites More sharing options...
Monniasza Posted July 8, 2020 Share Posted July 8, 2020 Just now, sarbian said: I do not know what this bug is. I will not search the forum to know what this bug is. So either ask them or link something relevant. Here is bug report: https://github.com/UbioWeldingLtd/UbioWeldContinued/issues/47 . Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 8, 2020 Author Share Posted July 8, 2020 (edited) 14 minutes ago, Monniasza said: Here is bug report: https://github.com/UbioWeldingLtd/UbioWeldContinued/issues/47 . So @Lisias chose to distribute a fork instead of reporting the bug to us. We had to deal with a fork that did not change the name in the past and it was a nightmare to deal with. An other display of his lack of respect for other modders. I will not touch this mess with a 10m pole. Edited July 8, 2020 by sarbian Quote Link to comment Share on other sites More sharing options...
Lisias Posted July 8, 2020 Share Posted July 8, 2020 1 hour ago, sarbian said: So @Lisias chose to distribute a fork instead of reporting the bug to us. We had to deal with a fork that did not change the name in the past and it was a nightmare to deal with. An other display of his lack of respect for other modders. I will not touch this mess with a 10m pole. The bug was reported ages ago. The fork was the way to fix the problem as the bug was decided to be not a bug. Since the fix was pretty simple, I fixed it myself and called it a day. Quote Link to comment Share on other sites More sharing options...
Monniasza Posted July 8, 2020 Share Posted July 8, 2020 2 hours ago, Lisias said: The bug was reported ages ago. The fork was the way to fix the problem as the bug was decided to be not a bug. Since the fix was pretty simple, I fixed it myself and called it a day. Were changes in the fork copied into the original? Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 8, 2020 Author Share Posted July 8, 2020 (edited) 36 minutes ago, Monniasza said: Were changes in the fork copied into the original? No, because as you can read in the replies to the link in your quote this is not a bug on MM side. But instead of changing his code or asking us for a simple way to call DatabaseReloadWithMM from an other mod he choose to fork. We had similar exchange in the past. He does not hear us plebeian from his throne high in the sky. And he is the one and only person I blocked on the forum because reading him does not bring me joy and I read Marie Kondo book. And that's from the guy who deals with horde of angry people who are triggered by a cat with a rainbow trail on their screen twice a year. Edited July 8, 2020 by sarbian Quote Link to comment Share on other sites More sharing options...
Monniasza Posted July 8, 2020 Share Posted July 8, 2020 (edited) 19 minutes ago, sarbian said: No, because as you can read in the replies to the link in your quote this is not a bug on MM side. But instead of changing his code or asking us for a simple way to call DatabaseReloadWithMM from an other mod he choose to fork. We had similar exchange in the past. He does not hear us plebeian from his throne high in the sky. And he is the one and only person I blocked on the forum because reading him does not bring me joy and I read Marie Kondo book. And that's from the guy who deals with horde of angry people who are triggered by a cat with a rainbow trail on their screen twice a year. Original: https://github.com/net-lisias-ksp/ModuleManager/commit/ff9f34ce5cb7da1cd40194dfaebdf999035aaa7f Copy: https://github.com/sarbian/ModuleManager/pull/161 I want to copy over this change to the original. Edited July 8, 2020 by Monniasza created pull request Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 8, 2020 Author Share Posted July 8, 2020 16 minutes ago, Monniasza said: Original: https://github.com/net-lisias-ksp/ModuleManager/commit/ff9f34ce5cb7da1cd40194dfaebdf999035aaa7f Copy: https://github.com/sarbian/ModuleManager/pull/161 I want to copy over this change to the original. This is NOT a fix. Do you actually understand all the impact that this change entails ? Quote Link to comment Share on other sites More sharing options...
pt1243 Posted July 8, 2020 Share Posted July 8, 2020 @sarbian just fyi the post title reads 'Jully 7th" Quote Link to comment Share on other sites More sharing options...
sarbian Posted July 8, 2020 Author Share Posted July 8, 2020 (edited) 2 hours ago, pt1243 said: @sarbian just fyi the post title reads 'Jully 7th" Read the room, you are not supposed to write useful post here ! (fixed, thanks) Edited July 8, 2020 by sarbian Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted July 10, 2020 Share Posted July 10, 2020 On 7/5/2020 at 1:39 AM, blowfish said: Can you check in ModuleManager.ConfigCache to see whether it looks correct? This will show you the final state of all the configs after MM has patched them but before KSP interprets them. It's a much faster way of debugging patches than trying to look for the effects in-game. It'll also tell us where to go next with the debugging. It is not correct. It has the original values. here's a snippet: UrlConfig { parentUrl = Squad/Resources/ScienceDefs.cfg EXPERIMENT_DEFINITION { id = crewReport title = Crew Report baseValue = 5 scienceCap = 5 dataScale = 1 requireAtmosphere = False situationMask = 63 biomeMask = 7 ... And here is the same snippet from the 1.8 save where it works: UrlConfig { parentUrl = Squad/Resources/ScienceDefs.cfg EXPERIMENT_DEFINITION { id = crewReport title = Crew Report baseValue = 8 scienceCap = 8 dataScale = 1 requireAtmosphere = False situationMask = 63 biomeMask = 23 I've not had time to look into it any more since reporting it. I've not even loaded KSP or installed the new ModuleManager from the 7th. Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted July 10, 2020 Share Posted July 10, 2020 1 hour ago, Superfluous J said: It is not correct. It has the original values. here's a snippet: And here is the same snippet from the 1.8 save where it works: I've not had time to look into it any more since reporting it. I've not even loaded KSP or installed the new ModuleManager from the 7th. @EXPERIMENT_DEFINITION:HAS[#id[crewReport]]:FINAL { %baseValue = 8 %scienceCap = 8 %biomeMask = 23 } @EXPERIMENT_DEFINITION:HAS[#id[evaReport]]:FINAL { %baseValue = 5 %scienceCap = 5 %biomeMask = 7 } Here you go; use this. Quote Link to comment Share on other sites More sharing options...
blowfish Posted July 10, 2020 Share Posted July 10, 2020 @Superfluous J oh, the difference is @EXPERIMENT_DEFINITION[*] vs @EXPERIMENT_DEFINITION - the [*] indicates the presence of some name value to match (which experiment definitions don't have), and that has been the case for a long time in MM. Are you sure you're comparing with the same MM version? Quote Link to comment Share on other sites More sharing options...
Hawk25 Posted July 12, 2020 Share Posted July 12, 2020 GREAT666666666666666666666666666666666666666666666666666666666666666666 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.