Jump to content

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


sarbian

Recommended Posts

% doesn't work for root-level nodes because Mu set the root of GameDatabase to read-only.

I'm not aware of any way to do what you want. Sorry... :(

At least I know not to waste time trying. Thanks for the reply.

There is a way to do it, it's a little kluge-ish but it works. What you need to do is go ahead and add your version of the Oxygen resource but you're going to include a tag. You'll also have a MM config node that looks for an Oxygen resource that has no tag then renames it. That should be safe since just about nobody uses tags. (if it did have a tag then you'd just look for RESOURCE_DEFINITION[Oxygen,<tag>])

And renaming a resource or any other node effectively deletes it as far as anything goes that tries to find that resource.

Here's an example. Fill in the missing values for density, flowMode, etc.

This has been tested experimentally


RESOURCE_DEFINITION
{
name = Oxygen
density =
flowMode =
transfer =
isTweakable =
tag = KingtigerOxygen
}
@RESOURCE_DEFINITION[Oxygen]:HAS[~tag[]]
{
@name = OxygenDELETED
}

Link to comment
Share on other sites

I'm curious is there any downside to having files that call items that are not there? Say I wanted to start a cfg file that added a property to every part in the game, and allow developers to add there parts to this file. Anyone can download it because they want said property, i.e. every part under 1 tonne to be able to be stored in KAS. But they don't use all items in said file because they only run with say, 12 mods instead of the say 20 that are listed. Will this cause any adverse effects to the game? or will the game call them, notice they don't exist then ignore them?

Link to comment
Share on other sites

I'm curious is there any downside to having files that call items that are not there? Say I wanted to start a cfg file that added a property to every part in the game, and allow developers to add there parts to this file. Anyone can download it because they want said property, i.e. every part under 1 tonne to be able to be stored in KAS. But they don't use all items in said file because they only run with say, 12 mods instead of the say 20 that are listed. Will this cause any adverse effects to the game? or will the game call them, notice they don't exist then ignore them?

Well, any part that doesn't exist will simply mean that the match rules never find a match. No error, no failure, just no effect. So the only possible downside would be an increase in loading time, which is tiny,

For example, I have over 230 MM rules spread across fiftysomething files, most of them are wildcard matches that scan through the over 1500 parts I have (B9, KW, Novapunch, KSO, many many others), and the sum total MM processsing time (from reading the logs for when it starts and when it finishes) is about 11 seconds, so if you added an extra 10% on that (which would be a LOT of rules, parts and changes), then you would be looking at one more second on my several minutes load time.

I'd say you'd be fine, but if you really want to, then break out rules into one file per mod instead of one monolithic file, and people can delete the ones they don't need.

Link to comment
Share on other sites

I'm curious is there any downside to having files that call items that are not there? Say I wanted to start a cfg file that added a property to every part in the game, and allow developers to add there parts to this file. Anyone can download it because they want said property, i.e. every part under 1 tonne to be able to be stored in KAS. But they don't use all items in said file because they only run with say, 12 mods instead of the say 20 that are listed. Will this cause any adverse effects to the game? or will the game call them, notice they don't exist then ignore them?

If it's a part that isn't in the game, ModuleManager won't find it and it won't be added. No adverse effects. If it's a module/plugin that you don't have being added to a part that does exist, MM will add it, but the Game will just write a long saying something to the effect of 'module PonyPower not found'. Still no real adverse effects :)

Link to comment
Share on other sites

Hello everyone,

I have started getting into using MM and as such have read through a number of pages in this thread to get a grasp on how it works. So far one thing has confused me a bit. I noticed at one point there seemed to only need to be a MM.dll file in the main gamedata folder, then it needed to be placed in each mod's folders, and now, I have no clue.

Any advice would be welcomed.

Link to comment
Share on other sites

Hi all,

I'm having an issue making some MM cfg files, i have been asking nathan, but this seems a more appropriate thread to get the code corrected before i try to submit them to the RO thread.

The basic idea of what i am trying to do is:

#1 editing "jrandoms" TAC RO pods_EnergyUsage.cgf file to be slightly more effective assigning its original fixes, add Reflectron DP-10 with RT2 RO fixed stats to manned command pods and added probe core passive antenna with RT RO fixed stats to all probes, assign 20 KAS storage units per crewman and remove reaction wheels entirely

#2 create a cfg each for TAC fixes (with above RT2, reaction wheel, KAS settings) to all AIES ALCOR, Bobcat's Soviet historical pack, FASA, B9, FusTek, Habitat pack, interstellar labs, and squad crew cabin/labs parts that the pods_EnergyUsage.cfg didnt affect correctly that need them (75% are only for power usage, Some FASA and Bobcat's Soviet pack parts contained ECLSS resources and/or life support regenerators that needed to be removed, some FusTek/Habitat pack needed their own settings aswell)

