Mission Info

Overview

Mission Info modifies the mission tracker on the right side of the screen. When you hover over a mission's icon or text, you'll get a tooltip with the flavor text of that mission's current tier. Additionally, clicking on the currently active mission's icon will show any associated image, video, or audio clip. The Mission Journal can be opened by selecting the active mission in the mission bar (the part that auto-hides).

The current version is 1.2.

 

Setup

Mission Info is a modification to the standard UI element GUI/Mission/MissionTracker.

To get started, first create a working folder called MissionInfo under "The Secret World\Data\Gui\Customized\Flash". Then copy the following files to the new folder:

  • The Secret World\Data\Gui\Customized\Flash\Sources\GUI\Mission\MissionTracker.as
  • The Secret World\Data\Gui\Customized\Flash\Sources\GUI\Mission\MissionTracker.fla

Now create a GUI folder under MissionInfo and a Mission folder under GUI. Then copy the following file to the Mission folder:

  • The Secret World\Data\Gui\Customized\Flash\Sources\GUI\Mission\MissionTrackerItem.as

Mission Info folder setup

 

Modifications

MissionTrackerItem.as

This class is where we'll build the tooltip and media popup handler. The good news is that the GUI/MissionJournal/JournalWindow class already does a lot of the work we're interested in, so we'll be able to simply copy and paste a lot of code. We'll start off with one new import and then some text holders:

import mx.utils.Delegate;

class GUI.Mission.MissionTrackerItem extends UIComponent
{
    private static var mdb_Tier:String = LDBFormat.LDBGetText( "MiscGUI", "Mission_Tier_MixedCase");
    private static var mdb_PlayAudio:String = LDBFormat.LDBGetText( "MiscGUI", "PlayAudio");
    private static var mdb_PlayVideo:String = LDBFormat.LDBGetText( "MiscGUI", "PlayVideo");
    private static var mdb_ShowImage:String = LDBFormat.LDBGetText( "MiscGUI", "ShowImage");

The above variable values were taken from JournalWindow.as, around line 115.

Next up, we want to modify the Draw function to include a new tooltip:

