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
JJonny4/13/2024

Do some copy paste, follow the guide, add a new coustom dice, earn some money.

I am looking for someone who would make a minor modification (adding +1 die) in to an already existing module. I have a guide how to do it but I dont have the patience to set up github and a yaml project. If someone who already has it would do it for me i would pay for it. The guide: https://github.com/BernhardPosselt/foundryvtt-special-dice-roller/blob/master/docs/Roller.md Please PM, me if someone is interested....
SStagnuDemorte4/8/2024

change token lighting based on changing value on actor or an Effect embedded on the actor.

I'm attempting to add a feature to my system that makes the token glow when it's lightsaber/generic laser sword is ignited. I was able to make a custom token document class that can override the light settings, but that only updates the light settings on refresh or move. is there some way to trigger a redraw or is there a better place to implement this logic? maybe i should make a custom token class.
Solution:
Thanks for your response. that resembles my first attempt. what ended up working is overriding the _onUpdateDescendantDocuments method on the token document, resetting the tokenDoc, then calling updateLightSource on the token itself. i think i had to override the _onUpdateDescendantDocuments on the actor as well to make sure it picked up the changes.
AAlgor4/5/2024

GitHub Actions on release

Hi there, hope I'm at the right place. I'm actually new to actions on GitHub, trying for release- depending. I have some private (because premium module) repos, all went fine on this action (on 5 other repos with the exact same parameters), but here, it produces an error (see attended screenshot)...
No description
Bbluegreymouse3/30/2024

hook preCreateToken update token name

I'm trying to update the token name when dropping a token on a scene. I basically have something like this ``` Hooks.on("preCreateToken", async function (tokenDocument) {...
Solution:
so switching the hook to createToken and keeping everything else the same seems to get the functionality i'm looking for.
Bbluegreymouse3/27/2024

Error on package install

Error message
Error: Cannot read properties of null (reading 'protected')
Error: Cannot read properties of null (reading 'protected')
...
Solution:
Does the lang file have a different directory name? The manifest has lang, the repo has languages.
No description
MMMonster Mensch2/14/2024

Newbie question on scope

Hey there, total newbie here. I'm a complete amateur to programming. I've completed the todo tutorial for foundry development, but I believe the module I'd like to make is better suited to the game settings scope rather than the flag scope. It's for Markov chain based weather as found in Izirion's Enchiridion of the West Marches. Does that sound correct or am I starting down the wrong path? Also, do you know any good modules that write game settings like this? I think it would help to read pract...
NNash2/8/2024

Having trouble to get scripts loaded

Trying to make my first module and I have troubles getting anything loaded in Foundry. Here is what I have done so far: 1. Made the module using the Foundry admin UI view. 2. Added that module to one of my worlds. 3. Created a script to scripts/ folder of the module (I edit these files directly in the module folder)....
Solution:
You dont want to log out, you want to shut off the world entirely.
GGreg2/5/2024

Newbie questions on testing.

Hi all, ive put together a simple module for PF2E that allows a user to favorite a spell, feat, item or action and add it appears at the bottom of the character sheet sidebar. This is my first module and I wondered what the procedure is for testing. Do I simply release it or is it best to get some people to test it first?
Solution:
it is always best to test it first. You should at the very least do so yourself. Either manually in foundry or through unit/integration automated tests. If you can find some people to help you test it, that is even better, since they will likely interact with it in ways you didn't think to. Always test before release 🙂...
LLyra12/29/2023

Minimise Document using Prototype

Quick question, I've got no idea what I'm doing so please excuse my ineptitude. Say I have a document, e.g. a wall: ```json { "light": 20,...
Solution:
From a post elsewhere: foundry.utils.diffObject(WallDocument.prototype.constructor._schema.initial(),canvas.walls.placeables[0].document.toObject(), {inner: true})...
JJadeForest10/25/2023

Newby accepting advice on the Foundry API and Module Development

Heya,im very new to Module development for foundry and im suuuuper rusty in the codding department but im motivated to make a tool for a custom system that i love and id welcome a bit of help (im already not super experienced and on top of that im really rusty so sorry for very dumb mistakes and questions)
Aarcticnerd9/24/2023

Newb looking for advice on creating Compendium via code

I am new to Foundry and trying to figure out if it will be a good fit for my game. I have a fair amount of custom content that my groups uses and I want to create a content mod for it. I know I can use the in game Create Compendium and Create Item features but I have a fair amount of content and wanted to try creating it via code. I have a moderate amount of experience writing JS and JSON files and it sounds like a fun project to try out. However I haven't been able to find many resources for creating the Compendium with code. The documentation from Foundry only talks about using the in game options and looking through some of the mods that add content wasn't enlightening. I was hoping someone could point me at a guide to get me started on this, or tell me if I am completely barking up the wrong tree and this really can't be done. Thanks!...
DDersonThePerson9/1/2023

Beginners help with doors

Hi foks. Apologies if i've posted this in the wrong place. I am totally new to working with Foundry, although not new to working with Javascript. I want to write a macro that will allow me to open an adjacent door with a key press instead of the mouse. Does anyone know if this is possible?... and a few pointers into which object I need to interact with would be so helpful. Im guessing " canvas.walls.doors[0]" or something? I suppose I just need to change the door "state" from closed to open?...
EEllam4/6/2023

How to run code from a specific user

Hi, I have the function foo(bar) and when you run this function it opens a window with some details on...
Zzeel3/31/2023

About: #package-development

This thread is not for discussions about Foundry package development, but for discussing the purpose of this forum.