|
RapidGameFramework
Reusable Godot managers for data-driven small games
|
Variables | |
| DataCacheManager | |
| data_cache_manager | |
| String | |
| Load achievements from JSON. | |
| id | |
| definition | |
| int | |
| Increment a numeric counter and return the new value. | |
| value | |
| bool | |
| Apply a batch of stat events and return newly unlocked achievements. | |
| achievement_id | |
| default_value | |
| Calculate one derived stat. | |
| op | |
| fields | |
| values | |
| total | |
| denominator | |
| entry | |
| Dictionary | |
| Return registered achievement definitions. | |
| collection | |
| achievement | |
| file | |
| global_flags = {} | |
| global_times = {} | |
| source_flags | |
| Merge achievement flags/timestamps from another stats state without replacing local counters. | |
| source_times | |
| unlocked | |
| Return cache diagnostics for achievement catalog loads. | |
| flag_id | |
| counters = state.get("counters", {}).duplicate(true) | |
| Return all counters, records, and flags as saveable state. | |
| records = state.get("records", {}).duplicate(true) | |
| flags = state.get("flags", {}).duplicate(true) | |
| derived_stats = state.get("derived_stats", {}).duplicate(true) | |
| run_summaries = state.get("run_summaries", []).duplicate(true) | |
| achievement_unlock_times = state.get("achievement_unlock_times", {}).duplicate(true) | |
| registered_achievements | |
| saved_achievements | |
| achievements = saved_achievements.duplicate(true) | |
| state | |
| stats_manager.achievement |
Definition at line 205 of file stats_manager.gd.
| stats_manager.achievement_id |
Definition at line 122 of file stats_manager.gd.
| stats_manager.achievement_unlock_times = state.get("achievement_unlock_times", {}).duplicate(true) |
Definition at line 338 of file stats_manager.gd.
| stats_manager.achievements = saved_achievements.duplicate(true) |
Definition at line 342 of file stats_manager.gd.
| stats_manager.bool |
Apply a batch of stat events and return newly unlocked achievements.
Return one boolean flag.
Set an unlocked/completed/seen style flag.
Event shapes:
{ "type": "counter", "id": "wins", "amount": 1 }{ "type": "record_high", "id": "best_round", "value": 10 }{ "type": "record_low", "id": "fewest_turns", "value": 3 }{ "type": "flag", "id": "found_secret", "value": true } Definition at line 71 of file stats_manager.gd.
| stats_manager.collection |
Definition at line 203 of file stats_manager.gd.
| stats_manager.counters = state.get("counters", {}).duplicate(true) |
Return all counters, records, and flags as saveable state.
Restore counters, records, and flags from saved state.
Definition at line 333 of file stats_manager.gd.
| stats_manager.data_cache_manager |
Definition at line 22 of file stats_manager.gd.
| stats_manager.DataCacheManager |
Definition at line 12 of file stats_manager.gd.
| stats_manager.default_value |
Calculate one derived stat.
Definition at line 142 of file stats_manager.gd.
| stats_manager.definition |
Definition at line 41 of file stats_manager.gd.
| stats_manager.denominator |
Definition at line 160 of file stats_manager.gd.
| stats_manager.derived_stats = state.get("derived_stats", {}).duplicate(true) |
Definition at line 336 of file stats_manager.gd.
| stats_manager.Dictionary |
Return registered achievement definitions.
Return UI-ready achievement rows with unlocked flags. Optional filters: game_id, category, state (locked, unlocked, or all), locked, and unlocked. game_id and category may be a String or an Array of accepted values.
Definition at line 202 of file stats_manager.gd.
| stats_manager.entry |
Definition at line 174 of file stats_manager.gd.
| stats_manager.fields |
Definition at line 147 of file stats_manager.gd.
| stats_manager.file |
Definition at line 218 of file stats_manager.gd.
| stats_manager.flag_id |
Definition at line 307 of file stats_manager.gd.
| stats_manager.flags = state.get("flags", {}).duplicate(true) |
Definition at line 335 of file stats_manager.gd.
| dict stats_manager.global_flags = {} |
Definition at line 221 of file stats_manager.gd.
| dict stats_manager.global_times = {} |
Definition at line 222 of file stats_manager.gd.
| stats_manager.id |
Definition at line 38 of file stats_manager.gd.
| stats_manager.int |
Increment a numeric counter and return the new value.
Append a run summary and optionally keep only the newest max_entries.
Return one record value.
Return one counter value.
Definition at line 59 of file stats_manager.gd.
| stats_manager.op |
Definition at line 146 of file stats_manager.gd.
| stats_manager.records = state.get("records", {}).duplicate(true) |
Definition at line 334 of file stats_manager.gd.
| stats_manager.registered_achievements |
Definition at line 339 of file stats_manager.gd.
| stats_manager.run_summaries = state.get("run_summaries", []).duplicate(true) |
Definition at line 337 of file stats_manager.gd.
| stats_manager.saved_achievements |
Definition at line 340 of file stats_manager.gd.
| stats_manager.source_flags |
Merge achievement flags/timestamps from another stats state without replacing local counters.
Definition at line 252 of file stats_manager.gd.
| stats_manager.source_times |
Definition at line 257 of file stats_manager.gd.
| stats_manager.state |
Definition at line 394 of file stats_manager.gd.
| stats_manager.String |
Load achievements from JSON.
Persist this manager's unlocked achievements into the shared global profile.
Merge globally saved achievement unlocks into this manager.
Calculate one derived stat.
Register achievement definitions from already-loaded data.
Expected shape: { "achievements": [{ "id": "first_win", ... }] }.
Definition at line 27 of file stats_manager.gd.
| stats_manager.total |
Definition at line 153 of file stats_manager.gd.
| stats_manager.unlocked |
Return cache diagnostics for achievement catalog loads.
Evaluate achievements and set achievement flags when their conditions pass.
Definition at line 305 of file stats_manager.gd.
| stats_manager.value |
Definition at line 60 of file stats_manager.gd.
| stats_manager.values |
Definition at line 148 of file stats_manager.gd.