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

Vanilla Character Attributes and Skills reset #288

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

triple111
Copy link

@triple111 triple111 commented Jun 21, 2024

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.

  • New Features:
    • Introduced new character attributes and starting skills aligned with vanilla Crucible values.
  • Enhancements:
    • Replaced outdated character attribute retrieval methods with new methods using base attributes.
    • Updated database schema to remove old attributes from chrAncestries and chrBloodlines, and added them to chrAttributes as baseAttributes.

Effort to remove legacy attribute functionality, Removes attributes from chrAncestires and chrBloodlines and adds new column baseAttribute in chrAttributes. All attributes are now 20, charisma at 19, to reflect EvE Incursion patch changes
Character attributes are no longer set through bloodlines or ancestries, which is accurate to Crucible functionality
Disabled career skills (not applicable in Crucible) and added migration to change skills to basic starting skills accurate for Crucible. This results in a character around 60k SP
Copy link

sourcery-ai bot commented Jun 21, 2024

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:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @triple111 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 4 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

uint32 attributeID;

if (!res.GetRow(row)) {
codelog(DATABASE__ERROR, "Failed to find attribute information for attribute %d", attributeID);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Potential use of uninitialized variable.

The variable attributeID is used in the error log before it is assigned a value. This could lead to undefined behavior or misleading error messages.

@jdhirst
Copy link
Contributor

jdhirst commented Jun 22, 2024

@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
Copy link
Contributor

jdhirst commented Jun 22, 2024

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.

Removed blank lines and unintialzed variable
@triple111
Copy link
Author

@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 jdhirst merged commit 8ac9e05 into EvEmu-Project:staging Jul 1, 2024
1 check passed
@jdhirst
Copy link
Contributor

jdhirst commented Jul 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants