add-mechanic

Implement Godot 4.x gameplay mechanics with GDScript 4 syntax.

32|8|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/n24q02m/better-godot-mcp --skill add-mechanic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-mechanic
Source: https://github.com/n24q02m/better-godot-mcp/tree/main/skills/add-mechanic
Command: npx skills add https://github.com/n24q02m/better-godot-mcp --skill add-mechanic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents common AI-generated Godot mistakes by guiding you to implement gameplay mechanics using correct GDScript 4.x patterns instead of outdated Godot 3 syntax that would fail at runtime.

Core Features & Use Cases

  • GDScript 4.x correctness guardrails: enforces modern syntax for exports, onready, signals, typing/returns, movement APIs, parent calls, timers/await, and unique-node access.
  • Movement mechanics templates: provides platformer, top-down, and point-and-click movement patterns built around CharacterBody2D and Godot 4 movement conventions.
  • Core gameplay component patterns: includes Health/Damage, Inventory (resource-based items), and Save/Load (ConfigFile and JSON) implementations designed for reuse across entities.

Use Case: You’re building a small RPG scene and want the player to move correctly in Godot 4, have health with a death signal, carry stackable items, and persist position/inventory across sessions.

Quick Start

Ask the AI to use the add-mechanic skill to implement a Godot 4.x movement + health system for your character, including an inventory resource and save/load using user:// files.

Frequently Asked Questions about add-mechanic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Godot 4 movement errors when upgrading GDScript from 3.x?

To fix Godot 4 movement errors, implement `CharacterBody2D` using the `velocity` property with `move_and_slide()` instead of outdated Godot 3 syntax. This ensures your GDScript 4.x character control works correctly without runtime errors.

What is the best way to save and load game state in Godot 4?

The best way to save and load game state in Godot 4 is using `user://` paths with ConfigFile or JSON formats. This persists player position and inventory resources safely across sessions following modern GDScript 4.x conventions.

How do I create a reusable health and inventory component in GDScript 4?

You create reusable health and inventory components in GDScript 4 by defining typed exports, signals for death events, and resource-based stackable items. This component-style system allows seamless reuse across multiple entities.

Does Godot 4 support platformer and top-down movement in the same project?

Godot 4 supports both platformer and top-down movement patterns within the same project using `CharacterBody2D`. You can implement point-and-click movement flows alongside traditional movement conventions safely using GDScript 4.x constructs.

Why does my AI-generated Godot script fail with syntax errors on typed exports?

AI-generated Godot scripts fail with syntax errors because they often use outdated Godot 3 syntax instead of GDScript 4.x patterns. Enforcing modern syntax for typed exports, onready, signals, and timers prevents these runtime failures.