-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
The "Click Happy" achievement (click_happy) is described as "Click 5 times" (threshold = 5, condition type = CLICKS_PERFORMED), but players are not receiving it after clicking 5 times in a new game — they have to click many more times before it unlocks (or it never unlocks at all during early gameplay).
Root Cause (Investigation)
In Utilities/Systems/achievement_manager.gd, the CLICKS_PERFORMED condition type is resolved as:
Resource_Achievement.ConditionType.CLICKS_PERFORMED:
return float(StatsManager.get_enemies_defeated_by_hand())This reads enemies_defeated_by_hand from StatsManager, which is only incremented when an enemy is fully defeated by a hand/click — not when the player clicks. Early in a new game, enemies may require multiple clicks to die, so enemies_defeated_by_hand stays at 0 (or is much lower than the number of clicks performed).
The CLICKS_PERFORMED condition type is documented/named as "Track total clicks performed (hand defeats)" — the parenthetical "hand defeats" was apparently used as the implementation, but the intent per the GDD is raw click count.
From docs/zom_nom_defense_gdd.md:
Completing specific achievements (e.g., "Click 5 times", "Defeat a zombie") unlocks more tech.
This confirms "Click 5 times" should fire on 5 raw clicks, not 5 kill-clicks.
Steps to Reproduce
- Start a new game
- Click on enemies 5 or more times (without necessarily killing any)
- Observe: "Click Happy" achievement does not unlock
Expected Behavior
The "Click Happy" achievement should unlock after the player clicks 5 times, regardless of whether those clicks resulted in enemy kills.
Affected Files
Utilities/Systems/achievement_manager.gd—_get_stat_value()mapsCLICKS_PERFORMED→get_enemies_defeated_by_hand()Utilities/Systems/stats_manager.gd— hasenemies_defeated_by_handbut no dedicated click counterConfig/Achievements/achievement_resource.gd—ConditionType.CLICKS_PERFORMEDcomment is ambiguous ("Track total clicks performed (hand defeats)")Config/Achievements/click_happy.tres— the affected achievement resource
Suggested Fix
- Add a dedicated
clicks_performedcounter toStatsManagerthat increments on every player click input (not just kills). - Update
achievement_manager.gdto useStatsManager.get_clicks_performed()forCLICKS_PERFORMED. - Clarify the
ConditionType.CLICKS_PERFORMEDdoc comment to remove the ambiguous "(hand defeats)" parenthetical. - Consider whether
enemies_defeated_by_handshould become its own separate condition type (e.g.,HAND_KILLS) to preserve that tracking for other potential achievements like the GDD'sach_click_kills_25.
Metadata
Metadata
Labels
Projects
Status