{"tab":"ai","section":"generateItemGenerationAndUsage","title":"Item Generation/Usage","summary":"Provides context to generateItemDefinitions (newly created `items`) and generateItemUpdates (inventory changes). Not included for `generateActionInfo` or `generateStory`. The JSON key is `ItemGenerationAndUsage` — non-standard casing.","kind":"schema","uiLocation":"AI Tasks → Item Generation/Usage","uiSubtitle":"\"Item Generation/Usage Instructions\"","editor":"Graphical form (labeled textareas)","related":[{"section":"items","note":"the item records this task shapes"},{"section":"generateActionInfo","note":"put item-use combat rules here, not in this task"}],"wikiUrl":"/ai/generateItemGenerationAndUsage","schema":null,"sizeLimits":[{"id":"aiInstructionIndividual","group":"AI Instructions Limits","label":"Each string leaf under a task (`aiInstructions.<task>.<key>`)","measure":"rawChars","enforced":5000,"display":5000,"sections":["ai/aiInstructions","ai/generateStory","ai/generateInitialStart","ai/generateCharacterBackground","ai/generateNPCDetails","ai/generateNPCUpdates","ai/generateLocationDetails","ai/generateRegionDetails","ai/generateFactionDetails","ai/generateEncounters","ai/generateItemGenerationAndUsage","ai/generateActionInfo","ai/generateNPCIntents","ai/generateNewNPC","ai/generateLearnedAbilities"]},{"id":"aiInstructionPerTask","group":"AI Instructions Limits","label":"Per task (`aiInstructions.<task>` total, sum of instruction chars)","measure":"rawChars","enforced":20000,"display":20000,"sections":["ai/aiInstructions","ai/generateStory","ai/generateInitialStart","ai/generateCharacterBackground","ai/generateNPCDetails","ai/generateNPCUpdates","ai/generateLocationDetails","ai/generateRegionDetails","ai/generateFactionDetails","ai/generateEncounters","ai/generateItemGenerationAndUsage","ai/generateActionInfo","ai/generateNPCIntents","ai/generateNewNPC","ai/generateLearnedAbilities"]}],"blocks":[{"type":"example","lang":"json","code":"{\n  \"aiInstructions\": {\n    \"ItemGenerationAndUsage\": {\n      \"custom\": \"## Inventory changes\\nADD: item physically enters possession — picked up, looted, gifted, crafted, or found.\\nREMOVE: item physically leaves — consumed, handed over, destroyed, stolen, or lost.\\n\\nNEVER update for items merely seen, discussed, offered, displayed, inspected, or nearby. Awareness is not possession.\\n\\n## Transaction rule\\nA purchase requires two conditions in sequence: (1) a price is stated, AND (2) the player explicitly pays or agrees AFTER hearing the price. Do not add a purchased item until both conditions occur in the same scene.\\n\\n## Loot tiers\\nCommon enemies: consumables and coin only. Named enemies: one item appropriate to their role. Elite or boss: one item worth keeping long-term, plus coin.\"\n    }\n  }\n}"},{"type":"prose","md":"## Fields\n\n### custom\n\nThe default key, under the non-standard-cased `ItemGenerationAndUsage`. As with every AI task, the key name is yours and you can add further keys; all non-empty values are concatenated in key order (see [Story Instructions](/ai/aiInstructions) for the processing rule). This block feeds both internal consumers, `generateItemDefinitions` and `generateItemUpdates`."},{"type":"prose","md":"## Authoring pattern\n\nCover in `custom`:\n\n- **Inventory trigger rules and the transaction gate are the most critical content in this key.** Without them the engine adds items when the player browses a shop or hears an item described, and completes purchases before the player agrees.\n- Loot rarity guidance and how drops should scale with enemy tier.\n- Item description framing: what level of detail new item definitions should have.\n- World economy calibration: relative cost of goods, how scarce certain item types are.\n- How newly materialized items should be framed (flavour first, mechanics second).\n\n> **Combat rules belong in `generateActionInfo`.** Item-use rules that must affect combat resolution (e.g. \"this potion heals 20 HP mid-combat\") belong in [`generateActionInfo`](/ai/generateActionInfo), not here."}],"body":"## Example\n\n```json\n{\n  \"aiInstructions\": {\n    \"ItemGenerationAndUsage\": {\n      \"custom\": \"## Inventory changes\\nADD: item physically enters possession — picked up, looted, gifted, crafted, or found.\\nREMOVE: item physically leaves — consumed, handed over, destroyed, stolen, or lost.\\n\\nNEVER update for items merely seen, discussed, offered, displayed, inspected, or nearby. Awareness is not possession.\\n\\n## Transaction rule\\nA purchase requires two conditions in sequence: (1) a price is stated, AND (2) the player explicitly pays or agrees AFTER hearing the price. Do not add a purchased item until both conditions occur in the same scene.\\n\\n## Loot tiers\\nCommon enemies: consumables and coin only. Named enemies: one item appropriate to their role. Elite or boss: one item worth keeping long-term, plus coin.\"\n    }\n  }\n}\n```\n\n## Fields\n\n### custom\n\nThe default key, under the non-standard-cased `ItemGenerationAndUsage`. As with every AI task, the key name is yours and you can add further keys; all non-empty values are concatenated in key order (see [Story Instructions](/ai/aiInstructions) for the processing rule). This block feeds both internal consumers, `generateItemDefinitions` and `generateItemUpdates`.\n\n## Authoring pattern\n\nCover in `custom`:\n\n- **Inventory trigger rules and the transaction gate are the most critical content in this key.** Without them the engine adds items when the player browses a shop or hears an item described, and completes purchases before the player agrees.\n- Loot rarity guidance and how drops should scale with enemy tier.\n- Item description framing: what level of detail new item definitions should have.\n- World economy calibration: relative cost of goods, how scarce certain item types are.\n- How newly materialized items should be framed (flavour first, mechanics second).\n\n> **Combat rules belong in `generateActionInfo`.** Item-use rules that must affect combat resolution (e.g. \"this potion heals 20 HP mid-combat\") belong in [`generateActionInfo`](/ai/generateActionInfo), not here."}