Jump to content

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


sarbian

Recommended Posts

So I wanted to modify a part, and it is not the first time but I really give up.


@PART[Kosmos_Balka_1_Skeleton]:NEEDS[KOSMOS]:FINAL
{
!node_stack_side00{}
!node_stack_side01{}
!node_stack_side02{}
!node_stack_side03{}
!node_stack_side04{}
!node_stack_side05{}
!node_stack_bottom{}
!node_stack_top{}
!mesh{}
}

@PART[Kosmos_Balka_1_Skeleton]:NEEDS[KOSMOS]:FINAL
{
node_stack_side00 = 0.433013, 0, 0, 1.0, 0.0, 0.0, 0
node_stack_side01 = 0.216506, 0, -0.375, 0.5, 0.0, -0.866025, 0
node_stack_side02 = -0.216506, 0, -0.375, -0.5, 0.0, -0.866025, 0
node_stack_side03 = -0.433013, 0, 0, -1.0, 0.0, 0.0, 0
node_stack_side04 = -0.216506, 0, 0.375, -0.5, 1.0, 0.866025, 0
node_stack_side05 = 0.216506, 0, 0.375, 0.5, 1.0, 0.866025, 0
node_stack_bottom = 0.0, -1.525, 0.0, 0.0, -1.0, 0.0, 1
node_stack_top = 0.0, 1.525, 0.0, 0.0, 1.0, 0.0, 1

MODEL
{
model = KOSMOS/Parts/Structural/Kosmos_Balka_1_Tunnel/model_Skeleton
position = 0.0, 0.0, 0.0
scale = 1, 1.25, 1
rotation = 0, 0, 0
}
}

The thing is it does not work properly, the attachnodes get added but not deleted, and the model is beeing seen twice, one with original size and the other one with the Y scale of 1,25.

What is wrong?

Link to comment
Share on other sites

So I wanted to modify a part, and it is not the first time but I really give up.


@PART[Kosmos_Balka_1_Skeleton]:NEEDS[KOSMOS]:FINAL
{
!node_stack_side00{}
!node_stack_side01{}
!node_stack_side02{}
!node_stack_side03{}
!node_stack_side04{}
!node_stack_side05{}
!node_stack_bottom{}
!node_stack_top{}
!mesh{}
}

@PART[Kosmos_Balka_1_Skeleton]:NEEDS[KOSMOS]:FINAL
{
node_stack_side00 = 0.433013, 0, 0, 1.0, 0.0, 0.0, 0
node_stack_side01 = 0.216506, 0, -0.375, 0.5, 0.0, -0.866025, 0
node_stack_side02 = -0.216506, 0, -0.375, -0.5, 0.0, -0.866025, 0
node_stack_side03 = -0.433013, 0, 0, -1.0, 0.0, 0.0, 0
node_stack_side04 = -0.216506, 0, 0.375, -0.5, 1.0, 0.866025, 0
node_stack_side05 = 0.216506, 0, 0.375, 0.5, 1.0, 0.866025, 0
node_stack_bottom = 0.0, -1.525, 0.0, 0.0, -1.0, 0.0, 1
node_stack_top = 0.0, 1.525, 0.0, 0.0, 1.0, 0.0, 1

MODEL
{
model = KOSMOS/Parts/Structural/Kosmos_Balka_1_Tunnel/model_Skeleton
position = 0.0, 0.0, 0.0
scale = 1, 1.25, 1
rotation = 0, 0, 0
}
}

The thing is it does not work properly, the attachnodes get added but not deleted, and the model is beeing seen twice, one with original size and the other one with the Y scale of 1,25.

What is wrong?

are you sure you need those brackets there?

!node_stack_side00{}

you can try using

!node_stack_side00 =

I don't know if you need to add more after the "=" sign

Link to comment
Share on other sites

are you sure you need those brackets there?

!node_stack_side00{}

you can try using

!node_stack_side00 =

I don't know if you need to add more after the "=" sign

Normally these brackets are used for "nodes", for "keys" they are not really needed but I don't know if they will cause problems.

But my last memory was that deletion of nodes and keys can be problematic no matter what, but don't know if that is still the case.

Link to comment
Share on other sites

Normally these brackets are used for "nodes", for "keys" they are not really needed but I don't know if they will cause problems.

But my last memory was that deletion of nodes and keys can be problematic no matter what, but don't know if that is still the case.

when I need to delete a key I just copy the full line and add the "!" at the beginning. Idk if this is the correct way to go, but it worked for me so far

Link to comment
Share on other sites

when I need to delete a key I just copy the full line and add the "!" at the beginning. Idk if this is the correct way to go, but it worked for me so far

Deleting attachnodes never really worked for me.

Everything else seems to work flawless.

Link to comment
Share on other sites

Yeah, if you append {} then MM will try (and fail, because it doesn't exist) to delete a node of that name.

You want

!valname = DEL

(or instead of DEL asdf or foo or...just some text).

It really requires some value for a key?

Ok will try it.

Link to comment
Share on other sites

Adding FSwheelAlignment to all parts (with either ModuleLandingGear, ModuleLandingGearFixed or FSwheel) that currently do not have it, does this make sense?

@PART[*]:HAS[MODULE[ModuleLandingGear*|FSwheel],!MODULE[FSwheelAlignment]]:NEEDS[Firespitter]
{
MODULE
{
name = FSwheelAlignment
}
}

EDIT: The answer is no, it does not make sense :(

Edited by ObsessedWithKSP
Link to comment
Share on other sites

Hi there, I wanted to know if it was possible to add some modules to the kerbals. I looked around and I found this message:

RESOURCE_DEFINITION makes the resource exist in the game. If you changed the name from EVA Propellant to MonoPropellant, you'd just remove EVAPropellant from the game, so the kerbalEVA part couldn't load.

The question from two pages back is asking essentially the same question: how do you modify the kerbalEVA part? The answer is the same: you need a plugin, because unlike most parts in the game, it's defined by the program, not by a part config. Module Manager can only modify elements of the game that are defined in config files.

Is that still true?

Link to comment
Share on other sites

ObsessedWithKSP: you missed the @ for MODULE.

@PART[*]:HAS[@MODULE[ModuleLandingGear*|FSwheel],!MODULE[FSwheelAlignment]]:NEEDS[Firespitter]

If that doesn't work, try just doing it on two lines

@PART[*]:HAS[@MODULE[ModuleLandingGear*],!MODULE[FSwheelAlignment]]:NEEDS[Firespitter]

{ stuff }

@PART[*]:HAS[@MODULE[FSwheel],!MODULE[FSwheelAlignment]]:NEEDS[Firespitter]

{ stuff }

Link to comment
Share on other sites

I have a question about the :NEEDS[] function

I always assumed that what should go into that function is the name of the .dll plugin of the mod

but since I was having some problems with it, I did some tests and it looks like it checks for a folder with that name, and if it finds one anywhere it will trigger

is this intended or am I delusional? :D

thanks

-edit-

I don't even know if that's true...

I'm trying to make a cfg that will modify a part only if RemoteTech is installed:

@PART[mediumDishAntenna2]:NEEDS[RemoteTech]

{

@description = REMOTE TECH IS INSTALLED

}

the new description shows up even if there is nothing with "RemoteTech" inside my gamedata folder

I have only the Squad folder and my mod folder

what am I missing?

Edited by Sigma88
Link to comment
Share on other sites

Needs will fire on .dlls, folders, and if any patch includes a :FOR[blah]. Make sure you aren't using :FOR[RemoteTech] anywhere

thanks, it was the next thing I was going to check :D (but I wasn't putting any hope on it)

-edit-

yes it worked :D

another curiosity, if I want my config to require a mod and to be loaded after that mod, should I do this:

@PART[whatever]:FOR[mymod]:NEEDS[thatmod]:AFTER[thatmod]

{

// messing around with that mod here

}

can I have the same result with just NEED or AFTER?

Edited by Sigma88
Link to comment
Share on other sites

Hi,

I'm using the Stock Bug Fix mod, and would like to keep a setting persistent between different versions.

This is the code in one of the cfg file:


@PART
[*]:HAS[@MODULE[ModuleGimbal]]
{
MODULE
{
name = MGFix
plusEnabled = False
}
}

If I put the following into a cfg file in the GameData directory, will this override the setting in the original cfg file:




@PART
[*]:HAS[@MODULE[ModuleGimbal]]:Final
{
MODULE
{
name = MGFix
plusEnabled = True
}
}

Thanks in advance

LGG

Link to comment
Share on other sites


@PART[*]:HAS[@MODULE[MGFix]]:Final
{
@MODULE[MGFix]
{
@plusEnabled = True
}
}

Didn't claw changed how the plus feature works to avoid such edit ? I tought you just had to put one file in the dir for it to work.

Link to comment
Share on other sites


@PART
[*]:HAS[@MODULE[MGFix]]:Final
{
@MODULE[MGFix]
{
@plusEnabled = True
}
}

Didn't claw changed how the plus feature works to avoid such edit ? I tought you just had to put one file in the dir for it to work.

The Gimbol fix is defaulted to not enabled. There IS an overall setting, which lives in GameData called StockPlusController.cfg, and looks like:


STOCK_PLUS
{
plusActive = True
}

The original code I posted was from claw's cfg file.

So you are saying that once the original code gave it a name, you can reference the name in the @MODULE line.

Nice

So what I am going to do is to add this code to the StockPlusController.cfg file, so I don't have to worry about changing it again

Thank you

Edited by linuxgurugamer
Link to comment
Share on other sites

Having trouble removing Firespitter modules from the OPT parts to try to get them to play nice with RealFuels. Here's an example config


{
// --- general parameters ---
name = ij_4m_adaptor_variant
module = Part
author = K.Yeon

// --- asset parameters ---
MODEL
{
model = OPT/Parts/NewParts/ij_4m_adaptor
}
scale = 1
rescaleFactor = 1

node_stack_top = 0.0, 2, 0, 0.0, 1.0, 0.0, 4
node_stack_bottom = 0.0, -2, 0, 0.0, -1.0, 0.0, 4

TechRequired = highAltitudeFlight
entryCost = 4200
cost = 4000
category = Propulsion
subcategory = 0
title = I-J Connector
manufacturer = OPT Aerospace Division
description =An aerodynamic 2.5m to J-system adapter that can be configured for a variety of different tank setups. Engineers agree that it's a step up from the previous solution of duct tape.
attachRules = 1,1,1,1,0
stackSymmetry = 1


mass = 0.75
crashTolerance = 12
breakingForce = 200
breakingTorque = 500
fuelCrossFeed = True
emissiveConstant = 0.87
maxTemp = 2500
dragModelType = default
bulkheadProfiles = i, j
thermalMassModifier = 4.0

MODULE
{
name = ModuleLiftingSurface

deflectionLiftCoeff = 0.9
dragAtMaxAoA = 0.25
dragAtMinAoA = 0.1
useInternalDragModel=False
}


MODULE
{
name = FSmeshSwitch
moduleID = 0
buttonName = Next tank setup
previousButtonName = Previous tank setup
objectDisplayNames = Structure Fuselage; LiquidFuel Tank; LFO Tank
useFuelSwitchModule = true
fuelTankSetups = 0;1;2
objects = Structure;LF;LFO
}

MODULE
{
name = FSfuelSwitch
resourceNames = Structural;LiquidFuel;LiquidFuel,Oxidizer
resourceAmounts = 0;1500;1125,1375
basePartMass = 0.75
tankMass = 0;0.1;0.1
tankCost = 0;200;600
displayCurrentTankCost = true
hasGUI = False
showInfo = false
}
MODULE
{
name = ModuleLiftingSurface

deflectionLiftCoeff = 0.75
dragAtMaxAoA = 0.4
dragAtMinAoA = 0.15
}
}
PART

And what I'm trying to remove them with


{
!MODULE[FSmeshSwitch]
!MODULE[FSfuelSwitch]
MODULE
{
name = ModuleFuelTanks
volume = 2500
type = Default
}
}
@PART[ij_4m_adaptor_variant]:FOR[RealFuels]

The fuel tank gets added successfully, but the Firespitter modules don't get deleted.

Link to comment
Share on other sites

@PART[ij_4m_adaptor_variant]:FOR[RealFuels]
{
!MODULE[FSmeshSwitch]
!MODULE[FSfuelSwitch]
MODULE
{
name = ModuleFuelTanks
volume = 2500
type = Default
}
}

The fuel tank gets added successfully, but the Firespitter modules don't get deleted.

I'm definitely not an expert, but have you tried this?

@PART[ij_4m_adaptor_variant]:FOR[RealFuels]
{
!MODULE[FSmeshSwitch][COLOR=#ff0000][B] {}[/B][/COLOR]
!MODULE[FSfuelSwitch][COLOR=#ff0000][B] {}[/B][/COLOR]
MODULE
{
name = ModuleFuelTanks
volume = 2500
type = Default
}
}

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