PDA

View Full Version : PC Controlled NPCs.



Blackfoot
December 10th, 2012, 17:12
Anyone know how tough it would be to add an NPC box on the client side in the 3.5/PF ruleset? This seems like a nice solution for NPCs that are controlled by the PCs like hirelings, cohorts, familiars, companions, and summoned monsters. Currently it is possible to share NPCs with the players but once closed the PC is not able to reopen the window.

I'm thinking if this works similar to items, images, and story.. it might be a somewhat simple addition.

I suppose it would be good if the PC can edit flag were available too.. like in items.
-------------------
FIXED! Here it is as a .ext
This version should resolve issues with it not loading properly on clients that do not have the extension locally.
It is still pretty basic.. I will work on adding edit controls eventually.

EDIT: REMOVED 7-15-14 - This Extension is obsolete due to improvements to the 3.5/PFRPG Rulesets.

Ikael
December 10th, 2012, 17:30
There are several way (and ruleset specific dependencies) doing it so it really matters how you're going to implement it. I have done that several times to different rulesets and I found it relatively easy task to do. However since I don't know much about 3.5E ruleset I don't know if my method would be suitable in it.

Valarian
December 10th, 2012, 19:17
Most Rulesets already support players running multiple characters. I'd handle it like that. Create a PC character sheet for the hireling with just the info required to run it. Then have the player select that sheet as well as their character. They can switch by right-click and activate on the portrait.

Blackfoot
December 10th, 2012, 19:43
I actually think the idea for this is probably 80% or 90% supported by the 3.5/PF ruleset already.. it's likely just a matter of making the creatures/encounters box show up on the client side.

JohnD
December 10th, 2012, 21:18
I think this would be a good feature to have.

phantomwhale
December 10th, 2012, 22:43
I pretty much copied the approach from 4E into Savage Worlds for NPC / campaign item sharing - it wasn't too hard to get to grips with what the code did, and added better sharing controls too !

Blackfoot
December 11th, 2012, 02:46
Seems like all that might need to be done is to add:

DesktopManager.registerDockShortcut("button_people", "button_people_down", "Personalities", "npclist", "npc");
to the appropriate spot in the client area of desktop.lua .. I'm a bit rusty though... how do I get it to recognize this file as an extension? Do I need a complex extension.xml file or should it be really simple with just that one file listed with something to notify the program to use it instead of the regular version?

Blackfoot
December 11th, 2012, 03:04
Hmm .. I think I have it... now for a little testing.

Blackfoot
December 11th, 2012, 03:08
Cool it works. :)

Hmm.. Now if I can just figure out to add edit controls. :D

Blackfoot
December 11th, 2012, 03:11
Updated and moved it to the initial post in this thread.

Callum
December 11th, 2012, 17:16
Blackfoot, that's a great idea! Let me be sure I understand correctly - does this allow the GM to share any NPC with a player, and that player then has control over the NPC? If that NPC is in the Combat Tracker, can the player make attacks, etc.?

I see that you've uploaded a zip file - is it possible to use this as an extension?

Blackfoot
December 11th, 2012, 17:22
Blackfoot, that's a great idea! Let me be sure I understand correctly - does this allow the GM to share any NPC with a player, and that player then has control over the NPC? If that NPC is in the Combat Tracker, can the player make attacks, etc.?

I see that you've uploaded a zip file - is it possible to use this as an extension?
The zipped file contains the extension folder and files.. you can unzip it and use it.. or I think.. if I understand it right.. change the .zip to .ext and use it straight.

Regardless.. it definitely works.. but doesn't have all the bells and whistles that items have .. (I'm still working on that part)

EDIT: Sorry.. didn't completely answer your question.
Yes, the GM can share NPCs from the NPC box with players and they can then operate them as the GM does... make sure you 'show roll actor' on... so that it shows the name of the NPC instead of the PC.. and yes the GM can drag that critter to the tracker and they operate normally... targeting will not work for the player.. but they can drag the dice to the target token or the target on the tracker to make appropriate rolls.

viresanimi
December 15th, 2012, 18:05
This is great little addition to the game. Thank you for making it!

Vires Animi

Blackfoot
December 15th, 2012, 22:36
NP. :)
It was a lot simpler than I expected. :D

Blackfoot
December 24th, 2012, 04:40
OK.. maybe it wasn't that simple after all... I ran a game with the extension loaded today but none of the players were able to make use of it.
Anyone have any idea why?
Clients don't need to have extensions on their machines like modules... so I'm confused as to why it would work on my machine running as a client.. and not on others... are others making use of the extension having this issue as well?

Blackfoot
December 24th, 2012, 06:09
I've seen this same issue with the language extension... is there some way around it without having the clients download the extension?

Trenloe
December 24th, 2012, 12:01
I've seen this same issue with the language extension... is there some way around it without having the clients download the extension?
The problem with the language extension was fixed by removing a slash in the title in extension.xml : https://www.fantasygrounds.com/forums/showpost.php?p=127910&postcount=35

I notice there is a slash in this extension - remove that and you should be fine.

Blackfoot
December 24th, 2012, 15:34
Really? OK.. I'll give that a go.. thanks! :)

Blackfoot
December 24th, 2012, 18:50
Hrm.. now I seem to be getting the sidebar doubling bug.. hrm.

Callum
December 27th, 2012, 12:53
JPG, is there any chance of folding this extension into the core? It seems like a really useful bit of functionality that would benefit a lot of users.

Moon Wizard
December 27th, 2012, 22:49
It's something that has come up a few times, so I've definitely thought about it.

One of the challenges lately with all the new features is interface overload and confusion. So, I've been holding off a bit to see if I get any brainstorms on refining the interface. Also, it would need to be a slightly different window, since the GM side contains encounters which do not need to be shared. I'll think about for v2.9.3.

Regards,
JPG

Blackfoot
December 28th, 2012, 00:50
The bit I added was only really one line of code ... but to add the other parts (like edit options like in items) is probably a bit more.

Blackfoot
December 28th, 2012, 01:05
Anyone know why I'm getting duplicate icons with the extension now?
I don't think I changed anything... I just made it a .ext file and changed the name so it didn't have a slash in it.

Trenloe
December 28th, 2012, 02:08
Where are you seeing the double icons? In the NPC list on the player side?

I can only see one when I use this.

Make sure you don't have any older extensions or an extension directory relating to this in the \extensions directory.

Dakadin
December 28th, 2012, 04:16
Blackfoot, I've encountered that issue before when using the desktop.lua file in an extension. I think it has to do with how the sidebar buttons are registered and loaded. It doesn't happen all the time so it can be tricky tracking down. Basically I think that the buttons from the ruleset haven't finished loading when the extension says to create the same ones. Since the buttons aren't already there it thinks it is ok to add them resulting in duplicates. I changed the extension you created to only include the NPC button for PCs. It is attached. Please let me know if it doesn't resolve the issue for you.

Blackfoot
December 28th, 2012, 05:09
Trenloe - yeah... it's on the Client side only... this is a client only feature really since all it does is add on the NPC button on the Client Desktop.

Dakadin - That seems to have fixed it... it moves the box to the 'wrong' place in the order.. but I guess that's not that big a deal... I wonder why this only does this in some situations. I've done something like this before and it didn't break things.

3nvy
January 29th, 2013, 22:37
so if i get this extension added onto my FG2 will it work if i join another game secession or does the GM of that game have to have the extension as well

or vise verse if the gm has it does all the players have it?

Trenloe
January 29th, 2013, 22:46
so if i get this extension added onto my FG2 will it work if i join another game secession or does the GM of that game have to have the extension as well

or vise verse if the gm has it does all the players have it?
All extensions and modules are controlled from the GM side. The GM will have to have the extension installed (players don't have to install it) and they will have to load the extension with the campaign.

3nvy
January 29th, 2013, 22:48
All extensions and modules are controlled from the GM side. The GM will have to have the extension installed (players don't have to install it) and they will have to load the extension with the campaign.

Awesome Info thankyou =D

Invictys
April 20th, 2013, 02:50
Will this extension work for 4e also?

Blackfoot
April 20th, 2013, 02:56
Probably not as is... it would need be modified to list 4e instead of 3.5 as the ruleset... other than that.. I'm not really sure.

kael79
May 19th, 2013, 12:10
Thank you for this .ext ! :)

Callum
May 19th, 2013, 14:53
Yes, thanks indeed, Blackfoot! I have one question - it seems that once you share an NPC with a player, then there's no way to remove that NPC from the player's NPC list, either on the GM side or on the player side - is that correct?

Blackfoot
May 19th, 2013, 16:16
Hmm.. I'm not sure.. the extension is really a very simple addon so it has no 'features' attached to it. It only makes use of already existing code... (I think it adds one line to the startup stuff) ...I would think it would use the same code for sharing that other things do.
Actually... I checked it.. you can 'stop sharing' in the host's NPC window by right clicking on the shared NPC.

Macgreine
June 2nd, 2013, 02:59
This doesn't seem to be working for me. How do I go about doing it? I have placed the ext file in the folder , checked the ext box when I started the campaign but dont know how to pass ownership/control.

viresanimi
June 2nd, 2013, 03:07
I believe you drag and drop NPC's unto player portraits. Been a while since I used it, because it generated some annoying errors or something I forget.

Vires Animi

Macgreine
June 2nd, 2013, 03:19
Thats not working either. Hmmm ? Anyone?

Blackfoot
June 2nd, 2013, 07:34
Thats not working either. Hmmm ? Anyone?
Allow me to explain.
All this thing does is actually plop the NPC box on the client desktop. Normally it doesn't show there. If that box isn't showing on the client screen, then something is wrong.
Once it is showing.. you (the host) drag one of the summonable monsters to the NPC box.. then drag that monster to the tracker... then drag that monster to the PC who has summoned it... they can then control that monster.. targeting won't work normally.. but they can make rolls and target by dragging it onto a token on the map or a target on the tracker... or they can make other sorts of checks from the NPC sheet.
Without it.. you can drag NPCs to PCs.. but they can't reopen the NPC after they close it.

Velocinox
June 14th, 2013, 23:00
Just to let you guys know there is a potential bug in the current version of this extension. Dakadin was kind enough to fix it over in the thread I started in House of Healing (https://www.fantasygrounds.com/forums/showthread.php?t=18916).

wthrasherb
April 10th, 2017, 09:43
So is there a 5E version or way to allow a player to control and NPC? I had 2 PCs drop in the middle of a fight and had them take up NPC lackies that were with the group. We just rolled and modifed manually so I could let the player do the rolling, but it would have been nice if I could have just turned control of the NPC over to the player.

Thanks!

Blackfoot
April 10th, 2017, 15:13
Assuming it works like the PF Ruleset.. all you have to do is make them friendly and the player can double click on the token to take control of that NPC.

Nickademus
April 10th, 2017, 15:22
I think the <npc> record still has to be shared or the player will just get a chat message saying unable to load data from unloaded module. I think it says that even if the npc doesn't come from a module. Or maybe it says only records that are owned may be shared. One of the error messages...

Andraax
April 10th, 2017, 15:23
After making the NPC friendly, drag and drop the link to the NPC onto the character's portrait for the appropriate player.

Trenloe
April 10th, 2017, 15:29
Share the NPC link from the combat tracker with the player. It has to be from the combat tracker to allow linking for targeting etc..

Further details, and a video showing how it's done, here: https://www.fantasygrounds.com/forums/showthread.php?37573-How-do-I-give-players-control-of-NPCs&p=330233&viewfull=1#post330233