Jump to content

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


sarbian

Recommended Posts

Check out the config in Community Tech Tree. That would be the best place to start.

All I found on that page was how to add your parts to his tech tree.

I found the right way to write tech tree nodes by myself, and spent about 3 hours creating a tech tree and assigning hundreds of parts to the new tech nodes.

The only way I found to display my tech tree in the game was to remove the stock TechTree file, put my one in its place and rename it to 'TechTree'.

The nodes appear correctly in-game, with the correct prices and names and connection.

However, the parts I spent hours slaving over simply don't appear on the tech tree.

Example node:


RDNode
{
id = Offworld1
title = Offworld Habitation
description = Technology to live and work in space. Recruits are lining up to become Space Miners.
cost = 50
hideEmpty = False
nodeName = Pod1
anyToUnlock = False
icon = RDicon_rocketry-general
pos = -2200,1800,-1
scale = 0.6
Parent
{
parentID = Flight1
lineFrom = RIGHT
lineTo = LEFT
}
}

Example part assignment:

 
@PART[MKS_RadialTank]: FINAL
{
@TechRequired = Offworld1
}

Also, ModuleManager, during loading, shows an error message for a split second, and the following MM patch doesn't work in-game:


@RESOURCE_DEFINITION[LiquidFuel]
{
@cost *= 6
}

Could someone help?

Link to comment
Share on other sites

A few questions:

1. Is it possible to use MM to delete a part, so that it doesn't show up AND doesn't take up memory?

2. If yes, how? An example would be fine.

3. If not, then how can I just delete a part so it doesn't show up?

I run a lot of mods, and would like to be able to write a config which will delete parts which I don't use to save memory.

Thanks in advance

LGG

Link to comment
Share on other sites

A few questions:

1. Is it possible to use MM to delete a part, so that it doesn't show up AND doesn't take up memory?

2. If yes, how? An example would be fine.

3. If not, then how can I just delete a part so it doesn't show up?

I run a lot of mods, and would like to be able to write a config which will delete parts which I don't use to save memory.

Thanks in advance

LGG

I've been wondering about this too, so correct me, if I'm wrong. But:

1. It is possible to delete a part, but they still need to be loaded and patched, so it will be the same start time and memory load.beware though that removing parts makes existing vessels fail to load

2. '-PART[parttobedeleted] {}' should do the trick, though some mods prefer to hide it instead

3. everything in GameData is checked and loaded at the start, renaming or removing a specific part's cfg file and it won't load up, texture and meshes are still loaded though and take up memory. You can remove those also but be careful as they could also be used by others.

Link to comment
Share on other sites

Hello.

The Contracts.cfg in the Squad folder looks like this:


