Quality of life: Spellcasting #536
Reference in New Issue
Block a user
No description provided.
Delete Branch "recast-hint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This makes changes to the spellcasting UI.
M or P to recast will no longer default to Light or Minor Bless/Minor Heal. You need to cast something before recast becomes available. This fixes #535 and I think it's disorienting when I've just started the game and M casts Light in a town that's fully lit, so the change is generally good I'd say.
I implemented a recasting hint in the text bar, which was one of the things I mentioned in my quality-of-life checklist https://github.com/NQNStudios/cboe/issues/16. It should move status icons to the left when necessary, to fall between the left text and right text. I think with very long spell names, this could overlap with the text, which would be bad. But I don't know what statuses go in the text bar so I haven't tested/handled that case yet.

Sometimes when my eyes glaze over, I think I'm casting the spell on the wrong side of the LED. I thought there was a bug when I cast Long Light instead of Dumbfound (even though I know the distance between the two is pretty large -- I wasn't paying much attention). I thought it would be nice to highlight the name of the selected spell. Light green seemed to make more sense than red for that, because the LED turns green. Then I made the caster/target selection texts also use light green instead of red, to match. Uncastable spells are grey.
Honestly still haven't decided if I like how it looks, so feedback is welcome.
The thing to do about this would probably be to calculate how much space is taken up by the name, APs, and active status icons, then squish the spell hint horizontally as needed.
Hmm… my first reaction to the spell hint was "that sounds bad, there just isn't enough space", and I still mostly feel that way (what about characters that can cast both mage and priest spells)? However, if it's only shown as part of the combat AP indicator, then I think I can live with it. In that case we can drop the status icons altogether – the only statuses shown there are whole-party statuses (fly, detect life, firewalk, stealth), most of which have no relevance in combat. (I think only firewalk could have combat relevance?)
So, to be clear: in combat we can show this indicator, and outside of combat we can show the status icons, but not both at the same time. Does that work? I'm not sure if it undermines the intent of your hint.
Oh, and about the redesign of the spellcasting dialogue: I like it.
While you're at it, maybe you can fix the alignment of the headers? Like, aligning "HP" with the column of HP, "SP" with the column of SP, etc.
Here's a redesign of the spell window that aligns the numbers, buttons, statuses etc. and colorizes HP/SP numbers
I think this is just fine.
I've just made it so attempting to recast the opposite spell type of the hint, toggles the hint to the other spell type, so you get to see it before repeating the input to do the recast.
I made this part of the spellcasting action that we already record and replay, so it should work in replays.
Regarding the colours, I think my logic behind choosing those colours was that they are the basic HTML colour set… or perhaps it was that it's the basic Win32 console colour set, or the union of the two. So I think I'd prefer to keep all the colours that were defined before, though moving them to a colour map definitely makes the code cleaner.
One other note on the colours – for two-word colours, could we replace the underscores with hyphens? So for example
color="title-blue"instead ofcolor="title_blue".Also, I think you missed updating the schema for the colours change? Unless I missed it.
I notice you added a documentation comment in the cpp (asPeaceful). Wouldn't that make more sense in the header?
For the ones that exist as
Coloursconstants can I use those values instead of the ones that were defined before? It'd be really weird/inconvenient if the xml couldn't make controls match colors with the programmatic valuescolor/colouractually doesn't have its acceptable values specified in the schema.I think it would actually make the most sense right next to the declarations of all the spells. I added that note in because I thought all the instances of
when(WHEN_COMBAT).asPeaceful()were bugs and they're not.So I put it there.
How different were they? If they're reasonably similar colours then the version in
Coloursshould be fine.Hmm, maybe that should be added, but if it's already not there then it won't block this PR.
Also, you misspelled "silver".
They're pretty similar, and also nothing was referencing the variants that would have come from the old
parseColor()so there's no functional change.That I did. Funny that it wasn't fuchsia that tripped me up!
Okay, I did a comparison of the colours. The ones that are different are:
The differences mostly aren't noticeable unless you look closely (except for teal). I did wonder if perhaps some of the "extra" colours that use 0xff should instead either use 0xdd or fill the gap with 0x31, so I tried this out:
I think they're probably fine as they are, but if you think any of them are overly bright then you could try reducing them as above.
I don’t think I’ll noodle with the values any more.
On Wed, Jan 22, 2025 at 6:37 PM Celtic Minstrel @.***>
wrote: