본문으로 건너뛰기
cccskills
무료GitHub에 공개

godot-inventory-system

Expert blueprint for inventory systems (Diablo, Resident Evil, Minecraft) covering slot-based containers, stacking logic, weight limits, equipment systems, and drag-drop UI. Use when building RPG inventories, survival item management, or loot systems. Keywords inventory, slot, stack, equipment, crafting, item, Resource, drag-drop.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(23)

  • SKILL.md10.1 KB
  • references/best-practices.md238 B
  • references/core-architecture.md281 B
  • references/crafting-integration.md684 B
  • references/elite-technical-patterns.md2.6 KB
  • references/equipment-system.md1013 B
  • references/inventory-manager.md2.4 KB
  • references/inventory-slot.md288 B
  • references/migration-notes.md3.3 KB
  • references/save-load.md292 B
  • references/ui-integration.md501 B
  • scripts/consumable_item_logic.gd1.2 KB
  • scripts/drag_and_drop_slot.gd1.6 KB
  • scripts/grid_inventory_logic.gd2.3 KB
  • scripts/inventory_data_resource.gd2.7 KB
  • scripts/inventory_grid.gd3.3 KB
  • scripts/inventory_item_resource.gd1.4 KB
  • scripts/inventory_persistence.gd1.4 KB
  • scripts/inventory_ui_controller.gd2.1 KB
  • scripts/item_database_loader.gd1.5 KB
  • scripts/item_pickup_node.gd1.2 KB
  • scripts/item_slot_data.gd1.2 KB
  • scripts/loot_table_resource.gd1.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Scenario triggers (which script?)

ScenarioOpen
Slot bag (WoW-style stacks)inventory_data_resource.gd + item_slot_data.gd + inventory_ui_controller.gd
Tetris grid (Diablo/RE footprint)grid_inventory_logic.gd / inventory_grid.gd
EquipmentItem Resources + RPG stats complement; drag via drag_and_drop_slot.gd
Loot tableloot_table_resource.gd + item_pickup_node.gd
Persistinventory_persistence.gd (ids + amounts, not nested Resources)
Consumablesconsumable_item_logic.gd
DB lookupitem_database_loader.gd

MANDATORY reads

  1. inventory_item_resource.gd — item blueprint
  2. inventory_data_resource.gd — two-pass stack + weight validation
  3. inventory_ui_controller.gd — reactive UI that reuses slot controls

NEVER Do in Inventory Systems

  • NEVER use Nodes for items — Item extends Resource.
  • NEVER add without stack/weight pre-checks — validate capacity first.
  • NEVER let UI mutate inventory arrays silently — data owns mutations; UI listens.
  • NEVER use float for quantities — int stacks.
  • NEVER emit per-item signals in a batch — one inventory_updated after the loop.
  • NEVER hardcode item references — String/StringName ids + database.
  • NEVER queue_free + recreate all slots every refresh — reuse slot widgets (see UI controller).
  • NEVER allocate new Resources inside _process.
  • NEVER mutate a shared item blueprint at runtime — use duplicate(true) on stack/slot instances so one pickup cannot corrupt every copy of that .tres.
  • NEVER access .icon on a null slot item — guard with is_instance_valid() before drawing UI.

Decision trees

Add item

  1. Weight/volume OK?
  2. Pass 1: fill partial stacks
  3. Pass 2: empty slots / grid footprint
  4. Return overflow count; single UI signal

UI

  • Bind once to inventory_updated
  • Update existing slot nodes; create only when slot count grows

Save

Deep recipes (on demand)

TopicReference / script
Resource item modelcore-architecture.md + inventory_item_resource.gd
Two-pass stack addinventory-manager.md + inventory_data_resource.gd
Tetris grid footprintelite-technical-patterns.md + grid_inventory_logic.gd
Equipment & craftingequipment-system.md / crafting-integration.md
Reactive UI & save idsui-integration.md + inventory_persistence.gd

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation

  • Resources — Items, slots, and inventories should be Resource data (not Nodes) so stacks stay lightweight and shareable as .tres databases.
  • Resource — Use duplicate(true) for runtime stack/slot instances so mutating quantity never corrupts the shared item blueprint.
  • GDScript exports — @export / @export_group power Inspector-authored ids, icons, max_stack, weight, and loot weights on item Resources.
  • Using signals — Emit inventory_changed / slot signals so UI reflects data; never let slot widgets mutate arrays silently.
  • Scene organization — Keep “signals up, calls down”: UI listens; inventory Resources/managers own add/remove/stack logic.
  • GUI containers — GridContainer / container sizing is the baseline for slot grids before custom Tetris footprints.
  • Control — Native _get_drag_data / _can_drop_data / _drop_data and set_drag_preview implement inventory drag-swap without a custom input stack.
  • Custom GUI controls — Pattern for building slot Controls that draw icons/counts and participate in drag-and-drop.
  • Saving games — Persist slot ids + amounts (not full recursive Resources) with the rest of player save data.
  • ResourceLoader — Resolve item blueprints by resource_path / id at load time instead of embedding textures in every save blob.
  • JSON — Compact inventory dictionaries (path/id + amount) for FileAccess save files without bloating nested Resource graphs.
  • Random number generation — Weighted loot rolls and chest contents need seeded RNG patterns, not ad-hoc randf() sprinkled in UI code.

Related Skills

Prerequisites

  • godot-resource-data-patterns — Inventory is Resource-first (items, slots, loot tables); learn composition/serialization patterns before inventing Node-based item trees.
  • godot-signal-architecture — Batch-safe inventory_updated / slot signals keep reactive UI in sync without per-item spam or ghost connections.
  • godot-gdscript-mastery — Typed Resources, Array/Dictionary slot maps, and int stack math assume solid GDScript patterns.
  • godot-ui-containers — Slot grids, equipment panels, and responsive inventory windows build on container layout before drag-drop polish.

Complements

  • godot-save-load-systems — Inventory persistence must round-trip through the project save schema (ids + counts, migration-safe).
  • godot-rpg-stats — Equipment bonuses, encumbrance, and consumable effects need a consistent stats/modifier layer.
  • godot-economy-system — Shops, buy/sell, and rarity-weighted loot tables consume the same item Resources and stack rules.
  • godot-ability-system — Consumable scrolls, skill books, and gear that grants abilities bridge inventory grants into AbilityManager registration.
  • godot-combat-system — Weapons/armor equipped from inventory feed damage and hit pipelines; keep DamageData separate from item metadata.
  • godot-ui-theming — Rarity colors, slot styles, and drag previews should live in Theme resources, not hardcoded slot scripts.

Downstream / consumers

  • godot-monte-carlo-balancer — After stack sizes, weights, drop rates, and shop prices are data-driven, Monte Carlo sims prove economy/loot bands before shipping curves.
  • godot-genre-action-rpg — Action-RPG bags, equipment screens, and loot loops assemble this skill with combat, stats, and quests.
  • godot-genre-survival — Weight limits, consumables, and scarce loot are core survival inventory constraints.
  • godot-quest-system — Fetch/collect quests query has_item and grant rewards through the same inventory add/remove APIs.

Master

  • godot-master — Library router and mirrored module entry; use when discovering peer skills or syncing shared script mirrors after Domain Skill edits.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8812026년 10월 17일 업데이트

Spawn and tune Bevy 0.20 directional, point, and spot lights, cascade shadows, distance fog, and a nearest-light shadow budget. Use when a 3D scene needs a sun, local lights, or fog on the camera. Keywords: DirectionalLight, PointLight, SpotLight, CascadeShadowConfig, DistanceFog, bevy_light.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8812026년 10월 17일 업데이트

Bevy ECS skill for PBR materials. Keywords: Bevy, StandardMaterial, PBR, material, ExtendedMaterial.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8812026년 10월 17일 업데이트

Bevy ECS skill for 3D level assembly. Keywords: Bevy, level, scene, mesh, world, ECS.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8812026년 10월 17일 업데이트

Bevy ECS skill for abilities. Keywords: Bevy, ability, cooldown, ECS, gameplay.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8812026년 10월 17일 업데이트

Rewrite Bevy 2D actors and cameras into 3D meshes and Camera3d while keeping gameplay components. Use when a Bevy 2D game should gain a perspective camera, mesh draw, and a planar velocity lifted onto XZ. Keywords: Camera2d, Camera3d, Sprite, Mesh3d, StandardMaterial, WishVelocity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8812026년 10월 17일 업데이트

thedivergentai의 스킬 모두 보기

이 스킬의 문제 신고