Jump to content

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


sarbian

Recommended Posts

Can someone help me with this? I'm trying to figure out why this isn't removing what I want it to remove (smoke trails).


@PART[*]:HAS[@MODULE[EFFECTS]]
{
@EFFECTS
{
@running_closed
{
-PREFAB_PARTICLE
{
}
}
}
}

@PART[*]:HAS[@MODULE[EFFECTS]]
{
@EFFECTS
{

@running_open
{
-PREFAB_PARTICLE
{
}
}
}
}

The laptop I play chugs heavily when the smoke effects are present so I'm trying to remove them.

I finally got it to where MM wasn't giving me an error, but it just doesn't find the relevant section and delete it.

Link to comment
Share on other sites

EFFECTS is a node in its own right, not a MODULE { name = EFFECTS } which is what you've got.

Try

@PART[*}
{
@EFFECTS
{
@running_open
{
-PREFAB_PARTICLE
{
}
}
@running_closed
{
-PREFAB_PARTICLE
{
}
}
}
}

But note this will only work for parts with fx of those names; if something is named running_cruise or smokeTrail or whatever, you still won't be removing it.

Link to comment
Share on other sites

EFFECTS is a node in its own right, not a MODULE { name = EFFECTS } which is what you've got.

Ah gotcha. That makes sense now.

But note this will only work for parts with fx of those names; if something is named running_cruise or smokeTrail or whatever, you still won't be removing it.

I figured that, the first version of the script only had running_open and I thought that might have been the problem. I can expand the script to include whatever effects subsets I need though, now that I know what I'm looking for! Thank you sir!

Link to comment
Share on other sites

Ever since I installed module manager in 1.0 I've been having a problem where the camera's focus point moves further away from my ship every 6000 meters in altitude I gain. I tried removing my mods one at a time to see which one was causing this and when I removed module manager it stopped happening. I did some searching and found this thread http://forum.kerbalspaceprogram.com/threads/56481-Focus-Bug-fix where they seem to be having the exact same problem but there was no fix found. I am using the latest version of module manager. Does anyone here know how to fix this?

Link to comment
Share on other sites

The bug was most likely gone when you removed MM because the module of the mod that generated the bug was not added anymore. MM does not run past main menu.

Link to comment
Share on other sites

Has 1.0.1 or 1.0.2 broken variable support? I'm trying to write a patch that adds an EVA Propellant RESOURCE to parts with positive CrewCapacity values, thus:

@PART[*]:HAS[#CrewCapacity[>0]]
{
RESOURCE
{
name = EVA Propellant
amount = 5
@amount *= #$/CrewCapacity#
maxAmount = 5
@maxAmount = #$/CrewCapacity#
}
}

However, doing so causes the game to hang during load with the following exception:

FormatException: Unknown char: #
at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0
at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0
at ShipConstruction.GetPartCosts (.ConfigNode partNode, .AvailablePart aP, System.Single& dryCost, System.Single& fuelCost) [0x00000] in <filename unknown>:0
at ShipConstruction.SanitizePartCosts (.AvailablePart aP, .ConfigNode partNode) [0x00000] in <filename unknown>:0
at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0
at PartLoader+^V^E.MoveNext () [0x00000] in <filename unknown>:0
NullReferenceException: Object reference not set to an instance of an object
at PartLoader.GetDatabaseConfig (.Part p) [0x00000] in <filename unknown>:0
at PartLoader.GetDatabaseConfig (.Part p, System.String nodeName) [0x00000] in <filename unknown>:0
at DragCubeSystem.LoadDragCubes (.Part p) [0x00000] in <filename unknown>:0
at Part+^V^G.MoveNext () [0x00000] in <filename unknown>:0

TIA

Edited by toadicus
Link to comment
Share on other sites

ShipConstruction.GetPartCosts

At a guess, the problem lies in the fact that EVA Propellant has no unit cost (or density) defined and as such is probably causing a few NaN-esque errors.

RESOURCE_DEFINITION
{
name = EVA Propellant
density = 0
unitCost = 0
hsp = 3000
flowMode = NO_FLOW
transfer = PUMP
isTweakable = false
}

Could be wrong though, I dunno.

Link to comment
Share on other sites

The problem is I'm bad at reading, and formatted my patch wrong. Fixed patch:


@PART[*]:HAS[#CrewCapacity[>0]]
{
RESOURCE
{
name = EVA Propellant
amount = 5
@amount *= #$/CrewCapacity$
maxAmount = 5
@maxAmount *= #$/CrewCapacity$
}
}

Thanks Sarbian!

Link to comment
Share on other sites

Hey, this is probably a stupid question but I can't figure out the proper syntax:

I want to make a ModuleManager patch for the USI Alcubierre Warp Drive part. Specifically, I want to add a new node to the tech tree following these specifications:

RDNode
}
id = ftl
title = Faster-than-Light Travel
description = Turns out that folding space itself is much easier than we previously thought! Now our pilots finally have an excuse to say, "Ludicrous speed! GO!".
cost = 1500
hideEmpty = False
nodeName = node9_fasterthanlight
anyToUnlock = False
icon = RDicon_science-experimental
pos = -786,963.9,-1
scale = 0.6
Parent
parentID = experimentalScience
lineFrom = RIGHT
lineTo = LEFT
}

