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

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,...

Boilerplate.css file

Hi I started a new system from the Boilerplate system, and am having an issue seeing updates from my .css file. It seems like the boilerplate.css file refuses to disappear from the file system. I tried deleting all references to this file but it doesn't go away. I even uninstalled foundry and delete all its user folders, then reinstalled and still see this there. I also deleted my internet cache. Is this something built into foundry or is it hidden somewhere in its cache? Where can I find Foun...
No description

Help Needed! Dynamic Table for Reputation Tracking

Hello, everyone. I am still encountering an issue with my Reputation Tracking system. In the actor sheet, there is a tab to track the character’s reputation with other characters using a table. Each row in the table represents a relationship. The row has a column for an input text field (to store the character’s name) and a second column of radio buttons which represent a numerical scale of the relationship level. There should be a button to add a new row, which creates a new object in the array of relationships this character has. Each row will also have a third column with a delete button that not only removes the row, but deletes the object from the array. For some reason, this isn't working as intended (see attached video for example of problem and console warnings). Rows and new objects get added, but information for only 1 object will save. When trying to add a new object after inputting info, the array will reset itself....

Trouble with Synthetic Actors (unlinked tokens)

When I create a token from an actor and try to update something like its hp, I get the following error: "actors is not a valid embedded Document within the Token Document". If I link the token to the actor, everything works as expected. Though, being linked, it updates all tokens. This would be problematic If I want to create one "goblin" actor, and have several different goblins in a scene. ...

Avoid Sheet Re-render When Editing Actor's Item

TL;DR How do I avoid a re-render of a character sheet with actor.items displayed, that happens when item.update is called? I have a simple on event handler on my character sheet like this: ```javascript onUpdateItem(event) {...
No description

How to Create & Save Custom Field Values from a Dropdown on Actor sheet?

I am building a custom system for a Hogwarts setting using the Wands & Wizards 5e supplement. I am currently working on the Character Sheets using the boilerplate system, and am trying to add special field properties. My goal is to have each character sheet feature 3 dropdown bars: 1 for Hogwarts House (Race), 1 for Caster Type (Class), and 1 for School of Magic (Subclass). Depending on the selection, the value will automatically save and store itself in that property, and will be used to pull in features later and set classes within the HTML to change the theme of the character sheet (Red for Gryffindor, Green for Slytherin, etc.). Currently, the dropdown selections are visible in the actor sheet, but the options do not save and always reset. I'm not sure what I have overlooked to not get this to work. I have attached images of my template.json file, my actor-sheet.html, and the actor-sheet.mjs file. You'll see in the .mjs file that I am trying to console.log() some messages for troubleshooting purposes, but those don't show up at all....
No description

Finding target when making an attack

I’m developing a game system, and can’t figure it out, when there is combat active and a player is targeting an NPC, where do i find what token is being targeted?

Trying to register a new system

Hey everyone, I am new to Foundry system development. I am working with the boilerplate system and have the folder properly updated and placed my /Data/systems/ folder. However, when I launch Foundry VTT, I do not see this system registered to the Game Systems tab to begin testing. How do I ensure I properly connect this and set it up so I can begin development and test along the way? Thank you!...

New to System Development but have done minor module development

I am trying to see if there is a complete working model of a system that I could use a base to understand how to make a system. I mean I realize everyone is going to write solutions differently. All of the tutorials seem to be for before v10. Should I just follow those and modify where I need to for v10+. I am trying to develop a game system and It be nice to be able to create a foundry system for it to play test and develop it more. Any suggestion I would love some direction. I am pretty good a...

calculating range/distance

I am trying to calculate the distance between two tokens to make sure they are in range of one another before applying an action. Though I am not sure the best way to go about this. I have tried the following which works, but it feels wrong. What is the best way to get an actors token? ``` // t comes from game.users.current.targets as I iterate through the current targets of the user...

Partial Reroll

I am looking for a way to partially "reroll" a roll. Quick example: Player rolls 2d6 (a 2 and a 5) and wants reroll the 2 keeping the 5, to hopefully get a better result. Does anyone know how to do this or point me to a system that already implements such mechanics? So far neither the docs nor experimentation have proven fruitful....

tiered status effects

If I have a status effect that can come from an ability, for example, burning comes from an ability with 'incendiary', but this 'incediary' can have varying degrees of strength. Do I need multiple status effects? like burning 1, burning 2... burning 5 to go with the levels of incendiary? Or just one burning for all incendiaries? same for things like stunned, where the increased level may affect how long the stun effect lasts.