Jump to content

[1.8.x-1.12.x] Module Manager 4.2.3 (July 03th 2023) - Fireworks season


sarbian

Recommended Posts

Hello fellow KSP-addicts! I have long been thinking (and dreaming) about a patch that adds "[Stock]" in front of every ingame stock part name. I have tried to program something myself several times but failed miserably every time. With increasingly less time for playing KSP (so sad) I find it increasingly difficult to remember just from the manufacturer's name whether a part is actually stock or from a mod, which is a problem for posting vessels online or sharing them on KerbalX or elsewhere. Anybody have an idea how to start? I've been thinking about telling MM to just use every part not safed in "Squad", how do I do that?

Link to comment
Share on other sites

  On 5/1/2017 at 8:06 AM, Flow said:

Hello fellow KSP-addicts! I have long been thinking (and dreaming) about a patch that adds "[Stock]" in front of every ingame stock part name. I have tried to program something myself several times but failed miserably every time. With increasingly less time for playing KSP (so sad) I find it increasingly difficult to remember just from the manufacturer's name whether a part is actually stock or from a mod, which is a problem for posting vessels online or sharing them on KerbalX or elsewhere. Anybody have an idea how to start? I've been thinking about telling MM to just use every part not safed in "Squad", how do I do that?

Expand  

Try this to filter by mod name, thus hiding all parts from other mods:

 

Link to comment
Share on other sites

Oh, I didn't know Janitor could filter by mod name. Not exactly what I had in mind but I'll give it a try. Thanks!

Edited by Flow
Link to comment
Share on other sites

Hey KSP family,

I really need some help with a handful of patches. I am playing a heavily modded game (part wise), but the main mechanic changes I have come with KSP Interstellar. I'll put each patch here and explain what I'm trying to do with them and maybe some of the fine folks here may be able to give me some help to correct the syntax and get these working. It takes about 15 minutes for my game to load, so troubleshooting these is not the easiest, and for most of the patches below I've tried making them work for over a month :/ 

  • First patch (for the Selectable Data Transmitter mod), I'm trying to add the selectability module to every antenna I have in the game, however even if I were to get this working I'd rather not make every antenna OP, I'd like a way to keep the default antenna settings (packet size, etc.) transfer between direct > relay or vice-versa. :
  • Does not work yet, going to get help from mod authors thread and report answer here.
     
  Reveal hidden contents
  • Next, I'm trying to give the ability to the KSPi ISRUs to generate basic stock resources like the stock ISRU so I don't need multiple for one mission. This isn't as important as I could always just edit the part files as a worst case, but I much prefer a MM patch:
  • [FIXED]
     
  Reveal hidden contents
  • Here I'm trying to give probes the ability to act as control points to take away the need for antennas in order to control them (doesn't make sense to me, they are basically computers anyways with internal antennas anyway). I'm not sure if this would do it or which module is necessary for this to work so I added the three that seemed most likely, so this one could probably be trimmed to a singular MODULE addition, but none of these get added with my config:
  • [FIXED]
     
  Reveal hidden contents
  • Finally, trying to add the graduated power responses found from the KW configs to all non SRB engines in the game (the "HAS[~useEngineResponseTime[]]" came from help in the community MM thread, as a way of not over-writing the configurations of the KW engines):
  • [FIXED]
     
  Reveal hidden contents

 

 

I figured adding all in one post would be better than creating 4 different posts, so I'm not expecting fixes for all of them at once, but if anyone has some helpful info on how I could get these to work I'd appreciate it!

 

Update 1: Fixed up the post to make it easier to browse by and updated the fixed configurations and the others to potentially fixed until I have tested them to verify

Update 2: Every MM patch fixed except the SelectableDataTransmitter one.

Edited by shoe7ess
Link to comment
Share on other sites

@shoe7ess For the first one, it is possible to change the Module being used without removing the existing data if all of the parameters are the same.  For my Electric Lights mod, I only needed to add one variable in my code, so in C# I made an inheriting class of ModuleAnimateGeneric that would also consume electricity.  Then using an MM script, I simply changed the name of the module.

If all the variable names are the same between ModuleDataTransmitter and SelectableDataTransmitter then you can do the same thing (if it is inherited, it has to be the same).  Here is one of the scripts from Electric Lights.

@PART[Mark1Cockpit]:FOR[ElectricLights]
{
	@MODULE[ModuleAnimateGeneric]
	{
		@name = ModuleAnimateGenericConsumer
		%resourceAmount = 0.01
    }
}

