NWNWiki
Advertisement
NWNWiki
3,718
pages

Neither the recall portal nor the stone of recall was designed to just be dropped in any module and work. They were built for the original campaign and left in the Toolset. However, that does not mean they cannot be used with a bit of altering.

Stone of recall[]

  • Locate the Stone of Recall in the standard Item palette under Plot Items, select "Edit Copy".
  • Change the tag of the item to something else, like "Recall_Stone".
  • Now, the standard script is longer than needed because of all the OC stuff, so here is a modified one. Incorporate it into the module's OnActivateItem script or use the following method.
    • Copy the script and save it with the name that matches your Item tag. i.e., if the stone's tag was changed to "Recall_Stone", then the copied script would be named "recall_stone" (case does not matter). This script must be in the module, but not attached to any script node.
void main()
{
    object oPortal = GetObjectByTag("NW_RECALL_PORTAL");
    if(GetIsObjectValid(oPortal))
        {
        object oClicker = GetItemActivator();

        SetLocalInt(oClicker, "NW_L_USED_RECALL", 1);
        SetLocalLocation(oClicker, "NW_L_LOC_RECALL", GetLocation(oClicker));
        AssignCommand(oClicker, ClearAllActions());
        AssignCommand(oClicker, PlaySound("as_mg_telepout1"));
        AssignCommand(oClicker,JumpToObject(oPortal));
        AssignCommand(oClicker, ActionDoCommand(ClearAllActions()));
        }
}

Now a script is needed to activate it. Attach the standard script x0_onitemactv as the module's OnActivateItem event handler.

  • If using this together with the Recall Portal, simply place down a Recall Portal from the Standard Placeables palette under "Visual Effects", make sure the tag is "NW_RECALL_PORTAL". OR If you simply wish them to go to a special spot, place a waypoint and give it the tag of "NW_RECALL_PORTAL".

When the item is used, the PC should now port to the Recall Portal or the placed waypoint.

Recall portal[]

The Recall Portal is a bit more tricky.

  • Place a Recall portal in your desired location from the Standard Placeables Palette under "Secret Object". Make sure the tag is "NW_RECALL_PORTAL".
  • Right click on the portal and select "Properties". Click the Advanced tab and then "Edit" next to the Conversation box.
  • Alter the conversation so it reads as follows (or however you desired).

+Root

  1. line 1 - Owner: This magical portal will transport you to the last place you used your Stone of Recall. You will be charged a tithe of 50 gold for this service. There is no charge to return to the last place you were last killed.
  2. line 2 - PC: <StartAction>Use the portal to teleport to your party leader at no cost.</Start>
  3. line 3 - PC: <StartAction>Return to the last place you used the Stone of Recall. Pay 50 gold.</Start>
  4. line 4 - PC: <StartAction>Return to the place you were last killed</Start>
  5. line 5 - PC: <StartAction>Leave.</Start>

Click "Save" but don't close the file just yet.

  • Select Line 2 and in the "Text Appears When" script node, make sure this script is attached, "nw_all_feedbackf".
  • Now click the "Actions Taken" TAB. In that script node, make sure this script is attached, "nw_all_feedbackg".
  • Select Line 3 and in the "Text Appears When" script node, make sure this script is attached "nw_all_feedbackc".
  • Now click "Actions Taken" TAB and copy this script to that script node. Save it any name you like.
#include "nw_i0_plot"
int CanAffordIt()
{
    int nCost = 50;
    // * remove the gold from the player
    // * I'm having the player remove it from himself
    // * but since I'm also destroying it, this will work
    if (GetGold(GetPCSpeaker()) >= nCost)
    {
        TakeGold(nCost, GetPCSpeaker());
        return TRUE;
    }
    return FALSE;
}
void main()
{
   CanAffordIt();
   location lLoc = GetLocalLocation(GetPCSpeaker(), "NW_L_LOC_RECALL");
   DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), lLoc));
   AssignCommand(GetPCSpeaker(), JumpToLocation(lLoc));
}
  • Select line 4 and Past this script into the script node under "Text Appears When".
int StartingConditional()
{
    int iResult;
    iResult = GetLocalInt(GetPCSpeaker(),"NW_L_I_DIED");
    SetLocalInt(GetPCSpeaker(),"NW_L_I_DIED",0);
    return iResult;
}
  • Now click the "Actions Taken" tab and copy this script to its script node. again, name it whatever.
void main()
{
   location lLoc = GetLocalLocation(GetPCSpeaker(), "NW_L_I_DIED_HERE");
   DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_UNSUMMON), lLoc));
   AssignCommand(GetPCSpeaker(), JumpToLocation(lLoc));
}
  • Click on Line 5 and make sure there are NO scripts in the "Text Appears When" node OR the "Actions Taken" node.
  • Save the file again and exit.
  • Make sure the conversation you just saved appears in the "Conversations" box of the Portal placeable.
  • Click the "Scripts" TAB of the portal and make sure this script is in its OnUsed script node. "nw_recall_portal".
  • Click OK.

When both the recall portal and the stone of recall are being used, a waypoint with the tag "NW_RECALL_PORTAL" is not needed.

To also teleport PCs to the Recall Portal upon death, or anyplace else, place a waypoint with the tag "NW_DEATH_TEMPLE" if using the default OnPlayerRespawn script "nw_o0_respawn". For the SoU respawn script, "xo_o0_respawn", the tag of the waypoint should be "X0_RESPAWN_LOC" instead.

Advertisement