Jump to content

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


sarbian

Recommended Posts

This does not explain why all of the other command modules retain the changes from the config file. The only one that looses the changes is the kerbin shuttle. I thought that maybe because it is not a stock part that there was something KSP did differently between stock and custom parts. However a couple of the mods that are included in the list above also have custom command pods.

Additionally on page 14 of this thread it is stated that it does reload when you refresh the database.

Edited by Mujun Kross
Link to comment
Share on other sites

It did in .22 but it does not work anymore in .23. Having the reload work is quite hard actually

With .23 reloading will patch *some* part but not all of them.

Edited by sarbian
Link to comment
Share on other sites

How do multiple MM config file interact with each other? If for example if I have one file that added something to a particular command pod, and another than adds something different to all command pods which value will end up being used? Does it matter what order the files are processed in, and if so does the file name matter?

Link to comment
Share on other sites

How do multiple MM config file interact with each other? If for example if I have one file that added something to a particular command pod, and another than adds something different to all command pods which value will end up being used? Does it matter what order the files are processed in, and if so does the file name matter?

Multiple files adding different items do not affect each other at all.

If they add the same thing then order might matters Or if one adds something that the other is checking for. Depends on how the config is constructed.

Config nodes are processed in two passes btw. First pass is anything without the :Final tag. Second pass is for configs with the :Final tag.

Link to comment
Share on other sites

EDIT Damnit Ninja'd...by nearly 20mins..?

If you use "@variablename = " multiple times/across multiple files then variablename will be equal to the last one executed. If you use "variablename = " (without the @) you will end up with several variables with the same name and potentially different values.

I think MM patches are executed in the same order as other cfgs (alphabetically by folder) but if you want to ensure your changes are aplied last, you can use ":final" eg

@PART[*]:HAS[~TechRequired[]]:Final

Edited by a__gun
Ninja'd
Link to comment
Share on other sites

Hmm, let say i have a engine part that have 2 model components, 1 for the engine itself and the other for auto shroud. How to remove the auto shround part with this?

edit: btw, since which version of this plugin had removed the ability to reload patch with DB reload? i want to revert to that version in my *mod* version ksp.

Edited by mwlue
Link to comment
Share on other sites

Is anyone able to help me out with this. I've been trying to wrap my head around trying to get module manager to check for this and to make the various changes.

I want it to search for instances of this:

MODULE
{
name = KethaneConverter
InputRates
{
Kethane = 2.75
ElectricCharge = 6
}
OutputRatios
{
Oxidizer = 1.01
}
}

and replace Kethane for Water which will look like this:

MODULE
{
name = KethaneConverter
InputRates
{
Water = 2.75
ElectricCharge = 6
}
OutputRatios
{
Oxidizer = 1.01
}
}

So it needs to detect a module called KethaneConverter that has an OutputRatios that has an element called Oxidizer AND an InputRates which has an element called Kethane. There are different modules throughout for different fuels. Once detected it needs to change the InputRates Kethane to Water.

So something like??

@PART[*]:HAS[@MODULE[KethaneConverter]:HAS[@InputRates[Kethane], @OutputRatios[Oxidizer]]]
{
@MODULE[KethaneConverter]
!InputRates
InputRates
{
Water = 2.75
ElectricCharge = 6
}
OutputRatios
{
Oxidizer = 1.01
}
}

Link to comment
Share on other sites

Hmm, let say i have a engine part that have 2 model components, 1 for the engine itself and the other for auto shroud. How to remove the auto shround part with this?

edit: btw, since which version of this plugin had removed the ability to reload patch with DB reload? i want to revert to that version in my *mod* version ksp.

No versions removed that ability. It stopped working (properly) in 0.23. I don't think it stopped working completely though.... ? Just on the second reload? Anyway, it's not a change in MM that's responsible, it's a change in 0.23

If it's for development work and what you're doing works in 0.22 then test there where possible.

Is anyone able to help me out with this. I've been trying to wrap my head around trying to get module manager to check for this and to make the various changes.

I want it to search for instances of this:

MODULE
{
name = KethaneConverter
InputRates
{
Kethane = 2.75
ElectricCharge = 6
}
OutputRatios
{
Oxidizer = 1.01
}
}

and replace Kethane for Water which will look like this:

MODULE
{
name = KethaneConverter
InputRates
{
Water = 2.75
ElectricCharge = 6
}
OutputRatios
{
Oxidizer = 1.01
}
}

