Jump to content

How do I get a body to orbit another only if a certain mod is installed?


SmashingKirby148

Recommended Posts

Module Manager can do conditional patching.

First, you write two patches: one to move Ike around Eeloo, and one to move Ike into a solar orbit. You can even put them in the same file to keep things tidy. Each of them begins the same way:

@Kopernicus:AFTER[Kopernicus]
{
    @Body[Ike]
    {
        ... ... ...

Now, for the patch that moves Ike into solar orbit, you insert :NEEDS[OPM] into the first line, so it looks like this:

@Kopernicus:NEEDS[OPM]:AFTER[Kopernicus]

This says: "only run this patch if a folder named OPM is present in GameData". Which is the folder you get when you install Outer Planets Mod. So Ike is only moved into solar orbit if OPM is present.

 

Then, you change the patch that moves Ike into orbit around Eeloo in a very similar way, so it looks like this:

@Kopernicus:NEEDS[!OPM]:AFTER[Kopernicus]

That exclamation mark is important. It says "only run this patch if a folder named OPM is not present in GameData". So Ike is only moved into orbit around Eeloo if OPM is not installed.

 

Now you have a constellation where only one of the two patches fires, depending on whether you have OPM installed or not. :)

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