Author Topic: Change Party Leader via script  (Read 249 times)

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Change Party Leader via script
« on: January 18, 2011, 11:08:19 pm »


               Is there a function or homebrew script that anyone has developed that will take party leadership from one PC and give it to another PC in the same party (preferrably without having to reform the party)?

I've searched and come up with naught, so I thought I'd ask.

Thanks!
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Change Party Leader via script
« Reply #1 on: January 19, 2011, 01:06:57 am »


               Not possible without reforming the party or NWNX, but I would like to ask, what you need this for? Party leader has no meaning in game unless you need it for your own scripts. And if you would, then you can workaround it.
               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Change Party Leader via script
« Reply #2 on: January 19, 2011, 04:26:31 am »


               I working on a system that would give party leadership some benefits.  Leadership would then be determined by an algorithm of different skills and ability points.



I'm using NWNX, so if there's something that's been built to do this, that's fair game.



How does the game engine do it?  It's possible for players to give party leadership to another, so surely there's a routine that handles it, right?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Change Party Leader via script
« Reply #3 on: January 19, 2011, 08:33:17 am »


               Well AFAIK there is not a fuction in any public nwnx plugin that would allowed this, I just know that some guys developed the party functions via NWNX so it is possible to do, but not sure if they would share it.

Anyway you know how to determine party leader already, it is not via GetFactionLeader, but via looping all party members and then choosing from them the one that fullfills the criteria. Because of this the real leadership has only visual meaning for players so it is not entirely needed.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Change Party Leader via script
« Reply #4 on: January 19, 2011, 02:08:45 pm »


               When I get home, I will have a look in IDA, I would imagine there is a function in the nwnserver that does this, and I suppose, it might be useful to be able to call it on command.



Although, for it to have any meaning, you would need to hook onto the Change Leader function, and disallow it on certain circumstances.

Also - I would imagine if you did hook onto it, it would fire for monster spawn events too.

eg - If you have a single monster in a single faction, and it dies, then respawns, it effectively becomes its faction leader again - hense the re-firing of the event.
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Change Party Leader via script
« Reply #5 on: January 19, 2011, 02:30:46 pm »


               Not to dissuade you but we had this as a feature for awhile and players HATED it.

Completly loathed it as we took into account Charisma, Level, and some other features to bring up a bonus and in the end players asked us to remove it like it was a kender in a jewlery store.
Just fyi is all.
               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Change Party Leader via script
« Reply #6 on: January 20, 2011, 03:13:42 am »


               Thanks, Baaleos. Any help is appreciated.

TSMDude, I'd be interested to know specifics of how it was implemented and what they disliked about it. What was it that annoyed them?  I'd think that an automatic switch of the leader from one PC to another, without having to drop people from the party and re-adding them, would be fairly innocuous.

If it was implemented in such a way as having to reform the party, thus requiring effort on the part of the players, I can see how that would be annoying.  I've played around with the AddToParty and RemoveFromParty functions and they don't come anywhere close to achieving the ideal. Yes, they can do the trick, but it isn't a good way to go.

Thanks for the help, guys.
               
               

               


                     Modifié par BelowTheBelt, 20 janvier 2011 - 03:15 .
                     
                  


            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Change Party Leader via script
« Reply #7 on: January 20, 2011, 01:40:19 pm »


               

BelowTheBelt wrote...

TSMDude, I'd be interested to know specifics of how it was implemented and what they disliked about it. What was it that annoyed them?  I'd think that an automatic switch of the leader from one PC to another, without having to drop people from the party and re-adding them, would be fairly innocuous.

If it was implemented in such a way as having to reform the party, thus requiring effort on the part of the players, I can see how that would be annoying.  I've played around with the AddToParty and RemoveFromParty functions and they don't come anywhere close to achieving the ideal. Yes, they can do the trick, but it isn't a good way to go.



While it was not reforming the party so much as they felt that we were trying to ramrod them into choosing a leader our way. I really dug it but players felt we were taking choices from them. In the end we removed it and just kept the level limit. From the read me I put it down below.


//Party Leader and Level Gap check - 23rd April, 2006
// This will limit the party level gap so that high level PCs can not
// Power Level a low level PC (aka killing a common exploit).
// The code also forces the PC with highest leadership rank
// to be party leader (based on level, CHA modifier, persuade skill, and
// a synergy bonus based on perform, bluff, and intimidate skill ranks.
// To sum it up, this is what the code does:
// 1) Checks that the party leader has highest leadership rank
// 2) Removes party members of lower level than party level gap limit
// eg. Level 8 - 15 can party, but only with highest ranking PC as the leader.
// To set up the party level gap limit, set a local integer on the module with
// "Allow_Level_Diff" as the integer name.  The numeric value will be the
// gap limit allowable for the module. Set to 0 to turn off party level gap limit
               
               

               


                     Modifié par TSMDude, 20 janvier 2011 - 01:41 .