So here, the module is ModuleAnimateGeneric upon entering the script, but then I change that to ModuleAnimateGenericConsumer (my mod class, inherits ModuleAnimateGeneric).  All the previous variables in that were set on the Module will be retained and then I add one more.. resourceAmount.

Edited by Alshain
Link to comment
Share on other sites

  On 5/2/2017 at 5:13 AM, shoe7ess said:

First patch (for the Selectable Data Transmitter mod), I'm trying to add the selectability module to every antenna I have in the game, however even if I were to get this working I'd rather not make every antenna OP, I'd like a way to keep the default antenna settings (packet size, etc.) transfer between direct > relay or vice-versa. :

Expand  

It's PART, not part. This is the basic idea, but will give errors when values in the base module are not set and left to default like DeployFxModules and antennaCombinableExponent. I'm not sure of an elegant way to handle that. SelectableDataTransmitter  inherits from ModuleDataTransmitter so it should be safe (famous last words) to just rename it and leave everything in place.

  Reveal hidden contents

 

  On 5/2/2017 at 5:13 AM, shoe7ess said:

Next, I'm trying to give the ability to the KSPi ISRUs to generate basic stock resources like the stock ISRU so I don't need multiple for one mission. This isn't as important as I could always just edit the part files as a worst case, but I much prefer a MM patch:

Expand  

PART, not part.

  On 5/2/2017 at 5:13 AM, shoe7ess said:

Here I'm trying to give probes the ability to act as control points to take away the need for antennas in order to control them (doesn't make sense to me, they are basically computers anyways with internal antennas anyway). I'm not sure if this would do it or which module is necessary for this to work so I added the three that seemed most likely, so this one could probably be trimmed to a singular MODULE addition, but none of these get added with my config:

Expand  

I think there's a setting for requiring connections for probe control.

  On 5/2/2017 at 5:13 AM, shoe7ess said:

Finally, trying to add the graduated power responses found from the KW configs to all non SRB engines in the game (the "HAS[~useEngineResponseTime[]]" came from help in the community MM thread, as a way of not over-writing the configurations of the KW engines):

Expand  

You're missing opening and closing braces.

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 5/2/2017 at 8:00 AM, Jso said:

It's PART, not part. This is the basic idea, but will give errors when values in the base module are not set and left to default like DeployFxModules and antennaCombinableExponent. I'm not sure of an elegant way to handle that. SelectableDataTransmitter  inherits from ModuleDataTransmitter so it should be safe (famous last words) to just rename it and leave everything in place.

  Reveal hidden contents

 

PART, not part.

I think there's a setting for requiring connections for probe control.

You're missing opening and closing braces.

  Reveal hidden contents

 

Expand  

Yeah, I figured out the power response curves one after I made that edit I think and forgot to add the brackets here, and the idea for the probe control is I want to be able to launch it without an external antenna, relying on it's internal antenna for range and if it leaves that then at that point it becomes uncontrollable (or if it has a high internal range, when it leaves the horizon), otherwise I'd use the setting you suggested. As far as the ISRU... if that's seriously the only thing that was holding that up I will be annoyed as I went ahead and wrote it into each relevant part >.< but thanks for the help!

 

  On 5/2/2017 at 7:46 AM, Alshain said:

@shoe7ess For the first one, it is possible to change the Module being used without removing the existing data if all of the parameters are the same.  For my Electric Lights mod, I only needed to add one variable in my code, so in C# I made an inheriting class of ModuleAnimateGeneric that would also consume electricity.  Then using an MM script, I simply changed the name of the module.

If all the variable names are the same between ModuleDataTransmitter and SelectableDataTransmitter then you can do the same thing (if it is inherited, it has to be the same).  Here is one of the scripts from Electric Lights.

@PART[Mark1Cockpit]:FOR[ElectricLights]
{
	@MODULE[ModuleAnimateGeneric]
	{
		@name = ModuleAnimateGenericConsumer
		%resourceAmount = 0.01
    }
}

So here, the module is ModuleAnimateGeneric upon entering the script, but then I change that to ModuleAnimateGenericConsumer (my mod class, inherits ModuleAnimateGeneric).  All the previous variables in that were set on the Module will be retained and then I add one more.. resourceAmount.

Expand  

