Jump to content

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


sarbian

Recommended Posts

9 minutes ago, Laguna said:

Try using :AFTER[Squad] for your modded stock parts, that should make the changes actually happen.  I've noticed that MM patches get loaded early on, but many if not most of the stock parts get loaded last, so your patches don't have any affect.  I had trouble as well with moved and modded stock parts not working, and using :AFTER[Squad] solved the problem.

That is inaccurate information.

Stock parts load before Module Manager does a thing.

The only effect :AFTER[Squad] will have is if some other modders are scheduling their patches in the :BEFORE[Squad] or :FOR[Squad] passes  and the effect is on Module Manager processing order. But actual stock parts and in fact ALL modded parts packs configs that do not contain Module Manager patches are processed by the game before Module Manager starts looking for and applying patches.

Clarification Edit: Just a reinforcement/clarification on the above: :AFTER[Squad] isn't something that one has to do because they're trying to patch Squad parts. It's just a scheduled pass that is influenced by alphabetical order.

Let's say you want your patch to happen before A_Mod runs its patches. He's scheduling it in :FOR[A_Mod]. If you use :BEFORE[A_Mod] then it runs before his FOR phase. If you want it to run after his patches then it's :AFTER[A_Mod]. If you do it in :AFTER[Squad] then that will also work if you needed it to happen after but it only works because Squad is sorted alphabetically later than A_Mod. Or if you needed it to happen before Z_Mod then it would work because Squad appears before Z_Mod. But those are just because of coincidental alphabetical sorting.  

Edited by Starwaster
Link to comment
Share on other sites

yeah sorry about pseudo code. Just thought there might be a step I'm missing.  I basically copied another cfg from another mod that changed addonparts, so I assume my syntax is correct.

so the tech tree i setup using yongeTechTree.dll.  That's fine, working as intended.

my.cfg (file extensions are on) contains: 

@PART[basicFin]:FINAL { @entryCost = 300 }

etc. Etc.  Through all the start parts I've moved to other nodes, and adding a entry cost to.  I've triple checked spelling and case for all the parts, and no typos...

deleted MM caches, started a new career, the tech tree is set up right, but entry costs still show 0.

stripped out all my other addons, so that its just /MyMod /squad and /YongeTechTree in my /gamedata 

not sure what I'm missing... 

If that is all correct, then I'm just going to wipe and reinstall Kerbal, just put mm, mymod and yonge's dll and try again on the fresh install

Link to comment
Share on other sites

1 hour ago, Ako_Vendetta said:

@PART[basicFin]:FINAL { @entryCost = 300 }

That exact config works for me.

How are you verifying whether the change took place or not? Checking the cache or in-game?

And where are you putting your config file? (needs to be in GameData or one of its subfolders)

Link to comment
Share on other sites

Tried :AFTER[Squad] as well before I started tearing my hair out and posted here.

Yup, /Gamedata/Mymod so all good there

i have a background in programming stretching back to Basic on Commodore 64, this ain't my first BBQ, although the KSP modding environment is. Lots going on that I'm not up to speed on how it all plays out on the back end.

i have a feeling it has to do with how Yonge Tree handles things.  I used it because it's a great shortcut for modding the tech tree, and I figured I could quickly make the changes I wanted, with just a few @entryCost calls with mod manger to change what I moved.   Seriously my little tweak was a 5 minute fix I had in my head would be no problem to implement!  Once again KSP had humbled me, haha!

Im going to wipe and reinstall, no real loss there, and just modify the tree with an MM config, minus the Yonge tree.

its possible I installed some mod ad some point that modified something somewhere that broke something.

ill let you know how it plays out.  Thanks for the help guys.  I know it's something on my end, just wanted to make sure there wasn't some step I was missing that I hadn't accounted for.

5 minute I thought to myself... Lol

 

Link to comment
Share on other sites

HAHAHA!

somebody do me a favor... Try and run a patch through MM with .CFG as extension instead of .cfg and let me know how it works out...

i have an old school habit of typing my extensions in upper case... 

I have a feeling MM don't like that...

changed to lower case and it works haha

Link to comment
Share on other sites

30 minutes ago, Ako_Vendetta said:

HAHAHA!

somebody do me a favor... Try and run a patch through MM with .CFG as extension instead of .cfg and let me know how it works out...

