Jump to content

The Great Unofficial Module Manager Help Thread!


Recommended Posts

9 hours ago, Clancythecat said:

it looks like this

so, some patch like this:

Spoiler

@PART[*]:HAS[@MODULE[ModuleDeployableCentrifuge]]
{
    MODULE
    {
        name = WOLF_CrewCargoModule
        ModuleName = #LOC_USI_WOLF_CrewCargoModuleName
            PartInfo = #LOC_USI_WOLF_CrewCargoCrate_PartInfo_Summary
        economyBerths = #$../MODULE[ModuleDeployableCentrifuge]/DeployedCrewCapacity$
        luxuryBerths = #$../MODULE[ModuleDeployableCentrifuge]/DeployedCrewCapacity$
        luxuryBerths *= 0.5
    }
}

This should work, as long as all centrifuges have an even deployed crew capacity. Tell me if it doesn't.

Link to comment
Share on other sites

I've been working to learn all of this stuff, and have been trying to make my own planetpack. Something that is confusing me while studying other mods is this (this one is from AfterKerbin)

@Scatterer_planetsList:BEFORE[AK]

or similar. I understand this is to edit the Scatter planet list and do it before adding this mod, but how the heck does [AK] get defined? In none of the other configs does it specifically "define" AK. Then take a look at this from SVE:

@Scatterer_config:FOR[StockVisualEnhancements]

This made me believe for a while that it was referencing the name of the file in the Gamedata, but that can't be the case because After Kerbin isn't labelled AK in the game folder, it's labelled Afterkerbin. GPP and Kcalbelohsystemhave a very similar format to SVE, but if it were true that it was the gamedata file name (Their [] values are gamedata matched) , then Afterkerbin shouldn't work. 

Can anyone shed some light on this? I've hit a standstill because I can't figure out how to define that Mod name. 

 

Link to comment
Share on other sites

18 minutes ago, FullOfStars said:

I've been working to learn all of this stuff, and have been trying to make my own planetpack. Something that is confusing me while studying other mods is this (this one is from AfterKerbin)

@Scatterer_planetsList:BEFORE[AK]

or similar. I understand this is to edit the Scatter planet list and do it before adding this mod, but how the heck does [AK] get defined? In none of the other configs does it specifically "define" AK. Then take a look at this from SVE:

@Scatterer_config:FOR[StockVisualEnhancements]

This made me believe for a while that it was referencing the name of the file in the Gamedata, but that can't be the case because After Kerbin isn't labelled AK in the game folder, it's labelled Afterkerbin. GPP and Kcalbelohsystemhave a very similar format to SVE, but if it were true that it was the gamedata file name (Their [] values are gamedata matched) , then Afterkerbin shouldn't work. 

Can anyone shed some light on this? I've hit a standstill because I can't figure out how to define that Mod name. 

 

If a patch is in a certain folder in gamedata, it is FOR the name of that folder.

If a patch is in a folder with a patch with a FOR, it also gets the FOR.

If a patch is in a folder with a DLL, it is FOR the name of that DLL.

At least, that's what I think. Testing may be required.

Link to comment
Share on other sites

15 minutes ago, SkyFall2489 said:

If a patch is in a certain folder in gamedata, it is FOR the name of that folder.

If a patch is in a folder with a patch with a FOR, it also gets the FOR.

If a patch is in a folder with a DLL, it is FOR the name of that DLL.

At least, that's what I think. Testing may be required.

That was my thinking, until I ran into After Kerbin. The others make sense, this doesn't because it has

-No DLL

-Non matching Gamefolder path

-Has no other patches inside of that to reference other than AK

-No folders inside of this has the name AK (Although three files in there have an AK_(config) name)

I really just don't get how they can patch something that doesn't look like it's defined anywhere. This -might- be why it breaks Scatterer (other than deleting the planetlist config) and why I am having trouble getting it to reference anything.

Even using SVE though...
Here's from another thread I posted where it doesn't seem to be referencing properly (of course this is probably just me not understanding): 


 

Link to comment
Share on other sites

11 hours ago, FullOfStars said:

That was my thinking, until I ran into After Kerbin. The others make sense, this doesn't because it has

-No DLL

-Non matching Gamefolder path

-Has no other patches inside of that to reference other than AK

-No folders inside of this has the name AK (Although three files in there have an AK_(config) name)

I really just don't get how they can patch something that doesn't look like it's defined anywhere. This -might- be why it breaks Scatterer (other than deleting the planetlist config) and why I am having trouble getting it to reference anything.

Even using SVE though...
Here's from another thread I posted where it doesn't seem to be referencing properly (of course this is probably just me not understanding): 


 

Are there ANY CFG files saying :FOR[AK]? Anywhere?

If not, yeah, After Kerbin might be breaking things.

Link to comment
Share on other sites