In order for this to work with the Alcubierre drive parts, though, I need to modify them to use this new node. Now I could just go in and edit the .cfg files myself, but I figure, well, I need to learn how to make MM patches anyway. So I have this:

@PART[*]:HAS[#Name[USI_WarpDrive]]:Final
{
TechRequired=ftl
}

@PART[*]:HAS[#Name[USI_WarpDrive_625]]:Final
{
TechRequired=ftl
}

I have no idea how to format these patches or anything like that. I put both of these things in the same file, which can be found here: http://pastebin.com/n0WCf1a3

Link to comment
Share on other sites

This is what you're after. square brackets after the node name (ie. PART) are shorthand for the #HAS[#NAME[]]. Since you want to edit the value if it exists, or add it if it doesn't, you use the % operator

@PART[USI_WarpDrive]:Final
{
%TechRequired=ftl
}

@PART[USI_WarpDrive_625]:Final
{
%TechRequired=ftl
}

Link to comment
Share on other sites

This is what you're after. square brackets after the node name (ie. PART) are shorthand for the #HAS[#NAME[]]. Since you want to edit the value if it exists, or add it if it doesn't, you use the % operator

@PART[USI_WarpDrive]:Final
{
%TechRequired=ftl
}

@PART[USI_WarpDrive_625]:Final
{
%TechRequired=ftl
}

I changed that, but the node itself isn't appearing in the tech tree. Do I add a % to the "RDNode"?

Thanks for the help, though.

Link to comment
Share on other sites

I changed that, but the node itself isn't appearing in the tech tree. Do I add a % to the "RDNode"?

Thanks for the help, though.

Check your brackets ?


RDNode
[SIZE=5][B]}[/B][/SIZE]

Link to comment
Share on other sites

Version 2.6.3 Allows the patching of Physics values with a PHYSICSGLOBALS node

Downloads :

ModuleManager.2.6.3.dll

ModuleManager-2.6.3.zip

Let's say you don't like Drag (I heard drag hating is in) then you just have to add a small MM patch in your GameData folder :


@PHYSICSGLOBALS
{
@dragMultiplier = 0
}

And voilà ! You can fly free of all that annoying drag.

Edited by sarbian
Link to comment
Share on other sites

Let's say you don't like Drag (I heard drag hating is in) then you just have to add a small MM patch in your GameData folder :

Haha, thats a good one, btw, does anyone now knows if maximum/minimumDrag parameters for parts still applies?

I keep seeing them a lot in mods parts, but its deprecated isn't?

Link to comment
Share on other sites

Hmm, this should work, right?


DEF {
MODULE {
name = ModuleName
id = Foo
}
}

PART
{
name = Partname
#@../DEF/MODULE[ModuleName] {}
#@../DEF/MODULE[ModuleName] {
@id = Bar
}
}

The edit-while-copying part doesn't seem to work :S I end up with two modules with id = Foo

Link to comment
Share on other sites

1) The .. only works inside the same root node. TO get an other root node you use @

2) It does not work inside a new node, only inside one you edit. I don't plan to change that for now since it would me a lot more complex afaik.

the (clearly not optimal) solution :


DEF {
MODULE {
name = ModuleName
id = Foo
}
}

PART
{
name = Partname
}

@PART[Partname]
{
#@DEF/MODULE[ModuleName] { }
#@DEF/MODULE[ModuleName] {
@id = Bar
}
}

Link to comment
Share on other sites

Hey I'm wondering if I can do something here, patch with MM the config file for TACLS.

Currently its built under the GlobalSettings, which I don't think its a node.


GlobalSettings
{
MaxDeltaTime = 86400
ElectricityMaxDeltaTime = 1
FoodResource = Food
WaterResource = Water
OxygenResource = Oxygen
CarbonDioxideResource = CarbonDioxide
WasteResource = Waste
WasteWaterResource = WasteWater
FoodConsumptionRate = 1.6927083333E-05
WaterConsumptionRate = 1.1188078704E-05
OxygenConsumptionRate = 0.001713537562385
ElectricityConsumptionRate = 0.014166666666667
BaseElectricityConsumptionRate = 0.02125
EvaElectricityConsumptionRate = 0.00425
CO2ProductionRate = 0.00148012889876
WasteProductionRate = 1.539351852E-06
WasteWaterProductionRate = 1.4247685185E-05
EvaDefaultResourceAmount = 10800
MaxTimeWithoutFood = 86400
MaxTimeWithoutWater = 43200
MaxTimeWithoutOxygen = 3600
MaxTimeWithoutElectricity = 10800
}

I haven't seen any mention of it on MM cache. Is it possible?

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