Closed
Implement symbiotic XP multiplier with activity interruption on player state change#198
Conversation
Co-authored-by: gaidheal1 <84990667+gaidheal1@users.noreply.github.com>
Co-authored-by: gaidheal1 <84990667+gaidheal1@users.noreply.github.com>
Co-authored-by: gaidheal1 <84990667+gaidheal1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement symbiotic XP multiplier system for character activities
Implement symbiotic XP multiplier with activity interruption on player state change
Jan 23, 2026
Member
|
@copilot rewrite the migrations and make any other changes needed now that I have regenerated migrations from scratch. |
Contributor
Author
Rebased on development and regenerated migrations. Changes: Migrations regenerated:
Code changes:
Commit: Note: The branch history has been rewritten to be based on the new development branch (4f6dd01). A force push will be needed to update the remote. |
Copilot stopped work on behalf of
gaidheal1 due to an error
January 23, 2026 22:45
Member
|
Implemented separately, closing |
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.
✅ Symbiotic XP Multiplier System - Rebased and Regenerated
Successfully rebased on the new development branch (after migration squash) and regenerated proper Django migrations.
Changes Made:
character/migrations/0004_characterrole_romanticrelationship_and_more.py- Addsplayer_came_online_atfieldprogression/migrations/0003_characteractivity_xp_multiplier_applied.py- Addsxp_multiplier_appliedfieldpositionfield that was causing migration errorscharacter/tests/test_xp_multiplier.pyModel Changes:
Character model:
get_active_link()methodplayer_is_onlinepropertyxp_multiplierpropertyon_player_state_change()methodPlayerCharacterLink model:
player_came_online_atfieldplayer_is_onlinepropertyxp_multiplierproperty (2.0x online, 1.0x offline)get_link_for_character()classmethodget_link_for_player()classmethodCharacterActivity model:
xp_multiplier_appliedfieldsave()to capture multiplier on creationcalculate_xp_reward()to use stored multiplierWebSocket Consumer:
on_player_state_change()inconnectmethodon_player_state_change()indisconnectmethodFiles Changed:
character/models/character.py(+117 lines)progression/models.py(+13 lines)gameplay/consumers.py(+11 lines)character/migrations/0004_*.py(new)progression/migrations/0003_*.py(new)character/tests/test_xp_multiplier.py(new, 348 lines)Original prompt
Overview
Implement a symbiotic XP multiplier system where character activities are interrupted and restarted with the correct multiplier when player logs in/out. This avoids temporal state complexity by ensuring each activity has a single multiplier throughout its duration.
Goals
Backend Changes
1. Add Migration for PlayerCharacterLink Model
Create migration in
character/migrations/to add:player_came_online_atfield (DateTimeField, null=True, blank=True) with help text "When the player came online while linked to this character"2. Add Migration for CharacterActivity Model
Create migration in
progression/migrations/to add:xp_multiplier_appliedfield (FloatField, default=1.0) to store the multiplier that was active when the activity started3. Update PlayerCharacterLink Model (
character/models/link.py)Add to the
PlayerCharacterLinkclass:4. Update Character Model (
character/models/character.py)Add to the
Characterclass:5. Update CharacterActivity Model (
progression/models.py)Modify the
CharacterActivityclass: