Aller au contenu

Photo

Approval from gifts for new follower not working (goes to pc)


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

#1
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
Hi!

Okay, my NPC is working and approval works fine if gained from dialogs.

However, when I give a gift to my NPC, the controlled character gets approval.
For example, if I'm controlling my pc, the pc gets approval, if I'm controlling Alistair, Alistair gets the approval.

The problem seems to be the approval_h.nss. All functions there work with integers (ie APP_FOLLOWER_ALISTAIR=1, APP_FOLLOWER_DOG=2). But since this is all hardcoded, the new NPC is not in the list. There's an Approval_HandleGift function which probably gets called when a gift is given, but that's probably called with a non existing value so that it defaults to the character being currently controlled.

By handling EVENT TYPE MODULE HANDLE GIFT you can at least give the npc the approval he should get, but the controlled character will get it still as well.

One solution might be to just override the approval_h.nss, but then it's impossible to make npc mods compatible. Is there another way to get this working properly?

Thanks and merry xmas!! :-)


PS: how's the CreateObject(Waypoint) request going? :-D I'm also having to make a big crappy go-around to add the NPC to the party camp when a waypoint could be soooo much easier!! :-D

#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
It is possible to use the module script of your addin to cancel out the approval gain given to the controlled character and recreate the item if it is not the appropriate character. You can even trigger an appropriate negative soundset (bad idea, probably) which will override the "thank you" generated by the main module script.

#3
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
Okay, it's working perfectly! :-D

The negative soundset was not necessary (because the controlled NPC was not saying anything in the first place).

As thank you... Gilmore approves of you! (and in the meantime also tells you a gruesome story) ;-)