Comments (1)
I found an issue with this as well. A freind of mine (A genius coder by the name of Ethaks) had to write a world script. the issue was the ownership was not officially recognized by the system, I believe he said.
I installed the World Scripter module and put this macro in the World Scripter compendium and it solved the issue for me.
// Fix Toughness Roll Buttons
async function runStuff() {
const commons = await import("/systems/mutants-and-masterminds-3e/module/helpers/common.mjs");
Hooks.on("renderChatMessage", async (message, html, data) => {
html.find("button.btnRoll").click(async (ev) => {
ev.stopPropagation();
const target = $(ev.currentTarget);
const tgt = target.data("target");
const savetype = target.data("savetype");
const vs = target.data("vs");
const dataAtk = target.data("datk");
const dataStr = target.data("dstr");
const typeAtk = target.data("type");
const hasAlt = ev.altKey;
const token = canvas.scene.tokens.find((token) => token.id === tgt);
if (token.actor.ownership[game.user.id] === 3 || token.actor.ownership.default === 3) return;
if (!token.actor.isOwner)
return ui.notifications.error(`You do not have owner permissions for ${token.actor.name}`);
const tokenData = token.actor.system;
const saveScore = tokenData.defense[savetype].total;
const name = `${game.i18n.localize(CONFIG.MM3.defenses[savetype])}`;
commons.rollVs(
token.actor,
name,
saveScore,
vs,
{ typeAtk: typeAtk, atk: dataAtk, str: dataStr, tkn: token },
{ alt: hasAlt },
);
});
});
}
runStuff();
from foundry-mm3.
Related Issues (20)
- Request: Sound Effects to Effects HOT 1
- Feature Request: Choose to Run a macro as part of the Attack Button options
- Feature Request: Weaken and Healing as Attack "Damage Types"
- Feature Request: Add Attacks to Items such as Powers and Equipment
- Condition Lab & Triggler Compatibility
- Attack and Damage messaging showing incorrectly HOT 1
- Feature Request: Area of Effect Attack type.
- BUG: Hero Labs import error with Power Profiles active HOT 2
- BUG: Power effect "FEATURE" seems to halt import HOT 1
- Feature Request: Ability to choose measurement system (Metric to Imperial) HOT 2
- Bug: Pulldown in chat not working properly HOT 1
- Feature Request: Expand attack successes to five, not three.
- Feature Request: Link HQ Sheet and/or Vehicles Sheet to Characters Sheets
- Bug: Issues with import HOT 1
- New Importer Issue
- Incorrect Calculation of Injuries HOT 3
- Feature Request: Strength Based Damage Option
- Unable to Import characters from HeroLab HOT 1
- Advantages do not save modifiers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry-mm3.