Difference between revisions of "Compatible Companion Mod Creation/Active Party"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (Created)
 
 
Line 1: Line 1:
 
The '''Active Party''' step describes how to add a choice to remove or add your custom companion to the active party.
 
The '''Active Party''' step describes how to add a choice to remove or add your custom companion to the active party.
  
</rant on>''The  partypicker is the only resource what you really have to change in  order to make your companion show up. No way around this. However, as  more mods come out, disregarding what others have done, and changing  game resources at will and without knowing what they're doing very  often, installing more than one mod messes the whole game up.''</rant off>
+
</rant on>''The  partypicker is the only resource that you really have to change in  order to make your companion show up. No way around this. However, as  more mods come out, disregarding what others have done, and changing  game resources at will and without knowing what they're doing very  often, installing more than one mod messes the whole game up.''</rant off>
  
 
With  that pleasant thought in mind, here's an option to make all our  companions "compatible", in the sense that even if they don't show in  the partypicker, you can still get them, or sent them back to camp.
 
With  that pleasant thought in mind, here's an option to make all our  companions "compatible", in the sense that even if they don't show in  the partypicker, you can still get them, or sent them back to camp.

Latest revision as of 01:38, 18 July 2011

The Active Party step describes how to add a choice to remove or add your custom companion to the active party.

</rant on>The partypicker is the only resource that you really have to change in order to make your companion show up. No way around this. However, as more mods come out, disregarding what others have done, and changing game resources at will and without knowing what they're doing very often, installing more than one mod messes the whole game up.</rant off>

With that pleasant thought in mind, here's an option to make all our companions "compatible", in the sense that even if they don't show in the partypicker, you can still get them, or sent them back to camp.

What we need

In your npc dialog, say valeria_npc.dlg, we build an option as you see in the pretty pictures. You first notice that this option is available only if we haven't been through the last partypicker choosing at the gates in the climax (when we talk to Riordan).

Camp1.JPG

Notice how we call the script valeria_come_with_me, to have her join the active party.

Camp2.JPG

Notice how we call the script valeria_go_back_to_camp, to sent her back to camp(remove from active party).

Camp3.JPG

The come hither script

#include "utility_h"
 
#include "plt_valeria_npc_hire"
 
void main()
{
    object me=OBJECT_SELF;
 
    SetImmortal(me,0);
    SetLocalInt(me, CREATURE_REWARD_FLAGS, 0); 
    SetLocalInt(me, AMBIENT_SYSTEM_STATE, 0);
    SetFollowerState(me, FOLLOWER_STATE_ACTIVE);
    SetObjectActive(me,1);
    AddCommand(me, CommandJumpToLocation(GetLocation(GetHero())));   //Ensures follower appears at PC's location.
 
    WR_SetPlotFlag(PLT_VALERIA_NPC_HIRE, PARTY_VALERIA_IN_PARTY, TRUE);
 
}

The go back to camp script

Notice the checks to see if we are in one of the camps. You should have different locations for your companions of course.

#include "utility_h"
#include "sys_ambient_h"
 
#include "plt_valeria_npc_hire"
 
void main()
{
    object me=OBJECT_SELF;
    object curArea=GetArea(GetHero());
 
    SetFollowerState(me, FOLLOWER_STATE_AVAILABLE);
    WR_SetPlotFlag(PLT_VALERIA_NPC_HIRE, PARTY_VALERIA_IN_PARTY,FALSE);
 
    if(GetTag(curArea)=="cam100ar_camp_plains"  || GetTag(curArea)=="den211ar_arl_eamon_estate_1"  ||GetTag(curArea)=="cli300ar_redcliffe_castle")
    {
        location ValeriaLoc;
        if(GetTag(curArea)=="cam100ar_camp_plains")
            ValeriaLoc=Location(curArea, Vector(135.85, 123.18, -0.08), -71.33);
        if(GetTag(curArea)=="den211ar_arl_eamon_estate_1")
            ValeriaLoc=Location(curArea, Vector(28.1, 4.75, 0.0), 176.33);
        if(GetTag(curArea)=="cli300ar_redcliffe_castle")
            ValeriaLoc=Location(curArea, Vector(2.56,-14.84, 0.0), -130.38);
 
        SetObjectActive(me,1);
        AddCommand(me, CommandJumpToLocation(ValeriaLoc));
 
        if(GetTag(curArea)=="cam100ar_camp_plains")
            Ambient_Start(me, AMBIENT_SYSTEM_ENABLED, AMBIENT_MOVE_NONE, AMBIENT_MOVE_PREFIX_NONE, 70, AMBIENT_ANIM_FREQ_ORDERED);
 
        if(GetTag(curArea)=="den211ar_arl_eamon_estate_1" ||GetTag(curArea)=="cli300ar_redcliffe_castle")
            Ambient_Start(me, AMBIENT_SYSTEM_ENABLED, AMBIENT_MOVE_NONE, AMBIENT_MOVE_PREFIX_NONE, 56, AMBIENT_ANIM_FREQ_ORDERED);
    }
    else
    {
        SetObjectActive(me,0);
    }
    SetImmortal(me,1);
}
Behaviour In Camp Compatible Companion Mod Creation The Fade