Jump to content

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


sarbian

Recommended Posts

So, apparently Coffeemann's Entropy mod does not like AlchemyTechnologies, and I'm trying to figure out how to exclude all AlchemyTech mods from the DangIt! patches. Is that possible, excluding an entire mod from a patch?

Link to comment
Share on other sites

Noob question. I don't know how to install the module manager. I put the .dll file in my game data folder of ksp but I don't know aht you mean by .vfg file. What config file? Can someone help me?

You just put the ModuleManager.2.5.9.dll in your KSP/GameData folder and any mod that has CFG will work or you can write your own CFG to change things it don't matter where the CFG's are at has long as there in the KSP/GameData or KSP/GameData/ * what ever folder.

Link to comment
Share on other sites

CKAN is having a problem downloading modulemanager from the web site:

https://ksp.sarbian.com/jenkins/job/ModuleManager/lastSuccessfulBuild/artifact/ModuleManager-2.6.0.zip

Here is the error:


0 kbps - downloading - 0 MiB left - 93% Failed to download "[URL]https://ksp.sarbian.com/jenkins/job/ModuleManager/lastSuccessfulBuild/artifact/ModuleManager-2.6.0.zip[/URL]" - error: SslCaCert
One or more files failed to download, stopped.

Link to comment
Share on other sites

I have try add the ModuleCommand to "Mobile Processing Lab MPL-LG-2". I upload the laboratory for a contract of space station, and it havent mode of control.

The code is:

@PART[Large.Crewed.Lab]
MODULE {
name=ModuleCommand
}
}

But a cfg that add MechJeb and loads after dont detect the ModuleCommand of lab.

Link to comment
Share on other sites

You're missing the open brace ({) for the PART node

@PART[Large.Crewed.Lab]
[B][COLOR=#ff0000]{[/COLOR][/B]
MODULE {
name=ModuleCommand
}
}

You probably also want to have minimumCrew = 1 otherwise it'll function as a drone with no power drain

Edited by Crzyrndm
Link to comment
Share on other sites

2.5.13 and 2.6.0 use the same code. I did a version change to fix a problem with the CKAN update server.

Oh i see. I was wondering as a modder posted the 2.6.0 MM with his latest version

Link to comment
Share on other sites

#kspmodders suggested I should bug you with this, so...

I wanted to create something that altered the default categories for parts -- including adding new "Filter by Function" categories and altering some existing ones. Ideally, it'd be something that's easy to distribute and modify (i.e. not just me manually adding parts to a custom category -- which can't be placed under "Filter by Function" anyways.

I see that MM can currently alter Part categories (RealChutes changes a bunch to None), but there doesn't seem to be a way to add them. (RealChutes does this in the DLL (relevant source), InfernalRobotics adds its own category as well).

Would it be possible to add this capability to a future version of ModuleManager?

In particular, my goal is to split Utility and Structural categories to add:

* Power (Solar panels, Batteries, Generators, etc.)

* Staging (Decouplers, Separators, possibly Fairings)

* Landing (Parachutes, Landing Legs, Landing Gear)

* Either removing the Parachutes category RealChutes adds, or renaming it to the above Landing category and extending it.

Edited by dewin
Syntax error: unmatched "("
Link to comment
Share on other sites

Module Manager isn't built to add categories, you want Filter Extensions (adding and changing part categories via .cfg files is exactly what it's designed to do). The only thing from your list it can't do at the moment is removing the RC parachutes category, and that's changing with the KSP 1.0 update

Link to comment
Share on other sites

Hey Sarbian, looking to see if I can modify the tech tree with MM, hoping you could help provide some clarification.

This is the target block of code:


TechTree
{
RDNode
{
id = start
title = Start
description = The technology we started out with.
cost = 0
hideEmpty = False
nodeName = node0_start
anyToUnlock = False
icon = RDicon_start
pos = -2568,1199,-1
scale = 0.6
}
}

Based on an example in the first post, I feel like I should be able to use this to access a node:

@TechTree
{
@RDNode[*]:HAS[#id[start]]
{
@description = test edit
}
}

This doesn't work though. What am I missing? I also tried it without the @TechTree wrapper.

@RDNode[*]:HAS[#id[start]]
{
@description = test edit
}

Link to comment
Share on other sites

Nertea, I got bit by a problem like that when I was trying to modify the contract config for KAINET, and the problem was the

[*] -- that's a shortcut for ":HAS[#name

[*]]", that is, it selects all RDNodes (or whatever) that have a name field. Since RDNodes don't have names (we might call its id or title a "name", but it has no variable called "name"), that patch doesn't find any matching nodes and so it does not execute. Delete the

[*] and your patch (with the @TechTree wrapper) will work just fine.

Link to comment
Share on other sites

Nertea, I got bit by a problem like that when I was trying to modify the contract config for KAINET, and the problem was the

[*] -- that's a shortcut for ":HAS[#name

[*]]", that is, it selects all RDNodes (or whatever) that have a name field. Since RDNodes don't have names (we might call its id or title a "name", but it has no variable called "name"), that patch doesn't find any matching nodes and so it does not execute. Delete the

