5E Character Create Playlist
  1. #1

    Simple ammo counter for 4E ruleset

    Simple ammo counter for the 4E ruleset by using code from the 5E ruleset.

    The ammo only displays with the weapon on the combat tab of the full character sheet or the main tab if the mini character sheet. (That was existing functionality.) It does not display with the power on the Powers tab (though using a power will still decrement the ammo.)

    Since the actual weapon databasenode used in an attack is not passed in the call to perform an attack (and I was not willing to find all the places attacks can be called from and fixing it there), the ammo is decremented based on the weapon name. So if you have two weapons named the same, it will decrement from the first one it finds. It does try to distinguish between the melee and thrown version of the same weapon (e.g., a dagger), but otherwise the first match is used.
    Attached Files Attached Files
    Last edited by valeros; April 15th, 2020 at 04:07.

  2. #2
    Thank you! Works great! But of course I am going to ask for another feature :-) Currently if there are two targets attacked, only one ammo is used. Is it possible to decrease the ammo based on how many targets are attacked? For example: Ranger power - Split the Tree

    Thanks again!

  3. #3
    Ok, try this one. It decrements one per target. And not based on the targets in the power but by how many targets Fantasy Grounds shows. That is, if you target 10 creatures with Split the Tree, Fantasy Grounds rolls against 10 targets, so this decrements 10, not just two like the power says. Also, be warned that there is a chain of function calls made between when the weapon info is available and when the targets are available. So there is the possibility something can happen between them and somehow this extension will miss something or count wrong. I hope not (it worked for me), but be on the lookout when you use it at first.

  4. #4
    Works perfectly in my tests. Thanks!

  5. #5
    Updated to not crash with rolling with NPCs

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
DMsGuild Classic

Log in

Log in