EvEmu-Project / evemu_Crucible

Emulator for EvE Online's Crucible expansion
https://evemu.dev
174 stars 68 forks source link

Vanilla Character Attributes and Skills reset #288

Closed triple111 closed 3 months ago

triple111 commented 3 months ago

This PR aligns the character attributes and starting skills with vanilla Crucible values to create a more accurate and vanilla experience. I used historical sources to find the starting values for skills, attributes, and ISK. All changes were non-destructive to allow for reversion. There are 2 new database migrations and changes to several server classes and eve-server.xml.

A new character will now start with: 20 Perception 19 Charisma 20 Intelligence 20 Memory 20 Willpower

~60K SP 5,000 ISK

Reference: Eve University "Starting Skills" of 23 March 2013 https://wiki.eveuniversity.org/index.php?title=Starting_skills&direction=next&oldid=13906

I am investigating the difference between the quoted 56,489 SP value and the resulting value due to these changes.

Summary by Sourcery

This pull request updates character attributes and starting skills to match vanilla Crucible values. It includes new database migrations and modifications to server classes to support these changes. The changes are non-destructive, allowing for easy reversion if needed.

sourcery-ai[bot] commented 3 months ago

Reviewer's Guide by Sourcery

This pull request updates the character attributes and starting skills to match vanilla Crucible values. The changes include refactoring the attribute fetching logic, updating the character creation process, and adding database migration scripts to modify the schema and data. The old methods and logic have been commented out to allow for easy reversion if needed.

File-Level Changes

Files Changes
src/eve-server/character/CharacterDB.cpp
src/eve-server/character/CharacterDB.h
Refactored character attribute fetching to use a new method GetAttributesFromAttributes, and commented out the old method GetAttributesFromAncestry.
src/eve-server/cache/ObjCacheDB.cpp
src/eve-server/character/CharUnboundMgrService.cpp
Updated character creation and cache generation logic to align with new attribute schema.
sql/migrations/20240614183142-charattributes.sql
sql/migrations/20240621173914-skillsvanilla.sql
Added database migration scripts to update character attributes and starting skills to match vanilla Crucible values.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
jdhirst commented 3 months ago

@triple111 Thanks for the contribution! I looked over everything and it all looks good to me and brings us closer to that vanilla experience.

Just a couple of things before I merge this:

  1. Could you please remove the commented code sections however? I know the codebase currently has a lot of those, however it will make things easier to read and understand by cleaning them up.
  2. Update that error message that references attributeID
  3. Couple of redundant lines that makes CodeFactor unhappy
jdhirst commented 3 months ago

To fix the workflow failure, can you please git fetch --all; git cherry-pick f97c462900c164496321ab115927071ed44bc464? This will fix the workflow bug in your branch so it can be built properly.

triple111 commented 3 months ago

@jdhirst The requested changes are included in the latest commit. I did however have an error with the workflow failure command you requested:

git fetch --all; git cherry-pick f97c462900c164496321ab115927071ed44bc464 Fetching origin fatal: bad object f97c462900c164496321ab115927071ed44bc464

jdhirst commented 3 months ago

I got this to build so will merge it, the CI pipeline should work for new branches now.