DM tools: NPC matrix & henchmen

Ideas and suggestions for game mechanics and rules.
t-ice
Dungeon Master
Posts: 2106
Joined: Fri Apr 17, 2009 6:24 pm

Re: DM tools: NPC matrix & henchmen

Post by t-ice »

Giving a lvl 8 NPC to a party of level 1s, and then logging that party like a level 1 party killing things isn't creating a new issue. Henchmen aren't to be used outside DMd events, and within DMd events, the same has always been more than possible. Like say a team of level 5s, a rogue and a fighter, do a plot where they ambush a level 15 wizard when he doesn't have any spells available. When that fight is done on nwn2, automated systems have no idea the enemy is nerfed because of plot. It'll just look like two level 5s killing a CR 14(?) enemy. It's not different from those PCs having NPC support because of plot.

Of course the above kind is the overwhelming minority of use cases. Mostly it's just facilitating atmosphere and auxiliary NPCs. Such as a quest giver NPC that leads the party to objective X. Or the NPC ranger that is needed to follow the plot trail when no PC has the appropriate skills.

It'd be a new thing for the players and DMs alike, and of course there will be learning pains. But it's a very potential tool. The greatest potential in my view is in fact immersing PCs to the IC world. You are actually fighting with faction X against enemies Y.
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: DM tools: NPC matrix & henchmen

Post by Ronan »

The difference between NPC henchmen and friendly NPCs in combat is that the former grant XP when they kill something, while the later do not. In the case of the "henchman" being higher level than the rest of the party too much XP would be granted. I would have to think this effect on PC XP would be extremely minor in most cases, though it has the potential to not be (just like a non-partied PC sniping kills of a very high CR).

We could of course simply exit out of the XP-granting method early when its triggered by a henchman-kill, effectively making henchmen act like friendly NPCs for purposes of logging and killing things (i.e., no logs, no XP given). This approach would be the simplest, though obviously a bit flawed.
t-ice wrote:...when no PC has the appropriate skills.
Yes, this is where I'd most used NPCs in the past, albeit with much pain. I'd use them more (for better handling of factions as you suggest) if they weren't massive PITAs to configure and control.
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: DM tools: NPC matrix & henchmen

Post by Ronan »

I made the tool, henchman API and properly changed the XP granting and logging scripts last night, but I don't know when I'll be able to test. I'll need to construct a small test mod and compare before/after logs and XP gains to make sure everything works the same, which is more time consuming than the actual coding.

I assumed log wording might need to stay the same to preserve parser compatibility, so changed nothing there.

OE actually provided us with most all the tools to do this already; the Amn scripts were only a few lines. Shame we haven't been taking advantage of this all along. I think "companion" scripts are different from "henchman" scripts? With regards to managing abilities and inventory? Both might be useful in different circumstances.
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: DM tools: NPC matrix & henchmen

Post by Zelknolf »

The problems are on the other end-- how are you differentiating between a hireling and a familiar?
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: DM tools: NPC matrix & henchmen

Post by Ronan »

ACR_GetIsHenchman() looks for the presence of a flag set during ACR_AddHenchman() and cleared during ACR_RemoveHenchman().
t-ice
Dungeon Master
Posts: 2106
Joined: Fri Apr 17, 2009 6:24 pm

Re: DM tools: NPC matrix & henchmen

Post by t-ice »

Ronan wrote: OE actually provided us with most all the tools to do this already; the Amn scripts were only a few lines. Shame we haven't been taking advantage of this all along. I think "companion" scripts are different from "henchman" scripts? With regards to managing abilities and inventory? Both might be useful in different circumstances.
"Companions" are indeed something else, with (at least) the players being able to manage inventory. Exodus had a try with "companions" in the form of a pack horse that would follow the PC around and could (obviously) carry stuff. Major module crashing in seemingly random occasions resulted from trying to use that. (I didn't write that so don't know the details, only was at the "omfg, it crashed during DMing again!" -end)

So based on that experience the advice would be to stick to henchmen. Of course you guys have far more tech competence than the Exodus team ever did, so maybe you could make companions work, too. Though I don't really see benefit for ALFA's gameplay in having companions over henchmen. Since we are specifically not supposed to make Leadership feat-ish cohorot whose inventory the player would independently alter.

In any case, thanks Ronan and Zelk for teching this tool out!
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: DM tools: NPC matrix & henchmen

Post by Ronan »

Well there are some situations where it makes sense for PCs to manage inventory, as well as tactics (which I think are configurable from the henchmen interface?) and spell loadout. Basically anything to take the burden off the DM. I agree its not a "must have" feature and wouldn't come up nearly as often.
t-ice wrote:I didn't write that so don't know the details, only was at the "omfg, it crashed during DMing again!" -end
This only seemed to happen when companions were used? No idea what triggered it? Might be worth trying on empty modules unless the crashes were really not very common.
t-ice
Dungeon Master
Posts: 2106
Joined: Fri Apr 17, 2009 6:24 pm

Re: DM tools: NPC matrix & henchmen

Post by t-ice »

Ronan wrote:Well there are some situations where it makes sense for PCs to manage inventory, as well as tactics (which I think are configurable from the henchmen interface?) and spell loadout. Basically anything to take the burden off the DM. I agree its not a "must have" feature and wouldn't come up nearly as often.
With the companion interface you can change tactics (to whatever degree they work), and I think inventory and spell loadout. With henchmen this can't be done, you can just give orders like "attack", "follow"(keep formation and not attack), "guard me", "heal me", "stay". Those were already found to be extremely useful on Exodus, though it takes a while for a player to get used to it, and all the antics the AI might play. In particular the henchmen are prone to charging enemies with a split-second reaction time. (Always seeming like they win initiative and PCs are left flat-flooted for a OOC surprise round). Something the player needs to get used to keeping in check.
Ronan wrote:
t-ice wrote:I didn't write that so don't know the details, only was at the "omfg, it crashed during DMing again!" -end
This only seemed to happen when companions were used? No idea what triggered it? Might be worth trying on empty modules unless the crashes were really not very common.
Yes, with companions (or a companion). It's all quite a long time ago now, but adding/removing companions, as well as removing the objects that once were companions seemed to be the main triggers. ATs were also some sort of issue as I recall.

With henchmen there were some clients that had AT crashing issues, but no server crashes like with Companions. The AT crashes really were odd, depending not so much on randomness, but on the client. Some people would go AT-crash-balooza when a couple henchmen were present in the party, whereas others never had an issue. (Though that did seem to be the case with AT crashes in general).
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: DM tools: NPC matrix & henchmen

Post by Zelknolf »

Still, the core concept of the design is valid:
- Set local object on NPC which is the PC who is dubbed master.
- Check that local object on each NPC within a loop to see if it's a summon or just some dude in party
- Calculate XP based on the results

We can't use the exact mockup tested, unfortunately; a member of a standard faction getting a kill is going to loop through every member of said standard faction who is currently spawned (currently cheaper than calculating distance on each one of them, as it's just checking a value on everyone-- that's still needlessly and noticeably expensive to do), but it's close enough that it could be fixed up, and we don't necessarily have to use all of the OE stuff that was used for the proof of concept.

Also occurs to me that we'll have to handle the cases where a PC who was dubbed the "master" of an NPC dies. We sure boot dead PCs from party and port them, and NPCs will port with their master if we handle it. (which shouldn't be bad-- if NPC is just some dude, then next PC in the party is your master now).

And the tests should not have run on a live server; they doubled everyone's RPXP yesterday and aren't compliant with the specs for the system's function going forward. The stuff you wrote has to come out of live play and be fixed, and we absolutely have to test this with fake data until we're sure.
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: DM tools: NPC matrix & henchmen

Post by Ronan »

Zelknolf wrote:We can't use the exact mockup tested, unfortunately; a member of a standard faction getting a kill is going to loop through every member of said standard faction who is currently spawned (currently cheaper than calculating distance on each one of them, as it's just checking a value on everyone-- that's still needlessly and noticeably expensive to do), but it's close enough that it could be fixed up, and we don't necessarily have to use all of the OE stuff that was used for the proof of concept.
I'm not following this, as the function exits immediately when non-PCs or creatures with non-PC masters get kills. Anything in a PC's party has that party as its faction, and is no longer a member of a standard faction. Unless I'm greatly mis-remembering how parties and factions work? Edit: If I'm wrong here we can just start with oPCParty's master instead of oPCParty.
Zelknolf wrote:Also occurs to me that we'll have to handle the cases where a PC who was dubbed the "master" of an NPC dies. We sure boot dead PCs from party and port them, and NPCs will port with their master if we handle it. (which shouldn't be bad-- if NPC is just some dude, then next PC in the party is your master now).
Yes, should probably loop through the party and drop all henchmen belonging to the deader.
Zelknolf wrote:And the tests should not have run on a live server; they doubled everyone's RPXP yesterday and aren't compliant with the specs for the system's function going forward. The stuff you wrote has to come out of live play and be fixed, and we absolutely have to test this with fake data until we're sure.
What exactly was happening? It would have been nice to know this so we could have rebooted the server. It hasn't been restarted. Edit: unfortunately we don't have a version we can switch to where much actually works, so I'll wait for paazin to recompile before restarting.

