farling42 / fvtt-pdf-pager

PDF Pager for Foundry
MIT License
6 stars 4 forks source link

Allow fields to map to entries in the Items array on the Actor #41

Closed farling42 closed 1 year ago

farling42 commented 1 year ago

Some fields (such as spell lists), map to Items stored on the Actor.

Provide a simple interface to manage the two-way synchronisation between Actor sheet and Actor Item.

farling42 commented 1 year ago

This can only be one-way, without using the getValue/setValue functions in the field mapper.

farling42 commented 1 year ago

Implemented in 0.47.0 using a syntax like:

items[type=spell,system.level=8][0].system.preparation.prepared

where type=spell,system.level=8 filters the full set of items down to just those that match the comma-separate list of comparisons. [0] is the index into the resulting alphabetically sorted array (first index is [0]) system.preparation.prepared is the field within the specific item.