Giter Site home page Giter Site logo

foundry-universal-configurator's Introduction

jenny's foundry universal configurator

this module is completely system agnostic and can patch any descendent property of globalThis during any hook ("init" or later) and then optionally reload specified types of world documents to reflect those changes.

this module is very dangerous and can make your world unloadable (possibly even in safe mode). if you're looking to customize foundry or a foundry system/module, here are some modules i'd recommend trying before resorting to this one:

this module optionally supports using codemirror for editing json values.

NOTE: if you pop out this module's settings window with PopOut! you won't be able to save the settings. this is 100% on my end to fix, so don't file any bug reports with PopOut!

this module has 2 main conceptual structures: overloads and patches. an overload defines what object we are going to edit, and patches are individual properties. to get started, click the "add overload button"

image

an overload has a number of options:

  • the key path (what object to edit, starting with a property of globalThis and specified as keys separated by a "." character. you can use numbers in the path to traverse arrays)
  • the overload type (i've only tested object so far. array should work, but i haven't encountered a scenario where i can use it yet)
  • document types to reset (this causes foundry to re-initialize these document types, effectively applying your patches. this may not be necessary if you are patching values during the proper hooks)
  • 0 or more patches

image

each patch specifies the following:

  • a key (if in object mode)
  • a type (this is not enforced, so you can intentionally use the wrong type to your advantage if necessary)
  • a patch strategy (different strategies are available to different types)
  • a value, specified as json (some patch strategies ignore this)

image

NOTE: i've only been able to thoroughly test the fallback, delete, and replace strategies so far. check out the patcher to learn about all the available strategies.

TODO: list and explain all patch strategies here

foundry-universal-configurator's People

Contributors

jenniferpylko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.