PDA

View Full Version : Individual PC XP assignment extension for d20 based rulesets



Trenloe
August 12th, 2016, 05:19
No longer needed - functionality included in FG v3.2.0

Based off discussions in this thread: https://www.fantasygrounds.com/forums/showthread.php?33582-Question-How-to-award-individual-exp-award-as-a-DM I put together an extension that provides the ability to assign XP to individual PCs through the Party Sheet.

Versions
1.0 - Initial full release after feedback on proof-of-concept extension.

Ruleset Compatibility
Tested with:

5E
3.5E
4E
PFRPG
Castles and Crusades

Should work with any CoreRPG based ruleset that uses the Party Sheet for XP awarding and the PC database (charsheet node) stores the experience in a number field called "exp". Relies on the Party Sheet XP entry (windowclass = "ps_xp_partyentry") for the PC having a <hlink> control called "link" to allow matching to the correct PC entry in the database which stores the actual XP total for the character (exp field)..

Installation

Download the attached "Individual PC XP Drag.ext" file and copy it to your <Fg App Data>\extensions directory.
Start/restart FG (if it's already running) and on the load campaign screen of a compatible ruleset campaign enable the "Individual PC XP Drag" extension.
When you load up FG it won't look any different, except you can drag/drop numbers to an individual PC's XP field in the party sheet - refer to the screenshot below.

Operation

14999

Basically you can drag a number from anywhere and drop it on the PC's XP field in the party sheet, this can come from a XP field in an encounter (#1) or quest (#2) which can be in the party sheet or not, from a /die xxx chat entry number, from a modifier box number, etc..

The code gets the number dropped and adds it to the current XP total in the PC database, which is linked to the number shown in this field. So the XP control grabs the data, sends it to the main PC database which is then reflected back to the party sheet (as well as the XP field in the main character sheet), which is the same way that the XP "Award" process operates.

Functionality

XP field in Party Sheet highlights and shows a + when a compatible number value is being dragged.
Whisper sent to the owning player of the PC (if logged in) and the GM to indicate assignment of XP. Other players don't see this message. See example screenshot below.

15002

Developer note
This extension has been developed and distributed freely for use by the Fantasy Grounds community. If you wish to use the code in this extension for anything beyond personal use please just ask. This includes modifying, updating or developing extensions with similar functionality to this (using all or portions of the code in this extension) and making them available to the public. If you're modifying for your own personal use, go nuts and mod away. But if you're going to post something publicly, please ask me. I'll more than likely be very happy you asked and give my blessing. It's just polite and respectful to do this. Thanks.

Trenloe
August 12th, 2016, 05:21
Placeholder

Zacchaeus
August 12th, 2016, 12:16
Nice one! :)

SpiritofFire
September 13th, 2016, 01:20
Used this during last session. Just want to say it worked great!

Trenloe
September 13th, 2016, 03:15
Used this during last session. Just want to say it worked great!
Cool - thanks for letting me know you're getting good use out of it.

I hear a rumour it might be included as standard in FG v3.2...

JohnD
October 1st, 2016, 18:37
Cool - thanks for letting me know you're getting good use out of it.

I hear a rumour it might be included as standard in FG v3.2...

Excellent.

Trenloe
November 1st, 2016, 19:23
This extension is no longer needed as the functionality is included in FG v3.2.0. Please remove/deactivate the extension.

swest
January 29th, 2017, 23:46
This extension is no longer needed as the functionality is included in FG v3.2.0. Please remove/deactivate the extension.

Greetings,

Can someone tell me how to achieve this (Individual XP assignment) in 3.2? I am unable to find any documentation/help, and it doesn't seem obvious.

Thanks.

- s.west

Trenloe
January 29th, 2017, 23:55
Can someone tell me how to achieve this (Individual XP assignment) in 3.2? I am unable to find any documentation/help, and it doesn't seem obvious.
It works how this extension worked. See "operation" in post #1 of this thread.

swest
January 30th, 2017, 15:41
It works how this extension worked. See "operation" in post #1 of this thread.

Well, I kinda figured as much. But it isn't working for me... I'll start from scratch, and check my extensions, etc., and get back to you.

Thanks.

- s.west

Zacchaeus
January 30th, 2017, 16:40
Well, I kinda figured as much. But it isn't working for me... I'll start from scratch, and check my extensions, etc., and get back to you.

Thanks.

- s.west

Do you mean it's not working at all or only some things don't work. I just checked and it would seem to be fully functional.

swest
January 30th, 2017, 16:49
When I try to drag either individual XP items on the party sheet, like a specific Quest, to a player's XP entry, nothing happens. Also, if I simply drag a number to the player's XP (on the party sheet), nothing happens.

I'm still in the process of testing this, so I may have more to report in a few minutes.

- s.west

swest
January 30th, 2017, 16:56
Ok. For starters, I thought that any number could be dragged. But, that's not the case (obviously). When I follow the specific guidance, and drag the results of a die roll (from the chat window), then yes, that works as indicated.

How, then, do I assign a particular 'quest' entry to a single player? [edit... well, I just tried dragging the number, from the XP entry in the Quests panel, and that works. I was sure that I had tried that before, but maybe not.]

Thanks.

- s.west

Trenloe
January 30th, 2017, 16:58
Follow the instructions, and look at the arrows in the screenshot, in post #1. You drag the numbers not the quest link.

swest
January 30th, 2017, 17:04
Ok, last question, and then I'll fade back into the woodwork: How might one assign a 'negative' value? Short of just going in to the characters sheet, and changing the number directly?

The reason this has come up is that I distributed XP for a session of play, and, although one of the players was absent, the XP was uniformly distributed to all characters. I think that the particular player is probably going to drop from the group anyway, but I wanted to 'unassign' that chunk of XP from his character, and have a record of it in the 'Quests' panel. But, negative values have no effect when dropped in that manner.

Is there a way?

Thanks.

- s.west

swest
January 30th, 2017, 17:06
Follow the instructions, and look at the arrows in the screenshot, in post #1. You drag the numbers not the quest link.

My apologies! I missed the first screenshot in post #1. I only saw the one that showed the results in the chat window (the second .jpg). Yes, that would have made it completely clear. Sorry for that oversight.

-s .west

Trenloe
January 30th, 2017, 17:08
See "Drag Negation" for number fields here: https://www.fantasygrounds.com/wiki/index.php/The_Basics#Number_Fields

swest
January 30th, 2017, 17:13
See "Drag Negation" for number fields here: https://www.fantasygrounds.com/wiki/index.php/The_Basics#Number_Fields

That is very cool. Thanks, very much for that guidance. It worked just like I wanted it to. I probably read that before (since I have the 'Basics' page bookmarked (!)) but just forgot it.

Thanks, again.

- s.west