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
Ssnagov4/28/2024

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|}}...
AAethril4/27/2024

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?
CCynicide4/4/2024

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;">...
Bbluegreymouse3/29/2024

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
ABAshby Blackburn3/14/2024

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,...
CCosmicRey2/14/2024

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
STNShyann, The Narrative Alchemist2/6/2024

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....
EEclipxs2/5/2024

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. ...
MmartinAbsolute1/28/2024

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
STNShyann, The Narrative Alchemist1/23/2024

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
PPsyPhi1/20/2024

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?
STNShyann, The Narrative Alchemist1/8/2024

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!...
GGrimwood_Games12/23/2023

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...
EEclipxs12/20/2023

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...
SShourn12/20/2023

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....
EEclipxs12/15/2023

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.
Mmfi12/9/2023

Importing an npm package into a foundry system

import minimist from 'minimist'; That line alone when included in my module's hook file is resulting in the system breaking. Do we need to include webpack/Vite/or something of the sort? Why isn't the software handling this automatically? Is there a tutorial we can follow?...
KKydo11/29/2023

(Paid) System Dev Assistance

Hello, I am developing a new game and would like to build my own game system in foundry vtt. I'm not very competent with JS, and am unfamiliar with the functionality of Foundry VTT. I do have some experience scripting and whatnot, but my learning process will require copious amounts of trial and error. I was hoping to skip the painful learning curve and pay someone to teach/help me with my system. I'm just not sure how much this runs, and was wondering if this is the kind of thing I can find peo...
EEclipxs11/26/2023

how to handle items and effects?

I've been working on a system for a game that needs a concept that seems like it might be a good fit for active effects. Though i'm not sure if effects are the right way to go. Some of these effects can temporarily raise or lower a stat, seems like a fit for effects. While some of these effects may deal damage, give your current attack an AoE, or grant you an ability to use this turn. Some of these things i'm not sure do fit into effects. ...
EEclipxs11/22/2023

Advice on the general programming model a system should follow

I'm brand new to foundry dev and I want to make sure I am gaining the correct understanding of the environment before I get too far. would it be fair to make this comparison with Foundry systems and the MVVM pattern? Model (document) | View (html/hbs templates) | ViewModel (sheets) or should I think of it as something else? I've seen some docs referring to sheets as applications, in which case maybe the mvvm comparison is not totally valid but perhaps it still is. ...
Next