How to use HCR ranger tracking?

I tried everything like putting the script hcr_trackstart or what its called in creatures heartbeats, or an area, etc, nothing works help please! When using tracking ability as ranger it says tracking is impossible in this area

Wtf help please!!! SOMEBODY!!!

First step of debugging: No panicking! :slight_smile:

Next step of debugging: Identify source of problem.

Could you link to the exact version of the system you’re using, and possibly post the script that’s causing the error message? Formatted, please.

[code]
Insert code here
[/code]

Blindly putting scripts into events in a trial-and-error way isn’t a good way to go about this kind of stuff, in general. Try opening the script itself, first of all, and see if it’s commented, and see whether the player is defined as anything, or generally try to identify who the caller is assumed to be.

If you’re getting a specific error message string, you can search for that string in the files, too, to see the conditions under which it appears. Exact script names, and exact error messages, though, please. :slight_smile: Copypaste 'em, if possible.

There is no bug it’s simply saying there is no track in the area or something like that, So i figured i need to either write a variable on each creature i want to be trackeable but nothing works i tried; TRACKABLE int 1, TRACK int 1 etc… So i just have no idea how the hard core rules works for tracking :frowning:

That’s what we’ll want to find out, then. :slight_smile:

The biggest hint for what to investigate is the error message. Open the scripts and search for the exact error message you’re getting. Once you’ve found it, you can check under which conditions it appears.

If the error message itself is a string constant in a list, no condition in sight, then your next step is to search again for the name of the string constant in the files, see where it’s used. That way, we should find the conditions, too.

If you’ve got one ready at hand, then preferably do this lookup in a demo module where tracking is working as intended.

Sorry i fell asleep so there is a code on onactivateitem that is the tracker tool using, it also includes tracking_start i will show you tracking start code maybe you can help me please?

// hc_track_start
// Starts tracking of creatures
// Archaegeo 17 Aug, 2002

#include “hc_inc_track”
#include “hc_text_track”

void main()
{
int nDC;
object oTracker=OBJECT_SELF;
object oTrackPlc=GetNearestObjectByTag(“Tracker”);
if(GetIsObjectValid(oTrackPlc))
nDC=GetWillSavingThrow(oTrackPlc);
if(!nDC || !GetIsObjectValid(oTrackPlc))
{
SendMessageToPC(oTracker,NOTPOSSIBLE);
return;
}
object oCritter;
object oArea=GetArea(oTracker);
int nLevel=GetLevelByClass(CLASS_TYPE_RANGER, oTracker);
int nCnt=1;
float fDistance;
int nDCAdj;
vector vCritter;
oCritter=GetNearestObject(OBJECT_TYPE_CREATURE, oTracker, nCnt);
while(GetIsObjectValid(oCritter) &&
GetArea(oCritter)==oArea)
{
fDistance=GetDistanceBetween(oCritter, oTracker);
nDCAdj=FloatToInt(fDistance/10.0);
if((d20()+nLevel) > (nDC+nDCAdj) &&
(!GetLocalInt(oCritter,“NOTRACK”) &&
!GetHasFeat(FEAT_TRACKLESS_STEP, oCritter)))
{
vCritter=GetPosition(oCritter);
AssignCommand(oTracker,SetFacingPoint (vCritter));
AssignCommand(oTracker,GetDirection(GetFacing(oTracker),oTracker,
oCritter));
}
nCnt++;
oCritter=GetNearestObject(OBJECT_TYPE_CREATURE, oTracker, nCnt);
}
return;
}

Edit: So studying this i figured out i can add trackless feat to creatures or the int NOTRACK so they cannot be tracked, but i want to figure out how to track them

Remember to format when posting code, please. :slight_smile: It makes things a gajillion times more readable.

[code]
Insert code here
[/code]

Remember, you’ve been given a huge hint: The error message. Whatever is causing your script to abort, whatever condition is not being met, is the reason the error message appears. So the question is - where does the error message get sent, and why?

I’m spotting a “SendMessageToPC(oTracker, NOTPOSSIBLE);” there, which suggests a string constant message is being sent. Is that the error message you’re getting? If you’re in EE, double-click on “NOTPOSSIBLE”, it should show you what the constant stands for.

Yes sir this is the message i will one sec :slight_smile: I only find NOTPOSSIBLE in variables not constants

string NOTPOSSIBLE = “It is impossible to sort out tracks here.”;

Edit: This is exactly what i get in-game

1 Like

OK then we now know that it’s looking for an object tagged “Tracker”, and will abort if it doesn’t find that object or it’s ?incapable of making will saving throws?. :smiley: That’s progress.

Next step: Go to an area in the functional demo module you’ve (hopefully) got for reference, and look for the Tracker object there, so you can check whether it has any variables or events set on it. You’ll want to set up an object just like that one in your area.

I got no demo i am using HCR_base_34 https://neverwintervault.org/project/nwn1/script/hcr-34-final

Even better. Downloaded it and opened it - there’s a blueprint for a Tracker already set up.

Under placeables:
Special -> Custom 1 -> Tracker.

Try putting that one down in your area where you want tracking to work, then test it again. :smiley:

Thx ill try :slight_smile: if it works you are my hero ahah!!!

1 Like

IT WORKED IM SO HAPPY :slight_smile: Thank you so much omg!!! You saved my server ahah, I learn slowly but i will improve!!!

2 Likes