referencing another mod

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

referencing another mod

Post by oliverjanda » Sat, 20. Jan 18, 23:20

Hi,
how can I do something like:

Code: Select all

if(AnotherMod.IsInstalled)
{
do some magic;
}

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Post by iforgotmysocks » Sun, 21. Jan 18, 00:00

U can check for cues, as far as i remember.
So if u want to check for a Mod called Test who has a base cue called Test_Main, then u can check for it like this:

Code: Select all

<do_if value="@md.Test.Test_Main.exists">
  <!-- do ur magic -->
</do_if>
Another method would be to check if a cue of a mod already completed.
<event_cue_activated/> or <event_cue_completed/> would be the way to go then.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sun, 21. Jan 18, 00:31

thats not the mod Test but the md script Test ;)


but if the related mod has no MD Scripts to check for you can also check for the presence of t-file entries (either by reading a certain Entry and checking if its diffrent from the usual ReadText or by checking <get_text_ids_in_range/> has more than 0 Entries) or you might be able to add your own md script to an existing mod by putting it in
/extensions/*your mod*/extensions/*other mod*/md
although i didnt try out if this works for md files so not sure if it would work... (its the method for diff files)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Sun, 21. Jan 18, 14:36

Thx, checking for the cue should work.

Post Reply

Return to “X Rebirth - Scripts and Modding”