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

Check box not linked to the property

Hello, I am using boilerplate but currently I am having an issue with linking my checkbox using handlebars. I have created json property equipped for weapon. I have created a listener but in no way I am able to make it work. So the in the actor sheet box automatically unchecks after update. and console log does not register anything Can anyone please give me advice on how to solve this or show how the handlebars should be working for checkbox on Foundry? This is my .hbs file code snippet...

Having a issue with item sheets

the names of the spaces for the item characteristics aren't showing, a very big line of text is showing instead im not experient enought in html to understand what im doing wrong....
No description

Would a Dialog Window be enough for this functionality?

In this system I'm trying to implement on foundry you roll a pool of dice and keep 2, pretty simple. The problem is that you won't simply pick the 2 highest, you are allowed to choose which dice to keep since the discarded dice interact with the system by generating special effects. I thought of showing a dialog window with each individual dice were you'd mark a checkbox for the chosen dice, and then print it on chat, but I don't know if it's possible to handle data that way inside a dialog....

How do I make an @variable

Hi all, I am new to system development. How do I make a @variable that can be used in dice formula. Do I have to write code to check for the @variable and swap it out. Or is there an easier way to make a global variable on a character sheet? I feel like this is a dumb question so I apologize if it is. So for an example I have a power die variable on characters this power die can be added to weapon damage. So I was hoping to be able to added it directly to the formula using an @ symbol like dnd5e does....

Incrementing items by drag and drop

I'm trying to handle incrementing item quantities rather than adding new items when you drag and drop an item to a character sheet, as long as the item already exists in their inventory and is of the right type. I've set up a hook in my ready hook section (using the Boilerplate as a base) but now it's both incrementing the existing item and adding a brand new one. ```JS   Hooks.on("preCreateItem", async (item, options, userId) => {     const actor = item.parent;...

data from onchange event

Hey quick question, i feel like an idiot. I'm used to angular as a framework, and handlebars obviously is much more toned down compared to it, so I can't seem to figure out the correct way to do this: I have a couple checkboxes representing a numeric value, so if i check the third checkbox, the value is set to three. If I check the second checkbox, the value is set to two, ecc. How do I apply a value to the individual checkboxes that is included in the event object passed to the onchange event?...

Modeling items that have items?

I'm trying to develop the Panic at the Dojo system, and I'm unsure how to implement one feature. In this system, you create "Stances" by combining a Style and a Form; these then can be assigned to a character, and they can switch between them. I'm not sure how to model that in Foundry's default systems....

Getting quench running

Having some trouble getting going with Quench, if anyone can point me in the right direction. I feel like I must me missing something simple. I've installed the package into my dev environment, and I get the UI in Foundry and the example tests run. In my system module code, though, I can't get it running. I've copied in the nonsense tests into ./tests, a directory at the root of my project. I've imported registerExampleTests into my .mjs entrypoint and tried to register the hook like:...

Issue with system json file

Hey there! I am trying to figure it out why is my system json file is screaming at me that is not parsing correctly. I hope that is a simple mistake on my part but I can't see it Link to the system.json file. ...

Accessing data in active effects via @ symbol

I noticed other systems are able to expose certain bits of data and access it in active effects eg: attribute: system.armor.ac mode: add value: @str.value However I can't seem to get the same functionality in my system. I have an actor data model module>data>actor.mjs file that just exports an actor class that extends foundry.abstract.TypeDataModel I have an actor document module>documets>actor.mjs that extends the actor data model...

multiple token attributes

Greetings! I am trying to start developing system that has multiple attributes but they are all relevant to the game and while being on the battlefield. Thing is that you can't seperate them into primary and secondary since they are three attributes that are relevant to the character. I do know that cypress has a same issue on this issue but would rather ask here on how to do that....

effect in "add" mode continually re-applied to actor/sheet

I have a datamodel value of type new fields.ArrayField(new fields.BooleanField(), { initial: [false], }) And I have an effect in "add" mode that adds another false to the array. Which seems to work. however, when i close and re-open the character sheet I see that the array is now 3 [false, false, false]. Other datamodal attributes eg: number don't behave this way. ...

Handlebars looping through getters

Hello, I'm trying to loop through and objects property including its getter, but since Handlebars 4.6.0 this is not allowed unless allowedProtoMethods is set to true (https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access). How/where can I set that option? For context I have a nested object to represent ability scores and accessing deeper sub stats with getters, and to list out the ability scores I'm looping through them. I can always output them each individually, but have a loop to do this would be ideal....

SchemaField with increasable max?

I'm trying to understand the new schema fields and have a situation where I sometimes want to increase the "max" value of a field. Is that possible? I have this ```schema.carryLoad = new fields.SchemaField({ value: new fields.NumberField({...

update item attribute on actorsheet

I have an item type rangedweapon that has a property of consumes ``` "rangedweapon": { .... "consumes": {...

changing id for messages in the chat

Hello, I'm trying to build a system for foundry and i'm facing a issue when i create more than one message in the chat. those messages are cards that show options for a skill. the options are some radio buttons, and i'm using labels with the radios. basically the radio has an id, and the label has that id in the tag for. when more than one message is in the chat, since the for is always the same, i can't select items for the old message. is there an option to call new ChatMessage() and only after that create the message? i would like to grab the timestamp from ChatMessage to make each id unique. example: ``` {{#each fields as |fd key|}}...

Altering Status Effects

I have been trying for some time now to made modifications to the Foundry active effects, but to even get started i need to find the names or values; simply searching for each has not yielded any real results, does anyone have the information handy regarding where they are stored?

Using an array in a sheet template

In the system I am creating, the progression of a skill category is handled with a fixed size array of values. I can create this array in template.json and render it on the sheet as input elements. However when I update the array based on user input I need to write an event handler to do it, I can't just change the value in the input box and have my Document update. Is there an easier way than this? This is the current implementation: Template ` <div style="display:flex; flex-direction: row;">...

empty pack

So I'm trying to access a pack in my module and it does exist but it's empty. My thoughts are 1. The file contents are invalid. But I've copied contents from another module and it's still empty. 2. My editor is changing the file in some way that makes it invalid. But I can't find a validator for levelDB files....
No description

Absolutely new to all of this, need help with a silly query.

Hello! I'm extremely new to all of this, and i'm having issues trying to understand how to code a way for the system to calculate the health of my character sheets. I've created in template.json an Actor and modified the "base" template to include the attribute "Health" which is composed of: "health": { "value": 10,...
Next