Jump to content

[1.12.x] VAB Organizer (August 18)


Nertea

Recommended Posts

45 minutes ago, JadeOfMaar said:

Thanks for posting your config. I clean forgot Atomic Age had engines other than the lightbulb and the jet engine which didn't appear for me.

Change the :NEEDS to :AFTER. You want to make sure that any adjustment to existing patches literally run after those that exist in VAB Organizer itself. The use of :FOR is bad for these reasons:

  1. Part of how :FOR works is it tells MM that the named mod (Atomic Age) is installed (even when it actually isn't). If you happen to not have that mod installed later then compatibility patches in other mods (if they exist) will still run and can break your game. If you publish that config as-is and other people use it and don't have Atomic Age, their games can break too. This is a very terrible beginner mistake to make.
  2. The patch will run within the sequence of the named mod (Atomic Age) which is alphanumerically earlier than VAB Organizer. The mod whose patches run alphanumerically later gets priority and will overwrite earlier patches.

 

I went out of my way to take care of Atomic Age (and the FTmN atomics mod) since they're owned by LinuxGuruGamer. I've submitted that patch to SheepDog's VABO config pack.

What it looks like:

// Atomic Age
@PART[nuclearEngineLightbulb]:NEEDS[SpaceTuxIndustries/RecycledParts]:AFTER[VABOrganizer]
{
	%VABORGANIZER
	{
		%organizerSubcategory = nuclearEngines
	}
}

 

Yes.

No. If a single mod is given for NEEDS and the same mod is given for AFTER then this is a needless redundancy. Just use the AFTER.

 

BEFORE, FOR, AFTER. Pick one. These control the timing of a patch.

Thank you.

It works now.

Link to comment
Share on other sites

On 9/8/2024 at 4:29 PM, JadeOfMaar said:

No. If a single mod is given for NEEDS and the same mod is given for AFTER then this is a needless redundancy. Just use the AFTER.

I stand corrected. Sorry for the mistake.

=== == = POST EDIT = == ===

No, I was right and @JadeOfMaar was equivocated on telling otherwise.

I updated the original post with the gory details, but TL;DR:

  • While the Patch Extraction phase, the :NEEDS clause is evaluated before the patch even being compiled.
    • Unsatisfied :NEEDS patches are just not compiled at all
  • Later the compiled patches are applied as needed.
    • Since there's no compiled patches with an unsatisfied :NEEDS clause, we have less patches to evaluate at this time if we would not use it.
    • So, yeah. Using :AFTER and :BEFORE when the target add'on is not installed is less efficient if you don't use :NEEDS too.

Interestingly enough, I just remembered a previous interaction between us about this subject, at that time another Fellow Kerbonaut had stepped up to confirm my results!

Spoiler

 

At that time, :FOR was the focus of the discussion, but the Fellow Kerbonaut also corroborated my thesis that :NEEDS is also beneficial for :AFTER and :BEFORE.

So, yeah. Sleeping every night makes wonders for one's memory! :D

Edited by Lisias
Rolling back the rollback.
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...