Author Topic: Arnheim (WIP)- AI, Persistent Reputation, and Group Membership  (Read 608 times)

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Arnheim (WIP)- AI, Persistent Reputation, and Group Membership
« Reply #15 on: December 05, 2012, 04:28:51 pm »


               I believe clear all actions causes the hostile to stop attacking, long enough for the set is neutral to kick in. I think it is just one of the quirks that NWN has always had.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Arnheim (WIP)- AI, Persistent Reputation, and Group Membership
« Reply #16 on: December 05, 2012, 05:22:56 pm »


               

SHOVA wrote...

I believe clear all actions causes the hostile to stop attacking, long enough for the set is neutral to kick in. I think it is just one of the quirks that NWN has always had.


Yes, you are right. Hostile creatures however do not attack unless told to do so, and since I've been controlling that with a custom Perception event I haven't needed to worry about it. This is some indication that custom AI will likely be needed for the system I am developing.


More findings... I was tinkering further with SetIsTemporaryNeutral. This time I am using the decay feature, so that the adjusted reputation is undone over time. By now it is fairly clear that SetTemporaryNeutral sets personal reputation at Faction Reputation - 50. This appears to be a clearing of personal reputation then a reduction of personal reputation by 50.

The decay feature makes this function even more odd:
  • If you use the default 180 seconds for the period of decay, then personal reputation increases by 1 every 3.6 seconds for 180 seconds. This is not what I expected. I expected the reputation to be stable for the duration and then to decay after it was over. Instead it decays at an equal rate over the duration, and then stops when the duration is up. This works, but is of limited use.
  • Then I increased the period of decay to 360 seconds and this enabled an initially neutral NPC to become friendly because the personal reputation still increased by 1 every 3.6 seconds. So for 180 seconds the creature slowly climbs back to normal, then over the next 180 seconds personal reputation towards the target increases by another 50. After it is finished all the changes to reputation are returned to the reputation it had at the beginning.
  • Then I tried this for a period of 50 seconds. The rate of increase stayed at 1 per 3.6 seconds. After 50 seconds reputation then went back to what it was at start.
I am not sur how I would make use of that. BUT I wonder if SetIsTemporaryFriend can be used to keep a creature in the Neutral category most of the time. I'll test that next.
               
               

               


                     Modifié par henesua, 05 décembre 2012 - 05:24 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Arnheim (WIP)- AI, Persistent Reputation, and Group Membership
« Reply #17 on: December 05, 2012, 06:02:06 pm »


               SetIsTemporaryFriend and SetIsTemporaryEnemy appear to function the same way with a period of decay for reputation.  Except the rate of change is much greater: 1 rep / 1.8 seconds. This remains the same regardless of how long or how short the period of decay is.
               
               

               


                     Modifié par henesua, 05 décembre 2012 - 06:02 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Arnheim (WIP)- AI, Persistent Reputation, and Group Membership
« Reply #18 on: December 05, 2012, 10:00:38 pm »


                I rewrote several PRR functions to use one database, and behave more consistently. I may issue my work as a branch of PRR.
               
               

               


                     Modifié par henesua, 05 décembre 2012 - 10:08 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Arnheim (WIP)- AI, Persistent Reputation, and Group Membership
« Reply #19 on: December 05, 2012, 10:49:18 pm »


               Cool!  It's funny when I did 2nd GodWar I never commented out the faction information.  I was using it to see if the factions where behaving properly, and that was back in the day when I would just plug stuff in, Cep, Ness, Prr, whatever without tinkering with it too much. So when loading you would get all this faction info.  Later when I made Orilion, which I should probably send you, I thought geez I wish I could get rid of all the faction info.  Big D'oh moment there as I commented out the debugging information.