PDA

View Full Version : Would it be possible... [Extension]



dantedoom
May 17th, 2018, 06:23
Hi! Me and my players keep forgetting the Flat Footed state in the beginning of the combat.

So, would be possible to make an extension so when I got to initiate combat it gives this effect to all characters in the combat tracker until they take their turn?

Thanks!

Ken L
May 17th, 2018, 11:02
Yes, you can hook into the initative roll action for each character/npc and add the flatfoot effect for 1 round. Alternatively you can hook into the 'addNPC' routine in manager_combat2.lua, and add the effect after population, there's something different for charsheets (PCs) IIRC so they're a specific case as they tend to pre-exist.

Then you'd have to remove it when their turn comes, specific for the first round else it'd keep removing the flat foot status every time their turn came up. I think the effect name detection still has the bug where it won't find 'flat-footed' due to the hyphen in the name so you'll have to either fix that in combat manager or work around it.

Source: i've had to heavily modify the 3.5/5e/SW rule-sets for my games.

Callum
May 22nd, 2018, 13:49
I'd really like an extension that did this, as we have the same issue in my group!

mr900rr
June 27th, 2018, 08:25
When I first started using Fantasy Grounds I didn't know how to use the program well and so this was a hassle so I opted not to do it, but after reading your thread I thought I would give it a shot. So you have to enable the extensions functionality in the options menu under combat section that way you can switch it off on the fly. When you drag an NPC onto combat tracker or roll their Init on their sheet or use the menu on the CT it will apply the flat-footed condition to them set to expire when its their turn. For PCs when you roll their Init on the character sheet or use the CT menu it will apply the flat-footed condition to them set to expire on their turn, I haven't yet figured out the dragging of a roll onto the Init box yet but I never do Init that way anyway. So this happens only on rounds 0 or 1 so you will need to reset your round to 0 or 1 before you do the Init rolls for the encounter, the exception is dragging NPCs onto the CT, I'm not sure on the rule for that, I would think if you summoned in a monster on round 3 he should be flat-footed till his turn as he is taking in whats going on around him.

See attachment in post below.

damned
June 27th, 2018, 09:08
Well done mr900rr!

mr900rr
July 1st, 2018, 10:00
Added the ability to check if player has Uncanny Dodge or Improved Uncanny Dodge and does not apply flat-footed to them if they do, still working on checking NPCs for it.

