Overview
When creating RPGs or action games, you'll want to place many enemy characters of the same type (slimes, goblins, etc.) with slightly different settings (more HP, higher attack power, etc.). Copying and pasting each one manually and changing settings is extremely tedious and makes later modifications difficult.
Godot has two powerful mechanisms for efficiently creating and managing "individual objects derived from a template": Scene Inheritance and Editable Children.
This article focuses on the recommended "Scene Inheritance" approach, explaining how to efficiently mass-produce NPCs and enemy characters.

Why is "Inheritance" Needed?
Let's say you've created a basic "enemy" scene (BaseEnemy.tscn). This scene contains CharacterBody2D, Sprite2D, CollisionShape2D, etc.
If you instantiate multiple copies of this BaseEnemy.tscn into your main scene, all enemies will have exactly the same appearance and performance. If you think "I want to double just this one's HP," you can't directly change internal properties of an instantiated scene. All changes would affect the original BaseEnemy.tscn.
The "inheritance" concept solves this problem.
Method 1: Scene Inheritance - Recommended!
Scene Inheritance creates a new "child" scene that inherits all the structure and functionality from an existing "parent" scene. This is the most flexible and recommended method.
Steps
1. Create the Base Scene
First, create BaseEnemy.tscn as the foundation for all enemies.
2. Create an Inherited Scene
Right-click on BaseEnemy.tscn in the FileSystem dock and select "New Inherited Scene".
3. Save the New Scene
A new scene opens - save it with a name like StrongEnemy.tscn.
Now, StrongEnemy.tscn is a complete copy of BaseEnemy.tscn while being an independent scene file. However, it's not just a copy. The link to the parent scene is maintained.
Benefits of Inheritance
- Edit Only Differences: In
StrongEnemy.tscn, you can freely change properties inherited from the parent scene (e.g.,Sprite2Dcolor,CollisionShape2Dsize, HP values@exported in scripts). Changed properties are indicated by a yellow circular arrow icon. - Parent Changes Propagate to Children: This is the most powerful aspect. When you add new functionality to the parent
BaseEnemy.tscnscript or change its node structure, those changes are automatically reflected in all child scenes (likeStrongEnemy.tscn).
This allows you to have both "bug fixes common to all enemies" and "individual adjustments for specific enemies."
Method 2: Editable Children
This feature makes the internal nodes of a scene instantiated within another scene directly editable.
Steps
- Instantiate
BaseEnemy.tscninto your main scene - Right-click the instantiated
BaseEnemynode in the scene tree and check "Editable Children"
This expands the BaseEnemy hierarchy in the scene tree, allowing you to directly select and modify properties of its Sprite2D and CollisionShape2D.
Difference from Scene Inheritance
- Convenience: No need to create a new scene file - you can make quick changes on the spot
- Low Reusability: Changes made this way are only saved within that main scene. If you want to use a "goblin with high HP" in another level, reuse is difficult
Therefore, except for limited cases like changing "just this one instance in this specific location," using Scene Inheritance is considered best practice.
Summary
When creating NPC and enemy character variations, keep these distinctions in mind:
- Basically use "Scene Inheritance": For creating reusable, maintainable templates (
StrongEnemy,FastEnemy, etc.) - Limited use of "Editable Children": For fine-tuning just one specific instance in a specific scene
Mastering the concept of inheritance enables you to manage game content systematically and efficiently. Try incorporating "Scene Inheritance" into your game development.