PDA

View Full Version : automatic PC activation thru combat tracker



plywoodchicken
April 15th, 2008, 18:43
Hi all, not sure if this has been done before, but while playing yesterday, I happened to be running two PCs. Sometimes I would forget to activate the PC whose turn it was based on the combat tracker so I'd roll the wrong dice.

Long story short, has anyone developed a way to automatically activate the PC whose turn it is according to the combat tracker? That way a player running multiple PCs that is as forgetful as me, wouldn't have to worry about emoting or dicing as the wrong character.

Any thoughts?

Thanks

Foen
April 16th, 2008, 06:20
It would certainly seem achievable, but I think it might create as many problems as it solved. If you were in the throes of an in-character discussion as one of the PCs and another one's turn arose, you would suddenly find yourself talking as the wrong PC. That could be quite annoying.

At least with the way it is, there is only yourself to blame *grin*

Stuart

Sigurd
April 16th, 2008, 13:52
I think it would be an improvement. People reading conversations would follow the threads anyway. As long as it didn't close all your char sheets etc...

Its a royal pain juggling sheets and making sure what you drag and drop is from the selected persona.


Sigurd

grimm182
April 16th, 2008, 13:58
Im highly interested in this fix, my current group has a rule if 2 or more players show then they continue on using the people who couldnt make its characters. Some of my players are new to RPG and FG2..so anything to make it less confusing/smoother is great! :)

plywoodchicken
April 16th, 2008, 16:12
It would certainly seem achievable, but I think it might create as many problems as it solved. If you were in the throes of an in-character discussion as one of the PCs and another one's turn arose, you would suddenly find yourself talking as the wrong PC. That could be quite annoying.

At least with the way it is, there is only yourself to blame *grin*

Stuart


I see your point Foen, but that would happen regardless of whether you were in combat or not when running multiple PCs. Hmm.. I wonder now if different CHAT options are feasible as well. For instance, if you had PC#2 active (via the combat tracker/GM) and you wanted to speak as PC#1.. something like:

/pc1 I need ALE!

might be displayed as:

Galstaff: I need ALE!

or something like that.. then it wouldn't matter which PC was "active".
If you are running only one PC, the /pc# option would be ignored. I think chat options have been covered in other posts.. so doing that shouldn't be a problem.

I haven't dug into the scripting side of this thing yet, as I'm only using the Lite client, but I hope to do so soon.

Foen
April 16th, 2008, 17:37
*bows head in submission*

OK, the general view is supportive, so I've had a bash at the scripting for this. It is a little more complex than I expected due to two things:

The processing needs to be done on the client side (hosts cannot set the active PC for a remote client, only the client can do this)
The User.getOwnedIdentities() method doesn't work as documented: in fact it doesn't seem to exist. I had to use the getRemoteIdentities() method instead, which requires a callback function.

Anyway, the following code should be appended to chat_chat.lua (including the local variable activeName):



local activeName = nil;

function onReceiveMessage(msg)
-- don't do this if you are the host, or if the message doesn't fit
if User.isHost() or not msg or not msg.icon or msg.icon~="indicator_flag" then
return;
end
-- get the name of the PC whose turn it is
activeName = msg.text;
if not activeName or activeName=="" then
return;
end
-- check to see if this is one of mine
User.getRemoteIdentities("charsheet","name",idCallback);
end

function idCallback(id, label)
-- called for each identity (PC) available to me, including those unassigned
if label == activeName and User.isOwnedIdentity(id) then
-- this isn't unassigned, and belongs to me
User.setCurrentIdentity(id);
end
end


Hope that helps

Stuart

plywoodchicken
April 16th, 2008, 18:06
Wow Foen, Thank you very much! I wasn't expecting code but yet you banged away at it anyway. I will give this a try late tonight when I get home and report back my findings.

Moon Wizard
April 16th, 2008, 19:14
As a related item, the v3.5 D&D custom ruleset I posted has a DM-controlled option to prepend character names to rolls when they are made from the character sheet via drag-rolling or double-click rolling.

This is very useful in my games, since everyone plays 2 characters. That way, when I have everyone roll Spot checks (or similar rolls), I know which character made each roll.

Cheers,
JPG