So it needs to detect a module called KethaneConverter that has an OutputRatios that has an element called Oxidizer AND an InputRates which has an element called Kethane. There are different modules throughout for different fuels. Once detected it needs to change the InputRates Kethane to Water.

So something like??

@PART[*]:HAS[@MODULE[KethaneConverter]:HAS[@InputRates[Kethane], @OutputRatios[Oxidizer]]]
{
@MODULE[KethaneConverter]
!InputRates
InputRates
{
Water = 2.75
ElectricCharge = 6
}
OutputRatios
{
Oxidizer = 1.01
}
}

Won't work because @NODE[namedthing] only works where nodes have a name property. @InputRates[Kethane] will fail in your example because no InputRates node is 'named' Kethane. Kethane is a property/variable of 'InputRates'

I'm trying to think of a way you could test for that but I'm not sure what if anything will work in that situation... possibly something like @PART:HAS[@MODULE[KethaneConverter]:HAS[@InputRates[*]:HAS[#Kethane], @OutputRates[*]:HAS[#Oxidizer]]{stuff}

But I'm really unsure of that. It's been awhile since I've sat down and done anything unorthodox with MM or even looked at the code so I'm not sure how it will behave if passed a wildcard for things that don't actually have a name property....

Also, FYI in your third section you're missing a set of brackets after @MODULE (inside the @PART:HAS[stuff]{}) so even if your conditionals had worked, the rest would have failed anyway. Just an FYI for future

Link to comment
Share on other sites

No, you can't duplicate a part. The ksp part list is read only, I would have to use reflection to add a part and even then I'm not that sure it would work.
Please? :blush:

What if the part already existed, so you didn't need to add a part, just fill it in? I'm thinking something like this inside the config file:


PART
{
name = myPoodleClone
}
@PART[myPoodleClone]:CLONE[liquidEngine2-2]
{
@title = Not a poodle
@mass = 2.0
}

KSP itself processes the first PART definition, creating the part so-named. Then ModuleManager comes by, finds the definition to modify it with a CLONE command, copies all the variables from the original into the new part, and then executes any further tweaks specified.

Completely unnecessary, since you could just copy the entire definition yourself if you really want to create a new part based on a current one, but... just a thought.

Link to comment
Share on other sites

Has anyone ever looked at trying to set up some sort of subscription based mod platform that once you subscribe and launch KSP the platform will check if you have the latest versions of your subscribed mods and alert you or download the newest version so it would be easier to manage all of the mods and plugins we seem to use for KSP? Think Skyrim steam workshop or something. I only ask because now that I have 12 or so mods, and they are all updated at various times, I find I have to spend a good hour or two every day browsing just to see if there are updates. I only ask here because this seems like a logical step for expanded functionality for something called module manager.....

Link to comment
Share on other sites

Thought I would share this with you.

I have a folder i keep my config files in as well as a collection of mods that I have changed (reduced part count etc). I had a copy of the mod manager dll in this folder as well as the gamedata folder. Honest mistake...I left it in my custom folder so when i run it on a clean ksp install i can make the necessary changes to my mod list.

However, on my actual copy of ksp that I play on (the one with my custom mods as well as all other mods i use) I have a copy of the dll in the gamedata folder. Because there are two copies of the same dll the config files are ran twice (you can keep nesting the dll inside folders and each will be ran).

Even if you make a conf file like this ;


@PART[Wayland_HyperRing]:Final
{
//!RESOURCE[LiquidFuel] {}
//!RESOURCE[Oxidizer] {}
//!RESOURCE[MonoPropellant] {}
//!RESOURCE[XenonGas] {}
!MODULE[ModuleFuelTanks]
MODULE
{
name = ModuleFuelTanks
volume = 4800
type = Cryogenic
}
}

that extra bit is added to the part multiple times...even though it says to remove the MODULE first. (The above is actual example of a part of a config file for RealFuel...it adds this to the part multiple times).

Also this is not limited to custom part collections...it will do the same on the stock parts as well.

The dll can detect older copies of itself and ignore them (as stated in previous posts)...so either the dll ignores copies of the same version or KSP is allowing the other copies to be ran regardless of the fact that a copy is already running.

As always keep up the good work...this mod is one of the best.

Thanks

Link to comment
Share on other sites

No versions removed that ability. It stopped working (properly) in 0.23. I don't think it stopped working completely though.... ? Just on the second reload? Anyway, it's not a change in MM that's responsible, it's a change in 0.23

If it's for development work and what you're doing works in 0.22 then test there where possible.

Hmm i did dropped an older version of MM to my .23 mod platform, it's like 1.5 i think (i renamed the the dll to blehblehbleh_1_5.dll, so i think it was 1.5 then :sticktongue:) and the DB reload seems working fine, i first loaded the game and go VAB to check my patches are loaded, then go back spacecenter, and reload DB, go VAB again, the patches still there.

I lost the patches after DB reload with latest 1.5.6. , that make me spent whole day yesterday figuring out why my patch "seems" not working as i reload DB instead of reloading the whole game.......

Link to comment
Share on other sites

Has anyone ever looked at trying to set up some sort of subscription based mod platform that once you subscribe and launch KSP the platform will check if you have the latest versions of your subscribed mods and alert you or download the newest version so it would be easier to manage all of the mods and plugins we seem to use for KSP? Think Skyrim steam workshop or something. I only ask because now that I have 12 or so mods, and they are all updated at various times, I find I have to spend a good hour or two every day browsing just to see if there are updates. I only ask here because this seems like a logical step for expanded functionality for something called module manager.....

That would be ideal, but Squad have said they won't have tight Steam integration - no workshop, no cloud, no achievements. For whatever reason.

Squad are supposedly redeveloping SpacePort but they've been saying that since last summer. Perhaps the new one will come with a mod manager.

In the mean time, some of the mods are using callhomes to check if there are updates from their 'home' server.

Link to comment
Share on other sites

hello I'm back lol

so any ways how would i go about and have MM set all parts that don't have a tech in them. i.e pods,utility,control and so on, basically id like MM to set the tech lv to a set level for its category,sub category, i hope this make sense.

Edited by MissMolly
Link to comment
Share on other sites

hello I'm back lol

so any ways how would i go about and have MM set all parts that don't have a tech in them. i.e pods,utility,control and so on, basically id like MM to set the tech lv to a set level for its category,sub category, i hope this make sense.

Sokar has made a config that matches all parts by their category and sticks them at the 'experimental' later stages of the relevant tech node, which is good as mods tend to be advanced parts.

However, to just stick them all at the start, this should do:


@PART[*]:HAS[~TechRequired]{
TechRequired = start
entryCost = 0
}

Link to comment
Share on other sites

Sokar has made a config that matches all parts by their category and sticks them at the 'experimental' later stages of the relevant tech node, which is good as mods tend to be advanced parts.

However, to just stick them all at the start, this should do:


@PART
[*]:HAS[~TechRequired]{
TechRequired = start
entryCost = 0
}

thanks

but thats to easy just to throw them all in to the start lol

ill try Sokar cfg and see if thats what I'm looking for but it may have to do if not i guess ill have to go the easy way lol

Edit Hey GavinZac thanks for the info I'm using the cfg from Sokar work very nicely

Edited by MissMolly
Link to comment
Share on other sites

thanks

but thats to easy just to throw them all in to the start lol

ill try Sokar cfg and see if thats what I'm looking for but it may have to do if not i guess ill have to go the easy way lol

advancedRocketry is a little further up the tech tree.

or is it advRocketry, I forget.

ima try the sokar configs too if I ever get around to PLAYING again.

Link to comment
Share on other sites

MM edits anything in the cfg. But it's hard to reply withour seeing an example of what you want to edit

mwlue : as as explained earlier in the thread reload will not patch all your part most of the time.

Link to comment
Share on other sites

Try with

!MODEL,1[*] {}

Mujun Kross : you need to have curly brace after a module section, even if they are empty


@PART[Wayland_HyperRing]:Final
{
!MODULE[ModuleFuelTanks] {}
MODULE
{
name = ModuleFuelTanks
volume = 4800
type = Cryogenic
}
}

Link to comment
Share on other sites

Try with

!MODEL,1[*] {}

Seeems not working... my code is


@PART[KW1mengineMaverick1D]
{
@description = boom

!MODEL,1[*] {}
}

It did changed the description, but the shroud model still there. the part.cfg has the following.


// --- asset parameters ---
MODEL
{
model = KWRocketry/Parts/Engines/1mMaverick1D/KW_1mEngine_Maverick1D_M
scale = 0.8, 0.8, 0.8
}
scale = 0.1

MODEL
{
model = KWRocketry/Parts/Structural/KWDecouplerShroud/KW_Auto_1mMavShroud
scale = 0.8, 0.8, 0.8
}

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...