Jump to content

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


sarbian

Recommended Posts

48 minutes ago, Olympic1 said:

You dont need MM to localize any mod. You can do it the way KSP is doing it.


Localization
{
	en-us
	{
		#ModName_id = Your text here
		#ModName_id = Your text here
		#ModName_id = Your text here
	}
}

You can of course change en-us to any of the other languages ( en-us - es-es - ja - ru - zh-cn )

 

More information can be found here:

 

I think he means that he can't use MM to edit those localization cfgs

for example, in the science defs you can find:

default = #autoLOC_501258

if I want to change that to some other #autoLOC_XXXXXX can I use MM?

 

and I think the answer is no, because KSP changes the #autoLOC_ before mm has a chance to modify the cfgs

 

Link to comment
Share on other sites

@Olympic1 @Sigma88 My parts are already module manager-defined parts that clone stock parts. What I want to do is localize the modified descriptions, toggles, and so on. For example:

+PART[airScoop]:FOR[ExplodiumBreathingEngines]
{
	@name = airScoopExV
	// [...]
	@title = #exvLOC_500115 
	@description = #exvLOC_500116
	@tags = #exvLOC_500117 
	// [...]
}

At first attempt though, I was able to use these variables '#exvLOC_xxxxxx' and KSP loaded the correct strings for them. So I apparently don't need to escape the '#' symbol. These strings are in a custom dictionary.cfg I am adding to the package:

Localization
{
	en-us
	{
		#exvLOC_500115 = XV-G51 ExV Harv3ster
		#exvLOC_500116 = An explodium harv3ster duct that can be mounted at the sides of a fuselage. Warranty does not cover engine flame-outs or any objects, inanimate or otherwise, sucked in by the harvester. Optimized for subsonic flight.
		#exvLOC_500117 = aero aircraft breathe fligh inlet jet explodium plane subsonic suck

		#exvLOC_501005 = 3xplodium Vapour

		#exvLOC_502027 = Start ExV Filt3r
		#exvLOC_502028 = Stop ExV Filt3r
		#exvLOC_502045 = ExpVapour Filt3r

		#exvLOC_6002101 = 3xV

		#exvLOC_6002390 = Depl0y <<1>>
		#exvLOC_6002391 = Retr4ct <<1>>
		#exvLOC_6002392 = T0ggle <<1>>
		#exvLOC_7001228 = Filt3r

	}
}

I'm using 'l33t' spellings in my tests, and I'll change these to correct spellings once I know the localization strings work.

Edited by Gordon Fecyk
Link to comment
Share on other sites

Been having issues with the new Module manager 2.8.0. Anytime i have it installed my game will crash on bootup. and any mods that use it do not function. nor do older mods that use older versions.

Log file

 

I hope this can get fixed with whatever the problem is. makes the game unplayable for me as i like using mods.

Link to comment
Share on other sites

32 minutes ago, Tokageroh said:

Been having issues with the new Module manager 2.8.0. Anytime i have it installed my game will crash on bootup. and any mods that use it do not function. nor do older mods that use older versions.

Log file

 

I hope this can get fixed with whatever the problem is. makes the game unplayable for me as i like using mods.

are you using mods that are updated to 1.3.0?

Link to comment
Share on other sites

38 minutes ago, Tokageroh said:

Been having issues with the new Module manager 2.8.0. Anytime i have it installed my game will crash on bootup. and any mods that use it do not function. nor do older mods that use older versions.

Log file

 

I hope this can get fixed with whatever the problem is. makes the game unplayable for me as i like using mods.

  1. You have mods compiled for KSP 1.1.3. More than a year ago.
  2. ModuleManager has nothing do do with those crash. The game crashed long after MM was done.
Link to comment
Share on other sites

22 minutes ago, Tokageroh said:

Thanks. after further diggings it seems that its opt space plane parts thats having issues when combined with tweekscale. It's a shame opt is my fav parts pack also.

Looking at your log, you have several mods that are failing to load.

Link to comment
Share on other sites

I have this patch for Fusebox which works for everything EXCEPT the parts in Squad/Parts/Prebuilt:

@PART[*]:HAS[#module[Part]]:Final
{
	@module = PartTapIn
}

Is there any way to make it work for those?  Right now I'm hard-coding in the exceptions for the three parts there:

  • kerbalEVA
  • kerbalEVAfemale
  • flag

 

Link to comment
Share on other sites

On 02/06/2017 at 1:06 AM, linuxgurugamer said:

I have this patch for Fusebox which works for everything EXCEPT the parts in Squad/Parts/Prebuilt:


@PART[*]:HAS[#module[Part]]:Final
{
	@module = PartTapIn
}

Is there any way to make it work for those?  Right now I'm hard-coding in the exceptions for the three parts there:

  • kerbalEVA
  • kerbalEVAfemale
  • flag

 

I succesfully targeted the kerbalEVA part with a module manager patch like this:

@PART[kerbalEVA]
{
...add stuff
}

maybe a workaround could be to add this exception to your first patch, then do the same specifically for the kerbalEVA, kerbalEVAfemale, ... ?


@PART[*!kerbalEVA]:HAS[#module[Part]]:Final
{
	@module = PartTapIn
}


@PART[kerbalEVA]:HAS[#module[Part]]:Final
{
	@module = PartTapIn
}

 

---------------------------------------

On my side i have a question too:

IS it possible to target the new localisation config file "GameData\Squad\Localization\dictionary.cfg"  with a module manager patch?

it look likes this:

Localization
{
	en-us
	{
		#autoLOC_18284 = Stability Assist
		#autoLOC_18285 = Prograde/Retrograde Hold
		...

thank's.

Edited by Skalou
Link to comment
Share on other sites

On 6/1/2017 at 7:06 PM, linuxgurugamer said:

I have this patch for Fusebox which works for everything EXCEPT the parts in Squad/Parts/Prebuilt:


@PART[*]:HAS[#module[Part]]:Final
{
	@module = PartTapIn
}

Is there any way to make it work for those?  Right now I'm hard-coding in the exceptions for the three parts there:

  • kerbalEVA
  • kerbalEVAfemale
  • flag

 

Your patch fails for those because they have no 'module = Part' in them. If it's not in their config node then it can't be targeted by Module Manager.

You'll just have to target them each specifically.

Link to comment
Share on other sites

@Snark Just shared this with me, but it does not work with the latest MM. Any clues on what is throwing the errors during loading? I've tried a few different things, no luck:

 

@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved model now has liquid fuel.:
	RESOURCE
	{
		name = LiquidFuel
		amount = 0
		maxAmount = #$../mass$
		@maxAmount *= 500
	}
}
@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved model now has liquid fuel.:
	RESOURCE
	{
		name = LiquidFuel
		amount = 0
		maxAmount = #$mass
		@maxAmount *= 500
	}
}
@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved model now has liquid fuel.:
	%RESOURCE
	{
		%name = LiquidFuel
		%amount = 0
		%maxAmount = #$mass
		@maxAmount *= 500
	}
}

It also appears to be causing errors in interstellarfuelswitch, and also makes all the wing parts it should modify not show in editor at all...

 

Edited by Errol
Link to comment
Share on other sites

42 minutes ago, Errol said:

@Snark Just shared this with me, but it does not work with the latest MM. Any clues on what is throwing the errors during loading? I've tried a few different things, no luck:

 


@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved model now has liquid fuel.:
	RESOURCE
	{
		name = LiquidFuel
		amount = 0
		maxAmount = #$../mass$
		@maxAmount *= 500
	}
}

@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved model now has liquid fuel.:
	RESOURCE
	{
		name = LiquidFuel
		amount = 0
		maxAmount = #$mass
		@maxAmount *= 500
	}
}

@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved model now has liquid fuel.:
	%RESOURCE
	{
		%name = LiquidFuel
		%amount = 0
		%maxAmount = #$mass
		@maxAmount *= 500
	}
}

It also appears to be causing errors in interstellarfuelswitch, and also makes all the wing parts it should modify not show in editor at all...

 

the logs will tell you why the error is occurring

Link to comment
Share on other sites

I check the logs and noticed that interstellarfuelswitch was throwing a lot of errors, so I tried unistalling it and running KSP. This time there were no module manager errors with this patch, but the wings all still don't show up in editor, for some reason:

 

@PART[*]:HAS[@MODULE[ModuleLiftingSurface],!MODULE[ModuleCommand],!RESOURCE[*]]
{
	@description ^= :(.)$:$0 New and improved version now has liquid fuel.:
	%RESOURCE
	{
		%name = LiquidFuel
		%amount = 10
	}
}

 

Link to comment
Share on other sites

@sarbian FYI: your file host (ksp.sarbian.com) has somehow ended up flagged as a 'harmful site', which is causing some anti-virus/browser software to block access to the download links in your OP here. The problem is not easy to figure out because browsers unfortunately will just show a generic issue with SSL or security certificate.

Discovered this on a PC for which I was asked to install an older version of MM. Firefox, Internet Explorer, and the F-Secure AV on that system all gave different errors, but from the AV log I finally dug up it indicated the website was seen as 'harmful'. Unfortunately in trying to extract that log I managed to delete the entry, so I have no file to send you (zero previous experience with this F-Secure product, sorry).

I went and reported the URL of your site to F-Secure as a false positive anyway, cause it was pretty easy to find (right at the bottom of the main page), but I couldn't quickly find how to do the same for MS or Mozilla and I needed to move on. You may want to check on this, else you may see people start complaining that your download site 'doesn't work'...

Link to comment
Share on other sites

1 hour ago, swjr-swis said:

FYI: your file host (ksp.sarbian.com) has somehow ended up flagged as a 'harmful site',

And it will only do it when crappy AV that tunnels all your HTTP/HTTPS traffic or force install browser extension are installed. FF, Chrome and IE all report the site as fine. 

AV that tunnels traffic are actually a security liability and I won't dignify them by looking in their crappy flagging.

Link to comment
Share on other sites

EDIT: Nevermind, I am an idiot. An idiotic idiot who did once idiot to idiotically idiot onto the Internet. I forgot to put a # before "$../../mass$".

So, quick question: I'm trying to programmatically multiply an array of keys*, and despite this seeming like the correct syntax, Module Manager reports six exceptions (which at least corresponds to six keys...).

*Trying to improve my Karbonite-Real Fuels patch by adding heat production and making stuff far more programmatic.

@PART(stuff)
{
    MODULE
    {
        name = ModuleResourceConverter
        <... other stuff>
        TemperatureModifier
        {
                key = 0 50000
                key = 750 25000
                key = 1000 5000
                key = 1250 250
                key = 2000 25
                key = 4000 0
        }
        @TemperatureModifier
        {
        	@key,*[1, ] *= $../../mass$
            // My understanding is this would read "for all variables "key", modify the second (0-indexed 1), space-separated value by the value mass that is two nodes below the TemperatureModifier node. Ideally, this is the part mass, though I might be messing that one up.
        }
    }
}

 

Edited by Starman4308
Typos yaaaay
Link to comment
Share on other sites

4 hours ago, Starman4308 said:

EDIT: Nevermind, I am an idiot. An idiotic idiot who did once idiot to idiotically idiot onto the Internet. I forgot to put a # before "$../../mass$".

So, quick question: I'm trying to programmatically multiply an array of keys*, and despite this seeming like the correct syntax, Module Manager reports six exceptions (which at least corresponds to six keys...).

*Trying to improve my Karbonite-Real Fuels patch by adding heat production and making stuff far more programmatic.


@PART(stuff)
{
    MODULE
    {
        name = ModuleResourceConverter
        <... other stuff>
        TemperatureModifier
        {
                key = 0 50000
                key = 750 25000
                key = 1000 5000
                key = 1250 250
                key = 2000 25
                key = 4000 0
        }
        @TemperatureModifier
        {
        	@key,*[1, ] *= $../../mass$
            // My understanding is this would read "for all variables "key", modify the second (0-indexed 1), space-separated value by the value mass that is two nodes below the TemperatureModifier node. Ideally, this is the part mass, though I might be messing that one up.
        }
    }
}

 

Again, the logs will say why the errors occur. Since you don't post them the only thing left is to take  wild guess.

So, the Part is missing a value named mass?

Link to comment
Share on other sites

@Starman4308

Or if not the log at least the entire patch and not 'stuff' and 'other stuff'.

I can actually see something wrong in what you posted but I have no idea if that's a typo because you typed it in or if it's really representative of the problem.

If you're getting errors, syntactical mistakes are a likely cause but who can say what's wrong from pseudo code?

Link to comment
Share on other sites

I'm wondering if makes sense to selectively load localized strings depending on whether another mod is installed or not. Or would that be pointless/unnecessary?

Something like this:

// stock sciencedefs localization
Localization
{
  tag = mymod_sciencedefs_loc

  en-us
  {
    // lots of localized strings -- science definitions for stock celestial bodies
  }
}


// support OPM if installed, otherwise don't load these
@Localization[*,mymod_sciencedefs_loc]:NEEDS[OPM]
{
  @en-us
  {
    // lots of localized strings -- science definitions for OPM celestial bodies
  }
}

 

Link to comment
Share on other sites

To anyone experiencing lag when looking at the ocean or under a certain altitude (160,000M), I have written a small ModuleManager patch for this:

@Kopernicus:AFTER[Kopernicus]
{
	@Body[Kerbin]
	{
		@ScaledVersion
		{
			fadeStart = 40000
			fadeEnd = 45000
		}
		@PQS
		{
			fadeStart = 45000
			fadeEnd = 55000
			deactivateAltitude = 70000
		}
	}
}

Or you can download a quick fix here:

https://www.dropbox.com/s/a8yizsm8c3orheh/GSLX - OceanPatch.zip?dl=0

You require Kopernicus, ModularFlightIntegrator and ModuleManager for this to function.

 

@lajoswinkler

Link to comment
Share on other sites

-PART[mk1pod]:AFTER[Squad]:FOR[PartOverhauls] {}

-PART[liquidEngine]:AFTER[Squad]:FOR[PartOverhauls] {}

Removes stock parts - works.

@PART[mk1podNew]:AFTER[Squad]:FOR[PartOverhauls] { @name = mk1pod }

@PART[liquidEngineT30]:AFTER[Squad]:FOR[PartOverhauls] { @name = liquidEngine }

Renames new part to old name - supposedly.

@PART[mk1podNew]:AFTER[PartOverhauls] {stuff happens}

Works - but should not, because part should have "name = mk1pod" now?

Note the AFTER, but it still targets the old name.

@PART[liquidEngine|liquidEngineT30*]:AFTER[PartOverhauls] {more stuff}

Works - seemingly because "liquidEngineT30*" catches the part that should be named "liquidEngine".

@PART[liquidEngine] { @title = LV-T30-A "Reliant" Liquid Fuel Engine }

Does not work - although part should be named "liquidEngine" now?

Note the lack of :AFTER and it still not working. (Code appears in this order in one file.)

 

Edited by KerbMav
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...