Author Topic: Henchmen hire/fire  (Read 332 times)

Legacy_Rowwena

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Henchmen hire/fire
« on: July 09, 2011, 09:50:08 pm »


               Hi,

Sorry if this has been answered before. Is there a way to disable the ability to remove a henchman via the radial menu? I would like to set it up so the only way to remove the henchmen in the module would be through the you're fired conversation.

Thanks
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Henchmen hire/fire
« Reply #1 on: July 09, 2011, 11:00:01 pm »


               I am not sure what script sets you are using for your henchman.  Or would I know the differance for that matter( I do not mess with henchman that much).

The command for then to leave most likely comes form the OnConversation event.   Mostlikel from a call to the function  bkRespondToHenchmenShout(oShouter, nMatch, oIntruder, TRUE);

You can find where that function is defined in x0_inc_henai.  find the line that reads:
case ASSOCIATE_COMMAND_LEAVEPARTY:

That is most likely the code you need to change for the results you want.
               
               

               
            

Legacy_Rowwena

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Henchmen hire/fire
« Reply #2 on: July 10, 2011, 04:59:31 am »


               I went in a commented out that whole section but it did not seem to work as I could still remove the henchman from the party. Not a big deal, I will just have to make the disclaimer that if anyone uses that method they will break some quests that require the henchman.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Henchmen hire/fire
« Reply #3 on: July 10, 2011, 05:20:06 am »


               

Rowwena wrote...

I went in a commented out that whole section but it did not seem to work as I could still remove the henchman from the party. Not a big deal, I will just have to make the disclaimer that if anyone uses that method they will break some quests that require the henchman.


A quick question.  Since that script is likely in an include file, did you build the module before testing?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Henchmen hire/fire
« Reply #4 on: July 10, 2011, 05:25:41 am »


               

Rowwena wrote...

I went in a commented out that whole section but it did not seem to work as I could still remove the henchman from the party. Not a big deal, I will just have to make the disclaimer that if anyone uses that method they will break some quests that require the henchman.



I just tested it by commenting out the section.  It worked for me.  Here is the steps I took. 

  • opened the x0_inc_henai script.

     



  •  Commented out the section. // a SendMessage to PC would be a better option. 

     



  •   Saved the script.  If the script is not saved after editing the changes will not take effect.  The compiler uses the include that is saved to the disk not the one opened in the toolset.





  •   Opened the OnConversation script being used by my henchman: nw_ch_ac4





  •   Recompiled the script. 

     



  •   Shut the script compiler.  

     



  • Tested the module.  It worked.  

EDIT: @Failed.Bard: There is no need to rebuild the module.  Just make sure you have saved the Include file before compiling the script it is included in.
               
               

               


                     Modifié par Lightfoot8, 10 juillet 2011 - 04:28 .
                     
                  


            

Legacy_Rowwena

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Henchmen hire/fire
« Reply #5 on: July 10, 2011, 06:06:46 am »


               I tried. Neither script compiled without errors, and it still did not work for me. Dumped both scripts in reloaded them from set, with the same results. Everything else is working so I guess I can just leave it '<img'>
               
               

               
            

Legacy_Rowwena

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Henchmen hire/fire
« Reply #6 on: July 10, 2011, 07:04:52 am »


               To clarify - it is the x0_inc_henai script that will not compile. The on spawn script compiles until I open the x0_inc_henai script. Once it has made the copy for my module it will not compile, and then trying to compile the spawn script then also will not compile - reflecting the error in the other script.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Henchmen hire/fire
« Reply #7 on: July 10, 2011, 07:45:53 am »


               

Rowwena wrote...

To clarify - it is the x0_inc_henai script that will not compile. The on spawn script compiles until I open the x0_inc_henai script. Once it has made the copy for my module it will not compile, and then trying to compile the spawn script then also will not compile - reflecting the error in the other script.


Well the x0_inchenai include should not compile, it is not a script, it is an include.  

If the only change you have had is  to the  x0_inc_HenAI include and the OnSpawn script will no longer compile, An error was most likely made in editing the include script.   here is the portion that i edited out.  

it is the begining of the case statment to just after the first bracket after the break. 

        }
        break;
    /*case ASSOCIATE_COMMAND_LEAVEPARTY:
        {
            oMaster = GetMaster();
            string sTag = GetTag(GetArea(oMaster));
            // * henchman cannot be kicked out in the reaper realm
            // * Followers can never be kicked out
            if (sTag == "GatesofCania" || GetIsFollower(OBJECT_SELF) == TRUE)
                return;
            if(GetIsObjectValid(oMaster))
            {
                ClearActions(CLEAR_X0_INC_HENAI_RespondToShout4);
                if(GetAssociateType(OBJECT_SELF) == ASSOCIATE_TYPE_HENCHMAN)
                {
                    FireHenchman(GetMaster(), OBJECT_SELF);
                }
            }
            break;
        } */

    }
}
               
               

               
            

Legacy_Rowwena

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Henchmen hire/fire
« Reply #8 on: July 10, 2011, 08:31:27 am »


               It's working now. I though that is how I did it the first time but I must have messed it up. Third time is the charm. Thanks so much Lightfoot !
               
               

               
            

Legacy_La Rose Noire

  • Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Henchmen hire/fire
« Reply #9 on: July 10, 2011, 09:37:32 pm »


               Strangely, my FireHenchman() function doesn't work, exactly as if i did nothing. Is this ligne useful ?

ClearActions(CLEAR_X0_INC_HENAI_RespondToShout4);

what does it mean ?