Lisias Posted May 8, 2018 Share Posted May 8, 2018 I don't like what I'm seeing here. The DLLs are readable and executable by everybody. I don't like the smell of it. I will report whatever I found soon. Quote Link to comment Share on other sites More sharing options...
Lisias Posted May 8, 2018 Share Posted May 8, 2018 Oh, yeah. I love the smell of serious security vulnerabilities in the morning. I hope I find another explanation for this, but for now, it appears to me that a DLL must be writeable in order to KSP being able to load it, at least on MacOS X. This is plain nuts - I don't know of a single anti-virus that would not flag this as malware. Can anyone try this on Linux and Windows? Quote [LOG 08:06:02.781] Load(Assembly): /KSPModFileLocalizer [LOG 08:06:02.782] AssemblyLoader: Loading assembly at /Users/lisias/Applications/Steam/steamapps/common/Kerbal Space Program/GameData/KSPModFileLocalizer.dll [ERR 08:06:02.785] Failed to load assembly /Users/lisias/Applications/Steam/steamapps/common/Kerbal Space Program/GameData/KSPModFileLocalizer.dll: System.UnauthorizedAccessException: Access to the path "/Users/lisias/Applications/Steam/steamapps/common/Kerbal Space Program/GameData/KSPModFileLocalizer.dll" at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options at System.IO.FileStream..ctor (System.String path, FileMode mode) [0x00000] in <filename unknown>:0 at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0 [LOG 08:06:02.791] Load(Assembly): /ModuleManager.3.0.7 [LOG 08:06:02.791] AssemblyLoader: Loading assembly at /Users/lisias/Applications/Steam/steamapps/common/Kerbal Space Program/GameData/ModuleManager.3.0.7.dll [LOG 08:06:02.840] AssemblyLoader: KSPAssembly 'ModuleManager' V2.5.0 Quote Link to comment Share on other sites More sharing options...
Lisias Posted May 8, 2018 Share Posted May 8, 2018 And.... yeah. `find . -name '*.dll' -exec chmod u+w {} \;` "solved" the problem. :-( Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted May 8, 2018 Share Posted May 8, 2018 I need an MM expert. I'm writing a rather lengthy MM patch to add features to stock parts and I have a specific question about the % instruction. Is it only going to work with indexing if a part already has modules applied. For example, I tried this... %MODULE[modulename],0 { %name = modulename Some = stuff } %MODULE[modulename],1 { %name = modulename other = stuff } ...and it's not having the desired result. The second part is merging with the first. Am I missing something or because the module is non existent in the part is this expected? Quote Link to comment Share on other sites More sharing options...
JadeOfMaar Posted May 8, 2018 Share Posted May 8, 2018 5 minutes ago, Manwith Noname said: I need an MM expert. I'm writing a rather lengthy MM patch to add features to stock parts and I have a specific question about the % instruction. Is it only going to work with indexing if a part already has modules applied. For example, I tried this... That is unknown territory the way you're trying to use %. This symbol serves to edit if an object exists, or create the object if it does not exist. The appropriate symbol is @ so you're only editing something which already exists, and which you can fully use instance numbers with. Given how things are working out, I figure you're basically running a double edit on the same module. Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted May 8, 2018 Share Posted May 8, 2018 @JadeOfMaar Hehe, yeah, I've kinda worked that much out. I was just curious if this intended since % is edit or create. Essentially what I'm trying to do is write the patch so I don't have to worry about it too much in the future should other people start writing patches that do the same sort of thing (adding texture sets via textures unlimited). The patch is already 10000 lines and rising. I can write it as a straight patch just adding the modules but I was hoping this way would alleviate potential issues down the road. I have already considered that what I am doing in this patch would sort of be the framework for others to build off with more texture sets but then it requires the end user to download multiple patches. If it's not intended to use it (%) this way I'll just make it a standalone framework. Quote Link to comment Share on other sites More sharing options...
JadeOfMaar Posted May 8, 2018 Share Posted May 8, 2018 (edited) @Manwith Noname Ahhh. In the case of % it's mainly a fail-safe to ensure that a node with a given configuration always exists, overriding when necessary and preventing duplicate creations of a node. Instead of instance numbers you can use the :HAS pass and target each module by keys or sub-nodes/sub-modules. It works fine with % but I'd also discourage using :HAS with %. Edited May 8, 2018 by JadeOfMaar Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted May 8, 2018 Share Posted May 8, 2018 (edited) @JadeOfMaar Thanks for the help. The only other stock patch out in the wild that I know of is Electrocutor's and I've already been writing with that in mind. I load after it and use edit or create for the first module so if people have it, things should still work fine, if they don't, it doesn't matter either. Their patch is fairly straight forward while mine....complicates things a bit as I've been breaking things down in to mesh groups where hopefully "logical". For instance, parts like the inflatable heatshield allow seperate settings for the shield, the trussing and the fairing. Edited May 8, 2018 by Manwith Noname Quote Link to comment Share on other sites More sharing options...
Bideogames Posted May 9, 2018 Share Posted May 9, 2018 (edited) You all seem to be experts, and I was wondering if you could help me fix my problem that occurs with Scatter exclusively when module manager is installed (at least when the last couple versions up to 3.0.7 are installed). KSP: 1.4.3 Mac 64bit Problem: When Module manager is installed, Scatter makes the oceans and sky appear off-white. Mods Installed: EVE, Scatter, SVE (and SVE textures), Module manager 3.0.7 (All mods are up to date) Reproduction Steps: Open any saved game and the ocean and sky look off-white. This issue persists even when flying a vehicle. Scatter does not have this issue when Module Manager is NOT installed. That being said, I am aware that this whole problem could be caused by conflicting config files (or having none). If you can't tell I'm pretty new to troubleshooting this kind of stuff. Any input is well Appreciated! ~Bideogames Edit: Don't Forget the log! https://www.dropbox.com/s/k7nui3h94v7nvnx/Player.log.zip?dl=0 Edited May 9, 2018 by Bideogames Quote Link to comment Share on other sites More sharing options...
Lisias Posted May 11, 2018 Share Posted May 11, 2018 (edited) On 5/8/2018 at 11:02 PM, Bideogames said: You all seem to be experts, and I was wondering if you could help me fix my problem that occurs with Scatter exclusively when module manager is installed (at least when the last couple versions up to 3.0.7 are installed). "You all"? I wish! :-) I'm probably so lost in this mess as you. :-) On 5/8/2018 at 11:02 PM, Bideogames said: KSP: 1.4.3 Mac 64bit Problem: When Module manager is installed, Scatter makes the oceans and sky appear off-white. Mods Installed: EVE, Scatter, SVE (and SVE textures), Module manager 3.0.7 (All mods are up to date) From your log, i found: NullReferenceException: Object reference not set to an instance of an object at scatterer.SkyNode.RestoreStockAtmos[UIApp] OnDestroy: MessageSystem (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) NullReferenceException: Object reference not set to an instance of an object at scatterer.SkyNode.RestoreStockAtmosphere () [0x00000] in <filename unknown>:0 at scatterer.SkyNode.Cleanup () [0x00000] in <filename unknown>:0 at scatterer.Manager.OnDestroy () [0x00000] in <filename unknown>:0 at scatterer.Core.OnDestroy () [0x00000] in <filename unknown>:0 What led me to the conclusion that Scatterer is the Victim, not the culprit. Open the "Console" application, look for the Unity's Player.log, and post it too. My guess is that your Mac's integrated GPU doesn't support something Scatterer needs, fails silently (or Scatterer ignores the Exception) and then Scatterer get lost. Try not loading SVE. Perhaps you had run out of VRAM. EDIT: How many monitors you have? There's a not so well known issue on Unity while running on multi-headed Macs! Edited May 11, 2018 by Lisias mutiheaded Mac? Quote Link to comment Share on other sites More sharing options...
FreeThinker Posted May 11, 2018 Share Posted May 11, 2018 I couldn't find it in the wiki so I have to ask, what possible math operators are available in MM, I know *=, += -= and /=, but how to raise something to a power? Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted May 11, 2018 Share Posted May 11, 2018 10 minutes ago, FreeThinker said: I couldn't find it in the wiki so I have to ask, what possible math operators are available in MM, I know *=, += -= and /=, but how to raise something to a power? Do Kerbals need more than basic arithmetic operations ?? Quote Link to comment Share on other sites More sharing options...
Warezcrawler Posted May 11, 2018 Share Posted May 11, 2018 Just now, FreeThinker said: I couldn't find it in the wiki so I have to ask, what possible math operators are available in MM, I know *=, += -= and /=, but how to raise something to a power? I found this On 9/14/2014 at 11:33 PM, sarbian said: - Added a new "power of" math operator. ^= is already used so it's != Quote Link to comment Share on other sites More sharing options...
Bideogames Posted May 11, 2018 Share Posted May 11, 2018 1 hour ago, Lisias said: "You all"? I wish! :-) I'm probably so lost in this mess as you. :-) From your log, i found: NullReferenceException: Object reference not set to an instance of an object at scatterer.SkyNode.RestoreStockAtmos[UIApp] OnDestroy: MessageSystem (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) NullReferenceException: Object reference not set to an instance of an object at scatterer.SkyNode.RestoreStockAtmosphere () [0x00000] in <filename unknown>:0 at scatterer.SkyNode.Cleanup () [0x00000] in <filename unknown>:0 at scatterer.Manager.OnDestroy () [0x00000] in <filename unknown>:0 at scatterer.Core.OnDestroy () [0x00000] in <filename unknown>:0 What led me to the conclusion that Scatterer is the Victim, not the culprit. Open the "Console" application, look for the Unity's Player.log, and post it too. My guess is that your Mac's integrated GPU doesn't support something Scatterer needs, fails silently (or Scatterer ignores the Exception) and then Scatterer get lost. Try not loading SVE. Perhaps you had run out of VRAM. You were Right! I tried loading up KSP without SVE which, low and behold, worked (: It makes sense because I only have 2GB of VRAM anyways. So I'm guessing my solution would be to make/find a performance config for EVE, or just not use one (it would make EVE almost pointless though). I remember seeing one linked on the EVE forum, so I'll try it out. Here is the player.log for after running without SVE: https://www.dropbox.com/s/k8acrhf6hauixzl/Player.log?dl=0 Quote Link to comment Share on other sites More sharing options...
Bideogames Posted May 11, 2018 Share Posted May 11, 2018 1 hour ago, Lisias said: How many monitors you have? Only Running one Monitor. I see how that could be an issue. Quote Link to comment Share on other sites More sharing options...
Gordon Fecyk Posted May 12, 2018 Share Posted May 12, 2018 (edited) Change a localization key based on variable? I'm polishing up Alien Space Programs for KSP 1.4.3. What I want to do is swap out localization strings based on the home world setting, so "Cannot disembark while off of Kerbin's surface.\nAstronaut Complex upgrade required." gets replaced with, "Cannot disembark while off of [homeworld name here]'s surface.\nAstronaut Complex upgrade required." Can I even edit a Localization section using Module Manager? For this particular example, #autoLOC_294633, I'm thinking about this: @Localization:HAS[@AlienSpaceProgramSettings:HAS[#Homeworld[Eve]]] { @en-us { @#autoLOC_294633 = Blah blah blah (s/Kerbin/Eve as needed) } @es-es { @#autoLOC_294633 = Blah blah blah (s/Kerbin/Eve as needed) } } Edited May 12, 2018 by Gordon Fecyk MM syntax, forgot # symbol Quote Link to comment Share on other sites More sharing options...
blowfish Posted May 13, 2018 Share Posted May 13, 2018 On 5/6/2018 at 1:01 AM, shdwlrd said: With the latest release, I noticed that some of the nodes aren't updating when you do the in game database refresh. It seems to be refreshing from the cache instead of reloading each file individually. If I deleted the cache file, then did the ingame refresh, then the node would update. I was working on a patch adjusting the effects nodes for multiple parts when I noticed the issue. I haven't been able to reproduce this. I tried adding, removing, and deleting a file and it detected the change every time. Maybe if you can get more info on exactly what's MM is seeing (should be a lot of info in the log). 5 hours ago, Gordon Fecyk said: Change a localization key based on variable? I'm polishing up Alien Space Programs for KSP 1.4.3. What I want to do is swap out localization strings based on the home world setting, so "Cannot disembark while off of Kerbin's surface.\nAstronaut Complex upgrade required." gets replaced with, "Cannot disembark while off of [homeworld name here]'s surface.\nAstronaut Complex upgrade required." Can I even edit a Localization section using Module Manager? For this particular example, #autoLOC_294633, I'm thinking about this: Spoiler @Localization:HAS[@AlienSpaceProgramSettings:HAS[#Homeworld[Eve]]] { @en-us { @#autoLOC_294633 = Blah blah blah (s/Kerbin/Eve as needed) } @es-es { @#autoLOC_294633 = Blah blah blah (s/Kerbin/Eve as needed) } } Not currently supported, see this issue: https://github.com/sarbian/ModuleManager/issues/118 I'm confused about your hypothetical patch though. It looks like you'd be looking for a localization node like this: Spoiler Localization { AlienSpaceProgramSettings { Homeworld = Eve } } Quote Link to comment Share on other sites More sharing options...
Gordon Fecyk Posted May 13, 2018 Share Posted May 13, 2018 Just now, blowfish said: I'm confused about your hypothetical patch though. It looks like you'd be looking for a localization node like this: [snip example] Alien Space Programs creates this variable and applies it in various places, so the variable does exist. It's in homeworldsettings.cfg in the add-on. I use it to switch parts around the tech tree in Explodium Breathing Engines if Eve is selected. It looks like, based on the order of operations, Module Manager's patches occur well after localization occurs. This must explain why I see the full text instead of localization keys in the Module Manager cache. Even if I wrote a patch to act on home world and current language, I'd only be able to apply it to parts and not to other in-game text. But this helps me understand why such a patch wouldn't work; thanks. I guess as an alternative, I can create per-homeworld dictionaries. These would need to be swapped in and out by hand. Quote Link to comment Share on other sites More sharing options...
shdwlrd Posted May 13, 2018 Share Posted May 13, 2018 3 hours ago, blowfish said: I haven't been able to reproduce this. I tried adding, removing, and deleting a file and it detected the change every time. Maybe if you can get more info on exactly what's MM is seeing (should be a lot of info in the log). Unfortunately I've played that install since then. I didn't think of saving the logs since I didn't see any obvious errors noted in them. The only thing is I had to refresh that install since it somehow got corrupted. Maybe that was causing it? If I see that behavior again I'll save the logs and let you. Quote Link to comment Share on other sites More sharing options...
Delay Posted May 20, 2018 Share Posted May 20, 2018 Okay, I just installed MM. I don't know if this is normal (highly probably, though), but I don't like the fact that the startup images are cycling at a ludicrous speed. Is it possible to slow to the original speed? Quote Link to comment Share on other sites More sharing options...
strudo76 Posted May 29, 2018 Share Posted May 29, 2018 Hey there I'd like to modify some experiments to allow the science to be collected (only by scientists), and disable the ability to reset the experiment. Is that possible to do with MM? I see the dataIsCollectable and collectActionName in the part definition, but nothing that refers to which trait can perform the collection. There is also the resetActionName key. I assume if I remove that key, the option to reset will disappear effectively implementing the second part of my request, but is that the best way to go about this? Also is there any way to affect the amount of experience a Kerbal gets for performing the tasks? Or a way to change the amount of experience required to reach each star? I'd like to be able to have my Kerbals become 4 star without needing to leave the Kerbin SOI. Thanks Quote Link to comment Share on other sites More sharing options...
Snark Posted June 8, 2018 Share Posted June 8, 2018 On 5/28/2018 at 6:51 PM, strudo76 said: I'd like to modify some experiments to allow the science to be collected (only by scientists), and disable the ability to reset the experiment. Is that possible to do with MM? I see the dataIsCollectable and collectActionName in the part definition, but nothing that refers to which trait can perform the collection. There is also the resetActionName key. I assume if I remove that key, the option to reset will disappear effectively implementing the second part of my request, but is that the best way to go about this? Also is there any way to affect the amount of experience a Kerbal gets for performing the tasks? Or a way to change the amount of experience required to reach each star? I'd like to be able to have my Kerbals become 4 star without needing to leave the Kerbin SOI. All good questions. However, would probably be better to ask these questions over in the Add-on Development forum, since these really have nothing to do with ModuleManager itself-- they're about how the various properties on KSP parts work. This topic's a good place to ask "How do I get ModuleManager to <do a thing to config>" questions. Your questions are about the contents of the config itself, which is a separate issue that doesn't involve ModuleManager per se. ------------------ ...So, on an unrelated note, a question to the community here: Could someone point me at where I could find information about how the :FOR[...] directive works, what it does, why it's needed, etc.? I recently came across it for the first time, am trying to figure it out, and am having a dickens of a time figuring it out. In fact, I can't find any documentation for any of the conditional-application directives (FOR, NEEDS, AFTER, BEFORE, etc.), other than a brief mention of FINAL in the handbook. Places I've looked: The syntax wiki The handbook wiki The OP of this thread Searching for :FOR in this thread (turns up no results) ...I'm guessing that it's probably discussed somewhere in the depths of this thread, but the thread's so gargantuan at this point that I've no idea where to look. I've written a fair amount of MM config, including using NEEDS and AFTER and such, but that was based on informal looking-around-at-people's-config. Can anyone point me at info on this? About FOR in particular, since it seems to work in ways that I'm having trouble deducing. Any information appreciated. Quote Link to comment Share on other sites More sharing options...
DStaal Posted June 8, 2018 Share Posted June 8, 2018 3 minutes ago, Snark said: ...So, on an unrelated note, a question to the community here: Could someone point me at where I could find information about how the :FOR[...] directive works, what it does, why it's needed, etc.? I recently came across it for the first time, am trying to figure it out, and am having a dickens of a time figuring it out. In fact, I can't find any documentation for any of the conditional-application directives (FOR, NEEDS, AFTER, BEFORE, etc.), other than a brief mention of FINAL in the handbook. Places I've looked: The syntax wiki The handbook wiki The OP of this thread Searching for :FOR in this thread (turns up no results) ...I'm guessing that it's probably discussed somewhere in the depths of this thread, but the thread's so gargantuan at this point that I've no idea where to look. I've written a fair amount of MM config, including using NEEDS and AFTER and such, but that was based on informal looking-around-at-people's-config. Can anyone point me at info on this? About FOR in particular, since it seems to work in ways that I'm having trouble deducing. Any information appreciated. Best page I know of is probably here: https://github.com/sarbian/ModuleManager/wiki/Patch-Ordering Though you should probably check out this section as well: https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax#mod-dependency-checking However, it's best to think of ':FOR' as something different than a conditional application directive - because it's actually unconditional. 'NEEDS' or the rest require the mod named to be there to activate. 'FOR' instead declares the mod. The only time you should be using ':FOR[modname]' is when you're the author of modname - because by using that, you've said 'this patch is a part of 'modname''. As such, it's rarely needed - but it is useful when mods are in sub-directories under a common folder in GameData and have no DLLs, or if you're making a large pack of parts and want to organize them into sub-mods internally in KSP for various reasons. The single most common bug I've run into when looking at mods is miss-using the ':FOR' directive. And it is a headache-inducing error, as it causes *other* mods to misbehave. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted June 10, 2018 Share Posted June 10, 2018 I'm trying to make this patch work: There was a common patch which only had specific patches for some stock antennas, but I want to have it work on all DIRECT and RELAY antennas depending their range. //Add Class Descriptions to antennas by range. //Author: Gordon Dry @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[<500000]]:HAS[#antennaType[DIRECT]]:FINAL { +description ^= :^:<color=orange>Class 1 Antenna DIRECT.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[<500000]]:HAS[#antennaType[RELAY]]:FINAL { +description ^= :^:<color=orange>Class 1 Antenna RELAY.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>499999],#antennaPower[<2000000001]]:HAS[#antennaType[DIRECT]]:FINAL { +description ^= :^:<color=orange>Class 2 Antenna DIRECT.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>499999],#antennaPower[<2000000001]]:HAS[#antennaType[RELAY]]:FINAL { +description ^= :^:<color=orange>Class 2 Antenna RELAY.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>2000000000],#antennaPower[<250000000001]]:HAS[#antennaType[DIRECT]]:FINAL { +description ^= :^:<color=orange>Class 3 Antenna DIRECT.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>2000000000],#antennaPower[<250000000001]]:HAS[#antennaType[RELAY]]:FINAL { +description ^= :^:<color=orange>Class 3 Antenna RELAY.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>250000000000],#antennaPower[<1000000000001]]:HAS[#antennaType[DIRECT]]:FINAL { +description ^= :^:<color=orange>Class 4 Antenna DIRECT.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>250000000000],#antennaPower[<1000000000001]]:HAS[#antennaType[RELAY]]:FINAL { +description ^= :^:<color=orange>Class 4 Antenna RELAY.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>1000000000000]]:HAS[#antennaType[DIRECT]]:FINAL { +description ^= :^:<color=orange>Class 5 Antenna DIRECT.</color> : } @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:HAS[#antennaPower[>1000000000000]]:HAS[#antennaType[RELAY]]:FINAL { +description ^= :^:<color=orange>Class 5 Antenna RELAY.</color> : } What happens is that the last line applies to all antennas, no matter if DIRECT, RELAY or even INTERNAL. What exactly is the syntax error? This patch works without MM errors btw. Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 10, 2018 Share Posted June 10, 2018 6 minutes ago, Gordon Dry said: I'm trying to make this patch work: There was a common patch which only had specific patches for some stock antennas, but I want to have it work on all DIRECT and RELAY antennas depending their range. *snip* What happens is that the last line applies to all antennas, no matter if DIRECT, RELAY or even INTERNAL. What exactly is the syntax error? This patch works without MM errors btw. Check your brackets. You have multiple :HAS blocks at the top level. You want :HAS[@MODULE[ModuleDataTransmitter]:HAS[#antennaPower[>1000000000000],#antennaType[RELAY]]] 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.