3 hours ago, SkyFall2489 said:

Are there ANY CFG files saying :FOR[AK]? Anywhere?

If not, yeah, After Kerbin might be breaking things.

Not specifically for AK as far as I could tell. I've since moved away from it and to other Planet packs that make sense. Was able to get Scatterer to work and update, now I'm having issue with EVE_Clouds not loading correctly. Either putting them in a single cfg or trying to patch them with module manager commands doesn't seem to work. Was wondering if there was a way to create a Blank EVE_Clouds folder and then @ seperate config files in to create a master list to reference. Trying @EVE_Clouds:FOR[MyMod] didn't work and creating a blank EVE_Clouds cfg gives a module manager error. It would be nice if I could test to make sure EVE was even working properly by a single master CFG working, but that isn't loading everything either so. Think that is where I will start and go from there. 
But a suggestion on how to do the following with MM patches would be welcome if anyone sees this. Basically I'd like:
EVE boot up > EVE_Clouds (blank template) > Individual EVE_Clouds config @ (Adds to template to build up that database)
I really don't see why @EVE_Clouds:For[MyMod] doesn't work. EVE seems to only recognize and randomly choose one config file. Maybe cause it doesn't have that template to try to add on to and EVE can't patch. Hmm. 
Scatterer and Module Manager have great Wikis. EVE's seems to either be outdated or nonexistant. If anyone has an EVE manual link I'd appreciate it. 

Example of what I was thinking below

Spoiler