#3. alter the RPL science tweak files to effect all science parts to have matching base/cap values and transmit at 100% value (i think i nailed this, i included a V2 of the file that might be even more effective as it adds the resettable/rerunnable/collectable feature to some parts that were missing them)

I think i got the files setup correctly, other than Bobcat's Soviet pack & FASA which will involve slightly more setup work due to some ECLSS features/resources being switched over to TAC

I will post have i have finished here, can someone give them a look over and let me know if they are written correctly?

EDIT Decided to give up on probe power/comms being effected by pods_EnergyUsage.cfg as it was being interfering the way i was attempting it (i will just wait for RO fixes that apply directly to then rather than trying to effect all probes with the pods_EnergyUsage.cfg file) looks like i got everything else working right! finally! I will link file, i wont be making any more changes unless there are errors or settings that seem non realistic.

To recap it includes: >> jrandoms original power usage/amounts, manned pods this cfg effects will have 1000km (1MM) range with same stats as reflectron DP-10, removed reaction wheels from all manned pods this cfg effects, added KAS storage of 20 per crewman on all manned pods this cfg effects Submitted for approval

https://www.dropbox.com/s/2lq5af9uu3r7pij/pods_EnergyUsage.cfg

Only FASA to look at now and from what i learned from nathan/MM thread i think i can make FASA 100% TAC friendly (or atleast remove any ECLSS stuff)

Thank you so much, couldnt have managed it without you. If you know what i need to add this cfg to remove reaction wheels and create reasonable power usage/max amount for all probes to have by default that would be awesome, but looks like anything to do with RT2 for probes should be left up to RO fixes for the mod probes come from

----FINAL VERSION UNLESS NATHAN/SOMEONE HAVE SUGGESTION ABOUT THE PROBE SETTINGS I ASKED ABOUT ABOVE------

Edited by Guest
Link to comment
Share on other sites

Hi all,

I'm having an issue making some MM cfg files, i have been asking nathan, but this seems a more appropriate thread to get the code corrected before i try to submit them to the RO thread.

The basic idea of what i am trying to do is:

*snip*

----FINAL VERSION UNLESS NATHAN/SOMEONE HAVE SUGGESTION ABOUT THE PROBE SETTINGS I ASKED ABOUT ABOVE------

I am looking at the cfg file now, it seems mostly correct as far as I can tell, but just so I fully understand your intent is to

add...

KAS Module storage for each pod at a rate of 20 per Kerbal it holds,

Add a omnidirectional antenna to all pods with a range of 1mm

Change

Electrical resource consumption,

Electrical resource ammounts

Nearly Remove

sas torque

If that is the jist, then I believe you have it, however, I am curious about the balance reasons of adding a 1mm omnidirectional antennae to all pods, with a very low consumption it seems a little op. I can understand not wanting to add the antennae, but boosting its range significantly I am curious about. Are you using the real system size mod thus requiring a balanced distance in that respect? I apologize if I missed it... been a long day.

Link to comment
Share on other sites

I am looking at the cfg file now, it seems mostly correct as far as I can tell, but just so I fully understand your intent is to

add...

KAS Module storage for each pod at a rate of 20 per Kerbal it holds,

Add a omnidirectional antenna to all pods with a range of 1mm

Change

Electrical resource consumption,

Electrical resource ammounts

Nearly Remove

sas torque

If that is the jist, then I believe you have it, however, I am curious about the balance reasons of adding a 1mm omnidirectional antennae to all pods, with a very low consumption it seems a little op. I can understand not wanting to add the antennae, but boosting its range significantly I am curious about. Are you using the real system size mod thus requiring a balanced distance in that respect? I apologize if I missed it... been a long day.

Hi thanks for the reply, i have tested file and it indeed seems to work, on the issue of RT2 "added default" range, i am using RSS so 1000km (1MM) isnt very far and the stats i gave it match RT2_RO file stats for the Reflectron DP-10 (shortest range comms device in game i believe) exactly.

Thanks alot for looking at the file, ANWRocketMan is working on a cfg set for TAC and i am sure he understands it better than I, but i wanted to attempt to get all pods blanket effected by 1 fix to handle power usage/charge, KAS storage and to add very basic comms. I think its working as intended hopefully ANWRocketMan fix doesnt render it moot, but if it does i'm sure it will be more realistic.

My original idea was > what pod wouldnt have atleast a basic comms unit built in? To remove reaction wheels as it seems thats where RO fixes are heading and to add minor storage for KAS stuff (i'm sure command pods all have some very basic storage of tools and odds/ends, it would be nice to have an emergency fuel line and some struts on board)

hope your Easter weekend goes well!

Link to comment
Share on other sites

Since this doesn't seem to be unambiguously addressed in any of the later discussion, what, if anything, breaks compatibility between ModuleManager 1 and ModuleManger 2? I assume there's more to it than just whitespace tolerance.

Basically, should I start using MM 2 right away, or should I wait until a majority of mods support it?

Link to comment
Share on other sites

Since this doesn't seem to be unambiguously addressed in any of the later discussion, what, if anything, breaks compatibility between ModuleManager 1 and ModuleManger 2? I assume there's more to it than just whitespace tolerance.

Basically, should I start using MM 2 right away, or should I wait until a majority of mods support it?

Only white spaces. And nobody should be using those anyway. There are long standing issues with white spaces and not just in Module Manager. Later versions of MM try to strip them out so they don't cause problems which is basically just another way of saying that it tries to compensate for people writing configs incorrectly.

I suspect 2.0.1 started from an earlier point on the branch and once the changes Ialdabaoth made in his branch are merged with Sarbian's branch then it will become whitespace tolerant once again.

Or people can learn to write their configs correctly without whitespaces.

Edit: Perhaps I should amend that to say 'whitespaces in unexpected locations'. Obviously expressions like 'description = This is a part description.' are ok. There are other places where whitespaces cause parsing problems, or in the case of names, URL locator problems.

Edited by Starwaster
Link to comment
Share on other sites

Hi,

Sorry to break up the thread but I have a question. I am trying to Re-Texture some of the stock engines without having to overwrite the actual files. I have made a folder called SquadRetexture in gamedata and a cfg file. The issue I am having is trying to figure out what command I need to use to get say the skipper engine to use my .mbm file instead of the stock one. Looking over the part.cfg in the stock engine folder there is no reference to .mbm's specifically the engine_normal.mbm and engine_diff.mbm.

Cheers!

Link to comment
Share on other sites

Hi,

Sorry to break up the thread but I have a question. I am trying to Re-Texture some of the stock engines without having to overwrite the actual files. I have made a folder called SquadRetexture in gamedata and a cfg file. The issue I am having is trying to figure out what command I need to use to get say the skipper engine to use my .mbm file instead of the stock one. Looking over the part.cfg in the stock engine folder there is no reference to .mbm's specifically the engine_normal.mbm and engine_diff.mbm.

Cheers!

You'd have to replace any 'mesh =' lines with MODEL{} nodes. Something like....


@PART[somePartID]
{
!mesh
MODEL
{
model = <path to the Squad model for that part>
scale = 1.0, 1.0, 1.0
texture = <path to your texture for this model>
}
}

I think that's the right way to use MODEL but it's up to you to do proper research and verify. (actually everything up to texture is correct.... just not sure about texture)

If you use non .mbm though, like .png you can just stick it in that part's folder and it overrides it. With the obvious caveat that to uninstall it, people have to go in and delete those textures.

Link to comment
Share on other sites

You'd have to replace any 'mesh =' lines with MODEL{} nodes. Something like.../QUOTE]

Thanks, I have only really just started playing around with MM cfg's. I've tried what you have said, the part still works as if it is stock. Here is what I did.

GameData/SquadRetexture/ - contains the part retextures

GameData/Configs/ - contains my cfg's


@PART[engineLargeSkipper]
{
!mesh
MODEL
{
model = <Squad/Parts/Engine/engineLargeSkipper/model.mu>
scale = 1.0, 1.0, 1.0
texture = <SquadRetexture/Engine/engineLargeSkipper/ksp_l_midrangeEngine_diff.mbm>
texture = <SquadRetexture/Engine/engineLargeSkipper/ksp_l_midrangeEngine_normal.mbm>
}
}

I'm going to check the forums to see if I can find any reference to what I am trying to do. In the mean time is there anything I am doing obviously wrong?

Cheers!

Link to comment
Share on other sites

You'd have to replace any 'mesh =' lines with MODEL{} nodes. Something like.../QUOTE]

Thanks, I have only really just started playing around with MM cfg's. I've tried what you have said, the part still works as if it is stock. Here is what I did.

GameData/SquadRetexture/ - contains the part retextures

GameData/Configs/ - contains my cfg's


@PART[engineLargeSkipper]
{
!mesh
MODEL
{
model = <Squad/Parts/Engine/engineLargeSkipper/model.mu>
scale = 1.0, 1.0, 1.0
texture = <SquadRetexture/Engine/engineLargeSkipper/ksp_l_midrangeEngine_diff.mbm>
texture = <SquadRetexture/Engine/engineLargeSkipper/ksp_l_midrangeEngine_normal.mbm>
}
}

I'm going to check the forums to see if I can find any reference to what I am trying to do. In the mean time is there anything I am doing obviously wrong?

Cheers!

Take out the <>

I put those there to signify that the text between was variable.

Link to comment
Share on other sites

Okay, everyone knows that the search feature here sucks, right? Good. Hopefully I won't get yelled at too badly for asking the following questions that may or may not have been previously addressed:

I'd like to do 2 things, or get the MM code for them, whatever you call it.

#1 I would like to set both 'breakingForce' and 'breakingTorque' to a specific number, say 1000,for ALL parts, but only if

a) the part doesn't have any bF or bT already defined, naturally

