RPGNodes is an addon that simplifies logic for building RPG games using custom nodes.
RPGNodes provides a generic solution for the typical logic found in RPGs.
For example:
RPGCharacter
can represent a character’s logic – adding experience, health, energy or mana.RPGItem
orRPGWeightItem
represents an item with common attributes (item_name, description, amount, buy_price, sell_price, etc.).RGPWeightInventory
stores and manages items that have weight, meaning each item can have a different weight.
The project is usable, though some nodes are still incomplete.
Unit tests are written with GUT.
RPGCharacter: Very usable – tested with unit tests (GUT)!!
RPGDialog: Usable – tested in a scene within the project.
RPGWeightItem: Very usable and tested together with
RPGWeightInventory
using unit tests (GUT).
RPGWeightInventory: Very usable and tested with unit tests (GUT).
RPGSlotInventory: TODO or not usable.
We recommend downloading the latest release from GitHub:
https://github.com/TheVulcoreTeam/RPGNodes/releases
Clone the repository and open it with Godot 4.4.x.
If you actually want to use it, it’s best to download the released version from GitHub.
Using the plugin requires the following steps:
- Download the release:
https://github.com/TheVulcoreTeam/RPGNodes/releases - Copy the
rpg_nodes
folder and place it inside your project'saddons
directory. If you don’t have anaddons
folder at the root of your project, create one. - Open Godot’s editor and enable the plugin under
Project → Project Settings → Plugins
Below is a brief description of each custom node.
If you have questions about how a particular method works, open a GitHub issue or read the source code for that node.
All methods are in English, and comments are written in English as well.
An extended RPG actor class that represents a playable character with leveling, energy, and stamina systems.
level_max: int
- Maximum achievable level (default: 30)energy: int
- Current energy/mana points (default: 20)energy_max: int
- Maximum energy capacity (default: 20)stamina: float
- Current stamina points (default: 20.0)stamina_max: float
- Maximum stamina capacity (default: 20.0)stamina_regen_per_second: float
- Stamina regeneration rate per second (default: 2.0)base_attack: int
- Base attack value (default: 1)experience_base: float
- Base constant for experience progression (default: 100.0)experience_factor: float
- Factor to adjust the leveling curve (default: 1.5)
level_increased(new_level)
- Emitted when character levels upexperience_gained(amount)
- Emitted when experience is gainedenergy_replenished(amount)
- Emitted when energy is restoredenergy_used(amount)
- Emitted when energy is consumedenergy_reached_full()
- Emitted when energy reaches maximumenergy_depleted()
- Emitted when energy drops to zerostamina_replenished(amount)
- Emitted when stamina is restoredstamina_used(amount)
- Emitted when stamina is consumedstamina_reached_full()
- Emitted when stamina reaches maximumstamina_depleted()
- Emitted when stamina is completely exhausted
revive(custom_hp, revive_with_max_hp)
- Revives the character when deadget_exp_for_level(level)
- Calculates experience required for a specific levelget_total_exp_to_current_level()
- Gets total experience accumulated to current levelget_exp_to_next_level()
- Gets experience needed for the next leveladd_experience(amount)
- Adds experience and handles level upsget_level_progress()
- Returns progress percentage toward next level (0.0-1.0)reset_level_stats()
- Resets level and experience to initial values
A dialog system for managing conversations with NPCs, supporting character names, messages, and avatars.
text: NodePath
- Path to RichTextLabel for dialog texttitle_name: NodePath
- Path to RichTextLabel for character nameavatar: NodePath
- Path to TextureRect for character avatardialogue: Array
- Array storing dialog sectionstimer
- Timer reference for dialog timingnext_pressed: bool
- Flag for next button state
character_name_changed(old_name, new_name)
- Emitted when character name changesavatar_changed(old_image, new_image)
- Emitted when avatar changesdialog_started()
- Emitted when dialog beginssection_ended(idx)
- Emitted when a dialog section endsdialog_ended()
- Emitted when entire dialog concludesdialog_cleaned
- Emitted when dialog is cleared
add_section(character_name, message, avatar_image)
- Adds a new dialog sectionnext_dialog()
- Advances to next dialog or starts dialog sequencereset_index()
- Resets dialog index to restart from beginningclear_dialog()
- Clears all dialog sections
Base resource class for representing items in the RPG system with basic properties.
item_name: String
- Name of the itemdescription: String
- Item description textbuy_price: int
- Price to purchase the item (default: 2)sell_price: int
- Price when selling the item (default: 1)
item_name_changed(new_name)
- Emitted when item name is modifieddescription_changed(new_description)
- Emitted when description changesbuy_price_changed(new_value)
- Emitted when buy price is updatedsell_price_changed(new_value)
- Emitted when sell price is updated
A weight-based inventory system that manages items with weight constraints.
max_weight: int
- Maximum weight capacity (default: 100)_weight_inventory: Array[RPGWeightItem]
- Array of items in inventory_weight: int
- Current total weight of inventory
weight_filled()
- Emitted when inventory reaches maximum weightweight_changed(new_value)
- Emitted when total weight changes
add_item(item)
- Adds an item to inventory if weight allowsget_item(uuid)
- Retrieves an item by its UUID, returns null if not foundremove_item(uuid)
- Removes an item by UUID, returns true if successful
CANT_ADD
- Error message for failed item additionITEM_WEIGHT
- Label for item weight displayWEIGHT_INVETORY
- Label for inventory weight displayFULL_INVENTORY
- Message when inventory is at capacity
Extended RPGItem class that adds weight properties for use in weight-based inventory systems.
weight: int
- Weight value of the item in inventory (default: 1)
weight_updated(new_weight)
- Emitted when item weight is modified
This class inherits all properties, signals, and functionality from RPGItem, adding weight management specifically for inventory systems that track carrying capacity.