Skip to content
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

Many fixes (resistances, status icons, custom skills, effect suppression) + expanded bonus handling + misc #393

Merged
merged 29 commits into from
Oct 31, 2024

Conversation

FoxLee
Copy link
Collaborator

@FoxLee FoxLee commented Oct 27, 2024

FINALLY got stuck in to v12! I've primarily gone after the bug with resistances for now—Ongoing Damage will have to wait a bit longer.

  • Updated references to certain properties in the damage rolled from chat cards (fixes Resistances showing on character sheets, but not subtracting damage during damage application #390). I also changed the fallback behaviour for unspecified damage, which seemed like it should use physical instead of true damage.
  • Updated references to certain properties in active effect config (Fixes V12 Active Effect, Status Effect Icon Replacer button doesn't work #383)
  • Added new logic for bonus keys based on the defence targeted by a power (as suggested by absolitude on the Discord). Yay for low-hanging fruit! :p
  • Since the v12 editions expand many single-string configs into objects, I took the liberty of adding short and abbreviated labels to ability action types (eg. "Standard" vs. "Standard Action" and "STD."). Also added strings accordingly in the EN and AN-AU lang files, and corrected some mistakes in strings for auto-apply effect settings.
  • Updated various templates to newer Handlebars. (Not actually required until v14, but I got sick of so many warnings so I got rid of some easy ones while I was working on nearby stuff.)
  • Increased the height of the description field in active effects config form, to make it a bit more usable (also suggested by absolitude on the Discord).

After another crack at it on Monday, also includes:

Unfortunately I still haven't managed to fix the ongoing damage elephant in the room, nor have I worked out what's up with the start-of-next-turn durations being borked. But hey, the week is young! :p

Apparently I can't stay away, so here's some Wednesday updates too <XD

  • Added a global defences modifier, on the basis that while it's not too hard to add bonuses to four defences manually, it does come up really frequently so it would probably be appreciated. It's compared to the bonus types for individual defences, so should respect 4e stacking rules.
  • Added an "isBasic" property for attacks, which can be targeted with the "basic" bonus key. I meant to add a marker on the power listing as well, but I forgot. I did also update Steve and the SRD powers compendium, I just haven't uploaded them yet because uploading "packs" is a PITA now and if I untangle the global attack/damage bonus types issue before I'm done on this tear, they'll need updates again anyway.

That's all for now, but I'm likely to go at it again tomorrow and/or Friday, so feel free to take your time with this increasingly complicated PR :p

FoxLee added 16 commits October 27, 2024 18:46
- Updated most Handlebars using `select` to instead use `selectOptions`. (Not _all_ of them. I wasn't game to mess with the really complex ones.)
- Restored the empty value for the sustain action selector.
Updated Handlebars selectOptions "nameAttr" to "valueAttr", since it was giving a warning
I really didn't need to do this, I just wanted to do because it confused me when I was debugging the damage resistance issue <XD
Added new logic for bonus keys based on the defence targeted by a power (as suggested on the Discord). Yay for low-hanging fruit! :p
Since the v12 editions expand many single-string configs into objects, I took the liberty of adding short and abbreviated labels to ability action types.
- Updated references to `flavor` and `number` within `roll` object, which turns out to be the cause of damage resistance failing in v12. (fixes EndlesNights#390 EndlesNights#390)
- Changed fallback behaviour to make unspecified damage into `physical` (corresponds with 4e Untyped) instead of `damage` (corresponds with 4e All damage type).
- New entries for middle-abbreviated action names (eg. "Standard" vs. "Standard Action" and "Std.")
- Corrected spelling errors in strings for auto-apply effect settings
To make editor area more usable
- Moved skill calcs to be after global mod calcs 
- Added 0 as fallback for most bonus values
- Added global skill modifier to skill totals, with comparison against typed per-skill bonuses in both PC and NPC skill calcs
- For NPCS, enabled power and untyped bonuses even when advanced calcs are off (on the premise that these cover the vast majority of temporary effects).
In determineSuppression logic, changed requirement for source to be Actor, to source NOT being actor; should now process item-based effects only, instead of only non-item effects. (Fixes EndlesNights#387).
In custom skills hook, changed "Hooks.once" to "Hooks.on", as suggested by ddbrown30 (Fixes EndlesNights#391)
- Added "bonus" property to modifiers migration
- Removed obsolete bonus typing for resistances from older migration script
@FoxLee FoxLee changed the title Fixed resistances, fixed status icons, and misc Many fixes (resistances, status icons, custom skills, effect suppression) + expanded bonus handling + misc Oct 28, 2024
- Restricted global styling to 4e documents/apps (was causing unwanted effects in some UI stuff)
-  Removed unneeded float and height attributes on some sections, as well as some new styling for the expanded global bonuses section
- Removed unused 5e "Bonus" strings and replaced with new "modifier" strings
- Added a hint for non-proficient armour penalty
- Added Def All to global modifiers section, and updated section layout in general
- Added non-proficiency penalty note to armour if active.
- Fixed unclosed lists around effects subsections
- Added missing list tags to resistances list
Added new migration functions for new global mods and "isBasic" attack tag
- Moved global mods calc before defences calc (and separated nonproficiency armour penalty from main global mods calc, since it needs to be after defences)
- Added global defences modifier logic for PCs & NPCs
- Updated code for global skills modifier, because I realised we could just copy the object instead of rebuilding
@NuptupTDOW
Copy link

Absolutely amazing work! I can't even begin to explain how excited I am for the global defences modifier and the isBasic property being added.

Instead of just adding a flat amount of extract height to the description text field, it seems a better solution is to have the text edit area scale in size with the window.
@EndlesNights
Copy link
Owner

Just building off of the change for the increased the height of the description field in active effects config form. It should now automatically scale in height in relation to the window form be resized similarly to how the description text resizes for other item objects.

I also slightly adjusted the background for the text editor so is is more clear what is part of the text field.

One div was accidently placed inside of another one, this wasn't readily apparent as some of the indentation was incorrectly formatted
@EndlesNights EndlesNights changed the base branch from main to dev October 31, 2024 03:45
@EndlesNights EndlesNights merged commit 5ac24ad into EndlesNights:dev Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment