Jump to content

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


sarbian

Recommended Posts

10 minutes ago, sarbian said:

Hum


!IFI_Tech,* = none

 

I worked on the assumption that there would only be one IFI_Tech at any given time, but yes, using the ,* would probably be recommended

 

but this still wouldn't solve the "delete only when others are present" problem

Edited by Sigma88
Link to comment
Share on other sites

4 hours ago, Aelfhe1m said:

The lack of OR in HAS requires a bit of a work around. For example:


// remove marker
@PART[*]
{
	!IFIModuleFound = delete
}

 

I really shouldn't do serious coding that late at night  :-)

I didn't need to check for anything;  since it's an earlier patch which is adding the value, I can just delete it from all parts.

Thank you all for taking a look

5 hours ago, blowfish said:

I took a look at the code, | doesn't work at all in a HAS block unfortunately

Thanks for verifying this, I was wondering.  I actually pulled the syntax from another mod (TweakableEverything), this tells me that the it (the other mod) isn't working properly, and I'm going to have to take a look at it

3 hours ago, Sigma88 said:

or you could just delete it 3 times

 


@PART:HAS[@MODULE[IFI_Extreme]]:FINAL
{
	!IFI_Tech = none
}
@PART:HAS[@MODULE[IFI_Improved]]:FINAL
{
	!IFI_Tech = none
}
@PART:HAS[@MODULE[IFI_Advanced]]:FINAL
{
	!IFI_Tech = none
}

 

I was trying to simplify the code a bit, this is what I had originally.

Link to comment
Share on other sites

1 hour ago, sarbian said:

Hum


!IFI_Tech,* = none

 

Well, IFI_Tech is a flag I use earlier in the patch to store a temporary value, so, since I created it, I know there will only be one.

And, after all that, I've been able to totally eliminate it;  turned out that I was only using it to store a constant, so I changed the reference to the variable to the constant and it's all good.

Thanks to everyone again

Link to comment
Share on other sites

Version 3.0.0

  • Huge rewrite and code cleanup by @blowfish
  • Patch loading (without cache) is faster.  About 10-30% depending on the number and composition of mods involved.
  • Code changes made here will make it much easier to add new features in the future.
  • Many tests have been added which can be run after ModuleManager is compiled.  This will help ensure that future changes don't break existing functionality.
  • Some errors which were previously silent will now cause loud failures (error messages in the loading screen and cache will not be generated).  Most of them have to do with patches that have more than one pass specified (e.g. :FOR[xxx]:AFTER[yyy]).

Downloads :

ModuleManager.3.0.0.dll

ModuleManager-3.0.0.zip

Edited by sarbian
Link to comment
Share on other sites

On 10/25/2013 at 9:01 AM, sarbian said:

Version 3.0.0

  • Huge rewrite and code cleanup by @blowfish
  • Patch loading (without cache) is faster.  About 10-30% depending on the number and composition of mods involved.
  • Code changes made here will make it much easier to add new features in the future.
  • Many tests have been added which can be run after ModuleManager is compiled.  This will help ensure that future changes don't break existing functionality.

Wonderful!  Have some rep, and a donation!  :rep:  :funds:   (Wonder what the current exchange rate between Euros and Funds is...)

Link to comment
Share on other sites

I'm having a problem with a simple cfg not working with 3.0.0 that was fine with 2.8.1

@EXPERIMENT_DEFINITION[*]
{
	%baseValue = #$scienceCap$
}

In 2.8.1 it applies 12 patches and recovered science always gives 100% of the reward.

In 3.0.0 it applies 0 patches and of course does nothing in game.

output logs from both 2.8.1 and 3.0.0 are at https://www.dropbox.com/s/ye7wh8p9c71ov7b/output_logs.zip

 

Hopefully this is the right place to ask for assistance, thanks.

Link to comment
Share on other sites

1 hour ago, Rastan9 said:

I'm having a problem with a simple cfg not working with 3.0.0 that was fine with 2.8.1


@EXPERIMENT_DEFINITION[*]
{
	%baseValue = #$scienceCap$
}

In 2.8.1 it applies 12 patches and recovered science always gives 100% of the reward.

In 3.0.0 it applies 0 patches and of course does nothing in game.

output logs from both 2.8.1 and 3.0.0 are at https://www.dropbox.com/s/ye7wh8p9c71ov7b/output_logs.zip

 

Hopefully this is the right place to ask for assistance, thanks.

It's the [*] that seems to be causing this to fail in 3.0.0. If you remove that then it applies the expected 12 patches to an otherwise stock KSP.

Quick testing suggests that only nodes with a name key are selected by @NODE[*] while nodes that use another primary key (like id in EXPERIMENT_DEFINITION or ResourceName in GLOBAL_RESOURCE) will not be matched and no error will be written to the log either.

Link to comment
Share on other sites

31 minutes ago, Aelfhe1m said:

It's the [*] that seems to be causing this to fail in 3.0.0. If you remove that then it applies the expected 12 patches to an otherwise stock KSP.

Quick testing suggests that only nodes with a name key are selected by @NODE[*] while nodes that use another primary key (like id in EXPERIMENT_DEFINITION or ResourceName in GLOBAL_RESOURCE) will not be matched and no error will be written to the log either.

Thanks, that change to the cfg fixed it in both an otherwise stock ksp and a heavily modded install.

In my heavily modded install I still have 36 unaccounted for patches after moving from 2.8.1 to 3.0.0.  Is there a straight forward way to figure out which *.cfg files need to be modified?  Do I need to remove the [*] from any node that uses a primary key?  Could the other missing patches be related to something else?  I found the problem with the science reward purely by chance earlier.  Sorry for being so lost when it comes to this stuff.   Here are my logs for my modded install for both 2.8.1 and 3.0.0 https://www.dropbox.com/s/xsyap8f2umbf4xe/output_logs fully modded.zip

Thanks

Link to comment
Share on other sites

On 12/2/2017 at 3:00 AM, sarbian said:

Version 3.0.0

  • Patch loading (without cache) is faster.  About 10-30% depending on the number and composition of mods involved.
 

Is there a way to force a cache?  I used the cache to determine if my MMConfigs correct.

Link to comment
Share on other sites

6 hours ago, Rastan9 said:

Is there a straight forward way to figure out which *.cfg files need to be modified?

Still trying to find a good answer to that myself.

Best I've come up with so far is to do a diff comparison on the two ModuleManager.ConfigCache files to find which nodes are being patched differently then search the logs for those nodes to see which patches were being applied to them in each version and then try to figure out what needs to be changed. It's a bit of a slow and tedious manual process though (you also need to filter out the UrlConfig => url lines which are no longer written to the cache in 3.0.0).

Spoiler

FfMRzmr.jpg

 

Link to comment
Share on other sites

15 minutes ago, Aelfhe1m said:

Still trying to find a good answer to that myself.

Best I've come up with so far is to do a diff comparison on the two ModuleManager.ConfigCache files to find which nodes are being patched differently then search the logs for those nodes to see which patches were being applied to them in each version and then try to figure out what needs to be changed. It's a bit of a slow and tedious manual process though (you also need to filter out the UrlConfig => url lines which are no longer written to the cache in 3.0.0).

  Reveal hidden contents

FfMRzmr.jpg

 

Load to the main menu, open MM menu (Modifier + F11). You ll get a _MMCfgOutput dirs in KSP with the cfg exporteds. Rename the dir, do the same with an other MM version. Now compare the dir contents with a good diff tool like Beyond Compare (or WinMerge, but I am not a fan).

I should add a cmd line param to do the export after patching...

Edited by sarbian
Link to comment
Share on other sites

1 hour ago, sarbian said:

Load to the main menu, open MM menu (Modifier + F11). You ll get a _MMCfgOutput dirs in KSP with the cfg exporteds. Rename the dir, do the same with an other MM version. Now compare the dir contents with a good diff tool like Beyond Compare (or WinMerge, but I am not a fan).

Thanks, with this I'll get started on trying to unravel the remaining missing patches.  As an aside, is there a way to not need all of my posts to be approved by a moderator?  Thanks again sarbian and Aelfhe1m.

Edited by Rastan9
Link to comment
Share on other sites

@sarbian I think there may be an error in the _MMCfgOutput export for files that contain more than one top level node (e.g. Squad.Resources.ScienceDefs.EXPERIMENT_DEFINITION.cfg). It only seems to be exporting the last node defined to the file (or the previous ones are being overwritten by each successive one).

Link to comment
Share on other sites

1 hour ago, Rastan9 said:

As an aside, is there a way to not need all of my posts to be approved by a moderator?

When you've had 5 posts approved, you'll no longer need to have further posts approved. This is one of the unfortunate measures needed to keep spambots and the like from filling up the threads and forums with their posts.

Link to comment
Share on other sites

2 hours ago, Aelfhe1m said:

@sarbian I think there may be an error in the _MMCfgOutput export for files that contain more than one top level node (e.g. Squad.Resources.ScienceDefs.EXPERIMENT_DEFINITION.cfg). It only seems to be exporting the last node defined to the file (or the previous ones are being overwritten by each successive one).

I ll have a look tonight. It should be easy to find if it appends with the experiments def. 

Link to comment
Share on other sites

29 minutes ago, DiscoveryPlanet said:

WHOOOOA this update make my loading game more faster, but got 14 error massage when in loading, yet when get into the game, there are no something wrong happen, what is going on?

I'm getting some too, but I think they're likely because the individual mods need to be updated to the new Module Manager.  I'm sure that will happen soon.

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