Sigma88 Posted April 13, 2016 Share Posted April 13, 2016 Just now, sarbian said: Or using the version built for 1.1 works better on 1.1. oh well, that's your fault for not making the mod universally compatible with all KSP builds (I'm joking of course, please don't 2.3.f me ) Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted April 15, 2016 Share Posted April 15, 2016 this is probably the wrong thread to ask this, but I have absolutely no idea where to ask so.... Would it be possible to make solar panels produce Ec/s when deployed regardless of solar irradiation? like they were RTGs Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 15, 2016 Share Posted April 15, 2016 4 hours ago, Sigma88 said: this is probably the wrong thread to ask this, but I have absolutely no idea where to ask so.... Would it be possible to make solar panels produce Ec/s when deployed regardless of solar irradiation? like they were RTGs Probably. I'd look at the configs for the stock radiators. Quote Link to comment Share on other sites More sharing options...
Streetwind Posted April 16, 2016 Share Posted April 16, 2016 (edited) Question! What happens if I apply a multiplication to a field that has multiple values? For example: SomeModule { key = 0 100 key = 1 1000 } Assume I want to write a patch that, for both keys, multiplies the second value with 0.5. Usually in this case I'd go @fieldName *= 0.5. But these fields have two values in them. I would fully expect the first value to be multiplied, and I don't want that, because it screws up the second key. Is there a way I can do this without "hardcoding" the new values? The multiplier is meant to be variable. Edited April 16, 2016 by Streetwind Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted April 16, 2016 Share Posted April 16, 2016 2 minutes ago, Streetwind said: Question! What happens if I apply a multiplication to a field that has multiple values? For example: SomeModule { key = 0 100 key = 1 1000 } Assume I want to write a patch that, for both keys, multiplies the second value with 0.5. Usually in this case I'd go @fieldName *= 0.5. But these fields have two values in them. I would fully expect the first value to be multiplied, and I don't want that, because it screws up the second key. Is there a way I can do this without "hardcoding" the new values? The multiplier is meant to be variable. Yes @key,1[*, ] /= 2 @key,1 targets the second key [*, ] selects all the elements of that key /= 2 divides them by 2 Quote Link to comment Share on other sites More sharing options...
Streetwind Posted April 16, 2016 Share Posted April 16, 2016 (edited) Nice, ModuleManager delivers as usual. But how would I write it if I wanted to select not all elements, but specifically the second element in a list of elements? I'm not clear on the syntax of that selection statement. Edited April 16, 2016 by Streetwind Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted April 16, 2016 Share Posted April 16, 2016 1 minute ago, Streetwind said: Nice, ModuleManager delivers as usual. But how would I write it if I wanted to select not all elements, but specifically the second element in a list of elements? I'm not clear on the syntax of that selection statement. The square brackets specify which elements you want to edit In a comma separated list ( key = A,B,C ) You can just put the number of the element you want to edit So @key[0] Will target the first element (A) [1] the second (B) and so on Since you have a space separated list you need to use [1, ] If instead of using number you use * your patch will target all the elements Quote Link to comment Share on other sites More sharing options...
Streetwind Posted April 16, 2016 Share Posted April 16, 2016 Perfect, thanks! Quote Link to comment Share on other sites More sharing options...
Streetwind Posted April 16, 2016 Share Posted April 16, 2016 (edited) Okay, while I'm in the business of asking questions: Is there a way I can reload my MM patches without restarting the client, for example to import changes I've just made? KSP has a button to reload the base config files, but that doesn't include patches. Edited April 16, 2016 by Streetwind Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 16, 2016 Share Posted April 16, 2016 9 minutes ago, Streetwind said: Okay, while I'm in the business of asking questions: Is there a way I can reload my MM patches without restarting the client, for example to import changes I've just made? KSP has a button to reload the base config files, but that doesn't include patches. Alt+F11 from the main menu or space center -> "Reload Database" or "Quick Reload Database" (the only difference I'm aware of is that quick reload doesn't re-render drag cubes). Quote Link to comment Share on other sites More sharing options...
Streetwind Posted April 16, 2016 Share Posted April 16, 2016 (edited) 14 minutes ago, blowfish said: Alt+F11 from the main menu or space center -> "Reload Database" or "Quick Reload Database" (the only difference I'm aware of is that quick reload doesn't re-render drag cubes). That is the stock KSP buttion I mentioned in my post. It does not reload MM patches - in fact, it overwrites previously applied patches with the base configs again. =/ Edited April 16, 2016 by Streetwind Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 16, 2016 Share Posted April 16, 2016 Just now, Streetwind said: That is the stock KSP buttion I mentioned in my post. It does not reload MM patches - in fact, it overwrites previously applied patches with the base configs again. =/ Alt+F11 should open up a window titled "Module Manager" (plus some version information) with 3 buttons. Does it not? Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 17, 2016 Share Posted April 17, 2016 @sarbian I have a user who is saying that some changes I sent him aren't being applied. So I'd like to see what the final cfg for a part is after all changes. Is there any way I can do that? I thought dumping the database would do that (alt-f11), but when I looked at my system's output, the changes which I knew had been applied weren't there, it appeared to be the original cfg. Thanks Quote Link to comment Share on other sites More sharing options...
sarbian Posted April 17, 2016 Author Share Posted April 17, 2016 5 hours ago, linuxgurugamer said: @sarbian I have a user who is saying that some changes I sent him aren't being applied. So I'd like to see what the final cfg for a part is after all changes. Is there any way I can do that? I thought dumping the database would do that (alt-f11), but when I looked at my system's output, the changes which I knew had been applied weren't there, it appeared to be the original cfg. Thanks The ModuleManager.ConfigCache has the whole config. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 17, 2016 Share Posted April 17, 2016 (edited) 2 hours ago, sarbian said: The ModuleManager.ConfigCache has the whole config. Thanks Edited April 17, 2016 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 17, 2016 Share Posted April 17, 2016 Another question: Is there a way to run MM against individual files? What I'm looking to do is to apply all the patches and make a new zip file without any patches. Thanks LGG Quote Link to comment Share on other sites More sharing options...
Streetwind Posted April 17, 2016 Share Posted April 17, 2016 (edited) 14 hours ago, blowfish said: Alt+F11 should open up a window titled "Module Manager" (plus some version information) with 3 buttons. Does it not? Ooohhh... Alt+F11, not F12! It was near midnight and I was having the dumb, apparently. You are of course correct. Edited April 17, 2016 by Streetwind Quote Link to comment Share on other sites More sharing options...
sarbian Posted April 19, 2016 Author Share Posted April 19, 2016 2.6.22 for 1.1 is out Quote Link to comment Share on other sites More sharing options...
Nnimrod Posted April 19, 2016 Share Posted April 19, 2016 33 minutes ago, sarbian said: 2.6.22 for 1.1 is out Thanks Quote Link to comment Share on other sites More sharing options...
11of10 Posted April 21, 2016 Share Posted April 21, 2016 10 hours ago, Stone Blue said: I dont know if any one else noticed, but with 1.1, if you DONT want KSP to run in the background if you switch windows, now the game also DOES NOT LOAD, while focusing on a different window... So, so much for surfing the web, or playing MS Solitaire while it takes 15 mins for your heavily modded install to load. Either you have to stay focused on the loading screen, and go do something NOT on your computer while you wait, OR you HAVE to have KSP run in the background if you switch windows during gameplay, OR you have to go into the Settings menu EVERY time you start your game, AND EVERY time before you CLOSE your game to switch the setting... Squad, if possible, PLEASE make the Simulate in Background setting ONLY affect gameplay, and NOT game loading like it always has been pre-1.1... 6 minutes ago, sarbian said: Can you post in ModuleManager thread so I don't forget about it ? I ll add something to force the value until the main menu Quote Link to comment Share on other sites More sharing options...
Brucey Posted April 22, 2016 Share Posted April 22, 2016 Is there a mm code to apply a universal nerf to all parts with reaction wheels? Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 22, 2016 Share Posted April 22, 2016 5 hours ago, Brucey said: Is there a mm code to apply a universal nerf to all parts with reaction wheels? I can walk you through creating it. How much about MM patches do you know already? Quote Link to comment Share on other sites More sharing options...
eggrobin Posted April 22, 2016 Share Posted April 22, 2016 (edited) On 8/12/2014 at 1:20 AM, NonWonderDog said: I think that and a bit of cleverness would allow any math people anyone would reasonably want to do. With clever enough use of regexes it might even turn out to be Turing complete. (No, wait, we'd still need a way to make a loop...) On 2/16/2016 at 10:52 PM, sarbian said: Ok, new features time. v2.619 1. "MM_PATCH_LOOP {}" nodes. They will have the current node loop on the active top node until the HAS condition is not valid anymore. It has some really specific use from complex patch and can easily lead to infinite loops. And thus we have another case of accidental Turing-completeness. Proof—see also gist: Machine { State { state = a } } @Machine:HAS[@State:HAS[~state[halt]]] { MM_PATCH_LOOP{} // Clean up the mess. !MM_PATCH_LOOP{} @State:HAS[~stepped[*]] { stepped = false } @State:HAS[~left_tape[*]] { left_tape = ... } @State:HAS[~right_tape[*]] { right_tape = ... } @State:HAS[~symbol[*]] { symbol = 0 } // Feed tape for one step. @State:HAS[~left_tape[*,...]] { @left_tape = 0,... } @State:HAS[~right_tape[*,...]] { @right_tape = 0,... } // We step only once per iteration, that way the tape fed above is enough. @State { @stepped = false } // Transition table (3-state 2-symbol busy beaver). @State:HAS[#symbol[0],#state[a],#stepped[false]] { // Write 1, move left @right_tape = #1,$right_tape$ @symbol = #$left_tape[0]$ @left_tape ^= /[^,]+,(.*)/$1/ @state = b @stepped = true } @State:HAS[#symbol[0],#state[b],#stepped[false]] { // Write 1, move right @left_tape = #1,$left_tape$ @symbol = #$right_tape[0]$ @right_tape ^= /[^,]+,(.*)/$1/ @state = a @stepped = true } @State:HAS[#symbol[0],#state[c],#stepped[false]] { // Write 1, move right @left_tape = #1,$left_tape$ @symbol = #$right_tape[0]$ @right_tape ^= /[^,]+,(.*)/$1/ @state = b @stepped = true } @State:HAS[#symbol[1],#state[a],#stepped[false]] { // Write 1, move right @left_tape = #1,$left_tape$ @symbol = #$right_tape[0]$ @right_tape ^= /[^,]+,(.*)/$1/ @state = c @stepped = true } @State:HAS[#symbol[1],#state[b],#stepped[false]] { // Write 1, move left @right_tape = #1,$right_tape$ @symbol = #$left_tape[0]$ @left_tape ^= /[^,]+,(.*)/$1/ @state = b @stepped = true } @State:HAS[#symbol[1],#state[c],#stepped[false]] { @state = halt @stepped = true } } // Cleanup. @Machine:HAS[@State:HAS[#state[halt]]] { @State { !stepped = delete } } // Output: // Machine { // State { // state = halt // left_tape = 1,1,0,... // right_tape = 1,1,1,0,... // symbol = 1 // } // } The above is the 3-state 2-symbol busy beaver, but it is straightforward to encode any Turing machine in a similar manner. As an immediate corollary, whether ModuleManager will halt on a given set of cfg files is undecidable. Thanks to @Sigma88 for helping me understand ModuleManager's features. Edited July 6, 2017 by eggrobin Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted April 22, 2016 Share Posted April 22, 2016 20 minutes ago, eggrobin said: And thus we have another case of accidental Turing-completeness. Proof—see also gist: Machine { State { state = a } } @Machine:HAS[@State:HAS[~state[halt]]] { MM_PATCH_LOOP{} // Clean up the mess. !MM_PATCH_LOOP{} @State:HAS[~stepped[*]] { stepped = false } @State:HAS[~left_tape[*]] { left_tape = ... } @State:HAS[~right_tape[*]] { right_tape = ... } @State:HAS[~symbol[*]] { symbol = } // Feed tape for one step. @State:HAS[~left_tape[*,...]] { @left_tape = ,... } @State:HAS[~right_tape[*,...]] { @right_tape = ,... } // We step only once per iteration, that way the tape fed above is enough. @State { @stepped = false } // Transition table (3-state 2-symbol busy beaver). @State:HAS[#symbol[],#state[a],#stepped[false]] { // Write 1, move left @right_tape = #1,$right_tape$ @symbol = #$left_tape[0]$ @left_tape ^= /[^,]+,(.*)/$1/ @state = b @stepped = true } @State:HAS[#symbol[],#state[b],#stepped[false]] { // Write 1, move right @left_tape = #1,$left_tape$ @symbol = #$right_tape[0]$ @right_tape ^= /[^,]+,(.*)/$1/ @state = a @stepped = true } @State:HAS[#symbol[],#state[c],#stepped[false]] { // Write 1, move right @left_tape = #1,$left_tape$ @symbol = #$right_tape[0]$ @right_tape ^= /[^,]+,(.*)/$1/ @state = b @stepped = true } @State:HAS[#symbol[1],#state[a],#stepped[false]] { // Write 1, move right @left_tape = #1,$left_tape$ @symbol = #$right_tape[0]$ @right_tape ^= /[^,]+,(.*)/$1/ @state = c @stepped = true } @State:HAS[#symbol[1],#state[b],#stepped[false]] { // Write 1, move left @right_tape = #1,$right_tape$ @symbol = #$left_tape[0]$ @left_tape ^= /[^,]+,(.*)/$1/ @state = b @stepped = true } @State:HAS[#symbol[1],#state[c],#stepped[false]] { @state = halt @stepped = true } } // Cleanup. @Machine:HAS[@State:HAS[#state[halt]]] { @State { !stepped = delete } } // Output: // Machine { // State { // state = halt // left_tape = 1,1,0,... // right_tape = 1,1,1,0,... // symbol = 1 // } // } The above is the 3-state 2-symbol busy beaver, but it is straightforward to encode any Turing machine in a similar manner. ∎ As an immediate corollary, whether ModuleManager will halt on a given set of cfg files is undecidable. What a geek Quote Link to comment Share on other sites More sharing options...
Brucey Posted April 22, 2016 Share Posted April 22, 2016 11 hours ago, blowfish said: I can walk you through creating it. How much about MM patches do you know already? I'd call myself a novice. I know enough to go find all the parts with a text editor and make changes manually. I'm wondering if there's code that just says, "for all parts with reaction wheels, multiply torque values by x" 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.