El Gobbo
LOELeague of Extraordinary FoundryVTT Developers
•Created by El Gobbo on 1/6/2025 in #system-development
Problems updating to v12
Hi guys, I am still working on the same system, using v11 (as that is the version I have installed due to some other games I am running) and starting from the boilerplate system builder using Data Models. My goal however has always been to get this system running on v12, so today I installed all my coding software on another machine along with the latest version of foundry and transferred over my project, only to find that I cannot even open it - base foundry does not even load. On examination of the console, I found the following error:
Uncaught (in promise) Error: A DataSchema must be an object with string keys and DataField values.
After fiddling around for a while, I found out the following: first, if I remove any of the files containing my Data Models, I can load base foundry, but none of the other Data Models load either; second, if I remove the line in the _module file that exports any of my Data Models, foundry also fails to load and I get the following error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'LOCALIZATION_PREFIXES')
Are these errors linked, what am I missing, and what can I do to get my module running in foundry v12?
5 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by El Gobbo on 12/6/2024 in #system-development
Array keeps resetting
Hi, I am very new to system development/programming and trying to put together a system for an rpg that does not currently have an implementation by starting from boilerplate. Due to the requirements of games I currently run on foundry, I am using version 11+. I am trying to store player-inputted values in an arrayField of variable length determined by player level, attached to the player characters datamodel. The idea is that players can only store a limited number of values, before they need to replace one. However, every time the Document updates, the array resets to empty. How can I get the array to persist? What am I missing?
The datamodel declaring the array
The loop pushing new values onto the array
I have tried removing the loop, but the results seem to be the same. Sorry if this is a super basic question, but I've been stuck on this for hours
4 replies