Feature request: Know what cutscene is playing from your module event.

From Dragon Age Toolset Wiki
Jump to: navigation, search

I just want to know what cutscene is about to play so I can act accordingly. There must be another way but I can't figure it out. This is as close as I've gotten.

Example:

 case EVENT_TYPE_GAMEMODE_CHANGE:
  {
   int nNewGameMode = GetEventInteger(ev, 0); 
   int nOldGameMode = GetEventInteger(ev, 1); 

      if (nNewGameMode == 5)
      {
        //find out which cutscene is about to play from the local variable   
        //CURRENT_CUTSCENE which was set in CS_LoadCutscene

        string sCutscene = GetLocalString(GetModule(), CURRENT_CUTSCENE);    
      }
  }
utility_h.nss

  void CS_LoadCutsceneWithReplacements(resource rCutscene,
                                     string [] arActors,
                                     object [] arReplacements,
                                     string strPlot = "",
                                     int nPlotFlag = -1,
                                     string sTalkSpeaker = "")
  {
    object oModule = GetModule();

    SetLocalString(oModule, CUTSCENE_SET_PLOT, strPlot);
    SetLocalInt(oModule, CUTSCENE_SET_PLOT_FLAG, nPlotFlag);
    SetLocalString(oModule, CUTSCENE_TALK_SPEAKER, sTalkSpeaker);

    //=================================== NEW LINE OF CODE PLEASE ADD
    SetLocalString(oModule, CURRENT_CUTSCENE, ResourceToString(rCutscene));
    //=================================== /NEW LINE OF CODE PLEASE ADD

    LoadCutscene(rCutscene, OBJECT_INVALID, TRUE, arActors, arReplacements, TRUE);
  }

CURRENT PROBLEMS

I just found out that I have to add a single line to utility_h.nss but that means I have to compile every other script that uses it. That means I have to essentially modify so many core files.

All I want to know is what cutscene is going to play so I can act accordingly.