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

[XEDRA] Adjust dream magic xp requirements to jmath #79126

Merged
merged 15 commits into from
Jan 18, 2025

Conversation

b3brodie
Copy link
Contributor

@b3brodie b3brodie commented Jan 13, 2025

Summary

Mods "[XEDRA] Adjust dream magic XP requirements to jmath"

Purpose of change

Currently dream magic uses EOCs to reduce the amount of effort required to level the spells. This approach does lead to some strangeness that I feel adjusting the xp formulas would fix.

  • Faulty communication of xp gains / requirements: The current EOC makes each spell, on average, take a couple of casts to level regardless of its actual level. However, to the player they will see that the next level requires thousands to tens of thousands of xp to level in the magic window, while their log will be telling them they are only getting a hundred xp per cast.
  • 'Low' max level. This likely wouldn't be an issue with XEDRA alone, but with multiple mods characters could conceivably reach the max spell level as defined by the integer limit of XP for dream classes. If they do so, their spell xp would loop back around and break their spell level. Reducing the actual xp requirements will make this a non-issue by massively raising the xp-defined max level.

Describe the solution

Dream Magic Adjustments:

  • Spells level in 3 casts, with 100 xp gained per cast and 300 xp required to level
  • Failed spell casts cost 10% of mana cost
  • Failed spells give 100% of normal exp to help move past the "very hard to cast at low levels" phase.
  • Spells cannot be level past 0 with the artifacts.

Adjust the spell xp formulas using the magic_type

  • A character with 100 focus and 8 int gets about 90 xp per cast, so 300 xp per level = 3 casts to level each spell

Add max_book_level field to magic type and individual spell definitions.

  • Takes an int which defines what the max level of this spell type / spell is learnable via books, scrolls, etc.

Add casting_xp_formula_id to magic type

  • Takes a jmath_func which calculates how much xp is given for casting a spell.

Add failure_cost_percent to magic type

  • Takes a double or math function that evaluates to one. On spell cast failure, it will use this percent to calculate how much energy will be used. Defaults to 0. Values above 1 and below 0 are valid, but spells with a failure cost greater than the success cost will use the success cost to calculate castability.

add failure_exp_percent to magic type

  • Takes a double or math function that evaluates to one. Determines what percent of normal spell xp one will gain for failing to cast a spell. Defaults to 0.2 which was the value before adding this change.

Add failure_eocs to magic type

  • Accepts eoc ids that will run when a character fails to cast a spell successfully.

Also give the adjusted xp formulas to inventor and dreamsmith since they're also 'dream' magic.

Describe alternatives you've considered

Different exp costs to level. I felt that 3 casts per level was a nice average from the prior numbers though.
Different numbers for the other new values, like failure cost. These numbers are fairly arbitrary.
Splitting eater and dreamer/inventor/dreamsmith xp requirements since eater spells tend to be more costly

Testing

Everything compiled, etc.
Saw that the spells formulas are adjusted as intended
Saw that artifacts were not usable past 0
Saw that xp was still 100 even at spell fail
Saw that some mana was still consumed even on spell failure.
Added the ethereal wings initiate eoc to test and saw that spell failures toggled the wings.

Additional context

For existing saves, this PR would permanently max out pretty much any already learned dream magic spells since they'd still have the same xp which is then calculated with the new formulas. However, leveling the spells was already pretty easy so its likely that most are already pretty close to max level. I don't think that this is too much of an issue.

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding Mechanics: Enchantments / Spells Enchantments and spells EOC: Effects On Condition Anything concerning Effects On Condition Mods: Xedra Evolved Anything to do with Xedra Evolved json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 13, 2025
@GuardianDll
Copy link
Member

FYI the idea is that dream magic cannot be learned from books, but there are few more underlying issues with it, like difficulty field makes it impossible for low lvl caster to cast a spell any reliably (probably can be fixed nowadays by moving difficulty formula to magic type), and approach of "you train spells when you cast them" incentivizes people to just abuse spells that do not need a target, keybinding it and then just repeating spell casting over and over and over

side note, there was #78665, so i suspect some magic mods may want to have fail_effect defined in magic type

@github-actions github-actions bot added the [C++] Changes (can be) made in C++. Previously named `Code` label Jan 13, 2025
@b3brodie
Copy link
Contributor Author

FYI the idea is that dream magic cannot be learned from books, but there are few more underlying issues with it, like difficulty field makes it impossible for low lvl caster to cast a spell any reliably (probably can be fixed nowadays by moving difficulty formula to magic type), and approach of "you train spells when you cast them" incentivizes people to just abuse spells that do not need a target, keybinding it and then just repeating spell casting over and over and over

