Aller au contenu

Photo

Levelling companions


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

#1
Premier2k

Premier2k
  • Members
  • 17 messages
Now I've managed to get the companions added to my party (Thanks to M. Rieder and Morbane), I'm now having trouble levelling a character.

I have used this code to give XP to the PC and companion (Padmal):

object oTarget = GetHenchman(oPC, 1);
GiveXPToCreature (oTarget, 1000);
GiveXPToCreature (oPC, 1000)

This gives the XP correctly and as the characters are both level 1, it causes them to level up.

Padmal is set as a level 1 gnome bard. When I click Level Up through his character sheet, he has Bard listed but it is greyed out and I cannot proceed?

I have seen a function lurking about - 'LevelUpHenchmen', do I need to use this somewhere? From what I can see it just looks like an automatic level up script, but I could be wrong.

Premier2k

#2
The Fred

The Fred
  • Members
  • 2 516 messages
It may be that he no longer qualifies to be a Bard. IIRC, only non-Lawful characters can be Bards, so it may be that this guy has a Lawful alignment.

#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Hey Premier2k,

there are several "ga_" functions that work from conversations that level up companions in different ways. Open them up in a conversation and read the description, the descriptions are pretty clear, IIRC. If you still have questions about them, post here. Some of them level the character up for you and some of them just give XP and let the player do it.

About your specific problem, I think that Fred has the right of it. There is probably something wrong with your character, not your script.

#4
Premier2k

Premier2k
  • Members
  • 17 messages
Yes he is a lawful character, I did not know that!
Thanks all, I shall have a look through those scripts.

#5
Morbane

Morbane
  • Members
  • 1 883 messages
You can change his alignment through scripting as well - Script Assist search for "align"

#6
Premier2k

Premier2k
  • Members
  • 17 messages
Ok, really confused. Just made a few changes and my henchmen no longer recieves XP when I try to give it to him?

I'm using this script:

#include "nw_i0_tool"
void main()
{

object oPC = GetPCSpeaker();
//object oTarget = GetHenchman(oPC, 1);
object oTarget = GetObjectByTag("padmal");
CreateItemOnObject("nw_it_mpotion001", oPC, 3);
CreateItemOnObject("nw_it_mpotion001", oTarget, 3);
GiveXPToCreature (oTarget, 1000);
GiveXPToCreature (oPC, 1000);
}

He doesn't recieve the items and doesn't get the XP. What's going on? I've tried using GetHenchmen and GetObjectByTag and nothing works?

I've triple checked his tag and that's fine.

What could it be?

EDIT: I've just tried, using RewardPartyXP and that doesn't work either. Got to be something wrong with the character itself....

Modifié par Premier2k, 07 janvier 2012 - 11:38 .


#7
Premier2k

Premier2k
  • Members
  • 17 messages
Oki, I have fixed that. Somthing called DesignerXP was set to 0. No idea what that does as I can't recall seeing that when I last played.

But now, Padmal is getting 2000xp for some reason....instead of 1000 like the PC?? I have no other scripts that give XP out

#8
Premier2k

Premier2k
  • Members
  • 17 messages
and now I've fixed that as well. I removed the rewardpartyxp and only gave the pc 1000 XP. That seemed to have worked. I'm not sure where he's getting the 1000 from but suspect it's something to do with ga_reset_level script running just before it