PDA

View Full Version : PFRPG Ammunition Manager



Pages : [1] 2 3

bmos
September 1st, 2020, 01:45
This extension aids in tracking whether some ranged weapons are loaded and assists in ammo tracking for all ranged weapons.

Extension Homepage, README, and Codebase (https://github.com/bmos/FG-PFRPG-Loaded-Indicator)
FantasyGrounds Forge (https://forge.fantasygrounds.com/shop/items/26/view)
Ext Files and Changelog (https://github.com/bmos/FG-PFRPG-Loaded-Indicator/releases)
License Information (https://github.com/bmos/FG-PFRPG-Loaded-Indicator/blob/master/LICENSE.md)
Bug Tracker and Suggestions (https://github.com/bmos/FG-PFRPG-Loaded-Indicator/issues)

To avoid my threads taking over the PF1e subforum, I publish most updates in my combo thread (https://www.fantasygrounds.com/forums/showthread.php?60308-bmos-extensions) (with only major updates in this individual thread which is primarily for discussion and bug reports). To ensure you're kept informed of future updates, either subscribe to that thread (for updates to all my extensions) or create a GitHub account and follow the specific repository of each extension you use. Or just check the releases linked in the first post of the thread periodically.

To add custom weapon names that require a load action, you can download and customize this extension (it needs to be used alongside the full Ammunition Manager extension):

bmos
November 20th, 2020, 13:35
Finally got around to updating this extension by releasing Loaded Indicator v1.1 (https://github.com/bmos/FG-PFRPG-Loaded-Indicator/releases/tag/v1.1).
Now, it's no longer just a checkbox but has some automation/logic to it.

The loaded indicator is now only shown on weapons that include 'firearm', 'crossbow', 'javelin', 'ballista', 'windlass', 'pistol', or 'rifle' in their name.
Loading one of these weapons now posts a chat message declaring the action. (thanks to Zygmunt Molotch for this idea)
Firing an un-loaded weapon of these types now posts a chat message declaring the issue.

bmos
November 20th, 2020, 16:34
Probably should have held off on that until I was finished for the day!
I have now also posted Loaded Indicator v1.2 (https://github.com/bmos/FG-PFRPG-Loaded-Indicator/releases/tag/v1.2) which automates the use of ammunition (somewhat, more to come I hope).

Post to chat if there is not enough ammo for the shot
Post to chat if the last piece of ammunition has been shot
Mark off ammunition as attacks are made
This extension now requires [Kelrugem's FullOverlayPackage](https://www.fantasygrounds.com/forums/showthread.php?50143-Save-overlay-extension-(idea-from-Ken-L))

bmos
November 24th, 2020, 01:37
Ammunition Tracker v1.3 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.3) (new name) now helps automate picking up un-damaged arrows at the end of the fight.
I have also made a new demo video (https://youtu.be/balPXO08mvM) to show these features.

For now, this does not allow tracking a specific type of ammunition but rather 'charges' of a weapon based on the checkboxes of the actions tab.

bmos
November 24th, 2020, 12:44
Thanks to Zygmunt Molotch for help with testing/finding weaknesses in my code.
Ammunition Manager v1.4 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.4) fixes some difficulties with detecting the correct weapon name (which caused a script error or sometimes just did not check the arrow box for each attack).

The previous video is still accurate.

EDIT: Ammunition Manager v1.5 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.5) (I know, 3 updates in less than 24 hours is a bit much, but I'm done for now I think ;))
Effect INFAMMO to disable per-character (such as when casting Abundant Ammunition). Fix expanded crit range attacks not using my code.
Stop rolling attacks that didn't happen (because no ammo or un-loaded weapon).

EDIT2: I know, I know.. but there were bugs and I just had to fix them.
I re-uploaded a fixed copy of v1.5. Please redownload.

Here is the v1.5 demo video as well:
https://www.youtube.com/watch?v=gq2srynLhmE

superteddy57
November 24th, 2020, 17:13
MOD: Renamed Thread to PFRPG Ammunition Manager

Asgurgolas
November 25th, 2020, 01:19
Just found out of this extension, and I officially do love you as much as I do Kelrugem :D

bmos
November 25th, 2020, 02:02
Now there's a competition :P
Enjoy!

EDIT: I think I remembered you saying that you had a hard time following my videos as English is a second language for you (and I speak quickly with my accent and verbal inaccuracies like "um" and "so"), so I have added English subtitles to my latest video to hopefully increase its usefulness.

Zygmunt Molotch
November 25th, 2020, 03:10
Thanks to Zygmunt Molotch for help with testing/finding weaknesses in my code.
Ammunition Manager v1.4 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.4) fixes some difficulties with detecting the correct weapon name (which caused a script error or sometimes just did not check the arrow box for each attack).

The previous video is still accurate.

EDIT: Ammunition Manager v1.5 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.5) (I know, 3 updates in less than 24 hours is a bit much, but I'm done for now I think ;))
Effect INFAMMO to disable per-character (such as when casting Abundant Ammunition). Fix expanded crit range attacks not using my code.
Stop rolling attacks that didn't happen (because no ammo or un-loaded weapon).

EDIT2: I know, I know.. but there were bugs and I just had to fix them.
I re-uploaded a fixed copy of v1.5. Please redownload.

Here is the v1.5 demo video as well:
https://www.youtube.com/watch?v=gq2srynLhmE

:D

now we gotta convince the Spellbook fella to put in INFAMMO as the effect for abundant ammunition :)

bmos
November 25th, 2020, 11:21
:D

now we gotta convince the Spellbook fella to put in INFAMMO as the effect for abundant ammunition :)There are pros and cons to that, it could confuse those who don't use my extension...
Either way, that is an unlocked module so you can edit your local copy in FG (no xml editing required).

EDIT: New Ammunition Manager v1.7 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.7) does some simple math to inform you by how many the attack exceeded the defensive stat (ac/cmd)
EDIT2: EDIT: New Ammunition Manager v1.8 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.8) does some slightly-less simple math to inform you in a less-specific manner (5+, 10+, 15+...)

bmos
December 6th, 2020, 17:42
suggestion:automatic re-rolling of miss chance for players that have the blind-fight feats.Ammunition Manager v1.9 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.9) now automates blind-fight (https://www.aonprd.com/FeatDisplay.aspx?ItemName=Blind-Fight)'s re-roll-on-miss function for players and NPCs.
The special circumstance of blink is not included in the automation at this time.
EDIT: this is not quite right by the rules. will continue working on it.

Kelrugem, perhaps you can bring this into your extension?
I add my special ability search function:



--- This function checks NPCs and PCs for special abilities.
local function hasSpecialAbility(rActor, sSearchString, bFeat, bTrait, bSpecialAbility, bEffect)
if not rActor or not sSearchString then
return false
end
local nodeActor = rActor.sCreatureNode;

if bEffect and EffectManager35E.hasEffectCondition(rActor, sSearchString) then
return true
end

local sSearchString = string.lower(sSearchString);
local sSearchString = string.gsub(sSearchString, '%-', '%%%-');
if ActorManager.isPC(nodeActor) then
if bFeat then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.featlist')) do
local sFeatName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sFeatName and string.match(sFeatName, sSearchString .. ' %d+', 1) or string.match(sFeatName, sSearchString, 1) then
return true
end
end
end
if bTrait then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.traitlist')) do
local sTraitName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sTraitName and string.match(sTraitName, sSearchString .. ' %d+', 1) or string.match(sTraitName, sSearchString, 1) then
return true
end
end
end
if bSpecialAbility then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.specialabilitylist')) do
local sSpecialAbilityName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sSpecialAbilityName and string.match(sSpecialAbilityName, sSearchString .. ' %d+', 1) or string.match(sSpecialAbilityName, sSearchString, 1) then
return true
end
end
end
else
local sSpecialQualities = string.lower(DB.getValue(nodeActor .. '.specialqualities', ''));
local sSpecAtks = string.lower(DB.getValue(nodeActor .. '.specialattacks', ''));
local sFeats = string.lower(DB.getValue(nodeActor .. '.feats', ''));

if bFeat and string.find(sFeats, sSearchString) then
return true
elseif bSpecialAbility and (string.find(sSpecAtks, sSearchString) or string.find(sSpecialQualities, sSearchString)) then
return true
end
end

return false
end

and modify this part of onMissChance:

if nTotal <= nMissChance then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else

to be this:

if nTotal <= nMissChance and hasSpecialAbility(rSource, "Blind-Fight", true, false, false, true) then -- bmos adding blind-fight
if string.match(rMessage.text, "%[BLIND%-FIGHT%]") or
string.match(rMessage.text, "%[ATTACK.*%((%w+)%)%]") ~= 'M' or
(EffectManager35E.hasEffect(rTarget, "Incorporeal") and not EffectManager35E.hasEffect(rSource, "Incorporeal")) then

rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if nMissChance > 0 then
local aMissChanceDice = { "d100" };
if not UtilityManager.isClientFGU() then
table.insert(aMissChanceDice, "d10");
end
local rMissChanceRoll = { sType = "misschance", sDesc = string.gsub(rMessage.text, " %[MISS%]", "") .. " [BLIND-FIGHT]", aDice = aMissChanceDice, nMod = 0, fullattack = rRoll.fullattack, actionStuffForOverlay = rRoll.actionStuffForOverlay };
ActionsManager.roll(rSource, rTarget, rMissChanceRoll);
-- KEL compatibility test with mirror image handler
else
rMessage.icon = "roll_attack";
end
end -- end bmos adding blind-fight
elseif nTotal <= nMissChance then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else

Kelrugem
December 6th, 2020, 17:50
Ammunition Manager v1.9 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.9) now automates blind-fight (https://www.aonprd.com/FeatDisplay.aspx?ItemName=Blind-Fight)'s re-roll-on-miss function.
The special circumstance of blink is not included in the automation at this time.

Kelrugem, perhaps you can bring this into your extension?
I add my special ability search function:



--- This function checks NPCs and PCs for special abilities.
local function hasSpecialAbility(rActor, sSearchString, bFeat, bTrait, bSpecialAbility, bEffect)
if not rActor or not sSearchString then
return false
end
local nodeActor = rActor.sCreatureNode;

if bEffect and EffectManager35E.hasEffectCondition(rActor, sSearchString) then
return true
end

local sSearchString = string.lower(sSearchString);
local sSearchString = string.gsub(sSearchString, '%-', '%%%-');
if ActorManager.isPC(nodeActor) then
if bFeat then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.featlist')) do
local sFeatName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sFeatName and string.match(sFeatName, sSearchString .. ' %d+', 1) or string.match(sFeatName, sSearchString, 1) then
return true
end
end
end
if bTrait then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.traitlist')) do
local sTraitName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sTraitName and string.match(sTraitName, sSearchString .. ' %d+', 1) or string.match(sTraitName, sSearchString, 1) then
return true
end
end
end
if bSpecialAbility then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.specialabilitylist')) do
local sSpecialAbilityName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sSpecialAbilityName and string.match(sSpecialAbilityName, sSearchString .. ' %d+', 1) or string.match(sSpecialAbilityName, sSearchString, 1) then
return true
end
end
end
else
local sSpecialQualities = string.lower(DB.getValue(nodeActor .. '.specialqualities', ''));
local sSpecAtks = string.lower(DB.getValue(nodeActor .. '.specialattacks', ''));
local sFeats = string.lower(DB.getValue(nodeActor .. '.feats', ''));

if bFeat and string.find(sFeats, sSearchString) then
return true
elseif bSpecialAbility and (string.find(sSpecAtks, sSearchString) or string.find(sSpecialQualities, sSearchString)) then
return true
end
end

return false
end

and modify this part of onMissChance:

if nTotal <= nMissChance then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else

to be this:

if nTotal <= nMissChance and hasSpecialAbility(rSource, "Blind-Fight", true, false, false, true) then -- bmos adding blind-fight
if string.match(rMessage.text, "%[BLIND%-FIGHT%]") then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if nMissChance > 0 then
local aMissChanceDice = { "d100" };
if not UtilityManager.isClientFGU() then
table.insert(aMissChanceDice, "d10");
end
local rMissChanceRoll = { sType = "misschance", sDesc = string.gsub(rMessage.text, " %[MISS%]", "") .. " [BLIND-FIGHT]", aDice = aMissChanceDice, nMod = 0, fullattack = rRoll.fullattack, actionStuffForOverlay = rRoll.actionStuffForOverlay };
ActionsManager.roll(rSource, rTarget, rMissChanceRoll);
-- KEL compatibility test with mirror image handler
else
rMessage.icon = "roll_attack";
end
end -- end bmos adding blind-fight
elseif nTotal <= nMissChance then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else


Yes, I can try to add that when my stuff settled down (I try to finish my thesis this month actually, hence, a looot to do right now :) ). Funnily, some parts of it are also already in my prototype stuff, I started with that, too, a bit :) So, thanks :D

Asgurgolas
December 6th, 2020, 18:26
Careful as miss chance coming from incorporeality is not checked twice, and anyways only from melee (i can't read "melee" in the code, but it's also true I mostly can't understand much from in there XD)

bmos
December 6th, 2020, 18:55
Careful as miss chance coming from incorporeality is not checked twice, and anyways only from melee (i can't read "melee" in the code, but it's also true I mostly can't understand much from in there XD)Thanks. Just reuploaded to address that (and have changed the post detailing how it works).
Is there a way to tag PC attacks as incorporeal?

Asgurgolas
December 6th, 2020, 20:21
not that I know... I know Kelrugem made a "ghost touch" effect. For mage armor, I just "AC: 4 armor; IFT: TYPE (incorporeal); AC: 4 melee". The bad part is that the +4 applies against spells too.

I just tried a bunch of things, but I haven't yet been able to apply "incorporeal" to PC attacks

Kelrugem
December 6th, 2020, 20:33
When you are incorporeal (having that effect), then your attacks are treated as incorporeal :) rather change IFT: TYPE(incorporeal) to IFT: incorporeal (I think the former doesn't even work) :)

But just write AC: 4 armor actually (when it is not an incorporeal touch attack), incorporeal is not that automated in 3.5e in FG :) It just adds the miss chance but it does not ignore armor, natural armor and shield bonus types, that you still need to do manually :) So, until that is automated, armor bonus types are still applied and so you do not need such a complicated effect :) (because most incorporeal creatures do touch attacks such that one does not need that automation of AC stuff; so, accounting for touch attacks while not for spells is difficult with an effect. So, you can keep your effect, AC: 4 armor; IFT: incorporeal; AC: 4 melee, to account for touch attacks but you still need to do a lot of stuff manually for incorporeality)

I had once a "ghost" type of AC in my extension, I can add it back, seemingly it is needed for such situations :)

EDIT: Additionally, you could declare your incorporeal attack as touch, but may lead to a problem when the defender is also incorporeal :) I would need to look more closely into that, I never had anything incorporeal going on at the moment

Asgurgolas
December 6th, 2020, 21:35
IFT: TYPE checks for anything on the "type" string, so for a devil which has "Outsider (evil, fire, baatezu)" would trigger either or all the "IFT: TYPE (outsider)", "IFT: TYPE (evil)", "IFT: TYPE (fire)", and "IFT: TYPE (baatezu)". Also remember that in 3.5 an "evil outsider" is different than "outsider with an evil alignment"

A ghost touch armor would be useful, but kinda nasty to differentiate when you have to consider armor and shield the same way as natural armor is: FG doesn't differentiate "natural armor" from "enhancement bonus to natural armor": a character with a +1 amulet of natural armor AND having a +3 bonus to its own base natural armor forces you to script the effect as "+4 armor, natural" for it to work (adding the item bonus AND the already present +3 base)

Kelrugem
December 6th, 2020, 21:44
IFT: TYPE checks for anything on the "type" string, so for a devil which has "Outsider (evil, fire, baatezu)" would trigger either or all the "IFT: TYPE (outsider)", "IFT: TYPE (evil)", "IFT: TYPE (fire)", and "IFT: TYPE (baatezu)". Also remember that in 3.5 an "evil outsider" is different than "outsider with an evil alignment"

A ghost touch armor would be useful, but kinda nasty to differentiate when you have to consider armor and shield the same way as natural armor is: FG doesn't differentiate "natural armor" from "enhancement bonus to natural armor": a character with a +1 amulet of natural armor AND having a +3 bonus to its own base natural armor forces you to script the effect as "+4 armor, natural" for it to work (adding the item bonus AND the already present +3 base)

Yeah, I just looked, indeed incorporeal is also a type which can be checked :) Though most creatures with that type also have that condition, so, not a difference most time :D

About AC: Yes, one may need multiple types of armor maybe as for damage types, or simply to ghost types :) (the natural natural armor type is normally never changed (besides increasing HD), so, one can just treat it as misc. bonus most of the time :) at least I do not know of any spell or circumstance in combat where the actual naturl AC is important :D)

EDIT: But maybe shift the discussion, if still needed, somewhere else; poor Ammunition Manager cluttered with that :D

bmos
December 7th, 2020, 00:32
not that I know... I know Kelrugem made a "ghost touch" effect. For mage armor, I just "AC: 4 armor; IFT: TYPE (incorporeal); AC: 4 melee". The bad part is that the +4 applies against spells too.Add NIFTAG: spell before the IFT section, perhaps?

When you are incorporeal (having that effect), then your attacks are treated as incorporeal :) rather change IFT: TYPE(incorporeal) to IFT: incorporeal (I think the former doesn't even work) :)Yeah, there's definitely something in code for [INCORPOREAL] attacks but it might only be for NPCs. I have updated the code in that comment so that if both attacker and defender have incorporeal condition than it rolls again for blind fight as this seems to be the most reasonable ruling.

Kelrugem
December 7th, 2020, 00:45
cool, thanks a lot :)

Asgurgolas
December 7th, 2020, 15:19
For now I just ignore the miss roll result whenever needed (such an impromptu ghost touch weapon against a shadow) and simply ask to roll for damage :p

Sudain
January 19th, 2021, 07:28
I think I found a bug in ammunition manager and or Kel's e.5e and PF1e Advanced Effects with Aao.

When rolling a crit-confirmation roll, penalties applied to attack rolls are counted twice. Advanced Effects rolls it correctly. Ammo Manager errors out and doesn't roll the confirmation roll. Advanced Effects and Ammo manager roll the confirmation roll with the penalty applied twice. Not sure where the bug lies or how to resolve it.

42999
43000
43001

bmos
January 19th, 2021, 20:57
I think I found a bug in ammunition manager and or Kel's e.5e and PF1e Advanced Effects with Aao.

When rolling a crit-confirmation roll, penalties applied to attack rolls are counted twice. Advanced Effects rolls it correctly. Ammo Manager errors out and doesn't roll the confirmation roll. Advanced Effects and Ammo manager roll the confirmation roll with the penalty applied twice. Not sure where the bug lies or how to resolve it.

42999
43000
43001

Ah, Kel may have made an update that I neglected to include here.
I will take a look when I get the chance.

Sudain
January 19th, 2021, 23:47
Thank you! :)

Kelrugem
January 20th, 2021, 00:17
that update may have been the official patch when the CC roll got fixed (there was this bug with manual rolls), I added that to my extension at some point, too :)

bmos
January 22nd, 2021, 14:01
that update may have been the official patch when the CC roll got fixed (there was this bug with manual rolls), I added that to my extension at some point, too :)You don't happen to remember what this fix was, do you?
I compared the onAttack function of your latest FullOverlay Package with the one I have and there were only a couple of small changes (that didn't seem to be related to anything except your work--regardless, I'm glad I have been able to bring in those changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/commit/bbca6b5728d8ef6947529f37eaf16ace94e212c7)!). Or is "nAdditionalDefenseForCC" the missing link? I am assuming since you have a comment saying "KEL Add nAdditionalDefenseForCC" this is something for one of your custom effects?

Kelrugem
January 22nd, 2021, 15:07
You don't happen to remember what this fix was, do you?
I compared the onAttack function of your latest FullOverlay Package with the one I have and there were only a couple of small changes (that didn't seem to be related to anything except your work--regardless, I'm glad I have been able to bring in those changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/commit/bbca6b5728d8ef6947529f37eaf16ace94e212c7)!). Or is "nAdditionalDefenseForCC" the missing link? I am assuming since you have a comment saying "KEL Add nAdditionalDefenseForCC" this is something for one of your custom effects?

Hmm, no, "nAdditionalDefenseForCC" is for ACCC; but who knows, maybe that fixes it, although I would spontaneously not know why :D (I would need to check the code) I think the official changes were in ActorManager2 back then, but not sure anymore :)

To make sure: Sudain, do you really mean my full overlay package or actually rmilmine's advanced effects extension? (due to the similar naming scheme :D) Or, since you additionally mentioned AoO in the name, do you still use advanced 3.5e/PF1 with AoO, I mean, does the extension carry that name? Then beware that I actually deprecated those versions and the most up-to-date version is now only the full overlay package :) (no worries, I added additional settings in this overlay package to suppress the overlays when you do not want to use them :) ) In that case, please update to the new extension; that may already fix it, too :)

Elaith
January 28th, 2021, 08:13
Hello,

This is a great mod. I just started to play around with it, and I think I will enjoy it quite a bit. I really love that you added blind-fight in there, as I have been meaning to create something to deal with that myself, but have been quite busy.

I am curious if you might extend this to true seeing? Either way, just a suggestion.


Thanks,
-Elaith

Kelrugem
January 28th, 2021, 09:06
Hello,

This is a great mod. I just started to play around with it, and I think I will enjoy it quite a bit. I really love that you added blind-fight in there, as I have been meaning to create something to deal with that myself, but have been quite busy.

I am curious if you might extend this to true seeing? Either way, just a suggestion.


Thanks,
-Elaith

When you are also using my extension, then there is already automation for true seeing :) (E.g. apply NIFT: CUSTOM(true seeing); invisible etc. instead of just invisible to people being invisible; then they're only invisible when the opposed actor has not true seeing :) )

Elaith
January 28th, 2021, 09:41
True I can do that, was just curious if there was any other automation in progress. Mainly because I have to modify multiple locations of the spell - npcs/players, etc. Was just curious if something could have been done to ignore miss chances, etc.

But thank you for the reply. I have used that code at times - when it makes it easier on me as a dm. I may just need to modify my spellbooks going forward, and adjust as needed.

-Elaith

Kelrugem
January 28th, 2021, 09:58
True I can do that, was just curious if there was any other automation in progress. Mainly because I have to modify multiple locations of the spell - npcs/players, etc. Was just curious if something could have been done to ignore miss chances, etc.

But thank you for the reply. I have used that code at times - when it makes it easier on me as a dm. I may just need to modify my spellbooks going forward, and adjust as needed.

-Elaith

aah, I see :) Yeah, that approach of my extension sadly means to adjust effects like about miss chance and invisible; certainly nice when the code would already do that without the need of NIFT :)

Sudain
January 28th, 2021, 15:57
Hmm, no, "nAdditionalDefenseForCC" is for ACCC; but who knows, maybe that fixes it, although I would spontaneously not know why :D (I would need to check the code) I think the official changes were in ActorManager2 back then, but not sure anymore :)

To make sure: Sudain, do you really mean my full overlay package or actually rmilmine's advanced effects extension? (due to the similar naming scheme :D) Or, since you additionally mentioned AoO in the name, do you still use advanced 3.5e/PF1 with AoO, I mean, does the extension carry that name? Then beware that I actually deprecated those versions and the most up-to-date version is now only the full overlay package :) (no worries, I added additional settings in this overlay package to suppress the overlays when you do not want to use them :) ) In that case, please update to the new extension; that may already fix it, too :)

I will confirm from the loaded page when I get a chance from work. I think I was using your advanced 3.5e/PF1 with AaO.

bmos
January 28th, 2021, 18:10
Proper handling of invisibility that actually restricts token vision and penalties is on my list of future extensions (if I get around to it). We'll see if it happens someday, it would be awesome!

Sudain
January 31st, 2021, 17:04
I will confirm from the loaded page when I get a chance from work. I think I was using your advanced 3.5e/PF1 with AaO.

Yup, that was it. Thank you!

bmos
January 31st, 2021, 20:57
Yup, that was it. Thank you!Fantastic.

Svandal
March 18th, 2021, 20:41
Any chance you can also add how much they miss by? Or at least if you miss with 10 or more.
If you trip or disarm bad stuff happens if you miss by 10 or more.

bmos
March 18th, 2021, 22:44
Any chance you can also add how much they miss by? Or at least if you miss with 10 or more.
If you trip or disarm bad stuff happens if you miss by 10 or more.Great idea. There's probably some sort of absolute value math I can use.
Entered as issue [1] (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/issues/1)

kevininrussia
March 23rd, 2021, 18:52
Possibility of this extension in CoreRPG/4E

Technically there is no ammo recovery rules that I could find. I got this response on the 4E discord "I think many DMs either allow you to recover mundane, or recover 50% of them but magic ammo is gone". I would use this extension for recovery :-)

bmos
March 23rd, 2021, 18:53
Any chance you can also add how much they miss by? Or at least if you miss with 10 or more.
If you trip or disarm bad stuff happens if you miss by 10 or more.I added this in v1.10 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.10).


Possibility of this extension in CoreRPG/4E

Technically there is no ammo recovery rules that I could find. I got this response on the 4E discord "I think many DMs either allow you to recover mundane, or recover 50% of them but magic ammo is gone". I would use this extension for recovery :-)Great! I figured there wouldn't be since 4E did away with most inventory management/simulation things.
I will see if I can make it CoreRPG compatible (and if not will just try to make it also 4E compatible).

kevininrussia
March 23rd, 2021, 20:03
I added this in v1.10 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.10).

Great! I figured there wouldn't be since 4E did away with most inventory management/simulation things.
I will see if I can make it CoreRPG compatible (and if not will just try to make it also 4E compatible).

I like that minutia stuff :-)

bmos
March 24th, 2021, 00:16
I like that minutia stuff :-)Try this:
EDIT: see post 43 (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager&p=589446&viewfull=1#post589446)

kevininrussia
March 24th, 2021, 03:05
When attacking PC -> NPC with ranged weapon I get this error:

https://i.imgur.com/ynG0MzY.png

bmos
March 24th, 2021, 11:24
I had missed a couple things in that script that I had to prefix with ActionAttack.
Try Ammunition Manager v1.11 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.11).

kevininrussia
March 24th, 2021, 17:19
Initial tests show the extension to be working in 4e. :-)

I noticed the Hit and Miss by 5+. Is it possible for that to apply to Skill Checks?

kevininrussia
March 24th, 2021, 17:27
I love how this extension works. Thanks!

If I was to tweak it a little for 4e I would make the Load button only active with 'loadaction' in weapon name and remove the Hit 5+ Miss 5+ from attacks. For Skill Checks the "5+" "10+" would be very useful. As an example, skill checks for climbing have tiers of success or failure.

bmos
March 24th, 2021, 17:58
In my experience, the DC is rarely entered for skill checks which means that the necessary info is only available to the GM.
Do you typically roll skill checks in such a way that there is a DC available in FG?

kevininrussia
March 24th, 2021, 18:18
I noticed that the 50% is being shown on Melee weapons

https://i.imgur.com/I8h2b5N.png

kevininrussia
March 24th, 2021, 18:24
In my experience, the DC is rarely entered for skill checks which means that the necessary info is only available to the GM.
Do you typically roll skill checks in such a way that there is a DC available in FG?

Well, I guess not. Usually its something like this:

https://i.imgur.com/XLHG6HN.png

Not that important though. I just got to remember it when I am DMing :-)

bmos
March 24th, 2021, 18:39
I noticed that the 50% is being shown on Melee weaponsI'm not seeing this locally, perhaps you're still using the pre-release version?