Contracts
{
DisableWorldFirstTutorial = False
DisableWorldFirstProgression = False
DisableWorldFirstRecords = False
DisplayOfferedOrbits = True
DisplayOfferedWaypoints = True
AverageAvailableContracts = 10
FacilityProgressionFactor = 0.2
SolarOrbitHeatTolerance = 800
SunStationaryName = keliostationary
HomeStationaryName = keostationary
OtherStationaryName = stationary
SunSynchronousName = keliosynchronous
HomeSynchronousName = keosynchronous
OtherSynchronousName = synchronous
MolniyaName = Kolniya
MODULE_DEFINITIONS
{
Antenna = ModuleDataTransmitter
Antenna = ModuleLimitedDataTransmitter
Antenna = ModuleRTDataTransmitter
Antenna = ModuleRTAntenna
Dock = ModuleDockingNode
Grapple = ModuleGrappleNode
Power = ModuleGenerator
Power = ModuleDeployableSolarPanel
Power = FNGenerator
Power = FNAntimatterReactor
Power = FNNuclearReactor
Power = FNFusionReactor
Power = KolonyConverter
Power = FissionGenerator
Power = ModuleCurvedSolarPanel
Wheel = ModuleWheel
Wheel = ModuleLandingGear
Wheel = ModuleLandingGearFixed
Wheel = FSwheel
}
ARM
{
MaximumExistent = 2
SignificantSolarEjectionChance = 10
ExceptionalSolarEjectionChance = 20
HomeLandingChance = 20
AllowSolarEjections = True
AllowHomeLandings = True
Expiration
{
MinimumExpireDays = 1
MaximumExpireDays = 7
DeadlineDays = 2982
}
Funds
{
BaseAdvance = 46000
BaseReward = 120000
BaseFailure = 0
SolarEjectionMultiplier = 1.25
}
Science
{
BaseReward = 16
SolarEjectionMultiplier = 1
}
Reputation
{
BaseReward = 26
BaseFailure = 13
SolarEjectionMultiplier = 1.25
}
}

The ARM is a type of contract. There are several same-level brackets with different names, such as Base, Flag, ISRU...

How can I write an MM patch that applies @DisableWorldFirstProgression = True and @MaximumExistent = 0 to everywhere it is found?

Link to comment
Share on other sites

Hello.

The Contracts.cfg in the Squad folder looks like this:


Contracts
{
DisableWorldFirstTutorial = False
DisableWorldFirstProgression = False
DisableWorldFirstRecords = False
DisplayOfferedOrbits = True
DisplayOfferedWaypoints = True
AverageAvailableContracts = 10
FacilityProgressionFactor = 0.2
SolarOrbitHeatTolerance = 800
SunStationaryName = keliostationary
HomeStationaryName = keostationary
OtherStationaryName = stationary
SunSynchronousName = keliosynchronous
HomeSynchronousName = keosynchronous
OtherSynchronousName = synchronous
MolniyaName = Kolniya
MODULE_DEFINITIONS
{
Antenna = ModuleDataTransmitter
Antenna = ModuleLimitedDataTransmitter
Antenna = ModuleRTDataTransmitter
Antenna = ModuleRTAntenna
Dock = ModuleDockingNode
Grapple = ModuleGrappleNode
Power = ModuleGenerator
Power = ModuleDeployableSolarPanel
Power = FNGenerator
Power = FNAntimatterReactor
Power = FNNuclearReactor
Power = FNFusionReactor
Power = KolonyConverter
Power = FissionGenerator
Power = ModuleCurvedSolarPanel
Wheel = ModuleWheel
Wheel = ModuleLandingGear
Wheel = ModuleLandingGearFixed
Wheel = FSwheel
}
ARM
{
MaximumExistent = 2
SignificantSolarEjectionChance = 10
ExceptionalSolarEjectionChance = 20
HomeLandingChance = 20
AllowSolarEjections = True
AllowHomeLandings = True
Expiration
{
MinimumExpireDays = 1
MaximumExpireDays = 7
DeadlineDays = 2982
}
Funds
{
BaseAdvance = 46000
BaseReward = 120000
BaseFailure = 0
SolarEjectionMultiplier = 1.25
}
Science
{
BaseReward = 16
SolarEjectionMultiplier = 1
}
Reputation
{
BaseReward = 26
BaseFailure = 13
SolarEjectionMultiplier = 1.25
}
}

The ARM is a type of contract. There are several same-level brackets with different names, such as Base, Flag, ISRU...

How can I write an MM patch that applies @DisableWorldFirstProgression = True and @MaximumExistent = 0 to everywhere it is found?

You patch it just like patching a part:


@Contracts
{
@DisableWorldFirstProgression = False
}

And so on. Check out my "KAINET" config in my signature for some more extensive contract-config modding (though be aware that it was made for 0.90 and hasn't been updated yet, so don't copy from it blindly).

Link to comment
Share on other sites

Can I list parts in the initial @PART call? As in @PART[part1,part2,part3] {}?

I have a number of parts (about 10 to 15) on which I want to change the same field in the same way. However, due to the nature of the parts and the field I want to change, I can't really filter them with a search term without potentially affecting other parts at random. So I'm going to target each part explicitly. Obviously I can do this with 10 to 15 individual @PART calls, and I have no problem with doing it that way - I just spontaneously wondered if it was possible to compact it into a single one.

Link to comment
Share on other sites

I'm attempting to create this MM cfg, base on advice I received in the SXT thread It's meant to fix most of the references to outdated squad paths in SXT but its not working at the moment. My knowledge of advanced MM syntax is very weak, the advice I received and a read of the MM wiki page is basically all I know about it. Any advice and corrections would be greatly appreciated:


// SXTchangedpaths.cfg
// Change paths for SXT and other mods that reference outdated stock paths
// These are only the paths I am aware of so far that have changed, there are several others,
// and there are ones where the model and texture map has changed

// Use if want to fix all broken parths
// @PART[*]:FINAL {

// Use if only want to do SXT parts, if using the above remember to comment out
@PART[*]:HAS[#author[Lack]] {
// Duplicate for as many times as needed
// @MODEL,* {
// @texture ^= :^Squad/Parts/OldPathToTexture:Squad/Parts/NewPathToTexture:
// }

@MODEL,* {
@texture ^= :^Squad/Parts/Utility/airIntakeRadialXM-G50/model000:Squad/Parts/Aero/airIntakeRadialXM-G50/model000:
}

@MODEL,* {
@texture ^= :^Squad/SPP/Mk2FuselageLong/mk2Fuselage:Squad/Parts/FuelTank/mk2FuselageLong/mk2Fuselage:
}

@MODEL,* {
@texture ^= :^Squad/SPP/Mk2CockpitStandard/Cockpit:Squad/Parts/Command/mk2CockpitStandard/Cockpit:
}

@MODEL,* {
@texture ^= :^NASAmission/Parts/Size3Decoupler/decoupler_and_adaptor_cm:Squad/Parts/Structural/Size3Decoupler/decoupler_and_adaptor_cm:
}

@MODEL,* {
@texture ^= :^NASAmission/Parts/Size2LFB/twin_nozzle_booster_nm:Squad/Parts/Engine/Size2LFB/twin_nozzle_booster_nm:
}
@MODEL,* {
@texture ^= :^Squad/Parts/Electrical/2x3ShroudSolarPanels/model001:Squad/Parts/Electrical/3x2ShroudSolarPanels/model001:
}

@MODEL,* {
@texture ^= :^Squad/Parts/Electrical/2x3ShroudSolarPanels/model002:Squad/Parts/Electrical/3x2ShroudSolarPanels/model002:
}

// this texture map has changed, but might still work
@MODEL,* {
@texture ^= :^Squad/Parts/Utility/CircularIntake/model000:Squad/Parts/Aero/circularintake/circularintake:
}
}

Edited by Andrew_C
Terrible spelling
Link to comment
Share on other sites

yes, you can use more than one part name with , or |

This makes me question something, I was under the impression that ',' was like AND operator, and not OR like the '|' for example

@PART[*]:NEEDS[modone,@module[such]]

would required both modone to be present as well as the the module. Wrong?

Link to comment
Share on other sites

Hello.

Any idea why this isn't working?


@RESOURCE_DEFINITION[LiquidFuel]
{
@cost = 10
}

Best guess is because there is no just ( Cost ) it's ( unitCost = 0.8 )

EDIT-

@RESOURCE_DEFINITION[LiquidFuel]
{
@unitCost = 10
}

Edited by Mecripp2
Link to comment
Share on other sites

I'm attempting to create this MM cfg, base on advice I received in the SXT thread It's meant to fix most of the references to outdated squad paths in SXT but its not working at the moment. My knowledge of advanced MM syntax is very weak, the advice I received and a read of the MM wiki page is basically all I know about it. Any advice and corrections would be greatly appreciated:

2 problems. First @texture will only apply on the first texture line. And @texture,* does not work (yet). Second your regex starts with a ^ but the texture path is not the first thing in the line.

Also all SXT part does not have "author = Lack". Some have "author = Lack NovaSilisko".

I advice you to do the long way and write a patch per part


@PART[SXTSaturnV1-2SepSmall]
{
@MODEL {
@texture,0 ^= :^NASAmission/Parts/Size2LFB/twin_nozzle_booster_cm:Squad/Parts/Engine/Size2LFB/twin_nozzle_booster_cm:
@texture,1 ^= :^NASAmission/Parts/Size2LFB/twin_nozzle_booster_nm:Squad/Parts/Engine/Size2LFB/twin_nozzle_booster_nm:
}
}

This makes me question something, I was under the impression that ',' was like AND operator, and not OR like the '|' for example

@PART[*]:NEEDS[modone,@module[such]]

would required both modone to be present as well as the the module. Wrong?

it is a OR when used for the name. And a AND pretty much anywhere else. An other inconstancy of MM syntax :( That is why using the | makes more sense in that context

Link to comment
Share on other sites

2 problems. First @texture will only apply on the first texture line. And @texture,* does not work (yet). Second your regex starts with a ^ but the texture path is not the first thing in the line.

Also all SXT part does not have "author = Lack". Some have "author = Lack NovaSilisko".

I advice you to do the long way and write a patch per part


@PART[SXTSaturnV1-2SepSmall]
{
@MODEL {
@texture,0 ^= :^NASAmission/Parts/Size2LFB/twin_nozzle_booster_cm:Squad/Parts/Engine/Size2LFB/twin_nozzle_booster_cm:
@texture,1 ^= :^NASAmission/Parts/Size2LFB/twin_nozzle_booster_nm:Squad/Parts/Engine/Size2LFB/twin_nozzle_booster_nm:
}
}

Thanks, I guess I was hoping there would be a simple, fast way to do it. Still, with your advice in mind I'll continue to take a bash at it and hopefully learn a bit about MM configs in the process.

Edited by Andrew_C
clarified
Link to comment
Share on other sites

Andrew_C: The easy way is to write something to generate the cfgs. I use excel. I put in the old and new texture paths for all changed textures, and I get an MM config out of it. That's how I wrote the patcher for SXT for use with Stock Revamp, before Stock Revamp switched to not overwriting files.

Link to comment
Share on other sites

Hi everyone,

I'm trying to do this task with a module manager patch :

For all tanks with LFO :

- Add the firespitter "FSfuelSwitch" module with the given 3 options

- LFO (unchanged)

- LF Only (twice the amount of LF from LFO mode)

- Ox Only (twice the amount of Ox from LFO mode)

- Remove the old resources as they are replaced by firespitter

I was kinda pleased with the following patch (it's not balanced yet and makes all tanks available at start so I could check them fast in game) : http://paste.ubuntu.com/11359289/

In the patched version of the game configuration (I'm looking at the ConfigCache file), I can find my variables in the module instance (you may check this result for the Kerbodyne S3-14400 Tank : http://paste.ubuntu.com/11359383/ )

Is there a way to prevent this "pollution" ?

Is there a way to use formulas in a patch file ?

This patch is not an original idea as it is just a try to make the "Stock Fuel Switch" mod apply to all possible tanks.

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