Code Monkey home page Code Monkey logo

swarm's Introduction

Swarm

Create swarms of monsters and critters that move as one. Rats, bats, ravens, bugs, pretty butterflies or even trolls (who wouldn't want to fight a swarm of trolls?) every token can be made into a swarm. ezgif-5-6176290679

Installation

Install by searching for swarm in the module browsing tool or manually using this url: https://github.com/oOve/swarm/releases/latest/download/module.json

Useage

Right click any token (or an actors prototype token) and bring up the token config.

  • image
  • Enable your swarm by checking the box Swarm
  • Check the over box to have your swarm fly over other tokens/players or leave it unchecked for under. Bats and crows fly over, whereas spiders under.
  • Count is the number of critters in your swarm
  • Speed lets you configure the critters individual speeds. Are they moving too fast, reduce this number.
  • At last you have a drop-down box where you can choose the swarm animation, see below.

ezgif-5-0069376d9c

On the next tab: Appearance

  • image
  • If you are modifying a prototype token, you can enter a wildcard pattern as your image. If enabled as well, your swarm will draw randomly from the wildcard token images.
  • Modify the Scale to reduce or increase the size of the individual critters.
  • Change the dimensions to create a larger area where the bugs crawl.
  • Mirror image if your critters e.g., move backward.
  • Reduce the opacity to remove the "large" token

And you should have your swarm ready for action.

Localization

Current support for:

If you want to translate this module, download this file and translate it. After that open an issue sharing your translation. Also share the default name convention for your language. You can find that by either, finding a system or module that is already translated to your language and open its module.json. It should look something like this: "languages": [ { "lang": "en", "name": "English", "path": "lang/en.json" }

Compatibility

Tested on Foundry VTT version 10.

Feedback

All feedback and suggestions are welcome. Please contact me on Discord (Ove#4315), join the discussion on the Modules' Discord channel

Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker

Licensing

Swarms is a module for Foundry VTT by Dr.O after original idea by Brunhine and is licensed under a Creative Commons Attribution 4.0 International License.

swarm's People

Contributors

oove avatar eternalrider avatar

Stargazers

 avatar  avatar Jamz avatar

Watchers

 avatar

swarm's Issues

Wildcard images - random on drop, all creatures the same

It looks like there is already support for multiple/wildcard images inside a single swarm.

I would love to see another option, probably in the prototype token settings, so that when I creature is wildcarded, it:

  1. Selects a single image from the wildcard options
  2. All creatures in the swarm are that image
  3. Can be changed by the GM to another wildcard choice, either through default Foundry or using modules such as Token Variant Art and Token Wildcard HUD.

My use case: I have bloody and non-bloody quipper (piranha) images. I would like to be able to change the non-bloody to bloody once combat gets going.

Update for V11

The module is currently not compatible with V11. Are there any plans for an update? It would be greatly appreciated!

Unexpected behavior when hiding tokens

Unfortunately I don't have time to dig into this because my game is in 1 hour. But what I've noticed while logged in at the same time as both GM and player is:

Hiding the token

  • GM's swarm disappears and is replaced by single center image. Desired behavior: Swarm still visible at lower transparency.
  • Player's swarm does not disappear. Desired behavior: Swarm disappears.
  • Note: If the player refreshes, the swarm does disappear

Player joins map where token is already hidden

  • Token (and swarm) are not visible (correct behavior)
  • If the token is then revealed, the center token is visible, but not the swarm. This can be fixed by refresh by player, or GM deleting/undo deleting token.

Note: I have a lot of other modules. I can try and Find the Culprit this if needed when I have more time.

Placing tokens

Thank you for a really cool mod!

When you place tokens on a map the swarm spawns in the upper left corner, causing the swarm to slowly move towards the token. You can either wait for the swarm to travel, or deactivate and reactivate the swarm to make it appear where the token is.

It would make more sense if the swarm spawned where the token is placed.

Sidenote: It would make sense have two speed settings, one for idle and one for moving. Especially for larger swarms.

Bug: Main Token Image Still Visible

Tried on newly created and old tokens.

Edit: I see the spiders in the demonstration GIF still has the token, but the rats don't?

Figured it out; adjusting the token opacity.

firefox_9cu7qDgqyy.mp4

Foundry 9.269
D&D 5e 1.6.3

Feature Request: Custom speed for swarm

The size of the mini tokens correlates to it's original token size, but it doesn't scale it's speed, which does look funny for giant or either very small tokens. It should be possible to link speed to token size or have a custom field for speed.

Support for S3-hosted images

Please add support for images hosted in S3.

When I use an image hosted there, I only get the central image, no swarm.

image

p.s. Never knew I need this module so badly. :D Thanks for making it, it's awesome!

Feature Request: Support for Animated Tokens

Ok, I spoke too soon when I said the module had everything I wanted. I did a little animated test of a tiny rot grub this morning before seeing that the swarm images stayed static.
RotGrubs

It's not an absolute need of course, because static images can be lots of fun too especially if some faked movement is baked in.
Beeholder20

I'm just thinking about editing/expanding my token art for swarms and before I dive into doing anything I figured I'd ask if animated tokens were a possible addition.

Feature Request: Normalize Movement Speed Between Animation Options

Currently the speed of the sprites along their animation paths varies quite a bit:

  • Spiral is slowest.
  • Circular is medium speed.
  • Random is fastest.

If speed stayed consistent between these options it would make the settings a bit more intuitive with Speed only controlling how fast the sprites move and the path options only affecting the shape of that movement. It would also make it easier to create animated tokens (like a Bat flapping its wings) to match certain speeds.
SwarmSpeedDisparity

Bug: Prototype token swarms fly away when token placed

Changing an existing token on a scene into a swarm seems to work as expected. However, if the prototype token of an actor is changed into a swarm and then the actor is dragged onto a scene the swarm images all make a beeline for the top left corner of the scene and eventually bounce away when they hit the corner. See attached video.

v9.269, 5e 1.6.3, swarms 9.0.1, hosted on the forge. Same behavior in firefox and chrome. Tested with only swarms active. No errors in console.
swarms

Feature Request: Use Images from Alternate Actor Tokens if Available

First off, thank you for this module, because it looks like it's got the potential to be tons of fun!

Others already touched on my top issues: getting updates to work on the token without refreshing the page, an option to have the swarm display over tokens (especially the control token), an option to customize scaling/speed, an option to change the default orientation of the token (I draw my tokens south-facing too), etc.

One thing I didn't see mentioned yet though was the option to use wildcard token images. I'd love to be able to add some variety into the swarms. Pulling images from Alternate Actor Tokens should scratch that itch nicely if it's possible to implement.

image

Compatibility issue with V10 version

So the effect of the issue is that your 10.0.1 version is still being served up as an update for V9 and I suspect that's not what you intended. The reason is that your module.json file still contains a v9-compatible name field, but no longer contains any V9-compatible compatibility fields (V9 does not parse the new compatibility object and ignores it). Because of that, V9 Foundry assumes that all versions are compatible and serves it up as an update. If your intent was to make your version 10.0.1 only available for V10, you need to either:

remove the name field completely, so that V9 does not see a valid manifest for this and future versions

OR

add minimumCoreVersion: 10, so that V9 knows that this is not a V9-compatible version

But not both.

You can actually do this just by editing your current module.json, you shouldn't have to make a new release or anything and it should work the way you intended from then on.

Bug: Target marker not appearing for players

It seems that if a player targets a token with swarm active, the target marker does not appear for the player, but it does appear for the GM that the player have marked it.

This makes it difficult for the players to know what they have targeted.

image
Player view

image
GM view

[Feature request] Compatability with 3dcanvas

Because of the 3d models being on a static 2d plane this should be possible although I do realize this is a huge request that probably needs communication with the dev of 3Dcanvas.

It would make me and my players extremely happy though! (And no, no need to enable animations for swarm behaviour, would probably just lag anyway)

[Feature Request] Swarm Shape

Would it be possible to give the swarm a more circular bounding area rather than the square one it has now? Even on hexgrid it's still a square shape.

Having it be an option would be fine, as I could see some users wanting it to conform to the grid square. Allowing a circular option though would give a much more realistic look.

Feature request: option to adjust swarm z index or play above tokens

Currently swarms only appear to show up below tokens even when the z index of the "control token" is increased (in my case using token z). Trying to create a swarm of flying creatures and it would be great if they played above tokens or if we had the option to select whether particular swarms would appear above or below tokens. I'd think that in most cases we'd want the swarming creatures to crawl on top of other creatures but there might be other opinions on that or situations where particular swarms of bugs or whatnot should appear below other stuff.

Thanks for all your work on this. Now all I need to do is figure out how to get a swarm to be briefly summoned on top of a target token as the "animation" for my swarmkeeper ranger's gathered swarm ability or for spells like insect plague.

Bug: Miniature tokens move backwards

My miniature tokens are crawling backwards in a swarm.

They have a downward orientation, as it is default for foundry. Otherwise the normal tokens wouldn't look in the right direction, when rotating. Excerpt from the FoundryVTT docs:

Rotation of zero (the default) corresponds to a southward facing as this is the most commonly used convention for Token artwork.

See: https://foundryvtt.com/article/tokens/

So the swarm's mini tokens' orientation should be rotated by 180° and it should be default. You could add a additional toggle or field for a custom orientation in the options.

Bug: Aspect ratio of mini tokens changes when copy and pasting newly created swarm

When using tokens, that don't have a 1:1 aspect ratio the swarm could be created with the wrong aspect ratio.

I use horses with 1:2 (e.g. 500px wide, 1000px tall) aspect ratio as the token picture (but not as the token aspect ratio. That's a 1x1 still).

  1. Place the new horse token
  2. Edit it to create a swarm
  3. Copy the token and place it next to the original
  4. Copy it again and place it again

image
As you see, the left token isn't updated as described in #5, but the new one in the middle has a wrong aspect ratio. The second time the token get's copied on the right it keeps the correct ratio. This is reproducible by me, it's always the first copy.

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.