generated from League-of-Foundry-Developers/FoundryVTT-Module-Template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,216 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,198 @@ | ||
![](https://img.shields.io/badge/Foundry-v10-informational) | ||
<!--- Downloads @ Latest Badge --> | ||
<!--- replace <user>/<repo> with your username/repository --> | ||
<!--- ![Latest Release Download Count](https://img.shields.io/github/downloads/<user>/<repo>/latest/module.zip) --> | ||
# Minion Manager | ||
|
||
<!--- Forge Bazaar Install % Badge --> | ||
<!--- replace <your-module-name> with the `name` in your manifest --> | ||
<!--- ![Forge Installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2F<your-module-name>&colorB=4aa94a) --> | ||
![Latest Release Download Count](https://img.shields.io/github/downloads/fantasycalendar/FoundryVTT-MinionManager/latest/module.zip?color=2b82fc&label=DOWNLOADS&style=for-the-badge) [![Forge Installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2Fminionmanager&colorB=006400&style=for-the-badge)](https://forge-vtt.com/bazaar#package=minionmanager) ![Foundry Core Compatible Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fgithub.com%2Ffantasycalendar%2FFoundryVTT-MinionManager%2Freleases%2Flatest%2Fdownload%2Fmodule.json&label=Foundry%20Version&query=$.compatibility.verified&colorB=orange&style=for-the-badge) ![Latest Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fgithub.com%2Ffantasycalendar%2FFoundryVTT-MinionManager%2Freleases%2Flatest%2Fdownload%2Fmodule.json&label=Latest%20Release&prefix=v&query=$.version&colorB=red&style=for-the-badge) | ||
|
||
--- | ||
|
||
# How to use this Template to create a versioned Release | ||
<img src="https://app.fantasy-calendar.com/resources/computerworks-logo-full.png" alt="Fantasy Computerworks Logo" style="width:250px;"/> | ||
|
||
1. Open your repository's releases page. | ||
A module made by [Fantasy Computerworks](http://fantasycomputer.works/). | ||
|
||
![Where to click to open repository releases.](https://user-images.githubusercontent.com/7644614/93409301-9fd25080-f864-11ea-9e0c-bdd09e4418e4.png) | ||
Other works by us: | ||
|
||
2. Click "Draft a new release" | ||
- [Fantasy Calendar](https://app.fantasy-calendar.com) - The best calendar creator and management app on the internet | ||
- [Sequencer](https://foundryvtt.com/packages/sequencer) - Wow your players by playing visual effects on the canvas | ||
- [Item Piles](https://foundryvtt.com/packages/item-piles) - Drag & drop items into the scene to drop item piles that you can then easily pick up | ||
- [Tagger](https://foundryvtt.com/packages/tagger) - Tag objects in the scene and retrieve them with a powerful API | ||
- [Rest Recovery](https://foundryvtt.com/packages/rest-recovery) - Automate most D&D 5e long and short rest mechanics | ||
- [Token Ease](https://foundryvtt.com/packages/token-ease) - Make your tokens _feel good_ to move around on the board | ||
|
||
![Draft a new release button.](https://user-images.githubusercontent.com/7644614/93409364-c1333c80-f864-11ea-89f1-abfcb18a8d9f.png) | ||
Like what we've done? Buy us a coffee! | ||
|
||
3. Fill out the release version as the tag name. | ||
<a href='https://ko-fi.com/H2H2LCCQ' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a> | ||
|
||
If you want to add details at this stage you can, or you can always come back later and edit them. | ||
--- | ||
|
||
![Release Creation Form](https://user-images.githubusercontent.com/7644614/93409543-225b1000-f865-11ea-9a19-f1906a724421.png) | ||
## What is this module? | ||
|
||
4. Hit submit. | ||
Minion Manager is a module that automates the MCDM "Flee, Mortals!" minion rules. This includes: | ||
|
||
5. Wait a few minutes. | ||
- Overkill damage from melee and ranged weapons | ||
- Minion group attacks | ||
- Group-style initiative | ||
|
||
A Github Action will run to populate the `module.json` and `module.zip` with the correct urls that you can then use to distribute this release. You can check on its status in the "Actions" tab. | ||
These are all configurable through the module's settings. | ||
|
||
![Actions Tab](https://user-images.githubusercontent.com/7644614/93409820-c1800780-f865-11ea-8c6b-c3792e35e0c8.png) | ||
## Group Initiative | ||
|
||
6. Grab the module.json url from the release's details page. | ||
You can set this by right-clicking on the token "add to initiative" button to open the group initiative interface - clicking on a number within that UI moves all the selected tokens into that initiative group. | ||
|
||
![image](https://user-images.githubusercontent.com/7644614/93409960-10c63800-f866-11ea-83f6-270cc5d10b71.png) | ||
## Where can I find the minion rules? | ||
|
||
This `module.json` will only ever point at this release's `module.zip`, making it useful for sharing a specific version for compatibility purposes. | ||
You can find the full MCDM book here: | ||
|
||
7. You can use the url `https://github.com/<user>/<repo>/releases/latest/download/module.json` to refer to the manifest. | ||
https://shop.mcdmproductions.com/collections/flee-mortals-the-mcdm-monster-book | ||
|
||
This is the url you want to use to install the module typically, as it will get updated automatically. | ||
Or the preview packet for the minion rules here: | ||
|
||
# How to List Your Releases on Package Admin | ||
https://files.mcdmproductions.com/FleeMortals/FleeMortalsPreview.pdf | ||
|
||
To request a package listing for your first release, go to the [Package Submission Form](https://foundryvtt.com/packages/submit) (accessible via a link at the bottom of the "[Systems and Modules](https://foundryvtt.com/packages/)" page on the Foundry website). | ||
# Documentation | ||
|
||
Fill in the form. "Package Name" must match the name in the module manifest. Package Title will be the display name for the package. Package URL should be your repo URL. | ||
![image](https://user-images.githubusercontent.com/36359784/120664263-b49e5500-c482-11eb-9126-af7006389903.png) | ||
## API | ||
|
||
You can access the API through `game.modules.get("minionmanager").api` | ||
|
||
One of the Foundry staff will typically get back to you with an approval or any further questions within a few days, and give you access to the package admin pages. | ||
## Functions | ||
|
||
Once you have access to the [module admin page](https://foundryvtt.com/admin/packages/package/), you can release a new version by going into the page for your module, scrolling to the bottom, and filling in a new Package Version. | ||
<a name="setGroupInitiative"></a> | ||
|
||
When listing a new version, Version should be the version number you set above, and the Manifest URL should be the manifest __for that specific version__ (do not use /latest/ here). | ||
![image](https://user-images.githubusercontent.com/36359784/120664346-c4b63480-c482-11eb-9d8b-731b50d70939.png) | ||
### setGroupInitiative | ||
|
||
> ### :warning: Important :warning: | ||
> | ||
> It is very important that you use the specific release manifest url, and not the `/latest` url here. For more details about why this is important and how Foundry Installs/Updates packages, read [this wiki article](https://foundryvtt.wiki/en/development/guides/releases-and-history). | ||
<code>setGroupInitiative(targets, groupNumber) ⇒ boolean | Promise<Array<Document<any, Scene>>></code> | ||
|
||
Clicking "Save" in the bottom right will save the new version, which means that anyone installing your module from within Foundry will get that version, and a post will be generated in the #release-announcements channel on the official Foundry VTT Discord. | ||
Sets the group initiative of a set of tokens or actors. | ||
|
||
**Kind**: global function | ||
|
||
# FoundryVTT Module | ||
| Param | Description | | ||
| --- | --- | | ||
| targets | The targets to set the group initiative for | | ||
| groupNumber | The group initiative to set on the targets | | ||
|
||
Does something, probably | ||
<a name="removeGroupInitiative"></a> | ||
|
||
## Changelog | ||
### removeGroupInitiative | ||
|
||
<code>removeGroupInitiative(targets) ⇒ boolean | Promise<Array<Document<any, Scene>>></code> | ||
|
||
Removes the group initiative of a set of tokens or actors. | ||
|
||
**Kind**: global function | ||
|
||
| Param | Description | | ||
| --- | --- | | ||
| targets | The targets to remove the group initiative from | | ||
|
||
<a name="getActors"></a> | ||
|
||
### getActors | ||
|
||
<code>getActors(targets) ⇒ Array<Actor></code> | ||
|
||
Helper function - turns a list of UUID strings/tokens/token documents into a list of the respective actors | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| targets | <code>Array<string|Token|TokenDocument|Actor> | stringTokenTokenDocumentActor</code> | | ||
|
||
<a name="turnIntoMinions"></a> | ||
|
||
### turnIntoMinions | ||
|
||
<code>turnIntoMinions(actors) ⇒ Promise<void></code> | ||
|
||
Turns the given actors into minions by creating a minion feature document on the actor. | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- |----------------------------------------------------------------------------------------------| | ||
| actors | <code>Array<string/Token/TokenDocument/Actor>String/Token/TokenDocument/Actor</code> | | ||
|
||
<a name="revertMinions"></a> | ||
|
||
### revertMinions | ||
|
||
<code>revertMinions(actors) ⇒ Promise<void></code> | ||
|
||
Removes the minion feature from a set of actors, turning them back into normal actors. | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- |------------------------------------------------------------------------------------------| | ||
| actors | <code>Array<string/Token/TokenDocument/Actor>stringTokenTokenDocumentActor</code> | | ||
|
||
<a name="isMinion"></a> | ||
|
||
### isMinion | ||
|
||
<code>isMinion(target) ⇒ boolean</code> | ||
|
||
Helper function - returns true or false whether the given target is a minion or not | ||
|
||
**Kind**: global function | ||
|
||
| Param | | ||
| --- | | ||
| target | | ||
|
||
<a name="setActorItemToGroupAttack"></a> | ||
|
||
### setActorItemToGroupAttack | ||
|
||
<code>setActorItemToGroupAttack(item, isGroupAttack) ⇒ Promise<Item></code> | ||
|
||
Helper function - sets the given item to become a group attack type feature | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| item | <code>Item</code> | | ||
| isGroupAttack | <code>boolean</code> | | ||
|
||
<a name="isItemGroupAttack"></a> | ||
|
||
### isItemGroupAttack | ||
|
||
<code>isItemGroupAttack(item) ⇒ boolean</code> | ||
|
||
Helper function - returns whether the given item is a group attack type feature | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| item | <code>Item</code> | | ||
|
||
<a name="turnActorAttacksIntoGroupActions"></a> | ||
|
||
### turnActorAttacksIntoGroupActions | ||
|
||
<code>turnActorAttacksIntoGroupActions(actors) ⇒ Promise<void></code> | ||
|
||
Turns every feature or item on a given actor into group attack type features | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| actors | <code>Array<Actor></code> | | ||
|
||
<a name="revertActorAttacksFromGroupActions"></a> | ||
|
||
### revertActorAttacksFromGroupActions | ||
|
||
<code>revertActorAttacksFromGroupActions(actors) ⇒ Promise<void></code> | ||
|
||
Reverts every feature or item on a given actor back into a normal item from being a group attack type feature | ||
|
||
**Kind**: global function | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| actors | <code>Array<Actor></code> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.