[*] and your patch (with the @TechTree wrapper) will work just fine.

The [*] just means that it will search for ALL RDNodes. The :HAS behind it makes the search specific.

A good example is @EXPERIMENT_DEFINITION[*]:HAS[#id[gravityScan]], it also uses the

[*] even though experiments have no name field.

EDIT: @Nertea, I tried the same with other ways, and those doesn't work either.

Edited by Olympic1
Link to comment
Share on other sites

I'm going to have to keep an eye here for how we can use MM to modify the TechTree, so I'm glad to see the questions are already being asked.

I'm running into the problem that the stock "experimental*" tech nodes were removed, except for the few that stock parts now appear in. Since I had made strong use of "experimentalRocketry", I'm trying to find a way to add an equivalent node. Apparently, just creating the "TechTree { RDNode { <blah> } }" data in the mod's path doesn't cut it. It either gets ignored or overwritten by the stock tech tree, without any error in the logs. So I was going to investigate injecting a node via MM. I'm hoping this is possible.

Link to comment
Share on other sites

Edit : I had a quick look and it seems that the Tree is loaded by the game late. I am afraid MM can't help here (yet?)

Edit2 :

This works but the game reload the tree anyway. NK is looking into it.


@TechTree
{
@RDNode:HAS[#id[start]]
{
@description = test edit
}
}

Edited by sarbian
Link to comment
Share on other sites

I'm trying to make TweakScale-able crew pods an option that can be toggled via MM patch (and would default to off). So far I fail to write the last condition right, without it the modules are removed correctly. Does anyone know better how to write this?


TWEAKSCALESETTINGS
{
scaleCrewPods = 0 // set to 1 for scaleable pods
}

@PART[*]:HAS[@MODULE[TweakScale],#CrewCapacity[*],~CrewCapacity[0],#../TWEAKSCALESETTINGS/scaleCrewPods[0]]:FOR[TweakScale]
{
!MODULE[TweakScale] {}
}

Link to comment
Share on other sites


TWEAKSCALESETTINGS
{
scaleCrewPods = 0 // set to 1 for scaleable pods
}

@PART
[*]:HAS[@MODULE[TweakScale],#CrewCapacity
[*],~CrewCapacity[0]]
{
var = #$@TWEAKSCALESETTINGS/scaleCrewPods$
}

@PART
[*]:HAS[@MODULE[TweakScale],#CrewCapacity
[*],~CrewCapacity[0],#var[0]]:FOR[TweakScale]
{
!MODULE[TweakScale] {}
}

Try something like this. Has may not do full variable addressing

Link to comment
Share on other sites

A little troubleshooting help? I'm trying to add FSfuelSwitch to all LFO tanks to add an option for CRP LqdHydrogen. Here's the patch:


@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[FSfuelSwitch]] {

%lh2Amount = #$RESOURCE[LiquidFuel]/maxAmount$
@lh2Amount += #$RESOURCE[Oxidizer]/maxAmount$
@lh2Amount *= 5

MODULE {
name = FSfuelSwitch

resourceNames = LiquidFuel,Oxidizer;LqdHydrogen

resourceAmounts = #$../RESOURCE[LiquidFuel]/maxAmount$,#$../RESOURCE[Oxidizer]/maxAmount$;#$../lh2Amount$

tankCost = 0;0
displayCurrentTankCost = false

hasGUI = true
showInfo = true
availableInFlight = false
availableInEditor = true

basePartMass = #$../mass$
tankMass = 0;0
}

!lh2Amount = delete
}

and the log entries:


[ModuleManager] Applying node /hydrogen-nukes/@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[FSfuelSwitch]] to Squad/Parts/FuelTank/Size3LargeTank/part/Size3LargeTank
[ModuleManager] Cannot find key lh2Amount in PART
[ModuleManager] Cannot parse variable search when inserting new key resourceAmounts = #$../RESOURCE[LiquidFuel]/maxAmount$,#$../RESOURCE[Oxidizer]/maxAmount$;#$../lh2Amount$

As the log entry suggests, the key resourceAmounts is never added to the module. Can anybody see what I'm missing?

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