I wish it was that easy, for the selectabledatatransmitter mod the main module only takes the 2 arguments (defaultAntennaType and reconfigTime). I can do the re-naming in order to keep the default antenna type settings as they were as well as add those two new settings, but if I switch it to a relay for instance it needs all the antenna information again, so I'm not sure how to re-use the default antenna variables for each selectable instance to keep it from being OP, though I know there is a way. OP of that mod has a section for necessary changes to make it work on another antenna that's a little too long to post here, but basically my original MM patch was a copy/paste of his setup and I've changed it as I've experimented with getting it working but hadn't thought about renaming, which at least can preserve the original antennas settings. Thanks for the continued help by the way :D

 

Edit: Apparently the update I did to my original post didn't stick, but I had figured out the power response curves and probe control issues a couple hours ago, so it's just the ISRU and Selectable Data Transmitter configs that I need to test now that I have the help of Alshain and Jso.

Update 2: The part > PART switch made the ISRU for KSPi work, so the last one that needs fixed is the selectable data transmitter. I may go to that forum and get some advice because there is no reason why it shouldn't be working at this point. Thanks again guys!

Edited by shoe7ess
Link to comment
Share on other sites

I need a little help.  I'm trying to remove a resource from a part using the following code but it isn't working as I would expect.  This is part of a bigger patch and all other changes are working so it is modifying the part, just not removing the resources.

	-RESOURCE[LiquidFuel] {}
	-RESOURCE[Oxidizer] {}

EDIT: Nevermind, it was working but had mod conflict.  ModularFuels was taking hold first, I just had to prioritize ahead of it.

Edited by Alshain
Link to comment
Share on other sites

Hi all,

 

Every time i try to update my module manager from 2.6.25 to 2.7.5 the parachutes no longer work, and when i put 2.6.25 back to the drag physics seem to be broken, am i installing this correctly? (just copying it into the GameData file and removing the old Module Manager)

also how can i get the log files? my KSP is saved in a different drive to the standard C: drive and i cant seem to find them

 

thanks for the help

Link to comment
Share on other sites

  On 5/7/2017 at 2:08 PM, Kerbinkind said:

Hi all,

 

Every time i try to update my module manager from 2.6.25 to 2.7.5 the parachutes no longer work, and when i put 2.6.25 back to the drag physics seem to be broken, am i installing this correctly? (just copying it into the GameData file and removing the old Module Manager)

also how can i get the log files? my KSP is saved in a different drive to the standard C: drive and i cant seem to find them

 

thanks for the help

Expand  

This post will show you how to find your logs:

 

Link to comment
Share on other sites

  On 5/7/2017 at 2:08 PM, Kerbinkind said:

Hi all,

 

Every time i try to update my module manager from 2.6.25 to 2.7.5 the parachutes no longer work, and when i put 2.6.25 back to the drag physics seem to be broken, am i installing this correctly? (just copying it into the GameData file and removing the old Module Manager)

also how can i get the log files? my KSP is saved in a different drive to the standard C: drive and i cant seem to find them

 

thanks for the help

Expand  

Well if you know where your GameData folder is you click one folder past it where the log is it's back in KSP main folder

Link to comment
Share on other sites

  On 5/7/2017 at 6:40 PM, MeCripp said:

Well if you know where your GameData folder is you click one folder past it where the log is it's back in KSP main folder

Expand  

Thanks Cripp, i see some logs it spat out previously when the game has crashed, but i cant find any current logs (the last time my game crashed was late last year) is there any way i can get some current logs?

 

Link to comment
Share on other sites

  On 5/8/2017 at 12:17 PM, Kerbinkind said:

Thanks Cripp, i see some logs it spat out previously when the game has crashed, but i cant find any current logs (the last time my game crashed was late last year) is there any way i can get some current logs?

 

Expand  

output_log.txt and KSP.log will always be current

Link to comment
Share on other sites

anyone else seeing MM getting stuck doing a database reload (either full or quick)? After 5mins for me it's only at 36% and the KSP.log says MM takes just over 4min during game load to get all its stuff done. The game is not frozen up either, can still pan around the Space Center screen no problem, but no more updates from MM are being written to the log.

Here's my log - I made a note where I hit Alt+F4 to terminate the game

Still, even if the reload worked would it have really taken ~4min to complete? Shouldn't there be a better way to load new values into the game when you're only trying to tweak a single patch?