i have an old school habit of typing my extensions in upper case... 

I have a feeling MM don't like that...

changed to lower case and it works haha

It's not ModuleManager.  ModuleManager only touches configs that have been loaded by KSP.

Link to comment
Share on other sites

Edit: Weird unintended double post

you're right blowfish, I brain farted, it would be KSP and not MM.  Just surprised it was case sensitive regarding extension, I wasn't expecting that.  

But you guys still pointed me in the right direction.  I knew there was something I was missing or not doing right. 

thanks guys, sorry for troubling ya's

Edited by Ako_Vendetta
Correcting double post
Link to comment
Share on other sites

7 minutes ago, Ako_Vendetta said:

No Win10.

 I tested again by changing a stock part extension to uppercase as well, and it wasn't loaded into KSP.  It's weird and doesn't really make sense I know... 

Must be backwards to the way I was thinking. I was thinking KSP must request a list of files ending in .cfg but... instead... maybe it's looking at a list of files and then internally picking out the ones that  end with .cfg? I can see it failing that way because of how Unity deals with URIs.

Edited by Starwaster
Link to comment
Share on other sites

Pretty confident it's a Unity issue, that would make the most sense.  

Something to get a modder to check if they are having issues getting their mod to work.  

Anyway, thanks for all the help guys, don't want to take this off topic anymore than I already have.

Link to comment
Share on other sites

1 minute ago, Nerfclasher said:

Is it possible to change required fuel for engines with module manger

Yes

@PART[someEnginePart]:FOR[myMod]
{
    @MODULE[ModuleEngines*]
    {
        @PROPELLANT[LiquidFuel]
        {
            @name = SomeOtherFuel
        }

        @PROPELLANT[Oxidizer]
        {
            @name = SomeOtherOxidizer
        }
    }
}

 

Link to comment
Share on other sites

1 hour ago, teej9 said:

Quick question, all of a sudden my Module Manager started throwing 2 errors for the realfuels config, but then i noticed it is not creating a config cache. Is there anyway to fix that?

MM doesn't create a cache if it detects errors - that's expected behavior.  The exact cause of the error is in KSP's log.

Link to comment
Share on other sites

Hi, I'm just going to put this here in the hopes that someone who knows more than me (everyone probably) can change the thing that I can't seem to find to make this work. Please, it would be awesome!

 

//This should give the ability to switch useless monoprop in command pods for yummy supplies for your USI LS kerbals consumption
@PART[*]:HAS[@RESOURCE[MonoPropellant],!MODULE[InterstellarFuelSwitch],!MODULE[FSfuelSwitch],#CrewCapacity[>0]]:NEEDS[InterstellarFuelSwitch]:FOR[InterstellarFuelSwitch]
{
	//Make variables for putting the monoprop back in and *4 for supplies. Can we pretend it's super condensed to reach same density?
	%propCap = #$RESOURCE[MonoPropellant]/maxAmount$
	%supCap = #$RESOURCE[MonoPropellant]/maxAmount$
	@supCap *= 4
	
	//What is the function of tankResourceMassDivider? We just removed it in the hope it defaults to unused.
	MODULE
	{
		name = InterstellarFuelSwitch
		tankSwitchNames = MonoPropel;Supplies
		resourceGui = MonoPropellant;Supplies
		resourceNames = MonoPropellant;Supplies
		resourceAmounts = $propCap$;$supCap$
		tankTechReq = start;start
		inFlightSwitchingTechReq = start
	}


}
@PART[*]:FINAL
{
	// Remove temporary variables to eliminate log spam but do we need to scrap the old MonoProp resource?
	!propCap = 0
	!supCap = 0
}

 

Link to comment
Share on other sites

4 minutes ago, Verran said:

This little bit of code is not having the desired effect of deleting a key from the atmosphere curve.  What am I jacking up?


                @atmosphereCurve
                    {
                        !key,2
                    }

 

You are missing an equal sign and a bit of text

!key,2 = DEL

Will do

 

Keep in mind that ,2 means the third key

Link to comment
Share on other sites

19 minutes ago, Verran said:

Here, about a fifth of the way down to the spread with lots of examples.  It just doesn't mention anything about DEL.  Anyway, thanks man.

The DEL part doesn't actually matter.  You can put anything there, it just has to be something.  But DEL or DELETE makes the intention of the patch clear.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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