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

feat: Upgrading Equipment #325

Merged
merged 162 commits into from
Aug 6, 2024
Merged

Conversation

Conner-Schaffer
Copy link
Collaborator

@Conner-Schaffer Conner-Schaffer commented Jun 1, 2024

Working on implementing the Enhance equipment feature and Quality feature to the game.

This PR has DB Ver 8.

Current Quality State: Functional,

Upon Crafting a new piece of gear you have a random chance to get PlusValue (relatively low)
SupportPawn will slightly increase your odds.

Using better Quality Rocks ups your odds the best.
You require at least Tier 2 rocks to reroll equipment with existing PlusValue (Quality X or WhiteDragon Rocks)
Quality directly adds the amount of crests you have, in a literal way, a plus 3 item gives you 3 extra slots.
so body pieces can get 4 while most other gear can only get 3, for example.

You can fail to roll a quality above 0, this is how it was on Live as well, it'll even say "Success" but this just means the Pawn will earn EXP for completing the craft, not that you successfully augmented the item, if you're unlucky you'll have to try a couple of times!

Some functionality changed in #409 to be live accurate

Bugs

Todo:

  1. Ditching AdditionalStatus for this PR, leaving what I made in, just not in the DB builder/no SQL calls in code, so it can be followed up on when we have more information.

Notes:

We can set the plus value to literally anything apparently

image

Current Enhance State: Completely Functional.

20% chance to be GreatSuccess
When Enhancing it will properly recognise when you hit Max Grade.
Enhancing Equipped Gear works.
You are rewarded EquipPoints upon attempting an enhancement, there is now a slight variation in the rewarded points, SupportPawn boosts points slightly and GreatSuccess boosts it greatly.

Theres data that drives dragonaugment stuff here, so I guess Capcom uses this data there too?

Bugs

None that I know of!!! :D

Todo:

  1. Source the values of CDataCraftStartEquipGradeUpUnk0 and CDataCraftStartEquipGradeUpUnk0Unk0, not hard code.
    ^ this is dragon augment stuff it seems.
Rendered.mp4

Current Dyes State: Completely Functional.

Gear must be Enhanced at least once to be able to apply Dye to it.

image

image

Configuration Guide

New Item Quality Rarity

In StartCraftHandler go to Lines 105 to 123.
You'll find D100 += X, this is out of 100, adjusting these will increase the likelihood of getting better quality (100 being plus 3)

Change Quality Rarity

In CraftStartQualityUpHandler go to Lines 75 to 93~ and its the same premise, except to get +3 you need a really high score of 150, (greatly favouring the better quality Refinement Rocks) or relying on random luck for GreatSuccess.

Enhancing Rate

In CraftStartEquipGradeUpHandler at Line 65 you'll see
uint addEquipPoint = (uint)((IsGreatSuccess ? 300 : 180) * (0.8 + (Random.Shared.NextDouble() * 0.4)));
Changing the 300 changes the rewarded points for greatsuccess, and the 180 is standard points.
Changing the 0.8 changes the lowest modifier (points * modifier), and then changing 0.4 changes the upper range from min, so 0.4 is a maximum multiplier of 1.2.

Checklist:

  • The project compiles
  • The PR targets develop branch

@Conner-Schaffer
Copy link
Collaborator Author

did a quick rebase

@Conner-Schaffer
Copy link
Collaborator Author

Need to figure out how to get access to the Recipes, unlike the startcrafthandler, where all that information is in the request packet, the startcraftequipgearup response packet has all the information I need I believe?

Copy link
Collaborator

@alborrajo alborrajo left a comment

Choose a reason for hiding this comment

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

This review is focused mostly on the reverse engineered structures. The handler logic looks fine for a proof of concept, however there's plenty wrong in the structures when compared to the PC client deserializers. Fixing this will probably clear up some of the issues we currently got

Copy link
Collaborator

@alborrajo alborrajo left a comment

Choose a reason for hiding this comment

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

Considering there's still queries using ddon_additional_status, you should probably leave them in the migration and schema, even if the functionality is unused right now

Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbCharacter.cs Outdated Show resolved Hide resolved
Arrowgene.Ddon.GameServer/Characters/ItemManager.cs Outdated Show resolved Hide resolved
@Conner-Schaffer
Copy link
Collaborator Author

Considering there's still queries using ddon_additional_status, you should probably leave them in the migration and schema, even if the functionality is unused right now

I'm thinking of just removing the queries to simplify any issues,

Copy link
Collaborator

@pacampbell pacampbell left a comment

Choose a reason for hiding this comment

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

It is getting close. Thanks for making all the changes. Found one potential bug and an issue for the color response. Rest are related to formatting and style.

Copy link
Collaborator

@pacampbell pacampbell left a comment

Choose a reason for hiding this comment

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

Fix this couple of things I pointed out, but otherwise it looks good.

@pacampbell pacampbell merged commit cc04567 into sebastian-heinz:develop Aug 6, 2024
1 check passed
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.

3 participants