side note, there was #78665, so i suspect some magic mods may want to have fail_effect defined in magic type

I can expand the magic_type field in this PR to add some extra things such as fail cost + plus maybe a fail EOC and difficulty formula. I don't have any good ideas for the repeatedly casting spells on yourself over and over again though, unfortunately.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 13, 2025
@GuardianDll
Copy link
Member

That's an issues of xedra dream magic design, it's not something you can, or need, to solve, worry not

@Standing-Storm
Copy link
Contributor

Standing-Storm commented Jan 14, 2025

maybe a fail EOC

Sinister laughter echoes in the distance

I don't have any good ideas for the repeatedly casting spells on yourself over and over again though, unfortunately.

If it is at all possible to grind, regardless of how tedious it is, people will do it. We haven't solved that in 50 years of video game design (other than designing games that have no improvable stats), and it's probably not solvable.

@Standing-Storm
Copy link
Contributor

I can expand the magic_type field in this PR to add some extra things such as fail cost + plus maybe a fail EOC and difficulty formula. I don't have any good ideas for the repeatedly casting spells on yourself over and over again though, unfortunately.

I understand if this is out of scope, but maybe JSONifying the exp-granted-per-cast formula would be a way to solve this?

I admit this is a selfish request, though, because I want to adjust it for MoM psionics (so you get more if your Nether Attunement is higher).

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 15, 2025
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels Jan 18, 2025
@github-actions github-actions bot added the <Documentation> Design documents, internal info, guides and help. label Jan 18, 2025
@github-actions github-actions bot added [Python] Code made in Python Lore Game lore, in-game communication. Also the Lore tab. Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Aftershock Anything to do with the Aftershock mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Items: Containers Things that hold other things Code: Tooling Tooling that is not part of the main game but is part of the repo. Martial Arts Arts, Techniques, weapons and anything touching martial arts. Items: Armor / Clothing Armor and clothing Appliance/Power Grid Anything to do with appliances and power grid Mods: No Hope Relating to the mod No Hope Limbs Limbs, mutable limbs, and code related to them. Mods: Defense Mode Anything to do with the Defense Mode mod Mods: TropiCataclysm 🌴 Having to do with the tropical region mod for DDA. Mods: Desert Region Anything relating to the Desert Region mod Mods: Mind Over Matter Mods: Sky Island Anything about the Sky Island mod ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds Mods: Backrooms labels Jan 18, 2025
@b3brodie b3brodie marked this pull request as ready for review January 18, 2025 00:51
@b3brodie
Copy link
Contributor Author

Alright, I think something went wrong with my conflict fix which broke the labeling, but the actual PR content is fully functional

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 18, 2025
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 18, 2025
@Maleclypse Maleclypse merged commit 8977bf7 into CleverRaven:master Jan 18, 2025
27 of 28 checks passed
@b3brodie b3brodie deleted the xedra_dream_exp branch January 20, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world Code: Build Issues regarding different builds and build environments Code: Tests Measurement, self-control, statistics, balancing. Code: Tooling Tooling that is not part of the main game but is part of the repo. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling <Documentation> Design documents, internal info, guides and help. EOC: Effects On Condition Anything concerning Effects On Condition Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds Info / User Interface Game - player communication, menus, etc. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Armor / Clothing Armor and clothing Items: Containers Things that hold other things Items: Food / Vitamins Comestibles and drinks Items: Gunmod / Toolmod Weapon and tool attachments, and add-ons [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Limbs Limbs, mutable limbs, and code related to them. Lore Game lore, in-game communication. Also the Lore tab. Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs Martial Arts Arts, Techniques, weapons and anything touching martial arts. Mechanics: Enchantments / Spells Enchantments and spells Mechanics: Weather Rain, snow, portal storms and non-temperature environment Melee Melee weapons, tactics, techniques, reach attack Missions Quests and missions Mods: Aftershock Anything to do with the Aftershock mod Mods: Backrooms Mods: Defense Mode Anything to do with the Defense Mode mod Mods: Desert Region Anything relating to the Desert Region mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Mind Over Matter Mods: No Hope Relating to the mod No Hope Mods: Sky Island Anything about the Sky Island mod Mods: TropiCataclysm 🌴 Having to do with the tropical region mod for DDA. Mods: Xedra Evolved Anything to do with Xedra Evolved Mods Issues related to mods or modding Monsters Monsters both friendly and unfriendly. Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site [Python] Code made in Python Scenarios New Scenarios, balancing, bugs with scenarios Spawn Creatures, items, vehicles, locations appearing on map Translation I18n Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants