-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: apply edit mode to sheet #667
feat: apply edit mode to sheet #667
Conversation
@@ -1403,6 +1403,39 @@ export class RqgActorSheet extends ActorSheet< | |||
(createdItems[0] as RqgItem)?.sheet?.render(true); | |||
}); | |||
}); | |||
|
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.
@wake42 these sections are the same or similar and could be generic if runes, skills, and passions all had the same interface or just the same properties. I think this could be a good time to make a change for the future to support occupations and cultures: (we could also finish this issue and do what I'm suggesting in another issue or as a part of the occupations and cultures changes)
.baseChance (for passions this would be 60, for skills it would vary)
.modifiers (maybe this is an array of key-value pairs? Occupations and cultures and such will add permanent bonuses here)
.gainedChance (or maybe we could call it .experience or .experienceGain)
.categoryMod (only for skills, maybe even refactor this to just be another entry in modifiers)
.chance (the sum of the previous three)
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 sure it makes sense to have a baseChance on runes & passions, especially not power runes that are matched against another rune.
The data-rune-grid-edit
&. data-passion-grid-edit
is the same thing though, I agree. For occupation / culture using this you mean there should be a modifier field for all these items that can be modified by those items, either by active effect or raw changing when you embed an occupation for example?
I guess we could implement a key-value structure and have a modifiers array, but arrays are not that easy to handle in Foundry dataModels I think. So if you wanted to link one of those to an input field it would take some extra code to accomplish.
Talking about datamodels that is also work that needs to be done - migrating the current definitions to use the datamodels Foundry uses: #596
All in all I'm not sure it's good to squeeze all these items into the same mold - they are different I think (even if they are similar)
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.
In play mode I think we should hide the characteristics formula for everyone.
Maybe we should show the "Edit Rune Magic Spell" context menu for trusted players.
Should we only have one input field for runes & passions? Is it confusing with double percentages? Not sure... For skills it's good I think.
src/actors/_actorsheets.scss
Outdated
@@ -124,7 +124,7 @@ | |||
.characteristics { | |||
grid-row: 2; | |||
grid-column: name-rune-start / name-rune-end; | |||
|
|||
width: 100%; |
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.
This doesn't seem to do anything. Remove?
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.
Done
src/actors/_actorsheets.scss
Outdated
@@ -678,81 +678,94 @@ | |||
} | |||
} | |||
|
|||
input.characteristic-rank-high { | |||
*.characteristic-rank-high { |
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.
Remove the wildcard (here and on the following rank css rules)
*.characteristic-rank-high { | |
.characteristic-rank-high { |
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.
Done
} | ||
|
||
label { | ||
.value { | ||
font-size: min(28px, 3cqw); | ||
font-weight: bold; |
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.
Part of avoiding content switching positions
margin-top: -5px;
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.
I put this in and don't know if it did anything. I thought you were talking about how the characteristics row is slightly taller in one view than the other.
I can hide the dice expression formulas in play mode. The green-red indicators are on that dice expression box. As a gm I still want to see those in play mode so I know if the NPC is, say, large for its type, or weak for its type.
I can do this, but should I also do it for Spirit Magic? I'm not sure when even a trusted player is really going to need to edit either though, except for the spirit spell focus field which is always available.
See my comment above about making runes, skills, and passions have similar fields so that we can reduce some handlers, but more importantly because I think it will be helpful to the later steps of the character creation process when you drag an occupation or tribe or culture onto your actor. I think it would be best if it added the bonuses to the .modifiers property I'm proposing. I also think that even for passions it make sense to have a .baseChance of 60, a .gainedChance so you know how much a player has gained if for no other reason. On runes I want the .gainedChance because it will make it easier to determine if a player has correctly added their starting rune amounts (if we want to do validation of character creation). |
I was thinking that maybe we could have an individual setting for if you want to see the green-red indicator. That way each player / GM could decide for themselves if they want it.
You're right - lets leave it as it is now.
Let's keep this as it is, and see where we land on this. It has a lot to do with character building as you say. |
Ok, I'll do that tonight. So would this be a new property on the actor like |
And generally I think we should see how this all works and we'll probably get feedback from users on "this is visually confusing" or "normal players should have access to X because of Y" |
@wake42 made a context menu for Show/Hide Characteristic Ratings and store the preference in actor.system.showCharacteristicRatings So there was the thing with |
Maybe the easiest way is to always show the input and add |
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.
I think the characteristics formula shouldn't be shown in play mode (for anyone, not even GM).
src/i18n/en/uiContent.json
Outdated
@@ -1176,6 +1174,10 @@ | |||
"WorldMigrationVersion": { | |||
"settingName": "World Migration Version", | |||
"settingHint": "The RQG system version this world has been migrated to." | |||
}, | |||
"SchowCharacteristicRatings": { |
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.
Misspelling
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.
Phixed
src/actors/rqgActorSheet.ts
Outdated
@@ -223,6 +223,8 @@ export class RqgActorSheet extends ActorSheet< | |||
isEditable: this.isEditable, | |||
isGM: getGameUser().isGM, | |||
isPC: this.actor.hasPlayerOwner, | |||
showCharacteristicRatings: | |||
(getGame().settings.get(systemId, "showCharacteristicRatings") as boolean) || false, |
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.
You don't need to cast the type if you register the type of the setting in
fvtt-system-rqg/src/global.d.ts
Line 47 in eabfc02
namespace ClientSettings { |
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.
fixed
src/i18n/en/uiContent.json
Outdated
}, | ||
"SchowCharacteristicRatings": { | ||
"settingName": "Show Characteristic Ratings", | ||
"settingHint": "Show a colored rating bar below characteristics which rates the value as compared to the dice expression formula for the characteristic. Red is lower than average and green is higher than average. This can help GMs see an NPC's strengths and weaknesses at a glance." |
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.
The last sentence doesn't make sense when a player see it. Maybe could be reformulated to something along the lines of This can help judging an actors strengths and weaknesses at a glance.
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.
Fixed and fixed the spelling of the setting
…fields-in-Character-Creation-Mode-#635
…haracter-Creation-Mode-#635' of https://github.com/sun-dragon-cult/fvtt-system-rqg into Moonpile/Ensure-Players-can-edit-the-needed-fields-in-Character-Creation-Mode-#635
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.
Lets merge this and any details can be looked at later.
No description provided.