League of Extraordinary FoundryVTT Developers

LOE

League of Extraordinary FoundryVTT Developers

Join the community to ask questions about League of Extraordinary FoundryVTT Developers and get answers from other members.

Join
SSpewbert3/7/2024

Hi, friends! I'd like to build a module

Hi, friends! I'd like to build a module and I could use a shove in the right part of the docs to go looking first. The goal is to modify the default roll dialog to add an additional button. Alongside "Advantage," "Disadvantage," and "Normal," I'd like to add a button to trigger the "Emphasis" roll, a mechanic which rolls 2d20 and takes the result farthest from 10. It's a mechanic my players really enjoy for high-risk situations. I have a macro working as a quick proof-of-concept which emulates the behaviour, but I'm not sure where to start in terms of modifying the built-in roll dialog so I can do it in a less hacky way. Any ideas?...
No description
Kkgar3/3/2024

Well now I'm downloading lancer

Well now I'm downloading lancer
MMana3/31/2023

Good call

It's more reliable to enter the directory.
KWkariboka (winterwulf)12/10/2022

MathJS

as a javascript dependency
CCynicide8/7/2022

Here s an example No template data in

Here's an example. No template data in the actor object, but the object is associated with a template in templates.json
No description
BMBig Man3/29/2022

ilthid stop drag

Actually, would it be possible to modify the core function that allows people to click and drag tokens in the first place?
ZZhell3/1/2022

new consumable types

Tried adding localization strings for some new consumable types, but keep getting this ("DND5E.Consumable[...]") no matter what. I'm 99% I have followed all guides on localization to the point. en.json in the module.json, etc etc, with all the needed strings inside.
No description
MMana2/26/2022

Overriding onDropItem & onSortItem

You'd override them in your sheet class.
Nn0q1/8/2022

dragdrop shennenegins

Right now, a user can drag a spell onto their character sheet. I store that in a 'spell' array and list it in the 'spell library'. They can prep the spell with the UI and that (for now) sets a flag which causes it to be displayed under the 'prepared spells' side as well. Ideally, I'd like a user to drag the spell from the library side to the prepped side and achieve the same thing. I don't need a solution and I haven't started trying to do this, but I'd really appreciate if someone could sim...
No description
DTDaniel Thorp1/1/2022

expand arrays

Is there a way to expandObject except for an Array?
CCalego12/10/2021

Dialog shennanegins

TIL the button callbacks for Dialog.prompt and Dialog.confirm can be asynchronous. ```js const foo = async () => { const response = await Dialog.prompt({...
CCalego10/31/2021

Primary and Embedded Updates

TIL how to update embedded documents at the same time as parent documents. ``` game.actors.getName("Foo").update({ 'data.traits.size': 'sm',...
CCalego10/19/2021

compendium shennanegins

TIL about CompendiumContent.getDocuments taking nedb queries.
game.packs.get('dnd5e.heroes').getDocuments({ 'data.abilities.con.value': {$gt: 14} });
game.packs.get('dnd5e.heroes').getDocuments({ 'data.abilities.con.value': {$gt: 14} });
More info about nedb queries: https://github.com/louischatriot/nedb#finding-documents...
MMana9/29/2021

devMode json changed warning

I checked the module repo and I honestly can't figure out where I would plug in my code. I'd be guessing I'd be adding entirely new file like how the anchor and disable template cache do, but the existing folders make no sense for what this would be about....
DTDaniel Thorp8/31/2021

socket woes

not the socket firing
EEthaks8/25/2021

select in sheet

Also, is the data actually saved on the actor? You can inspect the data in the console opened with F12 by using game.actors.getName("My Actor").data.toObject()
CCalego8/12/2021

ToDontThings

we should have threaded a long time ago I think, whoops
DDor7/29/2021

Dors project

To be clear, I'm very open to the feedback that I'm doing something stupid here, hah. This is my first Foundry work and first work of any size in js so doing dumb things is a daily occurrence. That said, I think some of the gap in understanding here is a lack of context about what the page is doing, which makes sense because I haven't explained it - I was looking for a pretty narrow solution. Let me explain some of what the form is doing and you can tell me if it still sounds like I'm doing a Dumb Thing. (as an aside, this is probably a good use case for threading, hah)...