Aller au contenu

Photo

Party Followers not gaining XP [solved]


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Xaltar81

Xaltar81
  • Members
  • 191 messages
So, what I am asking is this:
How do I make my party memebers gain XP?
I know I need to clear the "CREATURE_REWARD_FLAGS" but how the hell do I do that and where should it be done. I know it should be done in a separate script after the "hire_follower" command but where should it be executed and what needs to be in the script.

You get the idea, I know nothing about scripting other than what I have figured out and need an idiots guide.

Modifié par Xaltar81, 04 janvier 2010 - 09:24 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
For now the best/easiest approach to take might be to make a copy of UT_HireFollower in your own include file and rename it something like UT_HireFollower_Fixed, then make the following change:

WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE, TRUE, 0, TRUE);
to
WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE, TRUE, 0, bPreventLevelup);

Modifié par Craig Graff, 03 janvier 2010 - 08:39 .


#3
Mengtzu

Mengtzu
  • Members
  • 258 messages
So far I've cleared the flags in an EVENT_TYPE_ENTER in the area script for an area you must enter straight after gaining the followers. This works, but I'm still having the problem where the followers spawn in the area but do not join after being chosen from the party picker >_<

#4
Xaltar81

Xaltar81
  • Members
  • 191 messages
Awesome, thanks for the replies.
[edit] Thanks Craig, that worked great.

For anyone else like me the thing you need to copy is in "utility_h.nss" under _Core Includes. I'll post up my include script in a bit once I have cleaned it up a bit.

Thanks again guys you have no idea how much that was bugging me.

Modifié par Xaltar81, 03 janvier 2010 - 11:16 .


#5
Xaltar81

Xaltar81
  • Members
  • 191 messages
#include "utility_h"

void UT_HireFollower_fixed(object oFollower, int bPreventLevelup = FALSE)
{
    object oPC = GetPartyLeader();
    if(!IsObjectValid(oFollower))
    SetAutoLevelUp(oFollower, 2);
    SetGroupId(oFollower, GetGroupId(oPC));
    WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE, TRUE, 0, bPreventLevelup);
}

Then you just use UT_HireFollower_fixed instead of UT_HireFollower to join your NPC to the party and you don't need a second script to clear the flags. I know I probaby have too many includes but I just copied the ones from utility_h. I'll clean that up when its not 1am Image IPB

[edit] cleaned the script more.

Modifié par Xaltar81, 04 janvier 2010 - 09:50 .