Author Topic: NPC Control  (Read 4010 times)

Offline Ben J

  • Keeper of the 44 quest variables
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2723
  • "See how I reward those who fail me!"
NPC Control
« on: May 23, 2010, 03:49:22 AM »
Under what circumstances can the player control NPCs in combat?

I know the Paladin does it, but this control doesn't work for every combat.

What are the values that govern the control? The charisma of the Paladin? The charisma of the NPC?
Released designs:

The Sect

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: NPC Control
« Reply #1 on: May 23, 2010, 04:28:45 AM »
Quote from: CKITForm.txt
NPC Leadership:
---------------
  The following bytes control the function of the ability of one class to place NPCs under player control in combat.  By default, the NPC Leader Class is set to Paladin.  The Charisma Bonus grants the character +5% per point of the specified characteristic (default: Charisma) over the specified value (default: 13).  The type (%d) and number (1d%) of die that each NPC roles to compare to the NPC Leader's Skill value can also be manipulated for effects (examples follow the byte data).  Finally, NPCs who do not meet a minimum criteria (default: INT > 3) cannot be led by the NPC Leader Class.

  The following chart gives the base percentage of the NPC Leader
Class to lead:
Leader Class Level  % Chance to Lead
------------------    ----------------
  1                              19%
  2                              39%
  3+                            79%

NPC Leader Class       153031 (0x255c7)  1 byte    0 thru 255
Charisma Bonus Var.  153094 (0x25606)  1 byte    0 thru 255
Cha. Bonus Value       153095 (0x25607)  1 byte    0 thru 255
Cha. Bonus Relation   153096 (0x25608)  1 byte    0 thru 255
NPC Lead d%             153122 (0x25622)  1 byte    0 thru 255
NPC Lead 1d%           153125 (0x25625)  1 byte    0 thru 255
Min Intelligence Var.    153356 (0x2570c)  1 byte    0 thru 255
Min Intelligence Value  153357 (0x2570d)  1 byte    0 thru 255
Min Int. Relation         153358 (0x2570e)  1 byte    0 thru 255
NPC Leader Class        153276 (0x256bc)  1 byte    0 thru 255
NPC Leader Class        153872 (0x25910)  1 byte    0 thru 255

  NOTES:
Changing byte 153125 (0x25625) to 0 guarantees player control of all NPCs.
Changing byte 153122 (0x25622) to 1 and byte 153125 (0x25625) to 105 makes all NPCs impossible to control.

  WARNING: Experiments show that the computer crashes if byte 153125 (0x25625) is set to 255 (0xff). Any number less than 255 (0xff) seems to work just fine.
Some days it just doesn't pay to gnaw through the straps.

Offline Ben J

  • Keeper of the 44 quest variables
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2723
  • "See how I reward those who fail me!"
Re: NPC Control
« Reply #2 on: May 23, 2010, 04:35:18 AM »
Thanks!  :)

Quote
NPCs who do not meet a minimum criteria (default: INT > 3) cannot be led by the NPC Leader Class.

Ok, that explains why a certain very dumb NPC in my game cannot be controlled.  :P
Released designs:

The Sect

Offline taleh

  • Newbie
  • *
  • Posts: 10
Re: NPC Control
« Reply #3 on: July 28, 2011, 07:58:31 PM »
How would one go about setting these values? I've been working on a module (for far too long now  :D ) that has NPC's join at different points in the game. The only problem I'm having is: I want the PC to be able to control the NPC's in combat. I tried using the charedit on the main PC (who is a paladin) to adjust his charisma to 25 in hopes that this would assure NPC control in combat, but of course it didn't work. Any help would be greatly appreciated.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2186
    • Nol Drek's Web Site
Re: NPC Control
« Reply #4 on: July 28, 2011, 08:54:34 PM »
Your Paladin should control NPC's almost every time, unless their level is below 3 or you modified their Charisma to be below 17.

But, as stated in the post above:

Changing byte 153125 (0x25625) to 0 guarantees player control of all NPCs.

"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline GoldBoxFan

  • Hero Member
  • *****
  • Posts: 1708
  • "We need more cowbell."