or

B) the part DOES have those values defined, but the values are LESS THAN (i.e. '<' ) the value I want to set, in this case 1000. If the part has values set to GREATER THAN ( '>' ) my target value, ModuleManager will leave that number at the higher value.

Is the above possible? If so, I'd be eternally grateful if someone could post the config code. The same goes for my next request...

#2 I would like a config that fixes the 'Nan' bug when using engines with the electricCharge Resource wherein the 'maxAmount = 0'. It wouldn't matter if it just removed the resource altogether, or changed the maxAmount value to 1, or 10, or anything non- zero, I really don't care. Either way would be fine. :)

Now, I'd swear that I had seen something posted for #2 just recently, but for the life of me I can't find it again! :P

Once again, many thanks in advance (hopefully) to anyone who can figure this stuff out. I've been reading up on this thread for most of 6 hours now, and I've learned only one thing: I'll probably never be a game designer because any kind of computer code that's more complicated than a KSP part configuration file is totally incomprehensible to me!

Lol, thanks everyone. Later! :D

Link to comment
Share on other sites

#2 I would like a config that fixes the 'Nan' bug when using engines with the electricCharge Resource wherein the 'maxAmount = 0'. It wouldn't matter if it just removed the resource altogether, or changed the maxAmount value to 1, or 10, or anything non- zero, I really don't care. Either way would be fine. :)

Now, I'd swear that I had seen something posted for #2 just recently, but for the life of me I can't find it again!

Think it's this one you want:

@PART[*]:HAS[@MODULE[ModuleEngines],@RESOURCE[ElectricCharge]]
{
@RESOURCE[ElectricCharge]
{
%isTweakable = false
%hideFlow = true
}
}

Link to comment
Share on other sites

Okay, everyone knows that the search feature here sucks, right? Good. Hopefully I won't get yelled at too badly for asking the following questions that may or may not have been previously addressed:

I'd like to do 2 things, or get the MM code for them, whatever you call it.

#1 I would like to set both 'breakingForce' and 'breakingTorque' to a specific number, say 1000,for ALL parts, but only if

a) the part doesn't have any bF or bT already defined, naturally

or

B) the part DOES have those values defined, but the values are LESS THAN (i.e. '<' ) the value I want to set, in this case 1000. If the part has values set to GREATER THAN ( '>' ) my target value, ModuleManager will leave that number at the higher value.

Is the above possible? If so, I'd be eternally grateful if someone could post the config code. The same goes for my next request...

#2 I would like a config that fixes the 'Nan' bug when using engines with the electricCharge Resource wherein the 'maxAmount = 0'. It wouldn't matter if it just removed the resource altogether, or changed the maxAmount value to 1, or 10, or anything non- zero, I really don't care. Either way would be fine. :)

Now, I'd swear that I had seen something posted for #2 just recently, but for the life of me I can't find it again! :P

Once again, many thanks in advance (hopefully) to anyone who can figure this stuff out. I've been reading up on this thread for most of 6 hours now, and I've learned only one thing: I'll probably never be a game designer because any kind of computer code that's more complicated than a KSP part configuration file is totally incomprehensible to me!

Lol, thanks everyone. Later! :D

a) is possible

B) is not. conditional math is not checked for by any version of ModuleManager


@PART[*]:HAS[~breakingForce[]]
{
breakingForce = 1000
}
@PART[*]:HAS[~breakingTorque[]]
{
breakingTorque = 1000
}

Link to comment
Share on other sites

a) is possible

B) is not. conditional math is not checked for by any version of ModuleManager


@PART
[*]:HAS[~breakingForce[]]
{
breakingForce = 1000
}
@PART
[*]:HAS[~breakingTorque[]]
{
breakingTorque = 1000
}

Hmm. Okay, well, I thank you both, Starwaster and ObsessedWithKSP, those are what I needed. :D

Link to comment
Share on other sites

How do you use the % operator for nodes? Would I do something like


%MODULE
{
name = ModuleRTAntennaPassive
TechRequired = unmannedTech
OmniRange = 1000

TRANSMITTER
{
PacketInterval = 0.3
PacketSize = 2
PacketResourceCost = 15.0
}
}

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