View Full Version : Damage and Heal Chat Commands
MaxAstro
July 8th, 2024, 22:48
Not to step on dsaraujo's toes - they are wonderful and their extension is wonderful - but I find myself using their /dmg and /heal chat commands a lot. The ability to quickly generate arbitrary typed damage is incredibly useful, and helps handle some edge cases that automation simply can't.
I'm currently working on a project that involves automating a lot of spells, and for some of the weirder ones I find myself including notes to the effect of "this is impossible to automate, but if you have the GM Enhancement Extension, /dmg is really helpful for this".
All of this is to say, is there any possibility of those commands becoming core functionality at some point? I really feel like Fantasy Grounds benefits from them.
Trenloe
July 8th, 2024, 23:18
Never say never... At this point, the code is in the vault so I can't review it - and then I'd need the author's permission to use any portion of the code (in theory I don't "need" it, as per the FG coding EULA, but I personally feel I need to request permission to use someone else's code - especially from a Forge product in the vault), and then make sure the code doesn't clash with the GM enhancement extension. Like I say, never say never, but there are a few hoops that would have to be jumped through...
MaxAstro
July 8th, 2024, 23:47
(in theory I don't "need" it, as per the FG coding EULA, but I personally feel I need to request permission to use someone else's code - especially from a Forge product in the vault)
Mad respect for this, by the way.
And I definitely understand there being hoops and the like. Honestly the only reason I asked is because I feel weird putting what amounts to "you should go buy this extension to make this spell easier to automate" into what might end up being a published product... but also the /dmg command is so incredibly helpful that it feels like a disservice to not include such a note vs just saying "this can't be automated, sorry".
Anyway, just my two cents.
dsaraujo
July 13th, 2024, 21:06
Just saw this, and hopefully I can find a way to add some of the extension functionality to the ruleset without adding even more (significant) work to Trenloe.
Trenloe
July 16th, 2024, 02:43
All of this is to say, is there any possibility of those commands becoming core functionality at some point? I really feel like Fantasy Grounds benefits from them.
Just saw this, and hopefully I can find a way to add some of the extension functionality to the ruleset without adding even more (significant) work to Trenloe.
Daniel's chat command code will be available in the base PFRPG2 ruleset with tomorrow's update. Thank you so much Daniel for allowing me, and helping me, to use your code.
MaxAstro
July 16th, 2024, 05:04
That's absolutely fantastic... and now I have to go rewrite a bunch of developer notes. XD
Damnit, Trenloe, you are too helpful! That's the second time I've had to do significant rewrites on this project because you added really good features that didn't exist when I started. :P
Trenloe
July 16th, 2024, 13:12
Damnit, Trenloe, you are too helpful! That's the second time I've had to do significant rewrites on this project because you added really good features that didn't exist when I started. :P
I feel your pain...
dsaraujo
July 18th, 2024, 23:48
Great news!
Farnaby
July 19th, 2024, 08:27
Fantastic news, thanks!
Montis
July 19th, 2024, 11:02
Great stuff!
I just played around with this a bit and noticed a few things (sorry, I worked in QA for 12+ years :D)
When typing /xp, there is no help text coming up.
When using /atk, the damage is sometimes rolled first, but not always. I'm unsure exactly why but I've had it both ways. It would be preferable if the attack was always the first one to be rolled to have a consistent order.
I think it would also be useful to be able to do /atk +10, 3d6+3 instead of having to write out an attack name and "Damage" (if you don't specify an attack name, the bonus won't be added to the dice; if you don't write Damage, the command won't work). Or even a simple /atk +10 as we already have a damage command.
In any case these are more wishlist things, not something that is strictly necessary. Thank you again for the implementation, this is really helpful!
Trenloe
July 19th, 2024, 15:54
Great stuff!
I just played around with this a bit and noticed a few things (sorry, I worked in QA for 12+ years :D)
Thanks for the feedback.
When typing /xp, there is no help text coming up.
This is within the standard FG slash handler code - it will only recognize strings three or more characters long (without the slash). /xp 100 works OK as it's more than three characters, but /xp is two characters (without the slash) and so FG doesn't run any code. I thought about changing the /xp to something like /award, but that's not really intuitive and so I think the lack of help text, but keeping /xp. EDIT: I'll code into the command itself some help text, on top of using the built-in help functionality which displays in the full chat help.
When using /atk, the damage is sometimes rolled first, but not always. I'm unsure exactly why but I've had it both ways. It would be preferable if the attack was always the first one to be rolled to have a consistent order.
FG performs dice rolling actions asynchronously - displaying the result for each after the dice stop rolling. FG uses a 3d dice model, with more round dice rolling longer - as a d20 is "rounder" than usual damage dice, it will usually roll for longer and so the attack result is displayed after damage. Short of not rolling dice (i.e. using random numbers) there's no way to guarantee the display order.
I think it would also be useful to be able to do /atk +10, 3d6+3 instead of having to write out an attack name and "Damage" (if you don't specify an attack name, the bonus won't be added to the dice; if you don't write Damage, the command won't work). Or even a simple /atk +10 as we already have a damage command.
This was specifically designed to use the standard NPC attack format - allowing copy/paste from statblocks external to FG. I'll investigate allowing simpler matches as well.
Montis
July 19th, 2024, 18:41
This is within the standard FG slash handler code - it will only recognize strings three or more characters long (without the slash).
As a suggestion you could use /exp as an alternative to allow for 3+ characters. Maybe have both available and xp being a sort of "abbreviation" :P
This was specifically designed to use the standard NPC attack format - allowing copy/paste from statblocks external to FG. I'll investigate allowing simpler matches as well.
I totally get it and it makes complete sense, just sometimes I'd like to just enter something from my head quickly without having to go through extra steps, especially on the player side where I don't have a statblock available.
But again: thank you so much for your great work and dedication!
Trenloe
July 19th, 2024, 21:39
As a suggestion you could use /exp as an alternative to allow for 3+ characters.
Typing /xp still won't give you the standard help text, only /exp would. But I'll put some help text within the new code...
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.