Face Linked Properties #671

Open
opened 2026-02-20 10:19:37 -05:00 by deekerman · 2 comments
Owner

Originally created by @robartsd on GitHub (Feb 14, 2023).

We will soon have three widget types with face linked properties implemented in different ways:

  • Basic Widget
    • SET saves properties to the widget
    • GET returns the property in the widget
    • changing face copies properties to the widget (we want to change this #536)
  • Card
    • properties are set in faceTemplates in the deck, must be deck wide
    • SET saves properties to the widget
    • GET returns the property in the widget, checking face properties (and other default sources) only if not set in the widget
    • changing face does not override property if set in the widget
  • Dice (#1167)
    • SET saves properties to the widget
    • GET checks for the property on the active face before checking the widget properties
      • a GET immediately following a SET may return a value differing from the value set if the active face is overriding
    • changing face overrides the widget property only while the face is active

This is a place to discuss how we want face linked properties to work.

Originally created by @robartsd on GitHub (Feb 14, 2023). We will soon have three widget types with face linked properties implemented in different ways: - Basic Widget - SET saves properties to the widget - GET returns the property in the widget - changing face copies properties to the widget (we want to change this #536) - Card - properties are set in faceTemplates in the deck, must be deck wide - SET saves properties to the widget - GET returns the property in the widget, checking face properties (and other default sources) only if not set in the widget - changing face does not override property if set in the widget - Dice (#1167) - SET saves properties to the widget - GET checks for the property on the active face before checking the widget properties - a GET immediately following a SET may return a value differing from the value set if the active face is overriding - changing face overrides the widget property only while the face is active This is a place to discuss how we want face linked properties to work.
Author
Owner

@robartsd commented on GitHub (Feb 14, 2023):

Proposed changes to Basic Widget:

  • GET behaves like card, returns property set in the widget; only checking face if not set as a widget property
  • changing face no longer copies properties to widget
  • fileupdater adds activeFaceChangeRoutine and facesChangeRoutine to Basic Widgets that have a faces property
    • routine implements old behavior by reading the properties from the new active face and SETing them to the widget

Proposed changes to GET:

  • option to ignoreFaceProperties
    • allows access to value set on Dice even if the current face is overriding
    • allows access to other default values
  • option to get property for a specified face
    • may not be needed with #1608

Proposed changes to SET:

  • option to set property on a face instead of the widget (not applicable to Card)
    • defaults to setting on the active face, but could access other faces by index
    • may not be needed if SET is extended to as discussed in #1605
@robartsd commented on GitHub (Feb 14, 2023): Proposed changes to Basic Widget: - GET behaves like card, returns property set in the widget; only checking face if not set as a widget property - changing face no longer copies properties to widget - fileupdater adds activeFaceChangeRoutine and facesChangeRoutine to Basic Widgets that have a faces property - routine implements old behavior by reading the properties from the new active face and SETing them to the widget Proposed changes to GET: - option to ignoreFaceProperties - allows access to value set on Dice even if the current face is overriding - allows access to other default values - option to get property for a specified face - may not be needed with #1608 Proposed changes to SET: - option to set property on a face instead of the widget (not applicable to Card) - defaults to setting on the active face, but could access other faces by index - may not be needed if SET is extended to as discussed in #1605
Author
Owner

@ArnoldSmith86 commented on GitHub (Mar 2, 2023):

See #1664 for revelations about Basic Widget.

@ArnoldSmith86 commented on GitHub (Mar 2, 2023): See #1664 for revelations about Basic Widget.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/virtualtabletop#671
No description provided.