Config 1:EVE_Clouds Blank Template (I still haven't figured out how to make this "Blank" template)

EVE_Clouds:FINAL

{

(Think I'm missing something here. OBJECT {} ?)

}

//Should load EVE_Clouds with any following config patches applied?

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Config 2: Individual Planet Cloud CFGs (These do load if treated as non @ files, but they will only load one or sparsely or at random)
 

@EVE_Clouds:FOR[MyMod]
{
               @Object
                           {
                                   (Object Info)

                           }
}

//Should Apply patch to EVE_Clouds before loading final EVE_Clouds with full list of patches?



 

 

Edited by FullOfStars
Clarification: CFG
Link to comment
Share on other sites

7 hours ago, FullOfStars said:

Not specifically for AK as far as I could tell. I've since moved away from it and to other Planet packs that make sense. Was able to get Scatterer to work and update, now I'm having issue with EVE_Clouds not loading correctly. Either putting them in a single cfg or trying to patch them with module manager commands doesn't seem to work. Was wondering if there was a way to create a Blank EVE_Clouds folder and then @ seperate config files in to create a master list to reference. Trying @EVE_Clouds:FOR[MyMod] didn't work and creating a blank EVE_Clouds cfg gives a module manager error. It would be nice if I could test to make sure EVE was even working properly by a single master CFG working, but that isn't loading everything either so. Think that is where I will start and go from there. 
But a suggestion on how to do the following with MM patches would be welcome if anyone sees this. Basically I'd like:
EVE boot up > EVE_Clouds (blank template) > Individual EVE_Clouds config @ (Adds to template to build up that database)
I really don't see why @EVE_Clouds:For[MyMod] doesn't work. EVE seems to only recognize and randomly choose one config file. Maybe cause it doesn't have that template to try to add on to and EVE can't patch. Hmm. 
Scatterer and Module Manager have great Wikis. EVE's seems to either be outdated or nonexistant. If anyone has an EVE manual link I'd appreciate it. 

Example of what I was thinking below

  Reveal hidden contents

Config 1:EVE_Clouds Blank Template (I still haven't figured out how to make this "Blank" template)

EVE_Clouds:FINAL

{

(Think I'm missing something here. OBJECT {} ?)

}

//Should load EVE_Clouds with any following config patches applied?

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Config 2: Individual Planet Cloud CFGs (These do load if treated as non @ files, but they will only load one or sparsely or at random)
 

@EVE_Clouds:FOR[MyMod]
{
               @Object
                           {
                                   (Object Info)

                           }
}

//Should Apply patch to EVE_Clouds before loading final EVE_Clouds with full list of patches?



 

 

No idea about the specifics of your mods. So, if I’m understanding this right , EVE and AK are not interacting right. Either EVE doesn’t see AK, or EVE has no patch to support AK. Can you dig through EVE and AK to see if either of them have things marked NEEDS[AK] or NEEDS[EVE]?

Link to comment
Share on other sites

26 minutes ago, SkyFall2489 said:

No idea about the specifics of your mods. So, if I’m understanding this right , EVE and AK are not interacting right. Either EVE doesn’t see AK, or EVE has no patch to support AK. Can you dig through EVE and AK to see if either of them have things marked NEEDS[AK] or NEEDS[EVE]?

I got rid of AK to start from scratch since I didn't like what it was doing and it gave me a chance to try to build everything out. 
I've got three planets working, but for some reason, the same format even though its just a basic rip and change of directory. I thought I was onto something where it actually didn't need any editing to the EVE_Clouds file since 3 of them worked as is long as I put everything where it should. No idea what's up with Jool not loading though, even though it seems to be fine in EVE itself. Here's the files if you're curious. 
https://www.dropbox.com/s/ie1i6429ud0upmx/CSS.rar?dl=0

Link to comment
Share on other sites

6 minutes ago, FullOfStars said:

I got rid of AK to start from scratch since I didn't like what it was doing and it gave me a chance to try to build everything out. 
I've got three planets working, but for some reason, the same format even though its just a basic rip and change of directory. I thought I was onto something where it actually didn't need any editing to the EVE_Clouds file since 3 of them worked as is long as I put everything where it should. No idea what's up with Jool not loading though, even though it seems to be fine in EVE itself. Here's the files if you're curious. 
https://www.dropbox.com/s/ie1i6429ud0upmx/CSS.rar?dl=0

I've got absolutely no idea how EVE's config structure works, so I doubt I'll be able to help much here.

Link to comment
Share on other sites

  • 3 weeks later...

This took me over a week to figure out because it doesn't seem to be stated explicitly anywhere, so I'll put it here:

Module Manager does not support inline math operations. For example, if you wanted to calculate 71 * 58, the syntax

product = 71 * 58

does not work.

Instead, use the corresponding math assignment operator:

product = 71
@product *= 58

Other supported operations include += (addition), -= (subtraction), /= (division), and != (exponentiation).

Link to comment
Share on other sites

  • 1 month later...
On 11/2/2022 at 7:22 PM, FullOfStars said:

That was my thinking, until I ran into After Kerbin. The others make sense, this doesn't because it has

-No DLL

-Non matching Gamefolder path

-Has no other patches inside of that to reference other than AK

-No folders inside of this has the name AK (Although three files in there have an AK_(config) name)

I really just don't get how they can patch something that doesn't look like it's defined anywhere. This -might- be why it breaks Scatterer (other than deleting the planetlist config) and why I am having trouble getting it to reference anything.

On 11/3/2022 at 7:14 AM, SkyFall2489 said:

Are there ANY CFG files saying :FOR[AK]? Anywhere?

If not, yeah, After Kerbin might be breaking things.

AfterKerbin has several CFG files with "FOR [AK]" in them.

@FullOfStars When any CFG file has "FOR [X] " in it, if X does not exist in the Modlist, MM will create entry X in the Modlist. This is so that when CFGs are called prior to Mod X being loaded, the settings are already there later when it is. A side effect is that if your mod has no DLL, all the settings will be in the specified object in the Modlist even if the directory is renamed. (i.e. all AK stuff is in "AK" even though the folder is named "AfterKerbin") The behavior is described in the "Patch Ordering" page in the MM wiki.

Specifically regarding Scatterer and AfterKerbin, KSP loads "Scatterer_config" from /GameData/AfterKerbin/scatterer/config.cfg into the KSP GameDatabase first since it's an insert.  Then MM looks for a DLL and doesn't find any. (Other than the DLL in Scatterer, if present) Then it scans all the configs in alphabetical order looking for FOR - it hits /GameData/AfterKerbin/_Core00/AK_MainMenuBody.cfg and sees "@Kopernicus:FOR[AK]" and adds "AK" to the list of loaded mods. From this point on, anything with "FOR [AK]" or "NEEDS [AK]" will execute. Then it adds "AfterKerbin" to the loaded mods list, since that's the top level directory name.

This tripped me up early on, and does for a lot of people. Some badly-written patches use "FOR" when they mean "NEEDS", and the FOR statement creates the entry if it doesn't already exist.

After the above happens, Scatterer runs, and then AK_Scatterer.cfg runs. Looking at Scatterer, I see 2 issues:

1. If Scatterer isn't present, the config file still gets created
2. Scatterer also creates "Scatterer_config", after it's been created by AK. I actually don't know how KSP handles creating 2 nodes of the same name. I think that this is likely the root cause of the behavior you were seeing.

Link to comment
Share on other sites

  • 4 months later...

@PART[*]:HAS[@MODULE[ModuleCommand,![ModuleScienceContainer]]]:FINAL{
    MODULE
    {
        name = ModuleScienceContainer
        
        reviewActionName = #autoLOC_502201 //#autoLOC_502201 = Review Stored Data
        storeActionName = #autoLOC_502202 //#autoLOC_502202 = Store Experiments
        evaOnlyStorage = True // i.e. can nearby regular vessels also do this, or EVA only
        storageRange = 1.3
        canBeTransferredToInVessel = True
        canTransferInVessel = True
        showStatus = True
    }
}

This probe is supposed to add science containers to all probes. Why doesn't it?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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