The new XP script on BG was not used in compiled entry points; a quick grep of the local variable flag used (which should actually be changed/added to with something of our own) confirms it only appears in the item activation script.

I don't know what is going on with BG's scripts. After my recompile before last, DM avatars were getting subject to new PC initialization scripts, which kept all DMs (except me, oddly) from being able to walk without repeated clicking. A recompile fixed this where reboots and new avatars would not, but maybe introduced other issues? I will ask paazin to do a full recompile since something is clearly wacky with my setup. Git sometimes reports scripts as changed which should not be... maybe I should pay more attention to that. I guess the XP changes could have sparked this RP XP issue, but it seems I have bigger problems which may have been the root cause of all of this.

We were not able to test the wands yesterday because of a typo.
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: DM tools: NPC matrix & henchmen

Post by Zelknolf »

Ronan wrote:I'm not following this, as the function exits immediately when non-PCs or creatures with non-PC masters get kills. Anything in a PC's party has that party as its faction, and is no longer a member of a standard faction. Unless I'm greatly mis-remembering how parties work?
I might've missed something? Having the only version being a thing that was just dropped onto a live server is harder to puzzle through on this end-- such an early exit is all I was looking for.
Ronan wrote:What exactly was happening? It would have been nice to know this so we could have rebooted the server. It hasn't been restarted. Edit: unfortunately we don't have a version we can switch to where much actually works, so I'll wait for paazin to recompile before restarting.

The new XP script on BG was not compiled; a quick grep of the local variable flag used (which should actually be changed/added to with something of our own) confirms it only appears in the item activation script.

I don't know what is going on with BG's scripts. After my recompile before last, DM avatars were getting subject to new PC initialization scripts, which kept all DMs (except me, oddly) from being able to walk without repeated clicking. A recompile fixed this, but maybe introduced other issues? I will ask paazin to do a full recompile since something is clearly wacky with my setup. Git sometimes reports scripts as recompiled which shouldn't have been... maybe I should pay more attention to that. I guess the XP changes could have sparked this RP XP issue, but it seems I have bigger problems.

We were not able to test the wands yesterday because of a typo.
The RPXP heartbeat is firing every 13 minutes (not the current standard of 6 minutes 30 seconds), and the diagnosed issue of it being because you'd overriden acr_xp_i on a live server, was reported to HDM Paazin eight hours after the change hit the live server, to which paazin responded in a lack of awareness that such a change was made (you may fault me for not catching it sooner, I suppose; I was asleep over the intervening time, and had assumed that the clear instructions given earlier in this very thread would be followed) -- in the conversion, all PCs were given double RPXP on their first login, and the current state remains exploitable. I can explain how in details via PMs if needbe, but this being a public forum, I would prefer to not leave instructions.

So, we can bat words back and forth about what exact compilations happened-- I guess. I don't think that's very fruitful. The functional change is plain as day. There's plenty of good ideas in there and fine concepts that we can (will, if given to the ACR project) surely use, but the current state is not the way to go about it.
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: DM tools: NPC matrix & henchmen

Post by Ronan »

Zelknolf wrote:I might've missed something? Having the only version being a thing that was just dropped onto a live server is harder to puzzle through on this end-- such an early exit is all I was looking for.
Its just the standard method at that point.

Looking at a bytecode diff, it looks like one related entrypoint was recompiled: OnModuleLoad. This bytecode did not contain the local variable so I didn't see it when I grepped. I can't explain why things compiled this way, but clearly I made a mistake. Sorry; it was late, I had been troubleshooting other issues all day and I was tired. Once paazin does a recompile we can reboot the server.

The next time I test I'll use a separate branch to make sure the mod is running the proper scripts before it goes live again.

Edit: For those not in the know, the issues had nothing to do with the henchmen changes; I think those will work fine. They occurred because I was trying to test against (and accidentally left deployed) the latest development version of our XP scripts, which would obviously not work on a live module running 1.90.
Locked