Interesting. I forgot 5E has a "thrown" weapon type.
In Pathfinder it's just melee and ranged. I'll add that at some point.
Printable View
Good news!
Celestian has just included the compatibility patch in 5E Advanced Effects!
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.
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-Ammunitio...re/v1.8...v1.9
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 :)
Yeah, lua's pattern recognition was hard to learn but is pretty powerful.
This is my go-to reference link for string.match, although there are still a few things it doesn't explain well.
This is my go to for string.find.
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.
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.
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.
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.
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]
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)
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.
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.
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 :)
Ah! Thank you for clarifying that. I didn't notice they were warnings.
I have pushed a new build that should fix both of those issues.
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.
What you did works and solves all problems too! Thanks!
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.
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.
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.