Re: NPC Control
« Reply #5 on: July 29, 2011, 10:58:29 AM »
How would one go about setting these values? I've been working on a module (for far too long now  :D ) that has NPC's join at different points in the game. The only problem I'm having is: I want the PC to be able to control the NPC's in combat. I tried using the charedit on the main PC (who is a paladin) to adjust his charisma to 25 in hopes that this would assure NPC control in combat, but of course it didn't work. Any help would be greatly appreciated.
If you mean what PROGRAM do you need to do this you can google for them using hexadecimal dumps or other keywords. You can also use the DOS on your computer, probably at C:\Windows\System32\cmd.exe. Type debug and the name of the file you want to alter (copy it first). Like debug c:\frua\tutorial.dsn\geo040.dat. You use key letters for using the CMD.EXE like d followed by an address for dump, s for save, q for quit, n to name a new file, l to load the new file so you can work on it, e and an address is what you type to exchange one number for another. I'm sure this commands are online somewhere on a wiki. The big problem is the addresses are in hexadecimal and most of the help files for FRUA are listed in decimal.

Offline taleh

  • Newbie
  • *
  • Posts: 10
Re: NPC Control
« Reply #6 on: July 29, 2011, 04:23:36 PM »


Thank you very much for the information both of you.  :-[ It seems I made a goof when I created my test paladin for the game. After retrying with the correct level, things went better. I think I'll try setting the one value that was mentioned above to 0 anyways just to give my game more possible classes (that can control the NPCs) for the main character.

 :)

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: NPC Control
« Reply #7 on: July 29, 2011, 08:35:06 PM »
If you only want it for a module, you don't want to permamently alter the Ckit.exe program. Simply put it in a Diff.tbl, UAShell may create the table automatically.
Any decent hex editor shows both the decimal and the hexadecimal address of any byte.

Offline aridale

  • Newbie
  • *
  • Posts: 4
Re: NPC Control
« Reply #8 on: March 18, 2014, 01:44:59 PM »
ok I know this is an old topic, but how do you put the value into the diff.tbl? I tried opening it in notepad and putting 25625 0 0 on the line above the 0 thats there by default but its not having any effect ingame.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: NPC Control
« Reply #9 on: March 19, 2014, 12:43:32 AM »
Try 25625 00 00, you may need to use leading zeroes for otherwise single-digit numbers.
(Because the diff table may be connected to the File Compare function of the Command Prompt for all I know.)

Offline aridale

  • Newbie
  • *
  • Posts: 4
Re: NPC Control
« Reply #10 on: March 19, 2014, 01:00:40 AM »
ok I tried that... still doesnt appear to be workin. I still cant control the npc.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: NPC Control
« Reply #11 on: March 19, 2014, 01:53:15 AM »
In a hex editor, open up the hacked Ckit.exe and check that the byte was set correctly. If it was set, I have not a clue.
If you apply the hack in UAShell and the byte is not then set, there is a problem with UAShell.

Offline aridale

  • Newbie
  • *
  • Posts: 4
Re: NPC Control
« Reply #12 on: March 20, 2014, 05:28:09 PM »
I think the main problem is I dont really know HOW to apply things in UAShell. All this stuff is so old its hard to find info about any of it and its hard to "get started" on FRUA now in 2014. I  havent used FRUA since probably 95 or so. I remember it fondly... I also remember it bein a bit over my head at 15 lol. As for now... I know how to use UAShell to run hacked designs... thats about it.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2186
    • Nol Drek's Web Site
Re: NPC Control
« Reply #13 on: March 20, 2014, 07:55:55 PM »
I think the main problem is I dont really know HOW to apply things in UAShell.

Put the DIFF.TBL file in the same folder as the design you are using. For example:

C:\FRUA\MyDesign.DSN

Start UAShell. From the Design menu, choose Apply (or just press F5).
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline aridale

  • Newbie
  • *
  • Posts: 4
Re: NPC Control
« Reply #14 on: March 21, 2014, 12:45:47 AM »
yeah Ive done all that. Still doesnt work. Maybe its the dosbox issue with not bein able to mod ckit?

 

anything