Skip to content

Alpha: Substitutions, Initiative Turns, Injury Model, FanZone & Reputation v1 - #16

Closed
AlexanderDaly wants to merge 11 commits into
mainfrom
develop
Closed

Alpha: Substitutions, Initiative Turns, Injury Model, FanZone & Reputation v1#16
AlexanderDaly wants to merge 11 commits into
mainfrom
develop

Conversation

@AlexanderDaly

Copy link
Copy Markdown
Owner

Summary

This PR prepares the first playable alpha of the soccer-rpg career loop, adding tactical substitutions, unit-level initiative turns, a training-driven injury model, and the initial FanZone social dashboard with player reputation.

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Refactoring (no functional changes to existing systems' public APIs)
  • Documentation update (design/implementation reports)

Changes Made

  • Implemented a tactical substitution system with per-side substitution budgets, automatic bench selection, and a new Substitute action in the tactical match UI, backed by MatchController helpers and related scene wiring.
  • Switched tactical turns to a unit-level initiative queue (with stat-driven initiative, jitter, and player-control bonuses) so actors take turns based on initiative rather than rigid team-phase sequencing.
  • Reworked injuries into a training-focused injury system with weighted categories and concrete injury types, plus helpers for rolling, applying, and surfacing training injury events, while deprecating match-level rolls.
  • Added the first pass of the FanZone social media dashboard (FanZone V2) and SocialFeedManager, wiring post-match hooks so match results can drive social feed events and future narrative content.
  • Introduced a player reputation system v1 with reputation values, tiers, and basic UI hooks on the player mini-card and post-match screen.
  • Fixed matchday assignment per round and updated season awards tracking to record tactical match goal events for all scorers, not just simulated matches.
  • Updated project configuration (autoload for SocialFeedManager, debug flag for fanzone_v2_enabled) and desktop shell input handling to address the OS click-through issue.
  • Added internal design docs for substitutions, unit-level initiative, and season awards, documenting scope, current behavior, and follow-up work.

Related Issues

  • Documents and mitigates the OS click bug in the desktop shell, including a code-level fix to mouse filtering.
  • Completes tactical match goal attribution required by the Season Awards feature spec.

Testing

  • Manually tested tactical matches with substitutions, injuries, and initiative ordering in-game.
  • Manually verified FanZone V2 panel wiring and navigation from the dashboard.
  • Ran full automated test suite (GUT).
  • Added targeted unit tests for injury distribution and initiative ordering.

Additional Notes

  • Substitution selection is currently automated (lowest-rated outgoing, highest-rated bench incoming) to keep scope contained for this alpha; explicit selection UI is planned as a follow-up.
  • Training-only injury rolls are intentionally conservative, with capped probabilities per session and richer text descriptions to support narrative surfacing in FanZone and commentary.
  • FanZone V2 and reputation v1 are intentionally minimal and behind a debug flag to allow iteration on content, tuning, and UX without affecting the stable dashboard flow.

Soccer RPG Developer and others added 11 commits February 3, 2026 00:26
- Create TrainingConstants class with shared colors, XP values, and zone data
- Create TrainingDrillBase class with common functionality:
  - Difficulty selector setup
  - Footer button styling
  - Power/timer bar color updates
  - XP calculation and reward application
  - Score display and best score saving
- Refactor freekick_drill.gd to extend TrainingDrillBase (1069 → 768 LOC)
- Refactor penalty_drill.gd to extend TrainingDrillBase (804 → 531 LOC)
- Refactor rondo_drill.gd to extend TrainingDrillBase (880 → 674 LOC)

Total reduction: ~780 lines of duplicated code eliminated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add SocialFeedManager autoload with NPC persona-driven post generation,
event-reactive feed (match results, injuries, milestones, season updates),
player compose/reply with NPC auto-replies, and save/load persistence.
Rewrite panel_social.gd with filter bar, typed post cards, thread view,
and real-time updates. Add FanZone tile to dashboard grid.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AlexanderDaly

Copy link
Copy Markdown
Owner Author

todo's should be updated to resolve billing issues with github to allow automated testing tools.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aee03bcfc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 252 to +254
if save_roll.success:
if match_data:
match_data.record_event("shot", {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record on-target shot events for goals

Because record_event("shot", {"on_target": true}) is now gated by if save_roll.success, successful shots that become goals no longer generate a shot event. In this codebase, MatchData derives both shots and shots_on_target from "shot" events, so goals are undercounted in post-match stats and can depress match rating/XP-related outputs for players who score.

Useful? React with 👍 / 👎.

Comment on lines +334 to +335
if "social_feed" in data:
SocialFeedManager.from_dict(data.social_feed)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear stale social feed when loading legacy saves

This restore path only hydrates SocialFeedManager when social_feed exists, but does nothing otherwise, so loading older save data (or any payload missing that key) keeps whatever feed was already in memory from a previous career/slot. Since SocialFeedManager is an autoload singleton, this leaks posts/reputation-thread state across saves instead of defaulting to an empty feed.

Useful? React with 👍 / 👎.

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.

1 participant