[MODERATOR - the attached extension has an error. See post #12 for a fixed extension: https://www.fantasygrounds.com/forums/showthread.php?43860-Would-it-be-possible-Extension&p=411946&viewfull=1#post411946 ]

Added new file with the fixed line.

Schneiderpants
October 28th, 2018, 04:19
I'm not sure how to use this. I downloaded the above file and placed in the Extensions folder on my fantasy grounds directory. It is not showing up when I restart fantasy grounds and load a campaign.

I am not sure what mr900rr means by "So you have to enable the extensions functionality in the options menu under combat section that way you can switch it off on the fly." When I go to the options menu in FG, I do not see anything about enabling extensions under the combat section.

EDIT: Realized this extension is only compatible with 3.5E, I am using PFRPG.

Trenloe
October 28th, 2018, 10:02
EDIT: Realized this extension is only compatible with 3.5E, I am using PFRPG.
Edit the extension.xml file in the extension to change the ruleset tag from 3.5E to PFRPG.

Schneiderpants
October 28th, 2018, 15:26
Attempted that - I'm a newb with such things. I unzipped the .ext file into 2 separate files and a Scripts folder - one was the extension.xml file. In that, I replaced all instances of 3.5E to PFRPG. Saved. Used 7-zip to recompress as an .ext file. Put that file in my FG extensions folder.

Sure enough, it appeared in the game extensions when loading a PFRPG campaign. But when the campaign loaded, a Console (GM) - Copy to Clipboard window popped up with the red alert: "Script Error: (string "scripts/manager_combat2.lua"):1260: 'end' expected (to close 'function' at line 594) near '<eof>' "

Not sure where I went wrong. Probably multiple places.

EDIT: Looking in the scripts\manager_combat2.lua i see multiple references to 35E. Perhaps I should replace each with PFRPG?

Trenloe
October 28th, 2018, 15:40
Attempted that - I'm a newb with such things. I unzipped the .ext file into 2 separate files and a Scripts folder - one was the extension.xml file. In that, I replaced all instances of 3.5E to PFRPG. Saved. Used 7-zip to recompress as an .ext file. Put that file in my FG extensions folder.

Sure enough, it appeared in the game extensions when loading a PFRPG campaign. But when the campaign loaded, a Console (GM) - Copy to Clipboard window popped up with the red alert: "Script Error: (string "scripts/manager_combat2.lua"):1260: 'end' expected (to close 'function' at line 594) near '<eof>' "

Not sure where I went wrong. Probably multiple places.

EDIT: Looking in the scripts\manager_combat2.lua i see multiple references to 35E. Perhaps I should replace each with PFRPG?
The only thing you need to change is the <ruleset> tag in extension.xml. There should only be one place in that file where you replace 3.5E with PFRPG - nowhere else.

Trenloe
October 28th, 2018, 15:43
Sure enough, it appeared in the game extensions when loading a PFRPG campaign. But when the campaign loaded, a Console (GM) - Copy to Clipboard window popped up with the red alert: "Script Error: (string "scripts/manager_combat2.lua"):1260: 'end' expected (to close 'function' at line 594) near '<eof>' "

Not sure where I went wrong. Probably multiple places.
You didn't go wrong - it looks like this extension is broken from the start - this error appears when loading in a 3.5E campaign without any modifications.

Trenloe
October 28th, 2018, 15:50
Try the attached - I've fixed the error and tagged it for PFRPG (in addition to 3.5E). I haven't tested the actual functionality/compatibility of the extension.

Schneiderpants
November 1st, 2018, 01:15
Thanks Trenloe, it now works per mr900rr's previous instructions.

however, be aware that Options Setting "Add: Auto NPC initiative" set to "Group" causes the entire group of NPCs to lose the flat-footed condition at same time.

For example, Goblin (pyro) #1 #2 #3 from rise of the runelords AP - as soon as the first one's turn came up, flat-footed was removed from all 3 because they had the same initiative.

Changing "Add: Auto NPC initiative" to "On" instead of "Group" mainly fixes this issue, since each has a unique initiative roll. However, if they happen to have the same initiative roll result, the same issue occurs. IE both goblin 1 and goblin 2 had 20 initiative, and lost flat-footed on goblin 1's turn.

Perhaps a moot concern, since allies acting on same initiative are unlikely to be attacked by enemies, thus flat-footed AC would not be a factor.

Trenloe
November 1st, 2018, 08:12
Perhaps a moot concern, since allies acting on same initiative are unlikely to be attacked by enemies, thus flat-footed AC would not be a factor.
Yup.

Callum
November 4th, 2018, 11:54
Thanks for this very useful extension, mr900rr and Trenloe! Just a quick note for other users - you need to reset the Round to 0 in the Combat Tracker in order to make this work when rolling initiative for a second encounter. This happens automatically when taking a rest (from the CT menu), or you can do it manually by typing in the CT Round box.

mr900rr
November 28th, 2018, 06:48
Hi guys, sorry about absence, there was a fire in my town and then I just got busy with other stuff so I haven't been on FG in a while. Thanks Trenloe for fixing that, it appears I didnt upload the latest version of the file I had where I had added that "end" in there, looks like there has been several updates to FG since I was last on so I will try to get all my extensions caught up. Thanks also Callum and Schneiderpants for letting me know of the issues I appreciate the input and feedback.

Kelrugem
December 8th, 2018, 20:27
Thanks for this very useful extension, mr900rr and Trenloe! Just a quick note for other users - you need to reset the Round to 0 in the Combat Tracker in order to make this work when rolling initiative for a second encounter. This happens automatically when taking a rest (from the CT menu), or you can do it manually by typing in the CT Round box.

Hm, this does somehow not work for me (neither the rest nor the manual reset) :) It was applied once automatically and since then noone recieves the effect flat-footed anymore when a new encounter starts :) Does someone know how to trigger that again? :)

EDIT: Okay, in a test campaign it works completely, also when I restart it. Maybe it is due to some other extension (but I can not remember to have installed any other extension except the message of the day), I try to find the error :)

Kelrugem
December 9th, 2018, 21:04
Hi :)

For completeness for people having the same issue, I found the problem: When I use this extension with the extension about the Strain-Injury variant then it does not work. But I do not really know why because I am sure that it worked before and I did not change anything in these extensions :)

I wish you a nice day :)

Best,

Kelrugem