Page 1 of 1

How to properly display messages about unlocking Special Operations missions

Posted: Fri Nov 24, 2023 3:04 pm
by Secg
Greetings, Extreme Fighters!

It am I, Secg, again!

I'm finishing my Heroic 1.01 Mod, which will contain all Campaign Missions, Great Battles Missions, Special Operations Missions, & almost all Multiplayer Missions (except 2dumdums).

The only trouble I'm having now is that after earning Gold Medals to unlock Special Operations missions, I always received messages saying "You have unlocked [1,2] Great Battles Mission[s]" :o .

Anyone knows how to code so that the "You have unlocked [1,2] Special Operations Mission[s]" shall be properly displayed?

Thanks before hand!

Re: How to properly display messages about unlocking Special Operations missions

Posted: Fri Nov 24, 2023 5:01 pm
by TommyCD1
I am not 100% certain, since I simply ported Special Operations over and had functionality natively, but I believe unlocking conditions define whether the unlocked "thing" is an intel file, great battle, or special op.

If you're using the group.cfg file, then the unlocking condition looks like this.

Code: Select all

  UnlockingGroup()
  {
    Missions()
    {
      Add("S15");
    }
    Medal(2);
    Unlock("file.77", 0);
  }

  UnlockingGroup()
  {
    Missions()
    {
      Add("S01");
      Add("S02");
      Add("S03");
      Add("S04");
      Add("S05");
    }
    Medal(0);
    Unlock("mission.so.1", 2);
  }

  UnlockingGroup()
  {
    Missions()
    {
      Add("S01");
      Add("S02");
      Add("S03");
      Add("S04");
      Add("S05");
    }
    Medal(1);
    Unlock("mission.gb.5", 1);
  }
As you can see, an UnlockingGroup() determines what to unlock using the Unlock() function located within. The Unlock() function accepts two parameters, a string which is used to determine the ID of what is being unlocked, and an integer which I believe is used to determine the kind of "thing" being unlocked. 0 being an intel file, 1 being a great battle, and 2 being a special op.

If you're using the debriefing.cfg file within a specific mission itself, then the unlocking block is standalone and looks like this.

Code: Select all

Unlocking()
{
  Add(0, "file.7", 0);
  Add(1, "file.41", 0);
  Add(2, "mission.so.1", 2);
}
Here, the Add() function accepts three parameters, first an integer that corresponds to which medal will earn a reward. 0 is bronze, 1 is silver, and 2 is gold. The next two parameters are identical to before, the ID and the "thing" integer.

Keep in mind the "thing" being unlocked is localized as intel files, great battles, and special ops accordingly. I don't know what any numbers beyond 2 will do, if anything at all, but you won't be able to have a custom display message, such as "Unlocked 2 Custom Missions" or anything like that. In fact, the message displayed can have no correlation to what is actually unlocked.

As well, in the vanilla game, only Great Battles are intended to ever be unlocked. As such, the notification only has one display slot for use, and certain unlocks will override others, such as intel files being prioritized over great battles. This functionality was added pretty much from scratch in my Custom Campaigns \ Missions Add-on Support mod though. If you'd like to use only that, such as if what you are making is a total conversion mod, then feel free. Here's the vanilla debriefing code with the modified unlocking window I created. It should work as is, but let me know if it doesn't.

Re: How to properly display messages about unlocking Special Operations missions

Posted: Fri Nov 24, 2023 7:12 pm
by Secg
Helpful as always, TommyCD1!

Many thanks!