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
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. ...
EEclipxs11/21/2023

Advice for compendium data in a custom system

Hello, i'm new here! I was wondering if I could get a little direction for storing data about my games items/actors. I looked at how it is done in pf2e and dnd5e. They both seem to have gone different directions. DnD5e uses .db files for their packs data https://github.com/foundryvtt/dnd5e/tree/master/packs...
Mmfi11/13/2023

Dialog Box Auto-Closing Upon Opening 2nd Time

I've been appending custom functionality to the simple worldbuilding system. At this time, I'm trying to loop over all actors and then use and their items to add things up and perform rolls. To add modifiers, I want to make a dialogue box pop up wherein I can type in additional modifiers/etc, such as +1att (give the attacker +1 advantage to their role under value) The first time, it works! It prints verbose. That is the "building block" string for me to build additional logic on top of. The 2nd time, the dialogue just instantly returns "" and then it doesn't print verbose. ...
JJeff11/7/2023

Actor collision

Implementing the homebrew knockback feature. It's almost working but how do I test if two actor tokens are collding with each other? I a trying various methods with no success
GGloriousSir10/31/2023

Actor attributes update on player's side

I can't fathom how to make changes to actor attributes on player's side. According to documentation I can use actor.modifyTokenAttribute("attribute.path", new_value), but this won't work on player's side, because player does not have permissions for "ActorDelta update". Can I even do this? I really want to because in my system there are body parts on tokens so automatically updating them after attack would be pretty neat....
WWildos10/28/2023

Sort items

Hello, I am searching for where is stored the data about "items" order, as I would like to order them manually in parallel of with the CSS classes "item" and "item-list". Does anyone know where the "items" order is stored?...
MMagus10/19/2023

How do I create/modify embedded document types?

Let's say I want Items to also have Items embedded
MMagus10/11/2023

How do I specify an Array in my template.json?

I want schema checking for elements inside of an undefined-length array in my template.json, how do I do that?
MMagus10/8/2023

Is is possible to create/change Foundry's document types?

For instance, removing "Actor" and "Item" and adding new ones.
Mmfi10/6/2023

ERROR: actors is not a valid embedded Document within the Token Document

Hi guys! New here, just purchased the software. Could we get any help on this elusive error? It's within the chronicles unofficial system that we are intending to build out. Whenever an actor sheet based off of an active token on the scene is edited in any way, the error is produced and shows up as a toast at the top of the screen (the first one). We've stepped through with a debugger through many areas and it's clear that it' appears internal to foundry. Attached is a stack trace. We are using version 11. Version 10 also produces errors, but they're yellow rather than red....
No description
WWildos9/26/2023

How to trigger "hotbarDrop" with element that are not "Item" ?

Hello, I would like to know if it is possible to trigger "hotbarDrop" with element that are not "Item". The system I create does have some mandatory skills for each "character" (type of "Actor") that are define inside the template.json. I would like to give the possibility to player to drag and drop these skill into the Macro bar so they would be able to launch them from it. ...
PProgor9/25/2023

Is there a starter system based on the v10 DataModel?

I'm creating a new system (sci-fi with a cyberpunk theme, battles in space, land vehicles, and close combat, advancement through currency more than levels, more guns and devices with very little "magic" - may throw some psionic stuff in there to make the wizards happy). I'd like to build it up to the current state of the art, but it seems boilerplate, simple worldbuilding, and all the tutorials I can find are built for v9 with all the models in template.json. I can just start from scratch and...
DDynvar9/20/2023

Am I approaching character data updates incorrectly?

In my system I've constructed a core and modules directory where core handles all of the critical functions of the base system and the modules are additional systems that can be included or excluded at the whim of the GM (things such as psionics, magic, super powers, future technology, etc). To handle how these things interact, I've created a PcDataCalculator service to which modules may register their data calculation steps and dependencies ( in 5E terms, this would be like the Magic module registering the formula for determining a Wizard's number of prepared spells and indicating it's dependent on class-levels and intelligence. This whole process is intended to run as part of the actor's PrepareData function. The challenge I think I will run into is ActiveEffects. If active effects are run before this process, then an active effect impacting intelligence will cause prepared spells to be calculated correctly, but one that increases prepared spells by a value dependent on the subtotal value of prepared spells (such as 'double the number of prepared spells you can cast') would not work correctly. If run afterwards, I'd have the opposite problem. ...
OOtherwiseJunk9/10/2023

Limit portions of character sheet to Owner/GM only

Hey friends, I'm new so if this isn't the best way to go about asking about system development questions. I'm working on making a system that will involve portions of the character system being only accessible to the owner of the character (and of course the GM). Is there an easy way to check this and setup an if block in my template to not draw the section if you're not the owner of the sheet/the GM? Wanted to make sure I'm not reinventing the wheel before I try to add a way of validating this myself laughing
Llee11218/19/2023

Blind chat message is public instead since v11

I've updated to v11 today from v10.303 and now my blind chat messages aren't working anymore and I cannot figure out why. Extra confusingly, just adding the "blind: true", causes the message to become a public message, rather than the private gm message it's based on. `chatMessage = ChatMessage.create({...
SSabrecho8/19/2023

Giving a system "Per World" options

I'd like to plan ahead for others using my system and want to offer: ā˜ Imperial or ā˜‘ Metric ... when starting up a new world. How would I set that up?...
PPsyPhi8/9/2023

How to - Internal Compendium Pack References

Hi first post here, new to this forum, I'm creating a game system for an RPG I want to play on Foundry VTT and I've been extracting traits, abilities etc. from the SRD to create a set of compendium packs for the system. Have a question on how to set up internal links between Items? For example, each heritage has a number of traits and abilities, and there are also options that can be chosen when the heritage is first selected. What would be a good way to set up the packs to facilitate this behaviour? I haven't got far enough into the development of the system to know what I'll need later on, and assume that I would use a hook when the heritage (Item) is added or remove from the collection to add or remove the other traits or abilities. Thanks in advance for any help or advice given, PsyPhi...
Llee11218/8/2023

Default item macro is overriding my custom item macro

I'm trying to create and assign an item macro to the hotbar. It's mostly working, but has one unexpected behaviour that I cannot figure out. Whenever I drag an item to the hotbar, it creates the macro successfully in the Macros Directory, however a "Display [item name]" macro is also created and that's assigned to the hotbar instead. I'm fairly sure this is the default Foundry item macro and it's overriding my hotbar assignment, as it's stil created and assigned when I comment out my createItemMacro function. Is there any way to disable the "Display [item name]" macro from being created for my items?...
Ccargo_line8/3/2023

How do I add active effects support?

I'm a bit lost here ... I want to add effects to items like "increase speed by 1 while having this item in the inventory" and from what I found online, active effects seem to be the answer here - however, it also says that the game system I'm using has to support them. But how do I add that support? So far I've been following the guide from the wikie https://foundryvtt.wiki/en/development/guides/SD-tutorial, but I can't find anything helpful in there on this. Can anyone give me some pointers?...
IiHaveReturnd7/7/2023

Show Each Dice Rolled in Custom System Builder?

Is it possible to make it show all of the dice rolled automatically when clicking a roll value in a character sheet? I was able to get rolls done through chat (such as /r 2d20) to show each individual die with the "always-show-rolls" module posted on reddit, but it doesn't seem to work for rolls done through rollable objects I make in the character sheets. Like the last chat message, instead of having to click the die to show them like that top one...
No description