Add full achievement definition and character-state editors - #47
Open
fryguy503 wants to merge 3 commits into
Open
Add full achievement definition and character-state editors#47fryguy503 wants to merge 3 commits into
fryguy503 wants to merge 3 commits into
Conversation
* Add achievement definition and character editors * Match achievement editor to legacy PEQ layout --------- Co-authored-by: Trust <trust@bastiongame.com>
Adopt EQEmu database updates 9329/9330, provider-neutral reward sources, version-zero state, and pending state updates. Preserve shared catalogs and durable character history while adding strict schema diagnostics, character-repair safeguards, runtime validation, UI guidance, and expanded PHP 7.1 regression coverage.
Add type 6 specific-AA ranks and type 7 class-ineligible fallback authoring, validation, lookup, and character tooling. Bound AA rank-chain validation and add regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE UNTIL EQEmu/EQEmu#5119 has been accepted
Summary
This PR adds comprehensive achievement-system management to the PEQ Database Editor.
It introduces:
The branch changes 30 files with approximately 16,040 additions and 8 deletions.
Motivation
The EQEmu achievement system spans numerous related content and character-state tables. Managing those relationships directly through SQL is difficult and potentially unsafe, particularly around stable identities, selectable rewards, character history, and partially written graphs.
This editor provides a guided interface that validates and writes achievement data transactionally while protecting durable character and reward state.
Achievement Definition Management
Definition catalog
Adds a searchable, sortable, and paginated achievement catalog with filters for:
The catalog displays aggregate category, component, criterion, reward, and restriction counts.
Full graph editor
A tabbed editor manages the complete definition graph as one unit:
One submission validates and writes the entire graph transactionally. A failure rolls back the complete operation rather than leaving partially updated relationships.
General definition fields
Supports:
New definitions begin as disabled drafts.
Components and criteria
Supports component wire types:
Supports all 14 achievement criterion events:
Supports progress modes:
Supports component behaviors:
Event-specific controls explain the meaning of primary target, secondary target, threshold, replay behavior, and allowed progress modes.
Dynamic reference lookups
Provides bounded lookup suggestions for:
Valid numeric IDs can still be entered directly. Suggestions are optional and do not prevent authoring newly introduced or custom IDs.
Additional helpers include:
Reward authoring
Supports reward types:
Supports delivery modes:
Selectable reward authoring includes:
Validation ensures every enabled selectable option contains at least one enabled mapped grant and that at least one enabled non-common choice exists.
Stable identity protection
The editor protects durable identities used by character state and reward idempotency:
New reward identities are allocated atomically when appropriate.
Safe cloning and deletion
Safe cloning:
Definition deletion:
Category Management
Adds a category hierarchy editor supporting:
The hierarchy view displays child counts and associated-definition counts.
Validation prevents:
Failed submissions retain entered values and display field-specific errors.
Character Achievement Management
Character browser
Adds an administrator-only character browser with:
An administrator-only shortcut is also added to the existing player detail page.
Character achievement detail
Per-character achievement data can be filtered by:
The detail page displays:
Administrative repair actions
Supports carefully gated actions for:
Safety behavior includes:
Orphaned history
Character state referencing a deleted or incomplete definition remains visible.
The editor reports:
This evidence is never silently discarded.
Validation and Data Safety
Authorization
Request safety
Every mutation uses:
Graph submissions are limited to:
Database safety
FOR UPDATElocksAuthoritative validation
Server validation checks:
Immediate browser validation provides faster feedback, but server and repository validation remain authoritative.
Schema Diagnostics
The editor never creates or alters EQEmu tables automatically.
Before use, it verifies:
NOT NULLrequirementsIf the schema is missing or unsafe, the editor fails closed and displays a diagnostics page instead of permitting writes.
Required content tables
achievement_categoriesachievementsachievement_category_associationsachievement_componentsachievement_component_countsachievement_criteriaachievement_rewardsachievement_cast_restrictionsachievement_reward_setsachievement_reward_optionsachievement_reward_option_entriesRequired character-state tables
character_datacharacter_achievementscharacter_achievement_progresscharacter_achievement_rewardscharacter_achievement_reward_selectionscharacter_achievement_pending_mutationsSeparate content and character database connections are supported without cross-database joins.
Optional lookup tables produce warnings when unavailable but do not block unrelated authoring.
Editor Integration and UX
editor=achievementsEvery surfaced field includes one or more of:
aria-describedbyguidanceThe feature also includes a full authoring guide covering identities, publishing, progress modes, event semantics, rewards, skills, and NPC-name hashing.
Compatibility
mysqli; no new package dependenciesTesting
Executed against
eqemulator/peq-editor:latestwith PHP 7.1.33:Additional verification:
node --checkgit diff --checkpassedThe optional read-only database integration test was not executed locally because database environment variables were unavailable. When configured, it verifies:
It performs no mutations.
Deployment Notes
#reload achievements global.A failed server reload preserves the previous active achievement snapshot.
Increment
definition_versionwhen deployed semantics change incompatibly. Carefully reviewreset_on_version_change, because it can allow rewards to be delivered again.Intentional Limitations
Suggested Reviewer Focus
Checklist