Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
Update V.0.2.0
Browse files Browse the repository at this point in the history
[BREAKING] - New macro, please replace.

* Support for currency items
* Support for random coin items
* Support for random treasure table items.
  • Loading branch information
rinnocenti committed Jan 21, 2021
1 parent 6c9c1d8 commit 0bdd32d
Show file tree
Hide file tree
Showing 9 changed files with 329 additions and 153 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# v.0.2.0

[BREAKING] - New macro, please replace.

* Support for currency items
* Support for random coin items
* Support for random treasure table items.

# v.0.1.0

* Initial version for internal testing
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,53 @@ And the Modules:

Create a macro with permission for all your players with the following content:

Macro - LOOTING
Macro [NEW MACRO] - LOOTING

`let actions = new InnocentiLoot.Loot();`
`(async () => {
let actions = new InnocentiLoot.Loot();
await actions.Check();
})();`

## How to Use
the module basically works looking for a items in the token inventory of npc with hp 0, can be looted using the target with a macro, unless they are:
classes, spells, feats, natural weapons, siege weapons, vehicle equipment and natural equipment.

Items also have a percentage (configurable) chance of not being in good use and not being moved (and deleted) to the character sheet.
### Loot Currency end Cois
From version 0.2 the module adapts a new type of loot for currencys.

a loot type item that has the end of its name, in brackets, the abbreviation of the currencies in force will be considered coins of the same type. for example:

* "Silver (sp)" will convert your quantity into silver coins.
* "Golden (gp)" will convert your quantity into golden coins.
* "Bubble (sp)" will convert your quantity into silver coins.

A valid abbreviation must be in lower case and in parentheses at the end of the item name.
Alternatively you can make the item also generate a random quantity (eg. 3d6) of the item using the item's "source" field.

For the quantity, the module will initially consider if the item's source field has a valid roll, otherwise it will consider the item's quantity field.

<img src="https://github.com/rinnocenti/innocenti-looting/blob/main/img/item-coin.png" width="70%" height="70%">
In the example above this item will generate 3d6 gold coins for the player who loot it.

### Loot Items Rolltables.
From version 0.2 the module adapts a new type of loot for random items.
This type of item does not consider the module settings for the percentages of looting items, all items drawn will be added.
a random table loot is recognized by the name that must begin with 'Table:' followed by the name of the rollable table to be drawn, eg:

'Table: My Random Tresures'

will draw new items from the "My Random Tresures" rollable table add them to the loot list.

The table should only contain items and/or other item tables.
Items can be in the items folder in your world or in any item compendium.


## Module Settings
Items also have a percentage (configurable in module settings) chance of not being in good use and not being moved (and deleted) to the character sheet.

## Future Features
* Looting Gold.
* Support for Module Better Tables
* Pickpocket in lives npcs
* Sort Golds in loot and robbery (maybe in rolltables)

## Support
If you like this module and would like to help or found a bug or request new features call me on discord @Innocenti#1455 or create a issue here.
Expand Down
Binary file added img/item-coin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"Looting.MsgChat": {
"looting": "Looting",
"Currency": "Currency"
},
"Looting.Errors": {
"noSelect": "Select a token",
"noToken": "No token is targeted",
Expand All @@ -16,6 +20,8 @@
"removeItem": "Remove Item from token",
"removeItemHint": "If enabled it removes items from the token (does not remove from the actor unless the token is linked)",
"interactDistance": "Maximum distance to interact (in grids)",
"interactDistanceHint": "the maximum distance for players to interact with the lock in number of grids"
"interactDistanceHint": "the maximum distance for players to interact with the lock in number of grids",
"lootSystem": "Loot System",
"lootSystemHint": "Choose one of the ways to perform the loot (Soon)"
}
}
24 changes: 15 additions & 9 deletions lang/pt-BR.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
{
"Looting.MsgChat": {
"looting": "Pilhando",
"Currency": "Moedas"
},
"Looting.Errors": {
"noSelect": "Selecione um Token",
"noToken": "Nenhum token esta marcado como alvo",
"novalidLoot": " não é um baú válido",
"invalidDistance": "A distancia minima para esta interação é: {dist} quadros",
"invalidCheck": "{token} já foi pilhado"
"novalidLoot": " não é um baú válido",
"invalidDistance": "A distancia minima para esta interação é: {dist} quadros",
"invalidCheck": "{token} já foi pilhado"
},
"Looting.Settings": {
"percentWeapon": "Pilhagem de Armas (%)",
"percentWeaponHint": "Porcentagem de chance das armas no inventório do NPC não servirem para pilhagem (Foram danificadas)",
"percentWeaponHint": "Porcentagem de chance das armas no inventório do NPC não servirem para pilhagem (Foram danificadas)",
"percentEquipment": "Pilhagem de equipamento (%)",
"percentEquipmentHint": "Porcentagem de chance das armas no inventório do NPC não servirem para pilhagem (Foram danificadas)",
"percentEquipmentHint": "Porcentagem de chance das armas no inventório do NPC não servirem para pilhagem (Foram danificadas)",
"percentConsumable": "Pilhagem de consumivel (%)",
"percentConsumableHint": "Porcentagem de chance das armas no inventório do NPC não servirem para pilhagem (Foram danificadas)",
"interactDistance": "Distância máxima para interagir (em grade)",
"interactDistanceHint": "A distância mimáxima para os jogadores interagirem com a trava em unidades de grade do mapa",
"percentConsumableHint": "Porcentagem de chance das armas no inventório do NPC não servirem para pilhagem (Foram danificadas)",
"interactDistance": "Distância máxima para interagir (em grade)",
"interactDistanceHint": "A distância mimáxima para os jogadores interagirem com a trava em unidades de grade do mapa",
"removeItem": "Remover os Itens",
"removeItemHint": "Se ativado remove os itens do token (não remove do ator a menos que o token estiver linkado)"
"removeItemHint": "Se ativado remove os itens do token (não remove do ator a menos que o token estiver linkado)",
"lootSystem": "Sistema de Pilhagem",
"lootSystemHint": "Escolha uma das formas para realizar a pilhagem (em breve)"
}
}
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Innocenti Looting",
"description": "<p>Modules for loot from monsters and Npcs</p>",
"author": "Renato innocenti",
"version": "0.1.1",
"version": "0.2.0",
"minimumCoreVersion": "0.7.0",
"compatibleCoreVersion": "0.7.9",
"systems": [ "dnd5e" ],
Expand Down
2 changes: 1 addition & 1 deletion packs/looting-macro.db
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Looting","permission":{"default":0,"KrgPitW1Ezq59fcV":3},"type":"script","flags":{"furnace":{"runAsGM":false},"core":{"sourceId":"Macro.xF8VDI28j7UzkSoG"}},"scope":"global","command":"let actions = new InnocentiLoot.Loot();","author":"KrgPitW1Ezq59fcV","img":"icons/containers/bags/coinpouch-gold-red.webp","actorIds":[],"_id":"Nh2PYfEvqiw4lK59"}
{"name":"Looting","permission":{"default":0,"oYLBQUHyYQcwtcvC":3},"type":"script","flags":{"furnace":{"runAsGM":false},"core":{"sourceId":"Macro.xF8VDI28j7UzkSoG"}},"scope":"global","command":"(async () => {\nlet actions = new InnocentiLoot.Loot();\nawait actions.Check();\n})();","author":"oYLBQUHyYQcwtcvC","img":"icons/containers/bags/coinpouch-gold-red.webp","actorIds":[],"_id":"1cW8KDJr83nOynwW"}
Loading

0 comments on commit 0bdd32d

Please sign in to comment.