    public function Draw()
    {
    //    icon.addEventListener("doubleClick", this, "IconClickHandler"); // IconDoubleClickHandler
        var tooltipText:String = "<font size='15' color='#FF8000'><b>"+m_Quest.m_MissionName+": "+mdb_Tier+" "+m_Quest.m_CurrentTask.m_Tier+"</b></font>";
        tooltipText += "<br/> <br/>" + m_Quest.m_CurrentTask.m_TierDesc;
        var mediaTask = m_Quest.m_CurrentTask;
        if (mediaTask.m_MediaRDBID != 0)
        {
            var mediaText:String = "";
            switch(mediaTask.m_MediaType)
            {
                case  _global.Enums.QuestMediaType.QuestGiverList_QuestMediaType_Video:
                    mediaText = mdb_PlayVideo;
                    break;
                case  _global.Enums.QuestMediaType.QuestGiverList_QuestMediaType_Image:
                    mediaText = mdb_ShowImage;
                    break;
                case  _global.Enums.QuestMediaType.QuestGiverList_QuestMediaType_Audio:
                    mediaText = mdb_PlayAudio;
                    break;
            }
            if (mediaText != "")
            {
                tooltipText += "<br/> <br/>[" + mediaText + "]";
            }
        }
        com.GameInterface.Tooltip.TooltipUtils.AddTextTooltip( this, tooltipText, 310, com.GameInterface.Tooltip.TooltipInterface.e_OrientationHorizontal, true );
        this.onRelease = Delegate.create( this, MediaButtonHandler);
              /*    */    

Most of the above code can be found in JournalWindow around line 837. The last line, however, is delegating click handling to a method called MediaButtonHandler, which doesn't yet exist. Let's add that now:

    private function MediaButtonHandler( event:Object ) : Void
    {
        var mediaTask = m_Quest.m_CurrentTask;
        if (mediaTask.m_MediaRDBID != 0)
        {
            Log.Info2("MissionTrackerItem", "Showing media for quest task " + mediaTask.m_ID + ".");
            var mediaType:Number = 0;
            switch(mediaTask.m_MediaType)
            {
                case  _global.Enums.QuestMediaType.QuestGiverList_QuestMediaType_Video:
                    mediaType = _global.Enums.RDBID.e_RDB_USM_Movie;
                    break;
                case  _global.Enums.QuestMediaType.QuestGiverList_QuestMediaType_Image:
                    mediaType = _global.Enums.RDBID.e_RDB_GUI_Image;
                    break;
                case  _global.Enums.QuestMediaType.QuestGiverList_QuestMediaType_Audio:
                    mediaType = _global.Enums.RDBID.e_RDB_FlashFile;
                    break;
            }
            Quests.ShowMedia(mediaType, mediaTask.m_MediaRDBID);
        }
    }

This method is an almost exact copy of the method with the same name from the JournalWindow class found around line 1213. It simply has some additional verification to check that we do indeed have a media window to show.

 

MissionTracker.as

We probably want to prevent the Mission Journal window from popping up simultaneously with the media window. However, we also don't want to disable the ability to open the Journal completely, so we'll have to compromise. We'll open the Journal window if the user clicks on the currently selected mission in the list (not the copy of it at the top). For this, we'll comment out the line that creates a click handler in the ShowMission function, then add our own call to OpenMissionJournal in the click listener that's created from ShowAllMissions.

function ShowMission(tierId:Number, goalId:Number, isActive:Boolean) :Boolean
{
//        icon.addEventListener("dragOut", this, "IconMouseDragHandler");
//        m_MissionTrackerItem.onRelease = Delegate.create( this, OpenMissionJournal);
function ShowAllMissions( )
{
        tracker.onRelease = function()
        {
            if (m_ActiveMission == this.GetMissionId()) OpenMissionJournal();
            this.SignalSetAsMainMission.Emit( this.GetMissionId() );
        }

One last tidbit - as it stands, the tooltips that describe the different kinds of missions are preventing our new tooltip from showing up in the lower list. This turns out to be because the game adds those tooltips to both the backgrounds and to individual missions. So, we need to prevent the individual mission tooltips, but leave the background ones alone. This is another one line comment in the ShowAllMissions function:

function ShowAllMissions( )
{
        tracker._x = targetWidth;
        
//        AddSingleTooltip( slotID, tracker );

 

Building

MissionTracker.fla

Upon opening this file, you should see that the Futura-HeavyFix, FuturaStd-BookFix, and RussellSquareStd fonts are missing and need to be mapped. If you've followed my environment set up guide, you'll map these to Futura Heavy/Heavy, Futura Md/Medium, and RussellSquare/Regular respectively.

Next, configure font embedding to be more restrictive to help reduce the file size:

  1. Go to Text, Font Embedding
  2. Select (Fonts/_Headline)
  3. In the Character ranges box, uncheck All
  4. In the same box, check only the following groups:
    1. Punctuation
    2. Basic Latin
    3. Latin I
    4. Latin Extended A
    5. Latin Extended Add'l
  5. Select (_StandardFont) and make the same changes as above
  6. Select (Fonts/_TimerFont) and change the following:
    1. Uncheck All
    2. Check Numerals
    3. Add (:-. ) to the additional characters list. (That's open-paren, colon, dash, period, space, close-paren.)
  7. Click OK

To create the .swf file:

  1. Go to File, Publish Settings
  2. Change the Output file to "..\MissionTracker.swf"
  3. Uncheck Include XMP metadata
  4. Click Publish

 

Downloads/Links

Official Distributors SecretUI Curse
Official Forum The Secret World Forums
Git Repository git://git.curseforge.net/tsw/missioninfo/mainline.git
Source Archive Download