Not that important though. I just got to remember it when I am DMing :-)I made it anyway (https://www.fantasygrounds.com/forums/showthread.php?67328-4E-Skill-Success-Failure-Margins&p=589533&viewfull=1#post589533) since it could be useful when rolling skill checks from the party sheet or in a skill challenge (couldn't figure out how that part of the ruleset works so it's untested there).

kevininrussia
March 24th, 2021, 18:47
I'm not seeing this locally, perhaps you're still using the pre-release version?

I made it anyway (https://www.fantasygrounds.com/forums/showthread.php?67328-4E-Skill-Success-Failure-Margins&p=589533&viewfull=1#post589533) since it could be useful when rolling skill checks from the party sheet or in a skill challenge (couldn't figure out how that part of the ruleset works so it's untested there).


Yes, I am testing on the Test server. Guess I should have mentioned that...
No other extensions loaded

Thanks for the Skill check!

bmos
March 24th, 2021, 19:07
Yes, I am testing on the Test server. Guess I should have mentioned that...
No other extensions loaded

Thanks for the Skill check!pushed a hotfix to v1.11. redownload.

kevininrussia
March 24th, 2021, 20:58
pushed a hotfix to v1.11. redownload.

That fixed the issue. Was this issue affecting all rulesets on the test server or just 4E?

bmos
March 24th, 2021, 21:01
That fixed the issue. Was this issue affecting all rulesets on the test server or just 4E?Only 4E, because I did something slightly differently when adding 4E support (it had no replacement onInit() function)

Khoredran
April 7th, 2021, 04:43
Would it be possible to eventually make this extension work with NPCs using ammo? Checking if they have enough ammunition and removing the ones used would be absolutely fantastic!

Maybe by seeing the number of arrows a NPC has in the treasure section of its sheet, your Upgrade NPC Action extension could create an Arrows entry that would be used when said NPC were to use its corresponding ranged weapon attack.

Automating the different kind of arrow enchantments with pre-programed effects would be even more extraordinary, but I'm dreaming out loud here. (Ex: an entry of (5) +1 holy arrows having its [ATK:1; DMG:1; IFT:ALIGN(evil); DMG:2d6; DMGTYPE:good] effect ready to be triggered for these 5 uses while keeping track of them would be pure greatness!) I just don't know how feasible it would be though. ^^

Another suggestion would be to update the github for this extension to put the video of the latest version of the extension since I think the video of the first version is still uploaded there.

Also, amazing work as always!

bmos
April 7th, 2021, 12:16
Would it be possible to eventually make this extension work with NPCs using ammo? Checking if they have enough ammunition and removing the ones used would be absolutely fantastic!

Maybe by seeing the number of arrows a NPC has in the treasure section of its sheet, your Upgrade NPC Action extension could create an Arrows entry that would be used when said NPC were to use its corresponding ranged weapon attack.

Automating the different kind of arrow enchantments with pre-programed effects would be even more extraordinary, but I'm dreaming out loud here. (Ex: an entry of (5) +1 holy arrows having its [ATK:1; DMG:1; IFT:ALIGN(evil); DMG:2d6; DMGTYPE:good] effect ready to be triggered for these 5 uses while keeping track of them would be pure greatness!) I just don't know how feasible it would be though. ^^

Another suggestion would be to update the github for this extension to put the video of the latest version of the extension since I think the video of the first version is still uploaded there.

Also, amazing work as always!Yeah, I really need to re-record a bunch of my videos at this point.
I don't even think Live Hitpoints shows the right user interface...

I'm not sure about NPCs, although it would be nice. I'll add it to the issues list.

Sudain
April 7th, 2021, 17:23
Would it be possible to eventually make this extension work with NPCs using ammo? Checking if they have enough ammunition and removing the ones used would be absolutely fantastic!

Maybe by seeing the number of arrows a NPC has in the treasure section of its sheet, your Upgrade NPC Action extension could create an Arrows entry that would be used when said NPC were to use its corresponding ranged weapon attack.

Automating the different kind of arrow enchantments with pre-programed effects would be even more extraordinary, but I'm dreaming out loud here. (Ex: an entry of (5) +1 holy arrows having its [ATK:1; DMG:1; IFT:ALIGN(evil); DMG:2d6; DMGTYPE:good] effect ready to be triggered for these 5 uses while keeping track of them would be pure greatness!) I just don't know how feasible it would be though. ^^

Another suggestion would be to update the github for this extension to put the video of the latest version of the extension since I think the video of the first version is still uploaded there.

Also, amazing work as always!

If there is I hope we can make that an optional setting per campaign/dm. There are several cases where I want giants to have 'as much as dramatically appropriate' javelins and rocks. :D

bmos
April 7th, 2021, 19:45
If there is I hope we can make that an optional setting per campaign/dm. There are several cases where I want giants to have 'as much as dramatically appropriate' javelins and rocks. :DThe way the extension works for players is that setting ammo count to 0 disables ammo tracking. The same would be true for NPCs if I implement it for them.

kevininrussia
April 8th, 2021, 08:59
4e bug:

When selecting the Attack die on the Combat tab an error is thrown.
New campaign, no extensions.

https://i.imgur.com/iS6oal9.png
https://i.imgur.com/8QhZ0bj.png

Svandal
April 14th, 2021, 17:41
There is an incompatability with the "combat modifier calculation extension"
https://www.fantasygrounds.com/forums/showthread.php?66441-Combat-Modifier-Calculation-Extension

I have the latest live version, and when I only load this extension + combat modifier I get a error when I:
Target an enemy token and then double click on an attack (both melee and ranged throws error messages). I then get this error:
script execution error: [string "attacks"]:35: attemt to call field 'hasLoadAction' (a nil value)

If I attack by drag and drop method I do not get an error message.
I cross my fingers that this has an easy fix because I love both the "hit by x" amount from this extension and the range penalty from combat modifier.

Edit: Here is my compiled log file. (And I also post this in the combat modifier thread)

bmos
April 14th, 2021, 20:21
There is an incompatability with the "combat modifier calculation extension"
https://www.fantasygrounds.com/forums/showthread.php?66441-Combat-Modifier-Calculation-Extension

I have the latest live version, and when I only load this extension + combat modifier I get a error when I:
Target an enemy token and then double click on an attack (both melee and ranged throws error messages). I then get this error:
script execution error: [string "attacks"]:35: attemt to call field 'hasLoadAction' (a nil value)

If I attack by drag and drop method I do not get an error message.
I cross my fingers that this has an easy fix because I love both the "hit by x" amount from this extension and the range penalty from combat modifier.

Edit: Here is my compiled log file. (And I also post this in the combat modifier thread)I actually don't think this was a compatibility issue. I found a typo in my code that I believe was causing this and kevininrussia's issue.
Download v1.13 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.13).

Svandal
April 15th, 2021, 17:48
This time I swear I actually have a conflict issue. It is between Kels full overlay extension and your latest ammunition manager extension.
I get no error messages, but when I roll an attack vs an enemy it does not say hit by xx anymore.
When I only load you ammunition manager the chat reads: bla bla standard attack text + [HIT] [by 15+]
When I only load ammunition manager + full overlay the chat ready: bla bla standard attaak text + [HIT]

I have used both extensions for a long time without any problems, it was only when I updated to the latest live version and updated extensions it did not work anymore.
It might be something in Kels extension since he has not updated it yet, but I don`t think I can test that in any way.

bmos
April 15th, 2021, 19:42
This time I swear I actually have a conflict issue. It is between Kels full overlay extension and your latest ammunition manager extension.
I get no error messages, but when I roll an attack vs an enemy it does not say hit by xx anymore.
When I only load you ammunition manager the chat reads: bla bla standard attack text + [HIT] [by 15+]
When I only load ammunition manager + full overlay the chat ready: bla bla standard attaak text + [HIT]

I have used both extensions for a long time without any problems, it was only when I updated to the latest live version and updated extensions it did not work anymore.
It might be something in Kels extension since he has not updated it yet, but I don`t think I can test that in any way.My extension requires curent FG ruleset version. Kel's is not compatible with this ruleset version. Therefore not compatible with Kel's extension at this time.

I have configured this extension so Kel will very easily be able to make it compatible once that extension is updated.

Svandal
April 15th, 2021, 20:12
My extension requires curent FG ruleset version. Kel's is not compatible with this ruleset version. Therefore not compatible with Kel's extension at this time.

I have configured this extension so Kel will very easily be able to make it compatible once that extension is updated.

Nice.

Svandal
April 26th, 2021, 18:57
I posted an incompatible issue between this extension and Kels fulloverlay extension. Report is in this thread:
https://www.fantasygrounds.com/forums/showthread.php?50895-Kelrugem-s-extensions/page35

kevininrussia
April 27th, 2021, 18:46
Build 1.15 4E ruleset. I noticed that when last ammunition is used "Attacking without the required ammunition" is displayed on the PC Client chat but not the GM. Is that by design? This is also the case on ammunition recovery. "Recovered 4 pieces of ammunition" is displayed on the client chat but not GM.

bmos
April 27th, 2021, 18:58
Build 1.15 4E ruleset. I noticed that when last ammunition is used "Attacking without the required ammunition" is displayed on the PC Client chat but not the GM. Is that by design? This is also the case on ammunition recovery. "Recovered 4 pieces of ammunition" is displayed on the client chat but not GM.

Reuploaded. Hopefully it fixes that. Thanks!

Ilsensine
June 2nd, 2021, 08:48
Hello bmos,

for using an extension, does only the GM need to install the extension or does everybody that plays the campaign does have to install the extension?

bmos
June 2nd, 2021, 11:45
Hello bmos,

for using an extension, does only the GM need to install the extension or does everybody that plays the campaign does have to install the extension?Installing extensions is just for GMs. Players can't install them.
EDIT: just to clarify, players can put the ext in the folder of course but you only load the ext file when you are creating or loading a campaign. When players connect to a host, their clients load the relevant extensions from the host automatically.

Ilsensine
June 2nd, 2021, 11:55
Many thanks for the answer! :-)

Kelrugem
August 11th, 2021, 10:36
Yes, I can try to add that when my stuff settled down (I try to finish my thesis this month actually, hence, a looot to do right now :) ). Funnily, some parts of it are also already in my prototype stuff, I started with that, too, a bit :) So, thanks :D

Oopsi, I think I forgot something :D

bmos
August 11th, 2021, 11:51
Oopsi, I think I forgot something :DHard to keep track of all those ideas!
I wonder what else we have missed :D

Kelrugem
August 11th, 2021, 12:07
Hard to keep track of all those ideas!
I wonder what else we have missed :D

hehe, yes :D Thankfully Sudain made me aware of that I forgot the blind fight stuff :D

bmos
August 11th, 2021, 16:50
Hard at work on next Ammunition Manager update:
48650

Finally getting around to decrementing ammo from inventory.

EDIT: here is the first public build. tell me what I have broken! ;)

Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.0 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.0)
* Lots of code improvement and simplification.
* Opening PFRPG/3.5E ranged weapon details screen (magnifying glass button) now allows linking an inventory item with the subtype "Ammunition" or "Ammo" to the weapon. Attacks made with this weapon will decrement the count of that inventory item. If the name in this field doesn't match any inventory item, old behavior of this extension will be used.
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v1.16...v2.0)

EDIT2: here is a new video which includes the new feature:

https://www.youtube.com/watch?v=ORv6Ild71ek

Zygmunt Molotch
August 13th, 2021, 05:29
I do like how if it's not linked, it reverts to ticking off the count, thats a good fallback!

bmos
August 13th, 2021, 11:32
I do like how if it's not linked, it reverts to ticking off the count, thats a good fallback!
Thanks :) Hopefully I'll have a chance next week to implement an ammo counter.

EDIT: just posted v2.1 which improves the UI
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.1 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.1)
* Revise labels and tooltips to improve intuitiveness
* Change ammo search box into a dropdown list of all options
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.0...v2.1)
48686

bmos
August 15th, 2021, 15:38
Can someone with 4E data take a screenshot of the item sheet for an arrow? I need to know what "Class" and "Subclass" are used for ammunition.
EDIT: I have posted a new build that works in 4E if Class is Ammo or Ammunition:
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.2 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.2)
* Substantial reduction in redundant code between 4E and PFRPG (at least 80 lines).
* Implement item tracking in 4E ruleset. Class of the desired ammunition item should be set to Ammunition or Ammo.
* Increase height of ammo picker list to match neighboring number fields (all rulesets).
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.1...v2.2)
EDIT: if you have already downloaded Ammunition Manager v2.2 as of Aug 15 at 1:03pm, please redownload. I had uploaded the wrong ext version.

Also:

I'm starting to plan out how I could make this work for NPCs as well.
The main issue I'm seeing is that an NPC could have multiple ranged attacks and there isn't an obvious way to keep ammunition separate for each weapon like we have for PCs.
Thoughts?

bmos
August 15th, 2021, 20:37
Up next: SFRPG support :D

EDIT:
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.3-hotfix.1 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.3-hotfix.1)
* Code improvements
* Ammo is once again tracked via checkboxes. To reload quiver, double-click on max ammo counter.
* Excess recovered ammo added to inventory item.
* Starfinder is now a supported ruleset, but it might need updates to handle game mechanics better (I am not familiar with them). No hit margin tracking has been added to SFRPG.
* HOTFIX: issue with Starfinder attacks not being resolved vs target.
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.2...v2.3-hotfix.1)

I'll find time soon to post another video explaining the UI and features.
EDIT: new Ammunition Manager video coming out later this morning (once it uploads and processes):

https://youtu.be/luAgwIrQ-JE

EDIT2: also 5E is now supported:
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.4-hotfix.2 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.4-hotfix.2)
* 5E now a supported ruleset!
* HOTFIX: for issue with Starfinder attacks not being resolved vs target.
* HOTFIX: if a weapon was created for a character that had no inventory items, a script error could occur.
* HOTFIX: ruleset-specific loadaction items
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.3-hotfix.1...v2.4-hotfix.2)

Khoredran
August 15th, 2021, 22:47
I'm starting to plan out how I could make this work for NPCs as well.
The main issue I'm seeing is that an NPC could have multiple ranged attacks and there isn't an obvious way to keep ammunition separate for each weapon like we have for PCs.
Thoughts?

Maybe an additional field for ammunition in the NPC main sheet that works the same way than the PC version, and that recognizes which weapon is used in the Attack field (and the combat tracker one too?). Maybe a drop down list of which ammunition is used so we can select the ones we want to use and that is automatically populated by recognizing precise keywords in the NPC's inventory. Ex: Arrows (12), Bolts (8)
The parenthesis number would be picked up and it would tick down in the dropdown menu when used as ammunition.

A (-none-) option in the dropdown menu could be used when the NPC attacks with a melee weapon. Only when the corresponding ammunition would be used will it lower.

I don't know how it would be feasible, but they are my thoughts about how I would like to use it easily with my friendly npc's that have limited ammos!

Rivanknight220
August 19th, 2021, 20:59
Thank you for making this compatible with 5E! Having said that, would it be possible to make it where you could change the recovery option from misses to expended? 5E rules state you get back 50% of expended ammo after an encounter.

bmos
August 19th, 2021, 21:34
Thank you for making this compatible with 5E! Having said that, would it be possible to make it where you could change the recovery option from misses to expended? 5E rules state you get back 50% of expended ammo after an encounter.Thanks for pointing that out! I'll make it do that instead when used with 5E.

bmos
August 19th, 2021, 22:21
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.5 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.5)
* 5E now counts arrows shot rather than arrows that miss (as per 5e rules). Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.
* 4E now rebuilds ammo picker list whenever weapon details are expanded.
* 4E now counts ammo correctly even if weapon is fired through a linked power (requires "Power: Show item used" to be enabled). Thanks to kevininrussia (https://www.fantasygrounds.com/forums/member.php?32545-kevininrussia) for reporting this bug.
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.4-hotfix.2...v2.5)

Rivanknight220
August 20th, 2021, 01:00
* 5E now counts arrows shot rather than arrows that miss (as per 5e rules). Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.


I really appreciate you implementing my suggestion so quickly! My only question now is should the ammunition section of the weapon track the number of shots? I tested it out and that field stayed blank after rolling an attack a few times. Thanks again!

bmos
August 20th, 2021, 01:48
I really appreciate you implementing my suggestion so quickly! My only question now is should the ammunition section of the weapon track the number of shots? I tested it out and that field stayed blank after rolling an attack a few times.I think you might be misunderstanding how it works. maxammo (the number field) being set to 0 turns off ammo tracking. This should be set to the capacity of the character's quiver. Then it checks off attacks until the quiver is empty and then begins blocking attacks (because of lack of ammo). From there, you can recover ammo or just double-click the maxammo field to reload from the inventory.

Rivanknight220
August 20th, 2021, 02:08
I think you might be misunderstanding how it works. maxammo (the number field) being set to 0 turns off ammo tracking. This should be set to the capacity of the character's quiver. Then it checks off attacks until the quiver is empty and then begins blocking attacks (because of lack of ammo). From there, you can recover ammo or just double-click the maxammo field to reload from the inventory.

Apologies for not being clear. When I watched your YouTube video, I saw that in the details of the weapon itself, it was tracking the number of misses based off the attack rolls. My question is can it do the same for shots fired in total because as it stands right now when I do attacks, it marks off the ammo but the Shots field in the details of the weapon stays blank. I've attached a screenshot to show what I'm seeing. Three attacks, three bolts marked off but a blank Shots field.

I hope this gives you better information. Thanks again!

bmos
August 20th, 2021, 11:36
Apologies for not being clear. When I watched your YouTube video, I saw that in the details of the weapon itself, it was tracking the number of misses based off the attack rolls. My question is can it do the same for shots fired in total because as it stands right now when I do attacks, it marks off the ammo but the Shots field in the details of the weapon stays blank. I've attached a screenshot to show what I'm seeing. Three attacks, three bolts marked off but a blank Shots field.

I hope this gives you better information. Thanks again!

hmm. are you using other extensions?
For me that is working.

Rivanknight220
August 20th, 2021, 14:37
hmm. are you using other extensions?
For me that is working.

Yeah, I have quite a few from the Forge. I tried a plain campaign with just yours and it worked so now I have to figure out which one isn't playing nice. In the process of doing that testing I did stumble on something else. The checkmark counter is double counting for me. When I trigger the attack by either double clicking or dragging the dice to the chat it checks one off and then when the result of the attack shows up in chat it checks another off. It counts correctly in the Shots box of the weapon details. Apologies for being such a bother!

bmos
August 20th, 2021, 17:04
Yeah, I have quite a few from the Forge. I tried a plain campaign with just yours and it worked so now I have to figure out which one isn't playing nice. In the process of doing that testing I did stumble on something else. The checkmark counter is double counting for me. When I trigger the attack by either double clicking or dragging the dice to the chat it checks one off and then when the result of the attack shows up in chat it checks another off. It counts correctly in the Shots box of the weapon details. Apologies for being such a bother!Not at all, I really appreciate feedback--especially for new rulesets.
It looks like 5E counts off ammo on its own, so I can just remove my code that does that in 5E.

EDIT: pushed fix to Forge

graphil
August 21st, 2021, 11:53
The 5e version of ammo manager works well so thanks for that. I've also had a play with it in 3.5e and is going to be a great help there as well.

One for the wishlist and not sure if even possible. When you select the ammo type you are using (perhaps been normal ammo and +1) then the effect of the ammo applies to the attack and damage.

bmos
August 21st, 2021, 14:44
The 5e version of ammo manager works well so thanks for that. I've also had a play with it in 3.5e and is going to be a great help there as well.

One for the wishlist and not sure if even possible. When you select the ammo type you are using (perhaps been normal ammo and +1) then the effect of the ammo applies to the attack and damage.That is something I would like to add eventually, but it gets kind of complicated since magic/special ammo rules are quite different between rulesets. At the very least I should be able to add bonus to attack/damage.
I have now added it to the issue tracker (https://github.com/bmos/FG-Ammunition-Manager/issues).

nephranka
August 22nd, 2021, 14:26
I found the shots in 5e are not counting when you also have kent's automatic halfing luck extension loaded. Any chance the conflict could be resolved?

nephranka
August 22nd, 2021, 14:44
Looks like another ext is also in conflict. Xelab's combat automation.

These silent failures are tough to track down.

nephranka
August 22nd, 2021, 15:10
Ok...now this is getting crazy. I found a 3rd ext. Kent's automatic mirror images ext.

nephranka
August 22nd, 2021, 15:34
Finally, I think I located the last conflict. SlientRuin's generic actions ext.

bmos
August 22nd, 2021, 20:57
Finally, I think I located the last conflict. SlientRuin's generic actions ext.yeah, that is the issue with extensions that overwrite onAttack.
I have designed this so it's incredibly simple to add compatibility to other extensions when required:
https://www.fantasygrounds.com/forums/showthread.php?68831-Better-Combat-Effects&p=616214&viewfull=1#post616214


But, I also seem to have overlooked an obvious way to add compatibility on my end! This should fix SilentRuin's extension and hopefully the others too!

Unfortunately, my Forge access is down at the moment so you'll have to wait to get the automatic update (although I'll post a version on GitHub later today).

EDIT: here it is
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.6-hotfix.1 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.6-hotfix.1)
* 5E no longer double-counts ammo before/after attacking. Attacks no longer allowed if no remaining ammo. Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.
* Ammunition items in inventory that are not carried or equipped will no longer be included in ammo selection list. Thanks to nephranka (https://www.fantasygrounds.com/forums/member.php?44791-nephranka) for suggesting this.
* HOTFIX: Improve compatibility with other extensions by replacing ActionAttack.onAttack with appropriate version on load (for other extensions that call the previous one).
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.5...v2.6-hotfix.1)

EDIT 2: this should also fix compatibility with Better Combat Effects, although I haven't tested it myself.

kevininrussia
August 22nd, 2021, 23:56
yeah, that is the issue with extensions that overwrite onAttack.
I have designed this so it's incredibly simple to add compatibility to other extensions when required:
https://www.fantasygrounds.com/forums/showthread.php?68831-Better-Combat-Effects&p=616214&viewfull=1#post616214


But, I also seem to have overlooked an obvious way to add compatibility on my end! This should fix SilentRuin's extension and hopefully the others too!

Unfortunately, my Forge access is down at the moment so you'll have to wait to get the automatic update (although I'll post a version on GitHub later today).

EDIT: here it is
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.6-hotfix.1 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.6-hotfix.1)
* 5E no longer double-counts ammo before/after attacking. Attacks no longer allowed if no remaining ammo. Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.
* Ammunition items in inventory that are not carried or equipped will no longer be included in ammo selection list. Thanks to nephranka (https://www.fantasygrounds.com/forums/member.php?44791-nephranka) for suggesting this.
* HOTFIX: Improve compatibility with other extensions by replacing ActionAttack.onAttack with appropriate version on load (for other extensions that call the previous one).
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.5...v2.6-hotfix.1)

EDIT 2: this should also fix compatibility with Better Combat Effects, although I haven't tested it myself.

Does this hotfix fix the issue with 4e power attacks? I will be able to test BCE when Ammunition Manager gets on the forge so I can update it.

nephranka
August 23rd, 2021, 00:12
Thanks!

This has appeared to resolved the conflicts.

nephranka
August 23rd, 2021, 00:20
Thanks!

This has appeared to resolved the conflicts.

So I spoke too fast. The conflicts are resolved but the "5E no longer double-counts ammo before/after attacking." is still happenning.

nephranka
August 23rd, 2021, 00:52
So I spoke too fast. The conflicts are resolved but the "5E no longer double-counts ammo before/after attacking." is still happenning.

Update: It does appear to be tied to the two chat outputs that come from the attack. Example:

[ATTACK (R)] Crossbow [EFFECTS 1d4]
Attack [19] -> [at Adult Black Dragon] [HIT]

The 1st line gives one check and the second line gives another.

I found that it seems to be in a conflict with Automatic Flanking and Range- Extension v2.1\r5E version for Fantasy Grounds\r--by Kent McCullough 2020

bmos
August 23rd, 2021, 12:18
Does this hotfix fix the issue with 4e power attacks? I will be able to test BCE when Ammunition Manager gets on the forge so I can update it.

I believe I fixed attacking with powers in v2.5, but it requires that option to be turned on to show focus items.

bmos
August 23rd, 2021, 12:55
Update: It does appear to be tied to the two chat outputs that come from the attack. Example:

[ATTACK (R)] Crossbow [EFFECTS 1d4]
Attack [19] -> [at Adult Black Dragon] [HIT]

The 1st line gives one check and the second line gives another.

I found that it seems to be in a conflict with Automatic Flanking and Range- Extension v2.1\r5E version for Fantasy Grounds\r--by Kent McCullough 2020Just to confirm, you're saying they double-count when also using Auto Flank and Range?

EDIT: unfortunately since I don't have that paid extension, I can only make assumptions about what is happening. the fix I did last night for onAttack will not work in this case.
I have sent kent a message to try and resolve the incompatibility.

nephranka
August 23rd, 2021, 13:44
Just to confirm, you're saying they double-count when also using Auto Flank and Range?

EDIT: unfortunately since I don't have that paid extension, I can only make assumptions about what is happening. the fix I did last night for onAttack will not work in this case.
I have sent kent a message to try and resolve the incompatibility.

Yes. When I only have this ext and the range & flanking ext loaded you get the dbl-count.

Sadly, I think Kent has been out for a while with no return stated. This is a fairly big deal for me since I have a lot of ranged pcs and keeping track of all that comes with that is a big help, so the range & flanking ext is essential for my table.

kevininrussia
August 23rd, 2021, 19:23
I believe I fixed attacking with powers in v2.5, but it requires that option to be turned on to show focus items.

After a bunch of testing I think I figured out the bug when using a power to roll the ranged weapon attack. If the weapon is named "Crossbow" it works but "Hand Crossbow" does not. Also if the weapon has a name "Skikara Foe Seeker Longbow" it will not work but "Longbow" does work.

nephranka
August 23rd, 2021, 22:03
Found another extension with the conflict causing the dbl-count, Advanced Effects - 5E v4.9\rby Celestian, 2017-2020. This one is free so hopefully there is a fix that is possible. I looked for the ext file but it must be in the vault.

bmos
August 23rd, 2021, 22:12
Found another extension with the conflict causing the dbl-count, Advanced Effects - 5E v4.9\rby Celestian, 2017-2020. This one is free so hopefully there is a fix that is possible. I looked for the ext file but it must be in the vault.

Celestian has a GitHub (I've contributed to it before). I have submitted a compatibility patch there. You can see the modified file here (https://github.com/bmos/FG-PFRPG-Advanced-Effects/blob/patch-1/campaign/scripts/char_weapon_adnd.lua) and the changes I made can be seen here (https://github.com/bmos/FG-PFRPG-Advanced-Effects/commit/1f4dd3c5c3371e329bb33292110cb3f54989e6c0).


After a bunch of testing I think I figured out the bug when using a power to roll the ranged weapon attack. If the weapon is named "Crossbow" it works but "Hand Crossbow" does not. Also if the weapon has a name "Skikara Foe Seeker Longbow" it will not work but "Longbow" does work.Ah! I will try to re-write that to be able to handle spaces.

kevininrussia
August 23rd, 2021, 22:29
Ah! I will try to re-write that to be able to handle spaces.

Thanks!

bmos
August 23rd, 2021, 22:39
Thanks!

Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.6-hotfix.2 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.6-hotfix.2)
* 5E no longer double-counts ammo before/after attacking. Attacks no longer allowed if no remaining ammo. Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.
* Ammunition items in inventory that are not carried or equipped will no longer be included in ammo selection list. Thanks to nephranka (https://www.fantasygrounds.com/forums/member.php?44791-nephranka) for suggesting this.
* HOTFIX: Improve compatibility with other extensions by replacing ActionAttack.onAttack with appropriate version on load (for other extensions that call the previous one).
* HOTFIX: Improve weapon detection for 4e powers (no longer gets confused by spaces or punctuation in weapon names).
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.5...v2.6-hotfix.2)

nephranka
August 23rd, 2021, 22:46
Celestian has a GitHub (I've contributed to it before). I have submitted a compatibility patch there. You can see the modified file here (https://github.com/bmos/FG-PFRPG-Advanced-Effects/blob/patch-1/campaign/scripts/char_weapon_adnd.lua) and the changes I made can be seen here (https://github.com/bmos/FG-PFRPG-Advanced-Effects/commit/1f4dd3c5c3371e329bb33292110cb3f54989e6c0).

Ah! I will try to re-write that to be able to handle spaces.

That is great news!

Thanks!

kevininrussia
August 24th, 2021, 00:15
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.6-hotfix.2 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.6-hotfix.2)
* 5E no longer double-counts ammo before/after attacking. Attacks no longer allowed if no remaining ammo. Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.
* Ammunition items in inventory that are not carried or equipped will no longer be included in ammo selection list. Thanks to nephranka (https://www.fantasygrounds.com/forums/member.php?44791-nephranka) for suggesting this.
* HOTFIX: Improve compatibility with other extensions by replacing ActionAttack.onAttack with appropriate version on load (for other extensions that call the previous one).
* HOTFIX: Improve weapon detection for 4e powers (no longer gets confused by spaces or punctuation in weapon names).
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.5...v2.6-hotfix.2)

How long usually does it take for updates to be distributed from Forge? I'm seeing a readout of v2.6 but the hotfixes dont seem to be applied yet.

bmos
August 24th, 2021, 01:00
How long usually does it take for updates to be distributed from Forge? I'm seeing a readout of v2.6 but the hotfixes dont seem to be applied yet.
As previously mentioned, I have not had access to Forge for a few days now (https://www.fantasygrounds.com/forums/showthread.php?70180-Manage-Craft-page-not-loading) so Forge updates will be delayed:


Unfortunately, my Forge access is down at the moment so you'll have to wait to get the automatic update (although I'll post a version on GitHub later today).

Hopefully this issue will get resolved soon! In the meantime try downloading from Github and installing in extensions folder.

bmos
August 24th, 2021, 04:03
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.6-hotfix.3 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.6-hotfix.3)
* 5E no longer double-counts ammo before/after attacking. Attacks no longer allowed if no remaining ammo. Thanks to Rivanknight220 (https://www.fantasygrounds.com/forums/member.php?200660-Rivanknight220) for pointing this out.
* Ammunition items in inventory that are not carried or equipped will no longer be included in ammo selection list. Thanks to nephranka (https://www.fantasygrounds.com/forums/member.php?44791-nephranka) for suggesting this.
* HOTFIX: Improve compatibility with other extensions by replacing ActionAttack.onAttack with appropriate version on load (for other extensions that call the previous one).
* HOTFIX: Improve weapon detection for 4e powers (no longer gets confused by spaces or punctuation in weapon names).
* HOTFIX: Improve weapon detection for 4e powers (no longer gets confused by additional tags like [BLINDED] or [EFFECTS-4]).
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.5...v2.6-hotfix.3)

Rivanknight220
August 27th, 2021, 15:30
Yes. When I only have this ext and the range & flanking ext loaded you get the dbl-count.

Sadly, I think Kent has been out for a while with no return stated. This is a fairly big deal for me since I have a lot of ranged pcs and keeping track of all that comes with that is a big help, so the range & flanking ext is essential for my table.

I also use this extension and am getting the same issue. I wish there was a way to gift in the Forge because I would totally gift bmos this so he could figure it out...

bmos
August 27th, 2021, 16:37
I also use this extension and am getting the same issue. I wish there was a way to gift in the Forge because I would totally gift bmos this so he could figure it out...
Thanks all the same, but nephranka already got me the info I needed.

Here is the fix:
open AutomaticFlankingAndRange.ext\campaign\scripts\cha r_weapon_afar.lua
replace everything from "function customOnAttackAction" to the end of the file with:

function customOnAttackAction(draginfo)
--Debug.chat("my customOnAttackAction");
local nodeWeapon = getDatabaseNode();
local nodeChar = nodeWeapon.getChild("...")

-- Build basic attack action record
local rAction = CharWeaponManager.buildAttackAction(nodeChar, nodeWeapon);

-- bmos removing redundant ammo counting
-- for compatibility with ammunition tracker, make this change in your char_weapon.lua
-- this if section replaces the commented out line above: "CharWeaponManager.decrementAmmo(nodeChar, nodeWeapon);"
if not AmmunitionManager then
CharWeaponManager.decrementAmmo(nodeChar, nodeWeapon);
end
-- end bmos removing redundant ammo counting

-- Perform action
local rActor = ActorManager.resolveActor(nodeChar);
-- ActionAttack.performRoll(draginfo, rActor, rAction);
-- return true;

-- kent adding itemPath to rActor so that when effects are checked we can
-- make compare against action only effects
local _, sRecord = DB.getValue(nodeWeapon, "shortcut", "", "");
rActor.itemPath = sRecord;
-- end kent adding itemPath to rActor so that when effects are checked we can

-- bmos only allowing attacks when ammo is sufficient
-- for compatibility with ammunition tracker, make this change in your char_weapon.lua
-- this if section replaces the two commented out lines above:
-- "ActionAttack.performRoll(draginfo, rActor, rAction);" and "return true;"
local nMaxAmmo = DB.getValue(nodeWeapon, 'maxammo', 0)
local nMaxAttacks = nMaxAmmo - DB.getValue(nodeWeapon, 'ammo', 0)
if not AmmunitionManager or (not (nMaxAmmo > 0) or (nMaxAttacks >= 1)) then
ActionAttack.performRoll(draginfo, rActor, rAction);
return true;
else
ChatManager.Message(Interface.getString("char_message_atkwithnoammo"), true, rActor);
end
-- end bmos only allowing attacks when ammo is sufficient
end

nephranka
August 27th, 2021, 16:50
Thanks bmos!

This did totally fix that issue with range & flanking. Had a few more to resolve but it is all working now.

Rivanknight220
August 27th, 2021, 16:54
Worked like a charm. A thousand thank yous good sir!

bmos
August 27th, 2021, 17:13
Thanks bmos!

This did totally fix that issue with range & flanking. Had a few more to resolve but it is all working now.If you feel comfortable doing so you can share any compatibility patches for other currently un-maintained extensions here in my thread.

nephranka
August 27th, 2021, 17:31
If you feel comfortable doing so you can share any compatibility patches for other currently un-maintained extensions here in my thread.

Totally.

In this case your fixes caught most of the others accept for Advanced effects. Once I used your link to the suggested fix (early in the thread) I was able to fold it into the advanced effects ext while we are waiting for celestian to accept the code. He did respond that he is busy with work stuff, so it might be awhile. Either way, you code worked. So, if you have the most recent version of this ext, the fix for range & flanking, and the advance effects fix then that should cover most issues. I run like 99 exts so I have a good test bed ;P

TheoGeek
September 3rd, 2021, 23:32
Just trying out the extension and I really like the idea! One thing though, it seems like you use the onAttack function? My Nat20 extension does too, but if you don't call the normal onAttack action it bypasses all the Nat20 code. I could try a loadorder change to see if that helps, but your extension looks like it loads in the vault so I can't debug it.

Thanks!

bmos
September 4th, 2021, 00:53
Just trying out the extension and I really like the idea!
Glad you like it and thanks for letting me know about this issue.

it seems like you use the onAttack function? My Nat20 extension does too, but if you don't call the normal onAttack action it bypasses all the Nat20 code.Because of the "hit margin tracking" feature, I need access to some numbers only accessible from inside that function.

your extension looks like it loads in the vault so I can't debug it.Check the first post. All of my code is freely available on GitHub for collaboration, modification, and debugging. If you look at my onAttack function, I have separated out some "compatibility blocks" that make adding support to other extensions easy. Just change this line in your onAttack function:

Comm.deliverChatMessage(rMessage);

to this:

-- bmos adding hit margin tracking
-- for compatibility with ammunition tracker, add this here in your onAttack function
if AmmunitionManager then
local nHitMargin = AmmunitionManager.calculateMargin(nDefenseVal, rAction.nTotal)
if nHitMargin then table.insert(rAction.aMessages, "[BY " .. nHitMargin .. "+]") end
end
-- end bmos adding hit margin tracking

Comm.deliverChatMessage(rMessage);

-- bmos adding automatic ammunition ticker and chat messaging
-- for compatibility with ammunition tracker, add this here in your onAttack function
if AmmunitionManager and ActorManager.isPC(rSource) then AmmunitionManager.ammoTracker(rSource, rRoll.sDesc, rAction.sResult, true) end
-- end bmos adding automatic ammunition ticker and chat messaging

If your extension calls the previous onAttack (doesn't need to overwrite it), you can just load after mine (although I don't have a loadorder defined right now). Let me know if a loadorder is necessary to help improve compatibility with your extension.

TheoGeek
September 4th, 2021, 04:16
Thanks bmos...I'll look into that. I think the issue for me right off the bat is that I don't have a "copy" of the onAttack function in my extension, I simply set a local array tracker for a nat20, call the original onAttack, and then generate the message for display. Because of that, I don't have visibility to the rAction struct, and pasting your code into mine wouldn't work.

In my Nat20 extension, I replaced:



ActionAttack.Nat20_Original_onAttack(rSource, rTarget, rRoll)


... with ...



if AmmunitionManager then
AmmunitionManager.onAttack_5e(rSource, rTarget, rRoll)
else
ActionAttack.Nat20_Original_onAttack(rSource, rTarget, rRoll)
end


but it looks like the Nat20 onAttack isn't even executed if your extension loads after mine, so I also changed the loadorder of Nat20 to "51" and that seems to have fixed things.

I'll do some more testing and update Nat20 if everything goes well.

Thanks!

TheoGeek
September 4th, 2021, 04:23
Ooh...also, since I saw some "suggestions" ... :)

How hard would it be to automatically equip and unequip ammo when loaded or unloaded? :) It would play well with AutomaticEffects that way.

Thanks for the cool extension!

bmos
September 4th, 2021, 12:35
I also changed the loadorder of Nat20 to "51" and that seems to have fixed things.Probably that is all you have to do so you can change the line ActionAttack.Nat20_Original_onAttack(rSource, rTarget, rRoll) back to how it was.


How hard would it be to automatically equip and unequip ammo when loaded or unloaded? :) It would play well with AutomaticEffects that way.Thanks! That's a great starting point for the magic ammo automation I was planning. I hadn't even thought about using Advanced Effects.

TheoGeek
September 4th, 2021, 17:04
Probably that is all you have to do so you can change the line ActionAttack.Nat20_Original_onAttack(rSource, rTarget, rRoll) back to how it was.

Yup, that was all I needed...gonna upload a new version as soon as I get back to my PC!


Thanks! That's a great starting point for the magic ammo automation I was planning. I hadn't even thought about using Advanced Effects.

It would also be sweet, while you are thinking about it, to somehow figure out how to get it so that ammo is tied to the weapon by name or something. That may be a bit trickier. Like if a person had 2 hand crossbows but only one of them had magic bolts - the bonus should only be for that one crossbow.

But you needed something more to do, right? :)

Thanks again!

bmos
September 4th, 2021, 21:19
It would also be sweet, while you are thinking about it, to somehow figure out how to get it so that ammo is tied to the weapon by name or something. That may be a bit trickier. Like if a person had 2 hand crossbows but only one of them had magic bolts - the bonus should only be for that one crossbow.Ah, yeah. that would be the limitation.
I'll go back to planning to re-implement the way I was planning (using the ammo selected in the weapon details to check ammo item for enhancement bonus).
Not sure how I'll do flaming/etc but I'll figure it out eventually.

TheoGeek
September 6th, 2021, 06:57
hmmm...getting this error in the latest hotfix (new 5E campaign with no other extensions loaded):

"[ERROR] Failed script initialization (AmmunitionManager): [string "scripts/manager_ammunition.lua"]:7: attempt to index global 'User' (a nil value)"

Any thoughts?

TheoGeek
September 6th, 2021, 08:17
I downloaded the code from github and, on a flyer, changed the setting of sRuleset to just "" in the global context and moved setting it to User.getRulesetName() to the onInit() function.

That seemed to fix it.

bmos
September 6th, 2021, 11:46
I downloaded the code from github and, on a flyer, changed the setting of sRuleset to just "" in the global context and moved setting it to User.getRulesetName() to the onInit() function.

That seemed to fix it.

Thanks
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.6-hotfix.5 (https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v2.6-hotfix.5)
* HOTFIX: Fix INFAMMO effect not working and support INFAMMO in 5E
* HOTFIX: script error fix supplied by TheoGeek (https://www.fantasygrounds.com/forums/member.php?35127-TheoGeek)
Click here to see raw code changes (https://github.com/bmos/FG-Ammunition-Manager/compare/v2.6-hotfix.3...v2.6-hotfix.5)

kevininrussia
September 19th, 2021, 05:03
4E. I noticed thrown dagger ammo is not being deducted when used.

Would it be possible to add "Wand" to the weapon list? I was thinking I could track charges.

bmos
September 19th, 2021, 15:58
4E. I noticed thrown dagger ammo is not being deducted when used.

Would it be possible to add "Wand" to the weapon list? I was thinking I could track charges.See first post for easy way to add additional weapons for your campaign.
Have you tested with just this extension loaded?

kevininrussia
September 19th, 2021, 16:39
See first post for easy way to add additional weapons for your campaign.
Have you tested with just this extension loaded?

I remember I could edit the extension file to add weapons, but I am getting it from Forge and its put in the vault. Is there another way to edit this weapon list?

I am testing with just this extension loaded. I noticed Javelin is not working also. I should note, this deduction is not working with using a power on the Powers tab. When rolling off the Combat tab for the item, it works. Same with "Wand". Works from Combat Tab, not with Power. Other weapons like Bows work correctly on both the Combat tab and Powers.

https://i.imgur.com/A34K8hw.jpg
https://i.imgur.com/LtZJMYi.jpg

bmos
September 19th, 2021, 17:14
I remember I could edit the extension file to add weapons, but I am getting it from Forge and its put in the vault. Is there another way to edit this weapon list?Oops, looks like I hadn't posted the "Custom Weapons" ext file for this extension yet. Check the first post again :)

I should note, this deduction is not working with using a power on the Powers tab. When rolling off the Combat tab for the item, it works.
Same with "Wand". Works from Combat Tab, not with Power. Other weapons like Bows work correctly on both the Combat tab and Powers.I'll look into it. Would appreciate a zipped campaign if possible.

kevininrussia
September 19th, 2021, 17:49
Oops, looks like I hadn't posted the "Custom Weapons" ext file for this extension yet. Check the first post again :)
I'll look into it. Would appreciate a zipped campaign if possible.

Sure, I will get you a zip today. Where should I send it?

Beemanpat
September 20th, 2021, 08:05
Celestian has a GitHub (I've contributed to it before). I have submitted a compatibility patch there. You can see the modified file here (https://github.com/bmos/FG-PFRPG-Advanced-Effects/blob/patch-1/campaign/scripts/char_weapon_adnd.lua) and the changes I made can be seen here (https://github.com/bmos/FG-PFRPG-Advanced-Effects/commit/1f4dd3c5c3371e329bb33292110cb3f54989e6c0).

Just so I can understand(abit of a noob here), do I need to follow those links to get to get script to modify or is it big done in upcoming version release of Advance Effects or Ammunitions Manager exts?

thanks in advance

bmos
September 20th, 2021, 11:54
I can't speak to Celestian's plans. I have submitted the code you can see at those links and now the ball is in their court.

In terms of patching your copy until that happens, you need to open the .ext file (it's secretly a zip file so you can open with 7-zip, WinRAR, etc) and find that file and change the lines shown in red to match the lines shown in green.

bmos
September 20th, 2021, 15:55
deduction is not working with using a power on the Powers tab
So what is occurring here seems to be an issue with your power.
When you roll Howling Strike, it outputs to chat as a melee attack.

Regarding the other issue you reported where you couldn't recover ammo, it seems I have already fixed this in my local copy.
I finished up the UI stuff I was working on and have posted v2.7:
Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.7 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.7)
* Reloading, loading, and recovering ammo are now performed via clicking buttons rather than double-clicking text fields.
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.6-hotfix.5...v2.7)

bmos
September 22nd, 2021, 12:15
deduction is not working with using a power on the Powers tab
Here is your issue, although the description of that power does say it's for melee not ranged:
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=49231&d=1632309264

bmos
September 24th, 2021, 23:58
New demo video to help explain the new UI:
https://youtu.be/RAzqDLXPidA

kevininrussia
September 25th, 2021, 06:40
4E question.

When adding a new ammunition type to the inventory, I wont see the new ammunition item listed in the dropdown. I have to exit then reload the campaign to see the item in the dropdown. Is there a way to force an update with out having to exit?

https://i.imgur.com/yM0beSS.png

DCrumb
September 25th, 2021, 07:50
Try using the /reload command in chat.

bmos
September 25th, 2021, 15:48
4E question.

When adding a new ammunition type to the inventory, I wont see the new ammunition item listed in the dropdown. I have to exit then reload the campaign to see the item in the dropdown. Is there a way to force an update with out having to exit?Just close weapon details and re-open.

kevininrussia
September 25th, 2021, 20:30
Just close weapon details and re-open.

Thank you!

nephranka
September 27th, 2021, 12:11
I did notice the reload button is appearing on all weapons as well as the recovery area in the weapons details. Is the working as intended?

bmos
September 27th, 2021, 12:25
I did notice the reload button is appearing on all weapons as well as the recovery area in the weapons details. Is the working as intended?Nope, must be an issue with ranged item detection in 4E.
I'll take a look. Thanks.
EDIT: I meant to say 5e

EDIT2: posted fix:

Ammunition Manager (https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager) v2.7-hotfix.1 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v2.7-hotfix.1)
* HOTFIX: 5E UI buttons were shown for melee weapons. Now just for ranged/thrown. Thanks to nephranka (https://www.fantasygrounds.com/forums/member.php?44791-nephranka) for reporting.
* HOTFIX: When finding weapon node, only ranged weapons are allowed. This should fix potential issue of "double weapons" like daggers (which can be ranged or melee) not having ammunition tracked.
Click here to see raw code changes (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/compare/v2.7...v2.7-hotfix.1)

nephranka
September 27th, 2021, 13:08
No worries. I am in 5e in case that matters. I do not know if it happens in 4e.

nephranka
October 6th, 2021, 01:45
I found another conflict with an extension. At first I did not see this ext left the old one behind in the ext folder so I had 2 version running, which I thought was my problem. Once I cleaned that up the issue of the "reload" button on all weapons was still present. It looks like it is colliding with the Advance Effects ext.

bmos
October 6th, 2021, 01:55
I found another conflict with an extension. At first I did not see this ext left the old one behind in the ext folder so I had 2 version running, which I thought was my problem. Once I cleaned that up the issue of the "reload" button on all weapons was still present. It looks like it is colliding with the Advance Effects ext.I pushed an update. Let me know if it fixes it.
For some reason Celestian overwrites the whole file without calling prior functions, so I had to change my loadorder to 100.

nephranka
October 6th, 2021, 02:17
I pushed an update. Let me know if it fixes it.
For some reason Celestian overwrites the whole file without calling prior functions, so I had to change my loadorder to 100.

Looks like that fixed it. Thanks for the quick turn around.

bmos
October 6th, 2021, 12:47
Looks like that fixed it. Thanks for the quick turn around.Unfortunately that change broke more extensions so I'm rolling it back.
I've suggested a fix to Celestian that would fix it on the other end: https://github.com/CelestianGC/AdvancedEffects/pull/4

nephranka
October 6th, 2021, 14:45
Unfortunately that change broke more extensions so I'm rolling it back.
I've suggested a fix to Celestian that would fix it on the other end: https://github.com/CelestianGC/AdvancedEffects/pull/4

Any chance you could supply me with the code part of the fix so I can adjust the AE ext like you did with the previous fix between these two. I am just not sure when he will be able to fix it on his end.

Since this ext is not in the ext folder any more, I can not adjust your load order. I have not had any other breaks so I would be willing to do that as well but your fix seems like it is the more sound approach and load order is a band aid.

bmos
October 6th, 2021, 15:44
Any chance you could supply me with the code part of the fix so I can adjust the AE ext like you did with the previous fix between these two. I am just not sure when he will be able to fix it on his end.

Since this ext is not in the ext folder any more, I can not adjust your load order. I have not had any other breaks so I would be willing to do that as well but your fix seems like it is the more sound approach and load order is a band aid.here is a build of it. don't worry about "PFRPG" in the title, it is actually the 5e version

here is the change I made (https://github.com/CelestianGC/AdvancedEffects/pull/4/commits/1a38ac2eb8c760226f5b096df0f8421382e99387)

I should mention I haven't tested it much so let me know if there are issues

nephranka
October 6th, 2021, 16:58
Thank you. I will give it a test tonight but I am sure it will be fine.

Edit: Looks to be working good. I will be playing Sunday and will report back if there any issues.

Darth Decisive
October 6th, 2021, 22:37
I've encountered a strange error that makes it so that a single attack seems to consume two pieces of ammunition; one on the triggering of the attack roll, and another on the resolution of the attack.

nephranka
October 6th, 2021, 23:33
I've encountered a strange error that makes it so that a single attack seems to consume two pieces of ammunition; one on the triggering of the attack roll, and another on the resolution of the attack.

This may be a result of ext conflicts. Around post #111 we have found a couple of fixes they might work for you.

Darth Decisive
October 7th, 2021, 17:55
So you did! I got those loaded up and I'll mess around with them later. I'll also be able to try out the Advanced Effects patch too!

nephranka
October 7th, 2021, 18:46
So you did! I got those loaded up and I'll mess around with them later. I'll also be able to try out the Advanced Effects patch too!

Cool. These all really enhance my games and improve the quality of gaming for me.

nephranka
October 18th, 2021, 02:24
Nope, must be an issue with ranged item detection in 4E.
I'll take a look. Thanks.
EDIT: I meant to say 5e

EDIT2: posted fix:

Just noticed that even thought the reload button is gone, melee weapons have an ammunition section in the details?

bmos
October 18th, 2021, 12:33
Just noticed that even thought the reload button is gone, melee weapons have an ammunition section in the details?oh yeah I haven't gotten around to removing that. thanks for the reminder.

nephranka
October 18th, 2021, 15:20
oh yeah I haven't gotten around to removing that. thanks for the reminder.

Thanks! I just assumed it was already done.

crossbow57
November 4th, 2021, 19:22
I've really enjoyed kicking this extension around. It's been fun to see my ranged folks deal with the reload action, and the auto-tick of ammo has been a great feature.

Now the bad news - I seem to be unable to "link" the ammunition from a character inventory to the tracker, and I'm not sure if I'm not doing something correctly.

I'm using FGU - latest version, on a PC. I'm going to attach a couple of shots to help illustrate the behavior, but basically the extension seems to function in every way except when I go in to select ammunition, I get a blank box where I expect a dropdown of available choices... at least that's what I think I should see. I've made sure that ammo is equipped in the inventory, but something seems to be missing.

Also yes, I run a bunch of other extensions on my server, so I assumed for the longest time that it was an extension collision, but I recently had time to load ONLY the ammo management extension and got the same behavior. Please let me know if anything comes to mind - thank you! Big fan!4980649807

UPDATE: Accidentally stumbled on another party member where it worked. I found that I needed to have the ammo set up as "Goods and Services" and "Ammunition" as subtype - that seems to have been the issue. Just a good reminder in general as I'm sure that's listed elsewhere in the thread. That should do it for me, but if anyone has further wisdom, please let me know.

Also - is this extension going to be added to the Forge?

bmos
November 4th, 2021, 21:25
Accidentally stumbled on another party member where it worked. I found that I needed to have the ammo set up as "Goods and Services" and "Ammunition" as subtype - that seems to have been the issue. Just a good reminder in general as I'm sure that's listed elsewhere in the thread. That should do it for me, but if anyone has further wisdom, please let me know.Yup. Pretty sure I mention it in the how to video but the README really could use a re-write.


is this extension going to be added to the Forge?See the first post of this thread for links. All of my extensions have been on the Forge since day 1.

nephranka
November 5th, 2021, 00:37
How do you handle things like daggers? I see they have ammo but when you use them they do not tick off or record as being thrown?

Edit: I think non range weapons still have ammo refill options as well.

bmos
November 5th, 2021, 01:27
How do you handle things like daggers? I see they have ammo but when you use them they do not tick off or record as being thrown?

Edit: I think non range weapons still have ammo refill options as well.Interesting. I forgot 5E has a "thrown" weapon type.
In Pathfinder it's just melee and ranged. I'll add that at some point.

nephranka
November 5th, 2021, 10:43
Interesting. I forgot 5E has a "thrown" weapon type.
In Pathfinder it's just melee and ranged. I'll add that at some point.

Cool. The only problem is that right now it is broken and will not track when you throw them. The refill part I would expect is not working based on what you stated but the normal function of tracking used should still work from the base game?

bmos
November 5th, 2021, 13:06
Cool. The only problem is that right now it is broken and will not track when you throw them. The refill part I would expect is not working based on what you stated but the normal function of tracking used should still work from the base game?Can you post a picture of what the GM-view of a chat output for a thrown dagger attack looks like?

bmos
November 5th, 2021, 13:51
Good news!
Celestian has just included the compatibility patch in 5E Advanced Effects!

nephranka
November 5th, 2021, 14:23
Good news!
Celestian has just included the compatibility patch in 5E Advanced Effects!

The pic in #160 has the image you are looking for.

nephranka
November 5th, 2021, 14:27
Good news!
Celestian has just included the compatibility patch in 5E Advanced Effects!

Yeah! No more patch!

bmos
November 5th, 2021, 18:14
The pic in #160 has the image you are looking for.Derp. Thanks.
I pushed an update.

nephranka
November 5th, 2021, 20:03
Derp. Thanks.
I pushed an update.

Thanks! I will give it a spin tonight.

Edit: All good. Thanks!

ColinBuckler
November 16th, 2021, 22:47
Using 5E, when I have used all of the ammo in the tick boxes, it continues to allow attacks without any chat window warning that there is no ammo lavailable.

Reloading works as well as the recovery.

bmos
November 17th, 2021, 11:47
Using 5E, when I have used all of the ammo in the tick boxes, it continues to allow attacks without any chat window warning that there is no ammo lavailable.

Reloading works as well as the recovery.I think you're using an extension that overwrites that feature of mine, because it's working in my testing in 5e.

Kelrugem
November 20th, 2021, 22:29
Ammunition Manager v1.9 (https://github.com/bmos/FG-PFRPG-Ammunition-Manager/releases/tag/v1.9) now automates blind-fight (https://www.aonprd.com/FeatDisplay.aspx?ItemName=Blind-Fight)'s re-roll-on-miss function for players and NPCs.
The special circumstance of blink is not included in the automation at this time.
EDIT: this is not quite right by the rules. will continue working on it.

Kelrugem, perhaps you can bring this into your extension?
I add my special ability search function:



--- This function checks NPCs and PCs for special abilities.
local function hasSpecialAbility(rActor, sSearchString, bFeat, bTrait, bSpecialAbility, bEffect)
if not rActor or not sSearchString then
return false
end
local nodeActor = rActor.sCreatureNode;

if bEffect and EffectManager35E.hasEffectCondition(rActor, sSearchString) then
return true
end

local sSearchString = string.lower(sSearchString);
local sSearchString = string.gsub(sSearchString, '%-', '%%%-');
if ActorManager.isPC(nodeActor) then
if bFeat then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.featlist')) do
local sFeatName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sFeatName and string.match(sFeatName, sSearchString .. ' %d+', 1) or string.match(sFeatName, sSearchString, 1) then
return true
end
end
end
if bTrait then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.traitlist')) do
local sTraitName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sTraitName and string.match(sTraitName, sSearchString .. ' %d+', 1) or string.match(sTraitName, sSearchString, 1) then
return true
end
end
end
if bSpecialAbility then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.specialabilitylist')) do
local sSpecialAbilityName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sSpecialAbilityName and string.match(sSpecialAbilityName, sSearchString .. ' %d+', 1) or string.match(sSpecialAbilityName, sSearchString, 1) then
return true
end
end
end
else
local sSpecialQualities = string.lower(DB.getValue(nodeActor .. '.specialqualities', ''));
local sSpecAtks = string.lower(DB.getValue(nodeActor .. '.specialattacks', ''));
local sFeats = string.lower(DB.getValue(nodeActor .. '.feats', ''));

if bFeat and string.find(sFeats, sSearchString) then
return true
elseif bSpecialAbility and (string.find(sSpecAtks, sSearchString) or string.find(sSpecialQualities, sSearchString)) then
return true
end
end

return false
end

and modify this part of onMissChance:

if nTotal <= nMissChance then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else

to be this:

if nTotal <= nMissChance and hasSpecialAbility(rSource, "Blind-Fight", true, false, false, true) then -- bmos adding blind-fight
if string.match(rMessage.text, "%[BLIND%-FIGHT%]") or
string.match(rMessage.text, "%[ATTACK.*%((%w+)%)%]") ~= 'M' or
(EffectManager35E.hasEffect(rTarget, "Incorporeal") and not EffectManager35E.hasEffect(rSource, "Incorporeal")) then

rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if nMissChance > 0 then
local aMissChanceDice = { "d100" };
if not UtilityManager.isClientFGU() then
table.insert(aMissChanceDice, "d10");
end
local rMissChanceRoll = { sType = "misschance", sDesc = string.gsub(rMessage.text, " %[MISS%]", "") .. " [BLIND-FIGHT]", aDice = aMissChanceDice, nMod = 0, fullattack = rRoll.fullattack, actionStuffForOverlay = rRoll.actionStuffForOverlay };
ActionsManager.roll(rSource, rTarget, rMissChanceRoll);
-- KEL compatibility test with mirror image handler
else
rMessage.icon = "roll_attack";
end
end -- end bmos adding blind-fight
elseif nTotal <= nMissChance then
rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
rMessage.icon = "roll_attack_miss";
ActionAttack.clearCritState(rSource, rTarget);
-- KEL Adding Save Overlay
if rRoll.actionStuffForOverlay == "true" then
TokenManager2.setSaveOverlay(ActorManager.getCTNod e(rTarget), -3);
end
-- END
else
rMessage.icon = "roll_attack";
end
else


Hi :)

Just wanted to finally add this :) Is this still the most recent way to add the code, or should I be aware of any changes? :) (but I will surely check the code, so, if I find any other better way, then I'll let you know :) )

bmos
November 21st, 2021, 13:40
Hi :)

Just wanted to finally add this :) Is this still the most recent way to add the code, or should I be aware of any changes? :) (but I will surely check the code, so, if I find any other better way, then I'll let you know :) )

Yes, I added in 1.9 and removed in 1.10 (the feb ruleset update), so there wasn't ever any improvement to that code.
You can see all the code changes that 1.9 had over 1.8 here: https://github.com/bmos/FG-Ammunition-Manager/compare/v1.8...v1.9

Kelrugem
November 21st, 2021, 17:22
Yes, I added in 1.9 and removed in 1.10 (the feb ruleset update), so there wasn't ever any improvement to that code.
You can see all the code changes that 1.9 had over 1.8 here: https://github.com/bmos/FG-Ammunition-Manager/compare/v1.8...v1.9

Nice, thanks a lot :)

Kelrugem
November 28th, 2021, 12:56
if bFeat then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.featlist')) do
local sFeatName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sFeatName and string.match(sFeatName, sSearchString .. ' %d+', 1) or string.match(sFeatName, sSearchString, 1) then
return true
end
end
end
if bTrait then
for _,vNode in pairs(DB.getChildren(nodeActor .. '.traitlist')) do
local sTraitName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
if sTraitName and string.match(sTraitName, sSearchString .. ' %d+', 1) or string.match(sTraitName, sSearchString, 1) then
return true
end
end
end

By the way, the CharManager contains functons hasFeat and hasTrait for PCs, they look similar what you do in that case but are a bit different. Where there some specific concerns you had in the string checks you wanted to get resolved which is why there are some differences? Seemingly something about hyphens? But what does the %d+ do in the string match? (probably allowing numbers which are ignored then for the check?) (and the ,1? :D)

My knowledge about string comparisons is basically zero and I find the documentation about it often utterly confusing which is why I usually avoid any string comparisons :D (if you have any good documentation about string stuff in Lua I would be happy :) )

I will handle the remaining code different. I want to automate the blind fight differently. The blind fight will be checked before the defense values are checked such that I can counter bonuses coming from invisibility (melee), and attackers with that ability simply gain advantage on their miss chance roll, using my base code of that (as you may have seen I already added effects for advantage on attacks and so on) :) I want to add ethereal as counter effect to blind-fight in order to support stuff like blink and ethereal creatures in general :)

bmos
November 28th, 2021, 13:00
By the way, the CharManager contains functons hasFeat and hasTrait for PCs, they look similar what you do in that case but are a bit different. Where there some specific concerns you had in the string checks you wanted to get resolved which is why there are some differences? Seemingly something about hyphens? But what does the %d+ do in the string match? (and the ,1? :D)

My knowledge about string comparisons is basically zero and I find the documentation about it often utterly confusing which is why I usually avoid any string comparisons :D (if you have any good documentation about string stuff in Lua I would be happy :) )

I will handle the remaining code different. I want to automate the blind fight differently. The blind fight will be checked before the defense values are checked such that I can counter bonuses coming from invisibility (melee), and attackers with that ability simply gain advantage on their miss chance roll, using my base code of that (as you may have seen I already added effects for advantage on attacks and so on) :) I want to add ethereal as counter effect to blind-fight in order to support stuff like blink and ethereal creatures in general :)Yeah, lua's pattern recognition was hard to learn but is pretty powerful.
This is my go-to reference link for string.match (https://riptutorial.com/lua/example/20315/lua-pattern-matching), although there are still a few things it doesn't explain well.
This is my go to for string.find (https://riptutorial.com/lua/example/20535/string-find--introduction-).
Happy to help if you have questions.

If I remember correctly, I wrote my own function for that because I wanted it to handle PC special abilities and NPCs as well. I think the 3.5E CharManager functions just work for PCs.
If I was writing that again, I'd do it differently.

Those sound like great improvements.

Kelrugem
November 28th, 2021, 13:04
Yeah, lua's pattern recognition was hard to learn but is pretty powerful: https://riptutorial.com/lua/example/20315/lua-pattern-matching
Happy to help if you have questions.
If I remember correctly, I wrote my own because I wanted it to handle PC special abilities and NPCs as well.

Thanks for the link :)

Yeah, the NPC stuff I have seen :) It was just about the part with PCs because I was thinking about to replace these specific if-clauses for PCs with the existing functions :) (although they are rarely used in the code, besides two weapon fighting, slow and steady, multitalented and skilled no other feat or trait is automated. Hence, I doubt that these functions will get updated in the future. But if they get updated, your function could profit from such an update if using these instead)

