Compatible Companion Mod Creation/Fort Drakon

From Dragon Age Toolset Wiki
Jump to: navigation, search

The Fort Drakon step describes what to do with your custom companion if/when the hero is imprisoned in Fort Drakon.

While saving Anora, the PC is faced with fighting Sir Cauthrien. If the PC surrenders or is defeated, they get captured and sent to prison. Valeria must be removed from the party otherwise she'll still be following the PC around. She cannot be chosen to go save the PC without changing the game resources, unless you capture it after the initial selection is done. I haven't done it but I'm guessing it could be done if you find the right flag.

What we need

The plot DENPT_CAPTURED contains the important flag for this: DEN_CAPTURED_PC_CAPTURED. So, create in the VALERIA_NPC_HIRE plot the flag VALERIA_DEN_CAPTURED_PC_CAPTURED, so we do this only once.

To implement

In includes, add:

#include "plt_denpt_captured"

In the function check_plot_changed() add:

    // pc captured by cauthrien
    if(WR_GetPlotFlag(PLT_DENPT_CAPTURED,DEN_CAPTURED_PC_CAPTURED) && !WR_GetPlotFlag(PLT_VALERIA_NPC_HIRE,VALERIA_DEN_CAPTURED_PC_CAPTURED))
    {
        WR_SetPlotFlag(PLT_VALERIA_NPC_HIRE,VALERIA_DEN_CAPTURED_PC_CAPTURED,TRUE);
        if(WR_GetPlotFlag(PLT_VALERIA_NPC_HIRE, PARTY_VALERIA_IN_PARTY))
        {
            WR_SetFollowerState(oVal, FOLLOWER_STATE_AVAILABLE);
        }
        WR_SetPlotFlag(PLT_VALERIA_NPC_HIRE, PARTY_VALERIA_IN_PARTY, FALSE);
    }
Companion Initiated Conversation Compatible Companion Mod Creation Behaviour In Camp