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

commissions

package-development

system-development

other-topics

workgroups

development

package-ideas

package-compatibility

pixijs-canvas-shaders

progress-reports

dev-guides-and-docs

ui-ux-sheets-forms

hooks

development-basics

manifest-plus

tools-and-workflow

active-effects

wiki

dnd5e-dev

package-stewardship

swade-dev

typescript

starfinder-dev

lancer-dev

pathfinder1e-dev

foundryvtt-v10-research

coc7-dev

a5e-dev

v10-updatathon

svnsea2e-dev

package-jam-2022

blackflag-dev

api-announcements

hook conventions

Regarding hooks, is the convention that all pre... hooks are executed on the machine that initiated the action? Ie, if a user updated an actor, it would call preUpdateActor only on their machine, and then updateActor on everyone elses?

API doc topics

Give me some ideas for what areas of the foundry core API would benefit from a wiki documentation page. I'm looking for what would be most useful to do next.

Discord Permission Issue

Oh, I think you also need a Typescript role

item to actors script

I have this macro for updating actors in a compendium with spells from a compendium of spells (i.e. replacing by name any spells on the actors, so I can push my improvements to spell automation onto the monsters in my compendium). It works, but I'm wondering if I can make it more efficient - currently, it's doing an individual update per actor, and that feels like it should be possible to batch into a single update (which would also allow me to construct the update list by getting an extended index with the items for the monsters, and not have to getDocument on each monster). There's definitely a bunch of smaller improvements that can be made as well - this is slightly sketchy code and I'm out of practice. ```js let pack = game.packs.get("DDBImports.spells") let index = pack.index...

compendium errors upgrading to v9

hmm im not entirely sure how this will work though.. because I did just a quick smell test to my module under v9, and it broke on the compendium settings which is absolutely core to the module 😛 and I'm not sure if whatever I do to fix it will work on 0.8.x

Blind Chat Messages

Anyone have good examples of creating a chat message that should only be visible to a connected GM, but might be created by any connected client?

createEmbeddedDocuments issue

I'm going to throw my code in a thread so I don't clutter this channel up with a wall of text

Compendium loading

hmm ghost, I added some console.time tags here and there to measure the difference between loading only SRD data vs bigger compendiums (I tried the compendiums I have with stuff imported from ddbi) and I noticed that times lower significantly after the first calls on each of the compendium groups, these are cached midway I guess ? I am not aware of how the foundry infrastructure works inside. I mean.. I tried multiple times like this: 1) using only SRD compendiums, Times X 2) using DDBImporter compendiums, Times Y > X...

DocumentData shennanegins

TIL: It is possible to update an Actor or Item's data.data with arbitrary information that isn't defined in the system template. This data survives database compaction.
No description

flag shenannegins

TIL you can set the flags key on a document to whatever you want to (e.g. a string). This is a sure fire way to completely ruin someone else's day, or your own day when another module un-does this by setting a flag 'correctly'. ```js game.actors.getName('A Character').update({ ['flags']: 'A value'...

S3 File Picker Settings

Can someone with an S3 configuration give me a test of the FilePicker settings api and tell me if a file picked on S3 gives an indication that it is on the S3 bucket? You can open console and do this in game: ```js game.settings.register("core", "chooseFoo", {...

Tagger Code Review

Would anyone be keen to code review Tagger? I'd like to git better 😄 https://github.com/Haxxer/FoundryVTT-Tagger...

mergeObject

mergeObject is a beast of a function which lets you smash two objects together and that options argument lets you control how exactly you want to merge things. Argument 1: Source Object --> What we are merging into (this is going to be mutated by default) Argument 2: Mod Object --> What we are applying to the Source ...

custom hud element

Maybe I'm missing something simple here. I'm making my own custom hud element (NOT based on a Foundry Class) and am wondering what's the easiest way to make it draggable/movable. Any suggestions? I saw the draggable class which at least changes the cursor, but no dragging can actually happen yet (assuming I need a handler somewhere but don't want to reinvent the wheel.)

Dynamically get Object property from user input

Anyone know how I can do this? I have an Actor (myactor) and I'd like to have an input box which the user can use to refer to any of its properties, by typing in a path (i.e. @data.abilities.str.proficiency). How can I get that property within my script after they type in the box?...

Scroll Into View troubles

Anyone know why Element.scrollIntoViewIfNeeded() is working, but Element.scrollIntoView() isn't? The IfNeeded version is apparently "Non-Standard" https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded Not sure what I should do here... Could someone test which works best on your Foundry instance?...
No description

Overlay hiding stars

Hey y'all! I've run into a general CSS/design problem that I'm kinda stumped on solving. In the image the red circles are highlighting the star(s) in the constellation that are overlaid by my absolute positioned elements and therefore are uninteractable without stretching to some insane dimensions. Any suggestions? I've thought about maybe adding a margin to the image but that just makes the scrolling even worse :(...
No description

Document Timestamps

Is there a way to find the timestamp of the last edit made to a Document?

Temporary Documents

Is there a built-in way to create temporary entities? Like entities wich are not stored in the database, but remains in memory for .update etc