Code Monkey home page Code Monkey logo

rinnocenti / innocenti-looting Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 531 KB

A simple module to use for looting dead NPCs tokens. With it the token's targets will have their items moved to the user's sheet. (with the exception of some like natural weapons, feats and spells). Some items have a chance of not being in good use and will not be sent to the sheet (configurable percentage).

License: Creative Commons Zero v1.0 Universal

JavaScript 100.00%
dnd5e foundry foundry-vtt loot macro rouge

innocenti-looting's People

Contributors

rinnocenti avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

pdelva20

innocenti-looting's Issues

Idea: Loot tab

Instead of items that the players aren't meant to receive perhaps a looting tab could be a good idea, kinda like a mod in Minecraft called "Custom NPC" where it has a chance to drop THOSE items instead of what the NPC is carrying/wielding:

Ex:
image

Thank you!

Problem looting / HOWTO

Thank you for the module. I run into some problems partially because I couldn't at first figure out how it should work :D

  1. Do I need to manually turn every dead enemy in to loot sheet and give players access to them?

Took me a long time to actually figure out how my player can access the loot sheet in the first place, before I understood that I need to switch the sheet to loot sheet. Is there a setting (didn't find) or macro to do this automatically when enemies die?

  1. I get an error for no active GM present when trying to loot the enemies.

After getting to the loot sheet, I tried to split the gold three ways and was instantly given a message that there is no active GM on your scene. I have a GM session running in my Foundry VTT app, like always, and was testing this module as a player in Chrome. I can see the GM logged in the lower left hand corner and if I open a new connection to the game, I can see that the GM option has been grayed out, so the game recognizes that there is an active GM connection, so what could be the root of this error?

image

Looting / Selling problem

Regardless of lotting or converting the items to coin. The chat message shows up but I do not see the item removed from the NPC and added to my character sheet.

No token is targeted

This is probably me, but when selecting a 0hp npc and running the macro,
(async () => { let actions = new InnocentiLoot.Loot(); await actions.Check(); })();

I get the following warning in the game
No token is targeted
and this in the console

ActionLoot.js:30 Uncaught (in promise) TypeError: this.targets is not iterable
    at ActionLoot.Check (ActionLoot.js:30)
    at eval (eval at callScriptMacroFunction (Macros.js:176), <anonymous>:5:86)
    at Macro.eval (eval at callScriptMacroFunction (Macros.js:176), <anonymous>:5:97)
    at Macro.callScriptMacroFunction [as callScriptFunction] (Macros.js:179)
    at Macro.renderMacro [as renderContent] (Macros.js:197)
    at Macro.executeMacro (Macros.js:221)
    at Hotbar._onClickMacro (foundry.js:20566)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.v.handle (jquery.min.js:2)

Am I missing something?

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.