-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature user definable HTML pop up stat sheet #4084
Feature user definable HTML pop up stat sheet #4084
Conversation
…ture-statsheet-overlay
This PR is too big for me to review. Maybe you can split it up into some more manageable chunks? |
I will try but you will have to keep in mind when doing the review that if something is added but not used yet it is probably because it's in the next PR. :) |
actually, I take that back, since develop had to be merged into this branch along the way because of conflicts being created, that would create a bunch of PRs harder to review :( open to other ideas of how we can tackle it though |
* @return The notes of the token. | ||
*/ | ||
public String getNotes() { | ||
return notes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we StringUtil.htmlize the noted to account for the different possible note types possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated getNotes and getGMNotes to return HTML
* | ||
* @param zone the zone for the event. | ||
*/ | ||
public record TokenHoverExit(Zone zone) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have the same members as TokenHoverEnter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added information to match TokenHoverEnter event.
* @param to the name to rename to. | ||
*/ | ||
public record RenamePropertyType(@Nonnull String from, @Nonnull String to) {} | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
; Not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed stray semi colon
Another thing to consider: Maybe we should run the notes and tokennotes through the template engine? That way we could add Statblocks containing token properties as notes. |
Isn't that what the HTML stat sheet is though the token stat block? Or do you have other ideas outside of just the stat sheet? |
I'm thinking i things like tracking the number of arrows or usages of an item in a property and us this property to fill the values of an inventory that is kept as a text in the token notes. |
Identify the Bug or Feature request
resolves #1424
resolves #3149
I know it shouldn't be a two for one but they are quite connected.
Description of the Change
This change adds the ability for users to create pop up stat sheets that can be defined using HTML, CSS, JavaScript.
As part of this change the Campaign Dialog Token Properties has also been revamped an no longer requires several sanity roll checks when trying to update token properties.
Apologies in advance for anyone reviewing this as there are a lot of changes to make this all work.
Possible Drawbacks
I dread to think what people may not like about this :)
Documentation Notes
Stat sheets can be defined in an add-on.
See https://github.com/cwisniew/MT-test-stat-sheet for an example really simple stat sheet add on and more details on how to define stat sheets.
Update Campaign Property : Token Properties screen
Its now easier to add property types, delete property types and rename them (in the name text field when selected). There is also the ability to set any token property type as the default (needed as you can now delete or rename "Basic"). Note its not possible to delete the default token property type, you would have to make another property type the default before deleting it. There are also check boxes for all of the different options for stats appearing on the stat sheet, so it no longer a text input looks like you are swearing at your token properties.
![C
Default values can be edited in the table if they are simple values, or if more complicated then the '...' button can be used to open an editor.
Look Ma... No Basic...
Setting at the token property type level
An example of the basic no frills stat sheet from the above example repo
Using a different theme
The new token dialog has been modified to include property type and stat sheet details
Edit Token Dialog
Stat Sheet pop up at top left
Release Notes
This change is