[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS0BBY5Z7WSRFYQRV8WA5D":3,"skill-same:01M7CS0BBY5Z7WSRFYQRV8WA5D":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CS0BBY5Z7WSRFYQRV8WA5D","data-driven-gameplay-design",null,"Use when adding or changing tuning values, items, enemies, abilities or levels - put them in the engine's data assets (ScriptableObject, Resource, DataAsset\u002FDataTable, JSON\u002FRON) with validation and stable IDs, keep runtime state out of shared data, inject services instead of singletons, and test data invariants.","makifbaysal\u002Ftasktrooper","makifbaysal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25031940?v=4","01M7CRG3ZCSYZSSEVDMW3DEYC8","Mehmet Akif Baysal","01M7CRG401FJ8YAXH5ER730XYV",122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fdata-driven-gameplay-design\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: data-driven-gameplay-design\ncategory: gameplay\ndescription: Use when adding or changing tuning values, items, enemies, abilities or levels - put them in the engine's data assets (ScriptableObject, Resource, DataAsset\u002FDataTable, JSON\u002FRON) with validation and stable IDs, keep runtime state out of shared data, inject services instead of singletons, and test data invariants.\ntech_stack: Game core\nsource: informed by Donchitos\u002FClaude-Code-Game-Studios and the Unity, Godot, Unreal and Bevy data-asset docs; own wording\n---\n# Data-Driven Gameplay Design\n\n## Overview\n\nDesigners balance games by changing numbers hundreds of times. If a number lives in code, each change is a programmer task, a rebuild and a review. If it lives in a data asset, it is an edit a designer can make and a test can check. The code defines what a sword *is*; the data says what *this* sword does.\n\n**Core principle:** Behaviour in code, tuning in data. Data is typed, validated at load, referenced by a stable ID, and never mutated at runtime.\n\n## The data asset per engine\n\n```csharp\n\u002F\u002F Unity: ScriptableObject definition\n[CreateAssetMenu(menuName = \"Game\u002FWeapon\")]\npublic sealed class WeaponDefinition : ScriptableObject {\n    [SerializeField] string id;\n    [SerializeField, Min(0)] int damage = 10;\n    [SerializeField, Min(0.05f)] float cooldownSeconds = 0.5f;\n    [SerializeField] AnimationCurve falloff = AnimationCurve.Linear(0, 1, 1, 0);\n    public string Id => id; public int Damage => damage; public float CooldownSeconds => cooldownSeconds;\n    void OnValidate() { if (string.IsNullOrWhiteSpace(id)) Debug.LogError($\"{name}: missing id\", this); }\n}\n```\n\n```gdscript\n# Godot: a Resource saved as .tres\nclass_name WeaponDefinition extends Resource\n@export var id: StringName\n@export_range(0, 1000) var damage: int = 10\n@export_range(0.05, 10.0, 0.05) var cooldown_seconds: float = 0.5\n```\n\n```cpp\n\u002F\u002F Unreal: a primary data asset (or an FTableRowBase row in a DataTable imported from CSV)\nUCLASS(BlueprintType)\nclass UWeaponDefinition : public UPrimaryDataAsset {\n    GENERATED_BODY()\npublic:\n    UPROPERTY(EditDefaultsOnly, meta = (ClampMin = \"0\")) int32 Damage = 10;\n    UPROPERTY(EditDefaultsOnly, meta = (ClampMin = \"0.05\")) float CooldownSeconds = 0.5f;\n    virtual FPrimaryAssetId GetPrimaryAssetId() const override { return FPrimaryAssetId(\"Weapon\", GetFName()); }\n};\n```\n\n```ts\n\u002F\u002F Web: JSON validated once at load (zod)\nexport const Weapon = z.object({\n  id: z.string().min(1),\n  damage: z.number().int().nonnegative(),\n  cooldownSeconds: z.number().min(0.05),\n});\nexport const weapons = z.array(Weapon).parse(await (await fetch(\"data\u002Fweapons.json\")).json());\n```\n\n```rust\n\u002F\u002F Bevy: a serde struct loaded from RON\u002FJSON via an asset loader (or bevy_common_assets)\n#[derive(Asset, TypePath, Deserialize)]\npub struct WeaponDefinition { pub id: String, pub damage: u32, pub cooldown_seconds: f32 }\n```\n\n## Rules\n\n- **No tuning literals in gameplay code.** `damage = 25` in a script is a data bug. Physics constants and engine settings belong in project settings or a config asset too.\n- **Validate at load or in the editor**, not on first use mid-game: `OnValidate` \u002F `IsDataValid(FDataValidationContext&)` \u002F `@export_range` \u002F a schema parse.\n- **Stable IDs, not indices or display names.** Saves, network messages and drop tables reference `\"sword_iron\"`, never \"the third weapon\" or \"Iron Sword\".\n- **Data is read-only at runtime.** A ScriptableObject changed in Play mode stays changed in the editor; a shared Godot `.tres` mutated by one enemy changes every enemy. Copy into a runtime state object, or `duplicate()` the Resource (or set `resource_local_to_scene`).\n- **No logic in data assets** beyond trivial derived getters — rules live in systems that read the data.\n- **Curves and tables for progressions:** `AnimationCurve`, Godot `Curve`, `UCurveFloat`\u002F`UCurveTable`, or a table in JSON. A level-1-to-50 XP formula hard-coded in a `switch` is not tunable.\n\n## Services, not singletons\n\n```csharp\n\u002F\u002F ❌ hidden global state; tests share it; order of initialisation decides behaviour\nGameManager.Instance.Gold += reward;\n\n\u002F\u002F ✅ the dependency is explicit and replaceable in a test\npublic sealed class LootSystem {\n    readonly IWallet _wallet; readonly IRandom _rng;\n    public LootSystem(IWallet wallet, IRandom rng) { _wallet = wallet; _rng = rng; }\n}\n```\n\nEach engine has a sanctioned place for services: Unity — a composition root or the repository's DI container (VContainer, Zenject); Godot — an autoload for a *service* (save, audio, scene loading), never for a level's state; Unreal — subsystems (`UGameInstanceSubsystem`, `UWorldSubsystem`); Bevy — `Resource`s inserted by a plugin. Use the one the repository already uses.\n\n## Testing data\n\nTwo kinds of tests:\n\n1. **Systems with hand-built data:** a test creates its own small definition (`ScriptableObject.CreateInstance\u003CWeaponDefinition>()`, `WeaponDefinition.new()`, a literal object) so the test does not change when a designer rebalances.\n2. **Invariants over all shipped data:** load every asset of the type and assert what must always hold.\n\n```ts\ndescribe(\"shipped data\", () => {\n  it(\"every drop table has positive total weight and only known item ids\", () => {\n    for (const t of dropTables) {\n      expect(t.entries.reduce((s, e) => s + e.weight, 0)).toBeGreaterThan(0);\n      for (const e of t.entries) expect(itemIds.has(e.itemId)).toBe(true);\n    }\n  });\n});\n```\n\nIn Unity this is an EditMode test using `AssetDatabase.FindAssets(\"t:WeaponDefinition\")`; in Godot a test iterating `DirAccess` over the data folder; in Unreal an Automation test using the Asset Registry or the editor's Data Validation.\n\n## Balancing changes\n\n- A balance task changes data, not code — plus the invariant test if the change exposed a new rule.\n- Never let a unit test assert a shipped tuning value (`Assert.AreEqual(25, sword.Damage)`) — that is a change detector that breaks on every rebalance.\n\n## Common Mistakes\n\n- Magic numbers in `Update` \"just for now\".\n- Mutating a shared ScriptableObject or `.tres` at runtime.\n- Referencing data by array index in save files.\n- A static `Instance` holding gameplay state across scenes and tests.\n\n## Red Flags\n\n- A diff that changes a damage or speed number inside a `.cs`, `.gd`, `.cpp`, `.ts` or `.rs` file.\n- A data type with no validation.\n- Tests that fail when a designer edits a data asset.\n","# Data-Driven Gameplay Design\n\n## Overview\n\nDesigners balance games by changing numbers hundreds of times. If a number lives in code, each change is a programmer task, a rebuild and a review. If it lives in a data asset, it is an edit a designer can make and a test can check. The code defines what a sword *is*; the data says what *this* sword does.\n\n**Core principle:** Behaviour in code, tuning in data. Data is typed, validated at load, referenced by a stable ID, and never mutated at runtime.\n\n## The data asset per engine\n\n```csharp\n\u002F\u002F Unity: ScriptableObject definition\n[CreateAssetMenu(menuName = \"Game\u002FWeapon\")]\npublic sealed class WeaponDefinition : ScriptableObject {\n    [SerializeField] string id;\n    [SerializeField, Min(0)] int damage = 10;\n    [SerializeField, Min(0.05f)] float cooldownSeconds = 0.5f;\n    [SerializeField] AnimationCurve falloff = AnimationCurve.Linear(0, 1, 1, 0);\n    public string Id => id; public int Damage => damage; public float CooldownSeconds => cooldownSeconds;\n    void OnValidate() { if (string.IsNullOrWhiteSpace(id)) Debug.LogError($\"{name}: missing id\", this); }\n}\n```\n\n```gdscript\n# Godot: a Resource saved as .tres\nclass_name WeaponDefinition extends Resource\n@export var id: StringName\n@export_range(0, 1000) var damage: int = 10\n@export_range(0.05, 10.0, 0.05) var cooldown_seconds: float = 0.5\n```\n\n```cpp\n\u002F\u002F Unreal: a primary data asset (or an FTableRowBase row in a DataTable imported from CSV)\nUCLASS(BlueprintType)\nclass UWeaponDefinition : public UPrimaryDataAsset {\n    GENERATED_BODY()\npublic:\n    UPROPERTY(EditDefaultsOnly, meta = (ClampMin = \"0\")) int32 Damage = 10;\n    UPROPERTY(EditDefaultsOnly, meta = (ClampMin = \"0.05\")) float CooldownSeconds = 0.5f;\n    virtual FPrimaryAssetId GetPrimaryAssetId() const override { return FPrimaryAssetId(\"Weapon\", GetFName()); }\n};\n```\n\n```ts\n\u002F\u002F Web: JSON validated once at load (zod)\nexport const Weapon = z.object({\n  id: z.string().min(1),\n  damage: z.number().int().nonnegative(),\n  cooldownSeconds: z.number().min(0.05),\n});\nexport const weapons = z.array(Weapon).parse(await (await fetch(\"data\u002Fweapons.json\")).json());\n```\n\n```rust\n\u002F\u002F Bevy: a serde struct loaded from RON\u002FJSON via an asset loader (or bevy_common_assets)\n#[derive(Asset, TypePath, Deserialize)]\npub struct WeaponDefinition { pub id: String, pub damage: u32, pub cooldown_seconds: f32 }\n```\n\n## Rules\n\n- **No tuning literals in gameplay code.** `damage = 25` in a script is a data bug. Physics constants and engine settings belong in project settings or a config asset too.\n- **Validate at load or in the editor**, not on first use mid-game: `OnValidate` \u002F `IsDataValid(FDataValidationContext&)` \u002F `@export_range` \u002F a schema parse.\n- **Stable IDs, not indices or display names.** Saves, network messages and drop tables reference `\"sword_iron\"`, never \"the third weapon\" or \"Iron Sword\".\n- **Data is read-only at runtime.** A ScriptableObject changed in Play mode stays changed in the editor; a shared Godot `.tres` mutated by one enemy changes every enemy. Copy into a runtime state object, or `duplicate()` the Resource (or set `resource_local_to_scene`).\n- **No logic in data assets** beyond trivial derived getters — rules live in systems that read the data.\n- **Curves and tables for progressions:** `AnimationCurve`, Godot `Curve`, `UCurveFloat`\u002F`UCurveTable`, or a table in JSON. A level-1-to-50 XP formula hard-coded in a `switch` is not tunable.\n\n## Services, not singletons\n\n```csharp\n\u002F\u002F ❌ hidden global state; tests share it; order of initialisation decides behaviour\nGameManager.Instance.Gold += reward;\n\n\u002F\u002F ✅ the dependency is explicit and replaceable in a test\npublic sealed class LootSystem {\n    readonly IWallet _wallet; readonly IRandom _rng;\n    public LootSystem(IWallet wallet, IRandom rng) { _wallet = wallet; _rng = rng; }\n}\n```\n\nEach engine has a sanctioned place for services: Unity — a composition root or the repository's DI container (VContainer, Zenject); Godot — an autoload for a *service* (save, audio, scene loading), never for a level's state; Unreal — subsystems (`UGameInstanceSubsystem`, `UWorldSubsystem`); Bevy — `Resource`s inserted by a plugin. Use the one the repository already uses.\n\n## Testing data\n\nTwo kinds of tests:\n\n1. **Systems with hand-built data:** a test creates its own small definition (`ScriptableObject.CreateInstance\u003CWeaponDefinition>()`, `WeaponDefinition.new()`, a literal object) so the test does not change when a designer rebalances.\n2. **Invariants over all shipped data:** load every asset of the type and assert what must always hold.\n\n```ts\ndescribe(\"shipped data\", () => {\n  it(\"every drop table has positive total weight and only known item ids\", () => {\n    for (const t of dropTables) {\n      expect(t.entries.reduce((s, e) => s + e.weight, 0)).toBeGreaterThan(0);\n      for (const e of t.entries) expect(itemIds.has(e.itemId)).toBe(true);\n    }\n  });\n});\n```\n\nIn Unity this is an EditMode test using `AssetDatabase.FindAssets(\"t:WeaponDefinition\")`; in Godot a test iterating `DirAccess` over the data folder; in Unreal an Automation test using the Asset Registry or the editor's Data Validation.\n\n## Balancing changes\n\n- A balance task changes data, not code — plus the invariant test if the change exposed a new rule.\n- Never let a unit test assert a shipped tuning value (`Assert.AreEqual(25, sword.Damage)`) — that is a change detector that breaks on every rebalance.\n\n## Common Mistakes\n\n- Magic numbers in `Update` \"just for now\".\n- Mutating a shared ScriptableObject or `.tres` at runtime.\n- Referencing data by array index in save files.\n- A static `Instance` holding gameplay state across scenes and tests.\n\n## Red Flags\n\n- A diff that changes a damage or speed number inside a `.cs`, `.gd`, `.cpp`, `.ts` or `.rs` file.\n- A data type with no validation.\n- Tests that fail when a designer edits a data asset.\n",{"name":5,"source":24,"category":25,"tech_stack":26,"description":7},"informed by Donchitos\u002FClaude-Code-Game-Studios and the Unity, Godot, Unreal and Bevy data-asset docs; own wording","gameplay","Game core","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fdata-driven-gameplay-design",18,"https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper","https:\u002F\u002Ftasktrooper.ai","https:\u002F\u002Fgithub.com\u002Fmakifbaysal","Senior Software Developer","2026-11-15 04:50:29",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add makifbaysal\u002Ftasktrooper --skill data-driven-gameplay-design",{"tool":42,"command":43},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill data-driven-gameplay-design",{"tool":45,"command":46},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill data-driven-gameplay-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fdata-driven-gameplay-design\u002FSKILL.md",true,[],[51,57,64,71,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CSVEPQW6J6TD6CS2T5FPNZ","visual-craft","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fvisual-craft\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CSVAQG91ETHQ0HBNZDG5FR","ux-copy","Use when you write any words a user reads in a mockup or a hand-off - content language and voice, buttons, labels, errors, empty states, confirmations, numbers and dates, and the longest-string check","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fux-copy\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CSV6H0J38659NDXHJQ8396","screen-mockup-html","Use when you draw screens as the design task's HTML mockup - ONE canvas document holding every screen and every variant side by side, the sanitizer-safe recipe, phone and wide frames, the states grid, static control states, and the loopback self-check with screenshots at 375, 768 and 1440 attached to the task","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fscreen-mockup-html\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CSV3JFRF3BM3XK52M7YEYR","performance-awareness","How the performance score moves for your role. Use when the score context shows a declining trend, or before handing off work you have not self-checked against every criterion.","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fperformance-awareness\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CSTZDH00YRF5SCT7BRT9QD","design-variants","Use when a screen design needs variants - how many, variants as side-by-side rows on the one canvas, what makes two variants genuinely different, recommending one, how the human's choice is read, and narrowing to the chosen one in revision","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-variants\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CSTV6P3SM3PAE28DB0RF77","design-system-authoring","Use when you derive, change or extend a design system - where tokens live per stack, the DTCG token tree, role-based names for both themes, base vs layer vs drift, the DESIGN.md section order, the inventory format, the contrast check and the lint every proposal returns","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-system-authoring\u002FSKILL.md",[],[]]