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

Breton's magicka resist does not show in history. #2660

Open
fartingporkchop opened this issue May 31, 2024 · 5 comments
Open

Breton's magicka resist does not show in history. #2660

fartingporkchop opened this issue May 31, 2024 · 5 comments
Labels
bug classic variance Fixes a bug or behaviour from classic. Or could be result of lacking classic info.

Comments

@fartingporkchop
Copy link

Describe the issue

Creating a character, Breton's magic resistance does not show in class history summary. A Nord's frost resistance, and High Elf's immune to paralysis does show when checking history. Bretons might not have magic resistance like they should?

To Reproduce
Create a Breton character fully, then check in-game. Magic resistance does not show.
Create a Nord character fully, then check in-game. Frost resistance shows in history.
Same with High Elf, Paralysis immunity shows in history.

Save file doesn't show magic resistance either as a flag, which it does for Nords and High Elves abilities. Is the Breton's resistance hard coded elsewhere or not active?

Expected behavior

Breton's magic resistance should behave like the Nord's and High Elf's resistance. Otherwise, it should be like in DosBox where these resistances do not show up in the history for all races.

Screenshots and Logs

n/a

Desktop (please complete the following information):

  • OS: Windows
  • Version 1.1.1

Additional context

No mods.

@KABoissonneault
Copy link
Collaborator

Seems like the Racial part was added by @numidium in 42eed86

From the message, the intent was to show the racial bonuses from vampirism and lycanthropy, but it seems the Nord and High Elf data also have these flags, and it gets picked up by this code.

Because the race flags are not used by FormulaHelper.SavingThrow, I'm tempted to just remove the elemental resistance lines entirely. It's not useful info with the base game data. The Racial Special Ability lines can be kept, since those are actually relevant to vampirism/lycanthropy

We could potentially make FormulaHelper.SavingThrow use the flags, except that won't cover the Breton, which does not have the flag in the DF data.

image

@KABoissonneault KABoissonneault added bug classic variance Fixes a bug or behaviour from classic. Or could be result of lacking classic info. labels Jun 1, 2024
@numidium
Copy link
Collaborator

numidium commented Jul 7, 2024

From the message, the intent was to show the racial bonuses from vampirism and lycanthropy...

Sorry, I could have worded that better. If I remember correctly, at the time I wanted to cover all the racial bonuses and I put the text there to say that it includes vampirism/lycanthropy in addition to all the base races.

I'm noticing that ResistanceFlags isn't used anywhere mechanically. In fact, the only race that has its ResistanceFlags set in RaceTemplate.cs is Nord (Frost). Bretons don't have ResistanceFlags set in RaceTemplate.

I noticed that the Nord frost resistance and Breton magic resistances are applied directly in FormulaHelper.cs at line 1512. We could refactor this to check for racial resistance flags instead of checking against the player's race directly like it currently does.

In that case, we would have to add a line to RaceTemplate.cs to set the resistance flag for Magic for Bretons. Then in FormulaHelper we simply check against all the resistance flags.

numidium added a commit to numidium/daggerfall-unity that referenced this issue Jul 7, 2024
FormulaHelper previously applied racial resistances by reading the player's race directly. With this change, the saving throw calculation will be modified by the contents of the player's RaceTemplate.

Addresses the following issue:
Interkarma#2660
@numidium
Copy link
Collaborator

numidium commented Jul 8, 2024

I've been thinking... my PR makes it so that FormulaHelper reads from the RaceTemplate. However, the resistances have only ever been applied to the player from what I can see. Do we want them applied to Breton and Nord enemies, too?

@KABoissonneault
Copy link
Collaborator

I don't think it should be done for enemies, that goes into mod territory. Without mods, all enemies look too generic to tell by glance what race they are (I know in practice, it would be "always Breton in High Rock, always Redguard in Hammerfell"). For the most part, they are raceless. Do you know of any other feature that changes based on class enemy race? Maybe the hurt groans, but I can't even remember how to re-enable that feature.

In my opinion, leave it to combat mods running separate graphics per enemy race. It's easy for them to do.

@numidium
Copy link
Collaborator

numidium commented Jul 8, 2024

Do you know of any other feature that changes based on class enemy race? Maybe the hurt groans,

Yeah, now that I've examined the code, it seems that humanoid enemy NPCs are actually raceless. They just have a random race chosen for pain sounds in EnemySounds. Scratch that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug classic variance Fixes a bug or behaviour from classic. Or could be result of lacking classic info.
Projects
None yet
Development

No branches or pull requests

3 participants