bmos
November 28th, 2021, 13:07
Thanks for the link :)

Yeah, the NPC stuff I have seen :) It was just about the part with PCs because I was thinking about to replace these specific if-clauses for PCs with the existing functions :) (although they are rarely used in the code, besides two weapon fighting, slow and steady, multitalented and skilled no other feat or trait is automated. Hence, I doubt that these functions will get updated in the future. But if they get updated, your function could profit from such an update if using these instead)There are other things going on in that function too though that I forget haha

At the very least, it ignores numbers at the end of a feat/trait name like "armor expert 1" and "Armor Expert 2".
It also looks at Effects in case things are added temporarily.

And ",1" just means it's starting at the first character of the string it's searching.

Kelrugem
November 28th, 2021, 13:08
There are other things going on in that function too though that I forget haha

aaah, I see, thanks :)

BushViper
December 5th, 2021, 19:50
Bmos, thank you for listening to my (and others) feedback and removing the RELD from weapons that don't use ammunition.

It was a small thing, but it was annoying.

Absolutely fantastic extension.

bmos
December 6th, 2021, 14:43
Bmos, thank you for listening to my (and others) feedback and removing the RELD from weapons that don't use ammunition.You're very welcome. Thank you for the feedback :)
I don't use FantasyGrounds right now, so I'm mostly relying on users to suggest improvements!

nephranka
December 6th, 2021, 15:07
You're very welcome. Thank you for the feedback :)
I don't use FantasyGrounds right now, so I'm mostly relying on users to suggest improvements!

You have developed so many great exts! I hope you are not planning on leaving all together? That would be a huge loss.

bmos
December 6th, 2021, 15:29
You have developed so many great exts! I hope you are not planning on leaving all together? That would be a huge loss.Nope, I like working on these extensions and hope to play in FG games in the future.
The games I'm in right now just aren't in FG.

nephranka
December 6th, 2021, 15:43
Nope, I like working on these extensions and hope to play in FG games in the future.
The games I'm in right now just aren't in FG.

That's cool. Thank you for all the hard work!

chaiwalla
December 10th, 2021, 18:59
Yes, thanks for all the PFRPG extensions. Much, much appreciated.

A thought: what if the default ammunition counter came out all used up/checked off? Then the first thing you would do would be to choose an ammo and load up. Useful if you have several arrow types to choose from. And then a way to dump them back to the inventory, to be able to reload a different ammo type.

Mazzar
January 7th, 2022, 01:14
Re: Ammunition Manager with Audio Overseer - 5E ruleset
Quote Originally Posted by Mazzar
Hello.

I'd like to use Ammunition Manager but am having an issue with it. I use Audio Overseer extension to connect with Syinscape for sounds. It triggers sounds based on the last chat entry (usually an attack) and in order to trigger the correct sound, the name of the item being used has to be present in that line on the chat window.

For example, if a player attacks with a Crossbow, the last line of the chat window needs to look like this:

Attack [17] -> [at Goblin] with Crossbow [Hit]

I use an extension to add the attack weapon (or spell) but that messes up your extension. Is there any chance of adding the attack weapon to that last line too? Then I would not have to use that other extension to get the item in the chat line

Thanks
Maz

The actual issue I am having is that it is not automatically ticking off the ammo when an extension (LAE: Expanded Options) is set. The actual setting is Chat: Use Attack Prettifier. This basically sends a nice combat message to the chat window:

Lancelot Attacks -> Goblin with Shatterspike [HIT]

instead of

Attack [16] -> [at Goblin] [HIT]

kevininrussia
January 7th, 2022, 02:34
Extension: Ammunition Manager
Rule Set: 4E

When opening the Combat Tab on the Character Sheet I am getting these warnings in the Console:

[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)

bmos
January 7th, 2022, 12:31
Extension: Ammunition Manager
Rule Set: 4E

When opening the Combat Tab on the Character Sheet I am getting these warnings in the Console:

[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)
[1/6/2022 6:30:00 PM] [WARNING] window: Unable to locate control (ammo_label) specified in insertbefore attribute for control (range_label) in windowclass (char_weapon)

I think you're either using an old version or have an incompatible extension.
it's working for me in a new 4e campaign.

bmos
January 7th, 2022, 12:32
Re: Ammunition Manager with Audio Overseer - 5E ruleset
Quote Originally Posted by Mazzar
Hello.

I'd like to use Ammunition Manager but am having an issue with it. I use Audio Overseer extension to connect with Syinscape for sounds. It triggers sounds based on the last chat entry (usually an attack) and in order to trigger the correct sound, the name of the item being used has to be present in that line on the chat window.

For example, if a player attacks with a Crossbow, the last line of the chat window needs to look like this:

Attack [17] -> [at Goblin] with Crossbow [Hit]

I use an extension to add the attack weapon (or spell) but that messes up your extension. Is there any chance of adding the attack weapon to that last line too? Then I would not have to use that other extension to get the item in the chat line

Thanks
Maz

The actual issue I am having is that it is not automatically ticking off the ammo when an extension (LAE: Expanded Options) is set. The actual setting is Chat: Use Attack Prettifier. This basically sends a nice combat message to the chat window:

Lancelot Attacks -> Goblin with Shatterspike [HIT]

instead of

Attack [16] -> [at Goblin] [HIT]Adding that feature is outside the scope of what I'm doing here, but I have made it very easy for other extensions to add compatibility with this one.
Where did you get that "LAE: Expanded Options" extension? I don't see a thread.

Mazzar
January 7th, 2022, 19:17
It's probably an old extension. Not a problem. It really is out of the scope of what you are doing. I am able to edit the 5E ruleset to add the label of the action in the chat entry and it will work perfectly with your extension. The only problem is every time there is an update to the ruleset, it might get overwritten.

kevininrussia
January 7th, 2022, 20:03
I think you're either using an old version or have an incompatible extension.
it's working for me in a new 4e campaign.

Thanks for looking!
I tested with latest off Forge and clean campaign (no extensions) BUT its a Warning notice when I check the console. Its not opening the console like an error would. Apparently Warnings in the console are not a big deal and not something to worry about. Thanks again for taking the time looking.

bmos
January 7th, 2022, 20:27
It's probably an old extension. Not a problem. It really is out of the scope of what you are doing. I am able to edit the 5E ruleset to add the label of the action in the chat entry and it will work perfectly with your extension. The only problem is every time there is an update to the ruleset, it might get overwritten.That's what extension files do, they just make changes to the ruleset.
If there isn't another extension that can get updated, I will look at adding this feature :)


Thanks for looking!
I tested with latest off Forge and clean campaign (no extensions) BUT its a Warning notice when I check the console. Its not opening the console like an error would. Apparently Warnings in the console are not a big deal and not something to worry about. Thanks again for taking the time looking.
Ah! Thank you for clarifying that. I didn't notice they were warnings.

bmos
January 7th, 2022, 20:53
I have pushed a new build that should fix both of those issues.

Mazzar
January 9th, 2022, 00:42
That's what extension files do, they just make changes to the ruleset.
If there isn't another extension that can get updated, I will look at adding this feature :)



As it turns out, the Audio Overseer extension will have a new version coming that will handle multi-line support so there is no longer a need to have the action label in the last line of the chat. This means I can remove the extension that is causing a problem with yours. So problem is solved! No need to look into it at all. Thanks! Great extension by the way.

bmos
January 9th, 2022, 13:23
As it turns out, the Audio Overseer extension will have a new version coming that will handle multi-line support so there is no longer a need to have the action label in the last line of the chat. This means I can remove the extension that is causing a problem with yours. So problem is solved! No need to look into it at all. Thanks! Great extension by the way.ha! nice.
I already added the feature so I'll leave it in place for now.

Mazzar
January 9th, 2022, 20:12
What you did works and solves all problems too! Thanks!

rmilmine
February 14th, 2022, 05:42
So question, how do I use the Ammunition drop down in the weapon window? The character has arrows and a shortbow in inventory. The Actions tab has the shortbow. When I go into the shortbow and look at it, the ammunition drop down is empty.
How do I get it to populate the arrows the character has?
How do I say what arrows the shortbow is using?
I was thinking it might populate the drop down on equipped items, but that doesn't appear to be the case.

Currently what I've been doing is using the other Extension that adds effects to items.
So if I have a +1 Shortbow, and 20 +1 arrows, and 5 +2 Evil Outsider Demon arrows. This is what they would look like.
Shortbow Effect: BOW; action only
+1 arrows effect: IF: CUSTOM(Bow); DMGTYPE: magic ATK: 1; DMG: 1
+2 Evil Outsider Demon arrows effect: IF: CUSTOM(Bow); DMGTYPE: magic; IFT: TYPE(outsider); IFT: TYPE(demon); ATK: 2; DMG: 2d6+2;
I've not been using the ammo on the weapon, instead I go to the inventory tab and decrease the count based on number shot in the attack.
Now how this works is, I equip the bow, I equip the arrows I want to use and then attack with the bow.
Now if only I can figure out how to get this extension to decrease the count on the arrows in the inventory... I'm thinking it has to do with the drop down just not sure what's missing, as it's empty.

bmos
February 14th, 2022, 13:59
So question, how do I use the Ammunition drop down in the weapon window? The character has arrows and a shortbow in inventory. The Actions tab has the shortbow. When I go into the shortbow and look at it, the ammunition drop down is empty.
How do I get it to populate the arrows the character has?
How do I say what arrows the shortbow is using?
I was thinking it might populate the drop down on equipped items, but that doesn't appear to be the case.Perhaps you don't have the arrows equipped?
Right now the inventory implementation is less than idea because I wasn't able to figure out how to link the ammo field to the remaining inventory count.
I haven't looked at it in a while, but I think that is my end goal.

rmilmine
February 14th, 2022, 16:48
Perhaps you don't have the arrows equipped?
Right now the inventory implementation is less than idea because I wasn't able to figure out how to link the ammo field to the remaining inventory count.
I haven't looked at it in a while, but I think that is my end goal.

Have a look at the extension that does the scrolls/wands/potions etc. The part for scrolls and potions has code that updates the inventory item count from the actions tab. I'm sure something like that should be possible.
As I recall the way I did that was that during the equip it sets the action item for the potion or scroll to a number of uses equal to the item count. On unequip it sets the item count = to the item count - number used or something like that. When the action item is created it put a link to the originating item entry so that it can access the item as needed. You could do something that when the drop down item is populated it records all the items and links them to the drop down item in some manner. Might require a template update to the drop down to accept 2 items per item list. There are so many different ways it could be done.

The arrows are equipped as is the bow, but the drop down is empty. I'm wondering if maybe there is something in the item name, or in one of the fields within the item that isn't set in a manner the extension expects.

bmos
February 14th, 2022, 17:26
Have a look at the extension that does the scrolls/wands/potions etc. The part for scrolls and potions has code that updates the inventory item count from the actions tab. I'm sure something like that should be possible.
As I recall the way I did that was that during the equip it sets the action item for the potion or scroll to a number of uses equal to the item count. On unequip it sets the item count = to the item count - number used or something like that. When the action item is created it put a link to the originating item entry so that it can access the item as needed. You could do something that when the drop down item is populated it records all the items and links them to the drop down item in some manner. Might require a template update to the drop down to accept 2 items per item list. There are so many different ways it could be done.

The arrows are equipped as is the bow, but the drop down is empty. I'm wondering if maybe there is something in the item name, or in one of the fields within the item that isn't set in a manner the extension expects.That part I do understand and it is implemented that way. When you click the reload button it refills the quiver from the inventory count.

The issue I was having was displaying the right number on the combat tab to eliminate this step and have the shots/ammo recovery directly effect the overall ammo in the inventory. I didn't want to duplicate the data but wasn't able to figure out how to link the ammo field to the inventory count.
It's been a while since I looked at this issue though.

rmilmine
February 15th, 2022, 06:48
That part I do understand and it is implemented that way. When you click the reload button it refills the quiver from the inventory count.

The issue I was having was displaying the right number on the combat tab to eliminate this step and have the shots/ammo recovery directly effect the overall ammo in the inventory. I didn't want to duplicate the data but wasn't able to figure out how to link the ammo field to the inventory count.
It's been a while since I looked at this issue though.

Would it not be possible to do it in a similar fashion to potions and scrolls be possible? They use the inventory count and that count goes into the spell level and a link to the inventory item gets put in the spell that is added.
In order to link the inventory item and the drop down though, you would need to create a new template for the drop down. Add a function that accepts the inventory items and puts the item's name in the display and a link to the item in a list. You just need to ensure that the two lists remain in the same order.
Or instead of using a drop down, use a list with a check box. If one gets checked whatever one was checked gets unchecked. With the list you can easily link everything.

bmos
February 15th, 2022, 12:51
Would it not be possible to do it in a similar fashion to potions and scrolls be possible? They use the inventory count and that count goes into the spell level and a link to the inventory item gets put in the spell that is added.
In order to link the inventory item and the drop down though, you would need to create a new template for the drop down. Add a function that accepts the inventory items and puts the item's name in the display and a link to the item in a list. You just need to ensure that the two lists remain in the same order.
Or instead of using a drop down, use a list with a check box. If one gets checked whatever one was checked gets unchecked. With the list you can easily link everything.IIRC I did have it set up that way briefly during testing but I just couldn't figure out how to get the remaining ammo count to show on the combat tab. It's definitely work another look sometime.

nephranka
February 15th, 2022, 16:40
On a side note, were you able to resolve none range weapons have ammo options and ranged melee weapons (like dagger) having ammo? Thanks!

rmilmine
February 15th, 2022, 16:43
I still can't figure out why the drop down is empty for me.
So going to post some pictures.
51503
51504
51505
51506
51507
Please let me know if you see anything amiss with these.

bmos
February 15th, 2022, 16:55
I still can't figure out why the drop down is empty for me.
So going to post some pictures.
51503
51504
51505
51506
51507
Please let me know if you see anything amiss with these.

Ammo needs to be in the subtype field.
Pathfinder standard format is type: goods and services; subtype: ammunition
https://www.fantasygrounds.com/forums/showthread.php?61372-PFRPG-Ammunition-Manager&p=625827&viewfull=1#post625827

bmos
February 15th, 2022, 20:43
On a side note, were you able to resolve none range weapons have ammo options and ranged melee weapons (like dagger) having ammo? Thanks!
Yup. Went live today.
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v2.9


Would it not be possible to do it in a similar fashion to potions and scrolls be possible? They use the inventory count and that count goes into the spell level and a link to the inventory item gets put in the spell that is added.
In order to link the inventory item and the drop down though, you would need to create a new template for the drop down. Add a function that accepts the inventory items and puts the item's name in the display and a link to the item in a list. You just need to ensure that the two lists remain in the same order.
Or instead of using a drop down, use a list with a check box. If one gets checked whatever one was checked gets unchecked. With the list you can easily link everything.Thanks for getting me to look at this again. I think I know how to make this work the way I want now.
The issue I'm tracking this on is here: https://github.com/bmos/FG-Ammunition-Manager/issues/9

nephranka
February 16th, 2022, 01:40
Yup. Went live today.
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v2.9

Thanks for getting me to look at this again. I think I know how to make this work the way I want now.
The issue I'm tracking this on is here: https://github.com/bmos/FG-Ammunition-Manager/issues/9

Looks good on the melee weapon but the thrown dagger does not have an ammo section so no way to reload? I get no need to "recover" ammo for a dagger but I would have thought the reload button would take them from my inventory. Maybe I am not thinking about this the correct? Thanks!

Edit: one more item. Magic arrows populate in the ammo section even when not identified.

nephranka
February 16th, 2022, 01:46
I still can't figure out why the drop down is empty for me.
So going to post some pictures.
51503
51504
51505
51506
51507
Please let me know if you see anything amiss with these.

At least in 5e the subtype needs to be "Ammunition" on the arrows.

rmilmine
February 16th, 2022, 06:11
Ammo needs to be in the subtype field.
Pathfinder standard format is type: goods and services; subtype: ammunition
https://www.fantasygrounds.com/forum...l=1#post625827[/url]

That is really strange, the Core rule book that I bought has the Type as Ammo and the Subtype as blank for arrows and bolts. So all magical arrows or bolts I make are based off those...

nephranka
February 16th, 2022, 10:42
Here is an arrow in 5e

bmos
February 16th, 2022, 12:43
That is really strange, the Core rule book that I bought has the Type as Ammo and the Subtype as blank for arrows and bolts. So all magical arrows or bolts I make are based off those...You are correct that it is incorrectly listed in the Core Rulebook :P
However after consulting the Core Rulebook PDF I get why it's entered like that. They didn't clarify those item types until Ultimate Equipment.
I'll push an update to search both of those fields.


I get no need to "recover" ammo for a dagger but I would have thought the reload button would take them from my inventory. Maybe I am not thinking about this the correctDaggers are not subtype ammo, so you can't use the reload button with them.


Magic arrows populate in the ammo section even when not identified.Thanks, this is a great point. I can update to include nonid_name values.

nephranka
February 16th, 2022, 13:44
You are correct that it is incorrectly listed in the Core Rulebook :P
However after consulting the Core Rulebook PDF I get why it's entered like that. They didn't clarify those item types until Ultimate Equipment.
I'll push an update to search both of those fields.

Daggers are not subtype ammo, so you can't use the reload button with them.

Thanks, this is a great point. I can update to include nonid_name values.

Cool. Thanks for the info!

kevininrussia
February 17th, 2022, 07:01
Ruleset 4E
No other extensions loaded.

I am getting an error when opening the Combat tab.

[ERROR] Script execution error: [string "campaign/scripts/ammo_ammopicker.lua"]:53: attempt to index global 'itemsheetaltname' (a nil value)

bmos
February 17th, 2022, 12:27
Ruleset 4E
No other extensions loaded.

I am getting an error when opening the Combat tab.

[ERROR] Script execution error: [string "campaign/scripts/ammo_ammopicker.lua"]:53: attempt to index global 'itemsheetaltname' (a nil value)Oops, I just pushed an update (https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v2.9-hotfix.2) to resolve.

bmos
February 17th, 2022, 16:39
v3.0-rc.1 now available for testing.
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v3.0-rc.1
It required some pretty substantial behind-the scenes changes but the UI remains mostly the same.

EDIT and v3.0-rc.2
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v3.0-rc.2

bmos
February 17th, 2022, 20:55
v3.0 is now released
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v3.0

and I shot a new video but it's still processing:
https://www.youtube.com/watch?v=yW0JeWRxnx8

bmos
February 17th, 2022, 23:08
Currently what I've been doing is using the other Extension that adds effects to items.
So if I have a +1 Shortbow, and 20 +1 arrows, and 5 +2 Evil Outsider Demon arrows. This is what they would look like.
Shortbow Effect: BOW; action only
+1 arrows effect: IF: CUSTOM(Bow); DMGTYPE: magic ATK: 1; DMG: 1
+2 Evil Outsider Demon arrows effect: IF: CUSTOM(Bow); DMGTYPE: magic; IFT: TYPE(outsider); IFT: TYPE(demon); ATK: 2; DMG: 2d6+2;
Now how this works is, I equip the bow, I equip the arrows I want to use and then attack with the bow.
Now if only I can figure out how to get this extension to decrease the count on the arrows in the inventory... I'm thinking it has to do with the drop down just not sure what's missing, as it's empty.Pathfinder Advanced Effects will now facilitate use of "Action Only" on both weapon and ammo so you don't need to use that workaround.
And the new update to Ammunition Manager will decrement directly from inventory.

I've submitted a patch to Celestian to try and add this to the 5E Advanced Effects version as well.

Horus1216
February 21st, 2022, 16:47
So I'm running the ammo manager in FGU PF1 and one of my player's sheets is causing this error. (error pic is Capture.jpg) It seems to be directly related to their shortbow. It only happens for one character and none of the other 3. I am running multiple extensions so I have included SCs of all of my extensions I am running.(Captures 2-3)

bmos
February 21st, 2022, 18:02
So I'm running the ammo manager in FGU PF1 and one of my player's sheets is causing this error. (error pic is Capture.jpg) It seems to be directly related to their shortbow. It only happens for one character and none of the other 3. I am running multiple extensions so I have included SCs of all of my extensions I am running.(Captures 2-3)Hmm. That is a weird error!
Do you have the latest from the Forge? v3.0-hotfix.1?
If you don't mind, zip up your campaign and send it to me.
What triggers the error? Attacking? Opening the sheet?

Horus1216
February 21st, 2022, 18:14
Anything to do with the shortbow or the arrows in the inventory is what was triggering it. It also wouldn't show the ammo dots for his arrows regardless of how many he had in his inv/combat tab. I run the updater before every session. Also feel free to reach out to me in the discord channels.

bmos
February 21st, 2022, 19:01
Anything to do with the shortbow or the arrows in the inventory is what was triggering it. It also wouldn't show the ammo dots for his arrows regardless of how many he had in his inv/combat tab. I run the updater before every session. Also feel free to reach out to me in the discord channels.I'm not sure why it's triggering an error, but I think I've updated it so it won't anymore :)

Also the arrows item should be "Arrow" weighing .15lb rather than "Arrows (20)" weighing 3lb.
You should also watch the new how-to video (https://www.youtube.com/watch?v=yW0JeWRxnx8) since ammo tracking has changed in v3

nephranka
February 22nd, 2022, 23:31
In 5e, when I throw a dagger it outputs the attack but the ammo stays at 1? I would have thought it would have dropped to zero even if it is not taking from the inventory? Without the ext it keeps ammo at 1 but does check off the one circle. Maybe this is expected.

bmos
February 23rd, 2022, 00:38
In 5e, when I throw a dagger it outputs the attack but the ammo stays at 1? I would have thought it would have dropped to zero even if it is not taking from the inventory? Without the ext it keeps ammo at 1 but does check off the one circle. Maybe this is expected.
Thanks, I pushed a fix.
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v3.0-hotfix.3
I also allowed you to link thrown weapons to ammo so you can throw away all your daggers (although it still only matches the type ammo or ammunition).

nephranka
February 23rd, 2022, 00:40
Thanks, I pushed a fix.
https://github.com/bmos/FG-Ammunition-Manager/releases/tag/v3.0-hotfix.3
I also allowed you to link thrown weapons to ammo so you can throw away all your daggers (although it still only matches the type ammo or ammunition).

Nice! Who needs them daggers anyway!

nephranka
February 23rd, 2022, 00:47
So it works but both type and subtype are currently taken with "weapon" and "Simple Melee Weapons" so no real place to put "Ammo". Thoughts? I changed the type but this will require some book keeping to make them throw-able. Mainly passing this along in case others try it.

bmos
February 23rd, 2022, 00:51
So it works but both type and subtype are currently taken with "weapon" and "Simple Melee Weapons" so real place to put "Ammo". Thoughts? I changed the type but this will require some book keeping to make them throw-able. Mainly passing this along in case others try it.I'll be adding that in the next update. Thrown items will match "weapon" instead. Although I could add more search terms. But at least now you can use it the old fashioned way.

nephranka
February 23rd, 2022, 00:58
I'll be adding that in the next update. Thrown items will match "weapon" instead. Although I could add more search terms. But at least now you can use it the old fashioned way.

Got it!

Elaith
March 3rd, 2022, 00:20
Hello Bmos,

I wanted to thank you for some great extensions, they really make my life as a DM far easier. I noticed an issue with the 'ammunition manager' extension and Kelrugem's extended automation and overlay extension. It seems when I have the ammunition manager loaded - the function TVCONC (target you attack has (N) concealment) does not work. Everything else seems to be working fine, it is just that one function that is not working.

I am not sure if that is something in the Ammunition ext or the overlay that needs to be changed. I just wanted to let you know, in case it can be fixed. As I like the ammunition extension, but I use the overlay far more often.

Thanks,
-Elaith

BushViper
March 3rd, 2022, 00:57
Anything to do with the shortbow or the arrows in the inventory is what was triggering it. It also wouldn't show the ammo dots for his arrows regardless of how many he had in his inv/combat tab. I run the updater before every session. Also feel free to reach out to me in the discord channels.

I'm also having an issue where shortbows specifically are not displaying their ammo 'dots' in the actions tab.

bmos
March 3rd, 2022, 00:59
I'm also having an issue where shortbows specifically are not displaying their ammo 'dots' in the actions tab.Are you sure it isn't just linking the ammo to an item in the inventory because of the new update?

Elaith
March 3rd, 2022, 01:07
Oops, That was not a reply to myself. Sorry about that.

webdove
March 3rd, 2022, 05:26
Hi, Nice Extension! I tried equipping a shortbow and a crossbow, but the crossbow did not show a "reload" circle icon. Was that eliminated?

BushViper
March 3rd, 2022, 08:39
Are you sure it isn't just linking the ammo to an item in the inventory because of the new update?

Yep, that's it. It seems that I missed the explanation for that functionality.

My apologies.

bmos
March 3rd, 2022, 12:32
Hi, Nice Extension! I tried equipping a shortbow and a crossbow, but the crossbow did not show a "reload" circle icon. Was that eliminated?
The search terms for things like that (and the feature overall) is ruleset specific.
4e: 'loadaction', 'ballista'
3.5E / PFRPG: 'loadaction', 'firearm', 'crossbow', 'javelin', 'ballista', 'windlass', 'pistol', 'rifle', 'sling'
Other rulesets have just 'loadaction' but if you're in 5E or SFRPG I don't think I bothered adding that button since I don't think there's any rule like that for those systems.

webdove
March 3rd, 2022, 16:32
The search terms for things like that (and the feature overall) is ruleset specific.
4e: 'loadaction', 'ballista'
3.5E / PFRPG: 'loadaction', 'firearm', 'crossbow', 'javelin', 'ballista', 'windlass', 'pistol', 'rifle', 'sling'
Other rulesets have just 'loadaction' but if you're in 5E or SFRPG I don't think I bothered adding that button since I don't think there's any rule like that for those systems.

Ah ok. I am using 5E so no reload button. Thx.

bmos
March 3rd, 2022, 17:14
Ah ok. I am using 5E so no reload button. Thx.Is that a feature that would be worth having in 5E? I can definitely add it.

webdove
March 3rd, 2022, 19:12
The only related ranged weapon property is "loading"
PHB146 "Loading. Because of the time required to load this weapon, you can fire only one piece of ammunition from it when you use an action, bonus action, or reaction to fire it, regardless of the number of attacks you can normally make."

webdove
March 3rd, 2022, 19:23
I just rewatched your 1.5 video. I guess you should implement the loading function in 5E.

Also, I don't see the missed ammo information being used in 5E.
PHB 146 "At the end of the battle, you can recover half your expended ammunition by taking a minute to search the battlefield."
51763
51764

bmos
March 3rd, 2022, 19:42
I just rewatched your 1.5 video. I guess you should implement the loading function in 5E.

Also, I don't see the missed ammo information being used in 5E.
PHB 146 "At the end of the battle, you can recover half your expended ammunition by taking a minute to search the battlefield."
51763
51764have you tried with only ammunition manager loaded? it does seem to be showing ammunition recovery for hand crossbows on my end.

webdove
March 3rd, 2022, 21:45
He is a no extensions test
51772

bmos
March 4th, 2022, 11:54
He is a no extensions test
51772

ah, it looks like you are clicking the "shield" button that opens the item page.
you actually need to click the "magnifying glass" button that opens the weapon details.
51779

Garrick147
March 4th, 2022, 13:57
would love to see a reload for 5E

bmos
March 4th, 2022, 15:50
would love to see a reload for 5EThe previous discussion was about loading single-shot weapons like crossbows. The reload button has been removed since ammunition now feeds from the inventory.
See the video (https://www.youtube.com/watch?v=yW0JeWRxnx8) for more info.

webdove
March 4th, 2022, 16:30
ah, it looks like you are clicking the "shield" button that opens the item page.
you actually need to click the "magnifying glass" button that opens the weapon details.
51779

Yay. I see it now. Waiting anxiously for "5e reload" (we have a game starting at 7pm est :)

bmos
March 4th, 2022, 16:34
Yay. I see it now. Waiting anxiously for "5e reload" (we have a game starting at 7pm est :)Ah I was waiting but will release now :)

webdove
March 4th, 2022, 19:24
Thanks for the update!! There appear to be a couple of bugs to iron out.
51798

bmos
March 4th, 2022, 20:18
Thanks for the update!! There appear to be a couple of bugs to iron out.
51798I think there might be an extension incompatibility as a result of these changes.

webdove
March 4th, 2022, 22:28
Right you are. Too close to game time for debugging. I wonder which one is the culprit.
51803

Svandal
March 5th, 2022, 09:28
I got a bug report with only this mod loaded and it is only a bug with one of my existing campaigns.
It only applies for one of my existing campaigns, which I have attached. I do not know why, but it worked last time I opened this campaign two weeks ago.

This bug does not appear in any of my other campaigns.

The error thrown in the console windows when I try any attack with any weapon is:
ERROR script execution error: string "scripts/manager ammunition.lua 340 attempt to call field 'getWeaponName' (a nil value)

bmos
March 5th, 2022, 12:11
I got a bug report with only this mod loaded and it is only a bug with one of my existing campaigns.
It only applies for one of my existing campaigns, which I have attached. I do not know why, but it worked last time I opened this campaign two weeks ago.

This bug does not appear in any of my other campaigns.

The error thrown in the console windows when I try any attack with any weapon is:
ERROR script execution error: string "scripts/manager ammunition.lua 340 attempt to call field 'getWeaponName' (a nil value)Wasn't able to reproduce the issue with your campaign. I see how that could happen with other extensions loaded though (so I have pushed a new update) but since you said it is happening for you without any other extensions loaded I am puzzled.

Svandal
March 5th, 2022, 15:08
Wasn't able to reproduce the issue with your campaign. I see how that could happen with other extensions loaded though (so I have pushed a new update) but since you said it is happening for you without any other extensions loaded I am puzzled.


Well. I do run many extensions, and the bug happened when I ran many extensions at once.

Then I closed the campaign, disabled every other extension and was able to reproduce it with only your extension running.

I will try the new update later today.