Skip to content

Permissions - TokenProperty - Stat-Sheets - Token Editor - #6015

Open
bubblobill wants to merge 15 commits into
RPTools:developfrom
bubblobill:tokenProperty
Open

Permissions - TokenProperty - Stat-Sheets - Token Editor#6015
bubblobill wants to merge 15 commits into
RPTools:developfrom
bubblobill:tokenProperty

Conversation

@bubblobill

@bubblobill bubblobill commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Identify the Bug or Feature request

fixes #5943 #4960 #4774 #1641 #296 #4396 #1373
progresses #1762 #6003 #5446 #5944
and probably a bunch of others.

Description of the Change

Born out of the desire to enable the new pop-up attribuite-sheets to be shown to players for NPCs.
Previously the visibility of a property was settable through combining booleans as:
NONE -> GM(s) -> OWNER(s) -> ALL

Added a new enum Permissions and changed TokenProperty to use Permissions instead.
Permissions currently has the following entries;

  • NONE
  • GM
  • OWNER = GMs + Owners
  • ALLIES = GMs + Owners + Allies
  • ALL
    --
  • OWNER_ONLY
  • ALLIES_ONLY
  • OWNER_ALLIED_ONLY
  • OPPONENTS

Allies are currently implemented simply. For example; a property with this visibility on a player's token would be visible to other players with the same GM status, i.e. Non-GM players can see this on each others tokens.
This resolves the current problem with stat-sheets not being able to show NPCs attributes. They can be set to be visible to all, or whoever is on the same team. This is more explicit and builds on the current setup.

The first batch of values are cumulative. Each level expands the scope of who has permission.
The second batch are exclusive.

For TokenProperty, Permissions have been assigned to:

  • Stat-Sheet visibility,
  • Token Editor visibility, and
  • Token Editor editability.

Campaign Token Properties editor
image

With these permissions, you can set it so a player can see what values are, but not allow them to edit the values. This will help framework developers who require values be changed through another mechanism.
Other advantages is the ability to tailor information more contextually, such as the GM excluding themselves from seeing things they don't care about.

The Token Editor
image

This is the GM view. You can see where Defense was set as not being player visible, it now appears separately. Similarly, non-Type properties can be seen by the GM under the Misc group.

I also threw in a search bar whilst I was at it.

Future work will be the use of permissions for other aspects, like states and bars.

Possible Drawbacks

This is a big change, and whilst I tested it on old campaigns, the testing was not thorough.

Documentation Notes

Release Notes

  • Made Stat-Sheets visible for NPCs
  • Added permissions for player editing of Token properties.

This change is Reviewable

VariableType
Tables
Editor
DTO
CampaignProperties
- visibility on stat-sheet
- visibility in token editor
- editability in token editor.
Updated DTOs.
Updated TokenPropertiesTest
Updated Token Editor
Updated CampaignProperties
Updated Campaign Properties Editor.
Shuffled various cell editor/renderers
 off to a common home.
Tweaked AahLAF to ensure it all looks good.
Passable tests.
@bubblobill bubblobill self-assigned this Jul 17, 2026
@github-actions github-actions Bot added the bug label Jul 17, 2026
@bubblobill
bubblobill requested review from cwisniew and kwvanderlinde and removed request for cwisniew July 17, 2026 09:15
@bubblobill
bubblobill requested a review from cwisniew July 17, 2026 09:32
@Baaaaaz

Baaaaaz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@bubblobill Nice! Can you include some screenshots of the MTMultilineStringCellEditor in action?

I like what you are starting do so with the different syntax types, something that I was looking at for the input function enhancements. I've attached below where I got up with a custom control for with that, as it handles more syntax types, parses some syntax types after typing, can toggle minifying and prettifying json, etc Just in case it inspires you to enhance yours more (just recalling what you did to me with Halos! 😁 ) and then I can just perhaps re-use yours as you got in first!

InputControlTextEditor.java.txt

What you could also do was automatic selection of the syntax type if the property name had a specific file type suffix. That would be neat.

@bubblobill

bubblobill commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@Baaaaaz MTMultilineStringCellEditor
Is what you see when you edit a token property in the token editor.
image

It used to be buried as a private class. I just pulled it out so it can be accessed elsewhere.
The combo box could probably use with being extracted too.

I'm falling out of like with RSyntaxtTextArea. It's theming is not very compatible with FlatLaF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Impossible to display stats from unowned NPC tokens on custom stat sheets

2 participants