Code Monkey home page Code Monkey logo

ammo-swapper's Introduction

FoundryVTT - Forien's Ammo Swapper

GitHub release (latest SemVer) Foundry Core Compatible Version Foundry Core Compatible Version
License GitHub Releases GitHub All Releases
Discord Patreon Ko-Fi

[Systems]: WFRP4e, DnD5e,PF2e, PF1, SFRPG
[Languages]: English

This module for Foundry Virtual Tabletop adds HUD allowing to easily swap which ammunition is being used in ranged weapons.

Installation

  1. Install Forien's Ammo Swapper using manifest URL: https://raw.githubusercontent.com/Foundry-Workshop/ammo-swapper/master/src/module.json
  2. While loaded in World, enable Forien's Ammo Swapper module.

Usage

As Player

  • Assign character to your user account
  • Equip ranged weapon(s)
  • Click on HUD displayed on bottom of your screen to bring out selectable list of owned ammunition
  • Click on any ammunition on the list to change weapon's ammunition
  • If show only equipped setting is disabled Right-Click on weapon to toggle its equipped state!

As Game Master

  • You can either use the module like the Players (via assigned character),
  • Or you can use it by selecting tokens on the canvas.

Screenshots

screenshot

screenshot

Future plans

You can always check current and up-to-date planned and requested features here

If you have any suggestion or idea on new contents, hit me up on Discord!

System support

  • Module supports following systems:
    • DnD5e (tested version 3.2.0)
    • PF1 (tested version 9.6)
    • PF2e (tested version 5.12.7)
    • SFRPG (tested version 0.25.2)
    • WFRP4e (tested version 7.2.1)
  • Module displays only weapons/ammunition that exist on the Actor, using data from that Actor.
  • Module doesn't include any weapons and/or ammunition Items.
  • Module should work fine with any custom weapons/ammo created for supported systems.

For additional support (for example other systems) please open an issue, or you can use the API to include support within your system/module.

Contact

If you wish to contact me for any reason, reach me out on Discord using my handle: forien

Support

If you wish to support module development, please consider becoming Patron.

Acknowledgements

  • Thanks to doumoku for providing Japanese translations

License

Forien's Ammo Swapper is a module for Foundry VTT by Forien and is licensed under a MIT License.

This work is licensed under Foundry Virtual Tabletop EULA - Limited License for Package Development from March 2, 2023.

ammo-swapper's People

Contributors

doumoku avatar forien avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

ammo-swapper's Issues

Add in Hud For GM aswell

Would love to have the hud visiable for GM aswell as an option
incase we have a few goblins with fire/acid/snaring arrows that they need to switch between!
Lots of love!

HUD not showing up

Module Version: v0.3.0

Describe the bug
AmmoSwapper HUD is not displaying. Console says it is displaying

To Reproduce
Steps to reproduce the behavior:

  1. Follow activation steps
  2. Click on character with range weapon equipped
  3. HUD doesn't show up
  4. Console shows no error

Expected behavior
HUD should show up

Screenshots
image

Browser:

  • Client

Foundry Version:
11.315

Game System:
DND 3.0.3

Additional context
I disabled all other modules except for TokenActionHUD before testing

Make the bar draggable or otherwise movable to other areas of the screen

Right now the bar seems to default to the right of the hotbar, but there are lots of modules that utilize this same area, causing it to block them. Would be nice if we could have some kind of configuration to move this bar elsewhere, especially as it doesn't stay a standard size, but grows as the character has more ranged weapons.

Display charges for weapons that have it

When using a repeating crossbow in pf2e or other common magazines, there will be individual non-stacked weapons defined by charges instead of total numbers. It would be nice to see Repeating Hand Crossbow Magazine (3/5) instead of Repeating Hand Crossbow Magazine (1)

[BUG] Does not work with PF2E anymore ("An error occurred while rendering AmmoSwapper. Cannot read properties of undefined (reading 'value')")

Module Version: v0.2.2