Edited by Drew Kerman
Link to comment
Share on other sites

  On 5/8/2017 at 3:35 PM, Drew Kerman said:

anyone else seeing MM getting stuck doing a database reload (either full or quick)? After 5mins for me it's only at 36% and the KSP.log says MM takes just over 4min during game load to get all its stuff done. The game is not frozen up either, can still pan around the Space Center screen no problem, but no more updates from MM are being written to the log.

Here's my log - I made a note where I hit Alt+F4 to terminate the game

Still, even if the reload worked would it have really taken ~4min to complete? Shouldn't there be a better way to load new values into the game when you're only trying to tweak a single patch?

Expand  

That would be nice, but I've only been successful in reloading the db ingame on very light installs. So when tweaking patched I usually work on a very light install, and usually actually reload the game entirely.....

Link to comment
Share on other sites

  On 5/8/2017 at 4:24 PM, Warezcrawler said:

That would be nice, but I've only been successful in reloading the db ingame on very light installs. So when tweaking patched I usually work on a very light install, and usually actually reload the game entirely.....

Expand  

yea stripping down to bare needs was a consideration, but not sure why MM never had an option to define a set number of configs to reload rather than the whole DB. May just not be possible the way it works?

Link to comment
Share on other sites

  On 5/8/2017 at 4:26 PM, Drew Kerman said:

yea stripping down to bare needs was a consideration, but not sure why MM never had an option to define a set number of configs to reload rather than the whole DB. May just not be possible the way it works?

Expand  

I don't know. Maybe it was just a choice of how much work to put into developing that piece of functionality rather than if it is possible... My guess is that if you can reload everything, then you can also load more targeted... But is it worth the time for the mod maker is basically the real question I guess... Only sarbian can answer that in regards to MM.

With or without this, MM is still the most essential mod. It is what makes mod making for everyone!

Link to comment
Share on other sites

  On 5/8/2017 at 4:30 PM, Warezcrawler said:

I don't know. Maybe it was just a choice of how much work to put into developing that piece of functionality rather than if it is possible... My guess is that if you can reload everything, then you can also load more targeted... But is it worth the time for the mod maker is basically the real question I guess... Only sarbian can answer that in regards to MM.

Expand  

I think the lack of it may stem from the fact that most developers only ever test and iterate on values with their own mods, and when doing so that's usually all they have installed at the time. makes sense.

 

Edited by Drew Kerman
Link to comment
Share on other sites

  On 5/8/2017 at 4:26 PM, Drew Kerman said:

yea stripping down to bare needs was a consideration, but not sure why MM never had an option to define a set number of configs to reload rather than the whole DB. May just not be possible the way it works?

Expand  

this was already asked and answered in the past

let me see if I can find it

Link to comment
Share on other sites

  On 5/8/2017 at 4:26 PM, Drew Kerman said:

not sure why MM never had an option to define a set number of configs to reload rather than the whole DB. May just not be possible the way it works?

Expand  

I think this would be a lot less trivial than you think.  MM doesn't keep track of what patches apply to what.  So if you wanted to reload a particular e.g. PART, you'd basically have to go through every patch anyway to figure out which ones would apply to it.  If you wanted to reload a particular patch, you'd have to start from scratch since everything currently in the database would already have the old patch applied.  Plus, MM has no way of knowing exactly what nodes affect what in the game.  Knowing that a PART node affects a part with that name is simple enough, but there's a lot of other stuff in the game database.

Link to comment
Share on other sites

  On 5/8/2017 at 5:01 PM, blowfish said:

I think this would be a lot less trivial than you think.  MM doesn't keep track of what patches apply to what.  So if you wanted to reload a particular e.g. PART, you'd basically have to go through every patch anyway to figure out which ones would apply to it.  If you wanted to reload a particular patch, you'd have to start from scratch since everything currently in the database would already have the old patch applied.  Plus, MM has no way of knowing exactly what nodes affect what in the game.  Knowing that a PART node affects a part with that name is simple enough, but there's a lot of other stuff in the game database.

Expand  

Plus how much can a mm reload take? 30seconds?

Link to comment
Share on other sites

  On 5/8/2017 at 5:16 PM, Sigma88 said:

Plus how much can a mm reload take? 30seconds?

Expand  

Well, maybe it should but it's not for me. Even on the quick reload it's taking several minutes and then just stops at around 36%. Could it be choking? I load about 12k patches

Edited by Drew Kerman
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...