Script issue with adjust reputation
Débuté par
DM_Vecna
, avril 24 2011 06:59
#26
Posté 22 janvier 2012 - 06:33
Can someone make a sample module (vanilla nwn) , with two factions both at 50 and adjust one up 2 and adjust the other up 3 every heartbeart ( where they say there reputations towards the each other on that heartbeat) I did this and the numbers jump all weird. So a sample module maybe of the right way will enlighten me and I sure some others. Thanks.
#27
Posté 22 janvier 2012 - 06:52
ShadowM wrote...
Can someone make a sample module (vanilla nwn) , with two factions both at 50 and adjust one up 2 and adjust the other up 3 every heartbeart ( where they say there reputations towards the each other on that heartbeat) I did this and the numbers jump all weird. So a sample module maybe of the right way will enlighten me and I sure some others. Thanks.
9 months ago when this first came up, I did one with the adjust script set on the OnOpen event of a chest. I got the Odd results also. The problem seems to compond with old results adding back into the faction adjust.
So if you adjust the first faction by 2, a call to adjust the first faction by 2 adjusts it by 4 instead.
I still have this thread bookmarked to trace out the function calls, I have just not been able to find enough free time to delve into it that deep.
#28
Posté 22 janvier 2012 - 08:05
Ok, it appears to be a bug in the parameters (GetReputation and SetReputation have their parameters mixed up, and I can't figure out which one is right
). I'll try to fix it and check the functions again.
Modifié par virusman, 22 janvier 2012 - 08:10 .
#29
Posté 22 janvier 2012 - 08:38
The fix is now in NWNX Fixes 1.0.8:
http://nwn.virusman..../changeset/458/
http://nwn.virusman..../changeset/459/
http://data.virusman...1.0.8-linux.rar
http://nwn.virusman..../changeset/458/
http://nwn.virusman..../changeset/459/
http://data.virusman...1.0.8-linux.rar
Modifié par virusman, 22 janvier 2012 - 09:56 .
#30
Posté 24 janvier 2012 - 04:40
I don't know if this is worth mentioning, but I found that the reputation functions don't work correctly if the "reference" NPC is set to be "Plot" (unkillable). It works fine, even if the NPC is in a different area, so long as the NPC can be killed.
So I put my "reference" NPCs into a tiny area players can't access.
If working with an individual NPC rather than the whole faction, perhaps the NPC could be temporarily set to be killable, then adjust the reputation, then set the NPC back to Plot? To ensure this is done in the correct order, the functions would probably have to be executed as commands by a "commandable" object.
Ensuring the NPC isn't killed in the interval (maybe by an ongoing AoE spell) is another problem. Immunities applied to a NPC skin, maybe?
So I put my "reference" NPCs into a tiny area players can't access.
If working with an individual NPC rather than the whole faction, perhaps the NPC could be temporarily set to be killable, then adjust the reputation, then set the NPC back to Plot? To ensure this is done in the correct order, the functions would probably have to be executed as commands by a "commandable" object.
Ensuring the NPC isn't killed in the interval (maybe by an ongoing AoE spell) is another problem. Immunities applied to a NPC skin, maybe?
Modifié par Melkior_King, 24 janvier 2012 - 04:46 .
#31
Posté 25 janvier 2012 - 01:55
@Melkior_king. Are you suggestion that the Creature be made plot to stop the Error from occuring?
The Error we are seeing is in the function when uses with non plot creatures. There is no Error if the function is used just once. If it is used more then once the Error occures. Per virusman, It seems to be the arguments getting pushed onto the stack in the wrong order, Or at least I think that is what he is saying.
The Error we are seeing is in the function when uses with non plot creatures. There is no Error if the function is used just once. If it is used more then once the Error occures. Per virusman, It seems to be the arguments getting pushed onto the stack in the wrong order, Or at least I think that is what he is saying.
#32
Posté 25 janvier 2012 - 05:07
It appears to be stacking only if the faction reputations are equal in the module settings.
If you set it to different numbers, you'll see that it's actually not stacking. If you adjust Faction1->Faction2 reputation by 10, it'll take Faction2->Faction1(!) reputation, add 10 and assign that as Faction1->Faction2 reputation.
If you set it to different numbers, you'll see that it's actually not stacking. If you adjust Faction1->Faction2 reputation by 10, it'll take Faction2->Faction1(!) reputation, add 10 and assign that as Faction1->Faction2 reputation.
#33
Posté 26 janvier 2012 - 12:43
Thanks Lightfoot8 & virusman. I think I misunderstood the problem. All the same, it's worth mentioning that the reputation adjustments don't work correctly on plot NPCs.
I'm not sure if I've seen the bug the OP was talking about. I'll be watching this thread with interest to see if there's more information and especially if anyone knows how to avoid it.
I'm not sure if I've seen the bug the OP was talking about. I'll be watching this thread with interest to see if there's more information and especially if anyone knows how to avoid it.





Retour en haut