Describe the bug
No matter what I've tried, I have been unable to get the Ammo Swapper UI to pop up. (To be clear, I haven't gotten it working on older versions, either)

As a diagnostic, I tried creating a brand new test world, enabling the module, creating a player, creating a player character, giving the character a crossbow and bolts, and then logging in as the character. I then followed the regular instructions (i.e. assigning character, then equipping weapon). Even in a clean environment like this, no UI element pops up.

To Reproduce
Steps to reproduce the behavior:

  1. Install Ammo Swapper in a pf2e world
  2. Enable Ammo Swapper
  3. Follow Ammo Swapper usage instructions
  4. Nothing happens

Expected behavior
The Ammo Swapper UI should pop up

Screenshots
This is probably related. I get slightly different errors depending on whether I'm on the 'clean' game world or my normal one.

"Real" game world:
image
Clean world (no other modules):
image

Browser:

  • I have tried latest versions of Chrome (120.0.6099.225) as well as Brave

Foundry Version: 11 build 315

Game System: PF2E 5.12.7

Additional context
I saw there was a closed bug #2 that described similar issues, but I haven't been able to get this working anywhere, after trying multiple computers. That bug also seems to be old. There's a comment there about certain conditions needing to be met for it to show up, but after fiddling around with the items as GM, that didn't seem to make any difference.

Does not function with FVTT 7.5

Module Version: v0.1.2

Describe the bug
When swapping ammo between two choices, you have to select the current choice to toggle selection to the other choice, and it does not actually switch the ammo being used.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Ammo Swapper'
  2. Left Click on to popup options
  3. Select an alternate ammo type
  4. Nothing happens
  5. Select the current ammo type
  6. The active type displayed switches to the alternate
  7. Checking the selection on the weapon or rolling an attack, it does not change the ammo used

Expected behavior
Swaps to the selected ammo and the weapon uses the selected ammo.

Screenshots
If applicable, add screenshots to help explain your problem.

Using Edge browser

Foundry Version 7.5:

ADD5E

Additional context
DAE, MidiQOL, Furnace, CUB modules enabled

[BUG] Module does not appear on some machines

Module Version: v0.1.2

Describe the bug
We noticed that some users are able to view this module. However, I, as a GM, am unable to view the icons in the bottom left even when selecting the token for the character. Additionally, I logged in as a separate character and attempted to add a ranged weapon and ammunition to the character sheet. I hooked up the weapon to the ammunition, equipped the weapon, and even then, no icons appeared near the macro bar.

However, one player managed to see it without issues. They initially logged in via Firefox. I can now log in via Chrome into their player account and see the module.

To Reproduce
Steps to reproduce the behavior:

  1. Unfortunately, I don't know the steps to recreate this error. It's unknown what causes this. The module shows for some characters and it doesn't for others.

Expected behavior
We expected that anyone logged in with a bow (or other weapon consuming ammunition) equipped would be able to see the options to quickly change ammo. This includes the GM.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Browser:

  • Both the native app and Google Chrome. The only player who was successfully able to view it initially started on Firefox.

Foundry Version:
0.6.6

Game System:
D&D5E

Additional context
None. The same bug exists even when disabling all other modules.

Style - show a list of options for Weapons ranged when click on the weapon and show a list of ammunition when click on the little icon of the ammunition

Environment Details:

Foundry VTT Version: 0.7.1
Operating System: [Linux]
How Are You Using Foundry: [Linux,Native Application (Electron), Chrome]
Which Game System: Dungeons and Dragons 5th Edition, version 0.96
Modules Enabled?: yes
OS, Hosting, Browser (if applicable): Linux/Node/Chrome
Module Version : 0.1.1

Description of the issue:

A better styling concept for this module wil be to show up a list of options not only for the ammunition, but for the ranged weapons too, without generate a new panel for each weapon ranged equipped.

It will be more usable with little monitor or mobile device.

Here some screenshoot for make more clear what i meant:

img1

img2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.