Skip to content

Commit 5b7b506

Browse files
committed
v0.10.0
1 parent 0ab31f4 commit 5b7b506

20 files changed

+792
-118
lines changed

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77

88

99
## Dev environment tips
10+
1011
- Godot Engine documentation: https://docs.godotengine.org/en/stable/
1112
- Godot Engine GDScript style guide: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html
1213
- Use properties instead of setter and getter methods
14+
- Comments in english
1315

1416

1517
## Testing instructions
1618

1719
- Use GUT to unitary tests https://github.com/bitwes/Gut
1820
- Tests are located in the `tests/unit` directory.
19-

README.md

Lines changed: 153 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,30 @@ For example:
1515

1616
## Project Status
1717

18-
The project is usable, though some nodes are still incomplete.
18+
The project is production-ready with comprehensive inventory management, character systems, and robust testing coverage.
1919
Unit tests are written with [GUT](https://github.com/bitwes/Gut/).
2020

21-
![](addons/rpg_nodes/icons/RPGCharacter.png) **RPGCharacter:** Very usable – tested with unit tests (GUT)!!
21+
### Production Ready Features
22+
23+
![](addons/rpg_nodes/icons/RPGCharacter.png) **RPGCharacter:** Production-ready – tested with unit tests (GUT) and enhanced with serialization support!
2224

2325
![](addons/rpg_nodes/icons/RPGDialog.png) **RPGDialog:** Usable – tested in a scene within the project.
2426

25-
![](addons/rpg_nodes/icons/RPGWeightItem.png) **RPGWeightItem:** Very usable and tested together with `RPGWeightInventory` using unit tests (GUT).
27+
![](addons/rpg_nodes/icons/RPGWeightItem.png) **RPGWeightItem:** Production-ready and tested together with `RPGWeightInventory` using unit tests (GUT).
28+
29+
![](addons/rpg_nodes/icons/RPGWeightInventory.png) **RPGWeightInventory:** Production-ready and tested with unit tests (GUT).
30+
31+
![](addons/rpg_nodes/icons/RPGSlotInventory.png) **RPGSlotInventory:** Production-ready – complete grid-based inventory system with comprehensive tests (GUT)!
2632

27-
![](addons/rpg_nodes/icons/RPGWeightInventory.png) **RPGWeightInventory:** Very usable and tested with unit tests (GUT).
33+
![](addons/rpg_nodes/icons/RPGStats.png) **RPGStats:** Production-ready – full character stat management with allocation system and extensive tests (GUT)!
2834

29-
### TODO or not usable
35+
### Supporting Classes
3036

31-
![](addons/rpg_nodes/icons/RPGSlotInventory.png) **RPGSlotInventory:** TODO or not usable.
37+
**RPGSlotItem** Functional companion for slot-based inventories.
3238

33-
**RPGSlotItem** Todo or not usable.
39+
**RPGActor** Abstract base class for actor-like entities.
3440

35-
![](addons/rpg_nodes/icons/RPGStats.png) **RPGStats:** TODO or not usable.
41+
**RPGEnemy** Specific implementation for enemy characters.
3642

3743

3844
## Installation & Usage
@@ -55,6 +61,32 @@ Using the plugin requires the following steps:
5561
3. Open Godot’s editor and enable the plugin under
5662
**Project → Project Settings → Plugins**
5763

64+
## What's New in v0.10.0
65+
66+
This major release transforms RPGNodes from a promising toolkit into a production-ready RPG framework:
67+
68+
* **Complete Dual Inventory Systems**: Choose between weight-based or Diablo-style slot-based inventories
69+
* **Production-Ready Stats System**: Full character stat management with point allocation
70+
* **Enhanced Architecture**: Better inheritance with proper base classes (RPGActor, RPGNode)
71+
* **Comprehensive Testing**: Extensive unit test coverage for all new features
72+
* **Serialization Support**: Save/load functionality for critical systems
73+
74+
## Choosing the Right Inventory System
75+
76+
RPGNodes now offers two complete inventory solutions:
77+
78+
### Weight-Based Inventory (`RPGWeightInventory` + `RPGWeightItem`)
79+
* **Best for**: Realistic games with carrying capacity limits
80+
* **Features**: Items have weight, total weight capacity management
81+
* **Use cases**: Survival games, realistic RPGs, resource management games
82+
83+
### Slot-Based Inventory (`RPGSlotInventory` + `RPGSlotItem`)
84+
* **Best for**: Classic RPGs with grid-based inventories
85+
* **Features**: Grid layout (width × height), items take up multiple slots, auto-positioning
86+
* **Use cases**: Diablo-style games, tactical RPGs, games with visual inventory management
87+
88+
Both systems are fully tested and production-ready. Choose based on your game's design requirements.
89+
5890
## Custom Nodes
5991

6092
Below is a brief description of each custom node.
@@ -194,6 +226,119 @@ This class inherits all properties, signals, and functionality from RPGItem, add
194226

195227
---
196228

229+
## RPGSlotInventory.gd
230+
231+
A grid-based inventory system similar to Diablo-style games where items occupy specific slots in a grid layout.
232+
233+
### Properties
234+
235+
- `width: int` - Grid width in slots (default: 10)
236+
- `height: int` - Grid height in slots (default: 10)
237+
- `_slot_inventory: Array[RPGSlotItem]` - Array of items in the inventory
238+
- `_grid: Array` - 2D grid representing occupied slots
239+
240+
### Signals
241+
242+
- `slot_item_added(item)` - Emitted when an item is added to the inventory
243+
- `slot_item_removed(item)` - Emitted when an item is removed from the inventory
244+
- `slot_item_moved(item, old_position, new_position)` - Emitted when an item changes position
245+
- `inventory_resized(old_size, new_size)` - Emitted when grid dimensions change
246+
247+
### Functions
248+
249+
- `add_item(item, position)` - Adds an item at specific position or finds available spot
250+
- `remove_item(uuid)` - Removes an item by UUID
251+
- `move_item(uuid, new_position)` - Moves an item to a new position
252+
- `get_available_space(position, item_width, item_height)` - Checks if space is available
253+
- `find_available_position(item_width, item_height)` - Finds first available position
254+
- `is_position_valid(position, item_width, item_height)` - Validates position boundaries
255+
256+
---
257+
258+
## RPGSlotItem.gd
259+
260+
Extended RPGItem class that adds spatial properties for grid-based inventory systems.
261+
262+
### Properties
263+
264+
- `width: int` - Item width in inventory grid slots (default: 1, minimum: 1)
265+
- `height: int` - Item height in inventory grid slots (default: 1, minimum: 1)
266+
- `position: Vector2i` - Current position in inventory grid (default: Vector2i.ZERO)
267+
268+
### Signals
269+
270+
- `dimensions_changed(old_size, new_size)` - Emitted when width or height changes
271+
- `position_changed(old_position, new_position)` - Emitted when position changes
272+
273+
### Functions
274+
275+
- `get_occupied_cells()` - Returns array of grid cells occupied by this item
276+
- `is_position_valid(inventory_width, inventory_height)` - Checks if current position is valid
277+
- `would_fit_at(position, inventory_width, inventory_height)` - Checks if item would fit at position
278+
279+
This class inherits all properties, signals, and functionality from RPGItem, adding spatial management for grid-based inventory systems.
280+
281+
---
282+
283+
## RPGStats.gd
284+
285+
Comprehensive character stat management system with dynamic stat addition and point allocation.
286+
287+
### Properties
288+
289+
- `stat_points: int` - Available stat points for allocation (default: 0)
290+
- `_stats: Dictionary` - Dictionary storing all stats with name-value pairs
291+
- `_base_stats: Dictionary` - Dictionary storing base stat values
292+
293+
### Signals
294+
295+
- `stat_points_changed(old_points, new_points)` - Emitted when stat points change
296+
- `stat_added(stat_name, value)` - Emitted when a new stat is added
297+
- `stat_changed(stat_name, old_value, new_value)` - Emitted when a stat value changes
298+
- `stat_points_allocated(stat_name, points)` - Emitted when points are allocated to a stat
299+
300+
### Functions
301+
302+
- `add_stat(stat_name, base_value, current_value)` - Adds a new stat to the character
303+
- `get_stat(stat_name)` - Gets current value of a stat
304+
- `get_base_stat(stat_name)` - Gets base value of a stat
305+
- `set_stat(stat_name, value)` - Sets current value of a stat
306+
- `allocate_stat_points(stat_name, points)` - Allocates stat points to increase a stat
307+
- `add_stat_points(points)` - Adds available stat points
308+
- `to_dict()` - Serializes stats to dictionary for saving
309+
- `from_dict(data)` - Loads stats from dictionary
310+
311+
---
312+
313+
## RPGActor.gd
314+
315+
Abstract base class for all actor-like entities in the RPG system.
316+
317+
### Properties
318+
319+
- `character_name: String` - Name of the actor (default: "Actor")
320+
321+
### Signals
322+
323+
- `character_name_changed(old_name, new_name)` - Emitted when actor name changes
324+
325+
This class serves as the foundation for all character and enemy classes, providing common actor functionality and naming capabilities.
326+
327+
---
328+
329+
## RPGEnemy.gd
330+
331+
Specific implementation for enemy characters inheriting from RPGActor.
332+
333+
### Properties
334+
335+
- Inherits all properties from RPGActor
336+
- Additional enemy-specific properties can be added as needed
337+
338+
This class provides a starting point for enemy character implementation with all base actor functionality inherited from RPGActor.
339+
340+
---
341+
197342
## RPGPotion.gd
198343

199344
Consumable item that applies an effect over time or instantly.

README_ES.md

Lines changed: 153 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,30 @@ Por ejemplo:
1515

1616
## Estado del Proyecto
1717

18-
El proyecto es usable, aunque algunos nodos están incompletos.
18+
El proyecto está listo para producción con gestión de inventarios completa, sistemas de personajes y cobertura de pruebas robusta.
1919
Las pruebas unitarias están escritas con [GUT](https://github.com/bitwes/Gut/).
2020

21-
![](addons/rpg_nodes/icons/RPGCharacter.png) **RPGCharacter:** ¡Muy usable y probado con tests unitarios (GUT)!
21+
### Características Listas para Producción
22+
23+
![](addons/rpg_nodes/icons/RPGCharacter.png) **RPGCharacter:** ¡Listo para producción – probado con tests unitarios (GUT) y mejorado con soporte de serialización!
2224

2325
![](addons/rpg_nodes/icons/RPGDialog.png) **RPGDialog:** Usable – probado en una escena dentro del proyecto.
2426

25-
![](addons/rpg_nodes/icons/RPGWeightItem.png) **RPGWeightItem:** Muy usable y probado junto con `RPGWeightInventory` usando tests unitarios (GUT).
27+
![](addons/rpg_nodes/icons/RPGWeightItem.png) **RPGWeightItem:** Listo para producción y probado junto con `RPGWeightInventory` usando tests unitarios (GUT).
28+
29+
![](addons/rpg_nodes/icons/RPGWeightInventory.png) **RPGWeightInventory:** Listo para producción y probado con tests unitarios (GUT).
30+
31+
![](addons/rpg_nodes/icons/RPGSlotInventory.png) **RPGSlotInventory:** ¡Listo para producción – sistema completo de inventario en cuadrícula con pruebas exhaustivas (GUT)!
2632

27-
![](addons/rpg_nodes/icons/RPGWeightInventory.png) **RPGWeightInventory:** Muy usable y probado con tests unitarios (GUT).
33+
![](addons/rpg_nodes/icons/RPGStats.png) **RPGStats:** ¡Listo para producción – sistema completo de gestión de estadísticas de personaje con sistema de asignación y pruebas extensas (GUT)!
2834

29-
### TODO o no usable
35+
### Clases de Soporte
3036

31-
![](addons/rpg_nodes/icons/RPGSlotInventory.png) **RPGSlotInventory:** TODO o no usable.
37+
**RPGSlotItem** Clase funcional para inventarios basados en ranuras.
3238

33-
**RPGSlotItem** Todo o no usable.
39+
**RPGActor** Clase base abstracta para entidades tipo actor.
3440

35-
![](addons/rpg_nodes/icons/RPGStats.png) **RPGStats:** TODO o no usable.
41+
**RPGEnemy** Implementación específica para personajes enemigos.
3642

3743

3844
## Instalación y Uso
@@ -55,6 +61,32 @@ Usar el plugin requiere los siguientes pasos:
5561
3. Abre el editor de Godot y activa el plugin en
5662
**Proyecto → Ajustes del Proyecto → Plugins**
5763

64+
## Novedades en v0.10.0
65+
66+
Esta versión principal transforma RPGNodes de un kit de herramientas prometedor a un framework RPG listo para producción:
67+
68+
* **Sistemas Doble de Inventario Completos**: Elige entre inventarios basados en peso o estilo Diablo basados en ranuras
69+
* **Sistema de Estadísticas Listo para Producción**: Gestión completa de estadísticas de personaje con asignación de puntos
70+
* **Arquitectura Mejorada**: Mejor herencia con clases base apropiadas (RPGActor, RPGNode)
71+
* **Pruebas Exhaustivas**: Cobertura extensiva de pruebas unitarias para todas las nuevas características
72+
* **Soporte de Serialización**: Funcionalidad guardar/cargar para sistemas críticos
73+
74+
## Elegir el Sistema de Inventario Adecuado
75+
76+
RPGNodes ahora ofrece dos soluciones completas de inventario:
77+
78+
### Inventario Basado en Peso (`RPGWeightInventory` + `RPGWeightItem`)
79+
* **Ideal para**: Juegos realistas con límites de capacidad de carga
80+
* **Características**: Los ítems tienen peso, gestión de capacidad de peso total
81+
* **Casos de uso**: Juegos de supervivencia, RPGs realistas, juegos de gestión de recursos
82+
83+
### Inventario Basado en Ranuras (`RPGSlotInventory` + `RPGSlotItem`)
84+
* **Ideal para**: RPGs clásicos con inventarios basados en cuadrícula
85+
* **Características**: Diseño en cuadrícula (ancho × alto), los ítems ocupan múltiples ranuras, posicionamiento automático
86+
* **Casos de uso**: Juegos estilo Diablo, RPGs tácticos, juegos con gestión visual de inventario
87+
88+
Ambos sistemas están completamente probados y listos para producción. Elige según los requisitos de diseño de tu juego.
89+
5890
## Nodos Personalizados
5991

6092
A continuación hay una breve descripción de cada nodo personalizado.
@@ -194,6 +226,119 @@ Esta clase hereda todas las propiedades, señales y funcionalidades de RPGItem,
194226

195227
---
196228

229+
## RPGSlotInventory.gd
230+
231+
Sistema de inventario basado en cuadrícula similar a juegos estilo Diablo donde los ítems ocupan ranuras específicas en un diseño de cuadrícula.
232+
233+
### Propiedades
234+
235+
- `width: int` - Ancho de la cuadrícula en ranuras (por defecto: 10)
236+
- `height: int` - Alto de la cuadrícula en ranuras (por defecto: 10)
237+
- `_slot_inventory: Array[RPGSlotItem]` - Array de ítems en el inventario
238+
- `_grid: Array` - Cuadrícula 2D representando ranuras ocupadas
239+
240+
### Señales
241+
242+
- `slot_item_added(item)` - Emitida cuando se añade un ítem al inventario
243+
- `slot_item_removed(item)` - Emitida cuando se elimina un ítem del inventario
244+
- `slot_item_moved(item, old_position, new_position)` - Emitida cuando un ítem cambia de posición
245+
- `inventory_resized(old_size, new_size)` - Emitida cuando cambian las dimensiones de la cuadrícula
246+
247+
### Funciones
248+
249+
- `add_item(item, position)` - Añade un ítem en posición específica o encuentra espacio disponible
250+
- `remove_item(uuid)` - Elimina un ítem por UUID
251+
- `move_item(uuid, new_position)` - Mueve un ítem a una nueva posición
252+
- `get_available_space(position, item_width, item_height)` - Verifica si hay espacio disponible
253+
- `find_available_position(item_width, item_height)` - Encuentra la primera posición disponible
254+
- `is_position_valid(position, item_width, item_height)` - Valida los límites de la posición
255+
256+
---
257+
258+
## RPGSlotItem.gd
259+
260+
Clase RPGItem extendida que añade propiedades espaciales para sistemas de inventario basados en cuadrícula.
261+
262+
### Propiedades
263+
264+
- `width: int` - Ancho del ítem en ranuras de cuadrícula (por defecto: 1, mínimo: 1)
265+
- `height: int` - Alto del ítem en ranuras de cuadrícula (por defecto: 1, mínimo: 1)
266+
- `position: Vector2i` - Posición actual en la cuadrícula del inventario (por defecto: Vector2i.ZERO)
267+
268+
### Señales
269+
270+
- `dimensions_changed(old_size, new_size)` - Emitida cuando cambia el ancho o alto
271+
- `position_changed(old_position, new_position)` - Emitida cuando cambia la posición
272+
273+
### Funciones
274+
275+
- `get_occupied_cells()` - Devuelve array de celdas de cuadrícula ocupadas por este ítem
276+
- `is_position_valid(inventory_width, inventory_height)` - Verifica si la posición actual es válida
277+
- `would_fit_at(position, inventory_width, inventory_height)` - Verifica si el ítem cabría en la posición
278+
279+
Esta clase hereda todas las propiedades, señales y funcionalidades de RPGItem, añadiendo gestión espacial para sistemas de inventario basados en cuadrícula.
280+
281+
---
282+
283+
## RPGStats.gd
284+
285+
Sistema comprehensivo de gestión de estadísticas de personaje con adición dinámica de estadísticas y asignación de puntos.
286+
287+
### Propiedades
288+
289+
- `stat_points: int` - Puntos de estadística disponibles para asignación (por defecto: 0)
290+
- `_stats: Dictionary` - Diccionario almacenando todas las estadísticas con pares nombre-valor
291+
- `_base_stats: Dictionary` - Diccionario almacenando valores base de estadísticas
292+
293+
### Señales
294+
295+
- `stat_points_changed(old_points, new_points)` - Emitida cuando cambian los puntos de estadística
296+
- `stat_added(stat_name, value)` - Emitida cuando se añade una nueva estadística
297+
- `stat_changed(stat_name, old_value, new_value)` - Emitida cuando cambia el valor de una estadística
298+
- `stat_points_allocated(stat_name, points)` - Emitida cuando se asignan puntos a una estadística
299+
300+
### Funciones
301+
302+
- `add_stat(stat_name, base_value, current_value)` - Añade una nueva estadística al personaje
303+
- `get_stat(stat_name)` - Obtiene el valor actual de una estadística
304+
- `get_base_stat(stat_name)` - Obtiene el valor base de una estadística
305+
- `set_stat(stat_name, value)` - Establece el valor actual de una estadística
306+
- `allocate_stat_points(stat_name, points)` - Asigna puntos de estadística para aumentar una estadística
307+
- `add_stat_points(points)` - Añade puntos de estadística disponibles
308+
- `to_dict()` - Serializa estadísticas a diccionario para guardar
309+
- `from_dict(data)` - Carga estadísticas desde diccionario
310+
311+
---
312+
313+
## RPGActor.gd
314+
315+
Clase base abstracta para todas las entidades tipo actor en el sistema RPG.
316+
317+
### Propiedades
318+
319+
- `character_name: String` - Nombre del actor (por defecto: "Actor")
320+
321+
### Señales
322+
323+
- `character_name_changed(old_name, new_name)` - Emitida cuando cambia el nombre del actor
324+
325+
Esta clase sirve como fundación para todas las clases de personaje y enemigo, proporcionando funcionalidad común de actor y capacidades de nomenclatura.
326+
327+
---
328+
329+
## RPGEnemy.gd
330+
331+
Implementación específica para personajes enemigos heredando de RPGActor.
332+
333+
### Propiedades
334+
335+
- Hereda todas las propiedades de RPGActor
336+
- Se pueden añadir propiedades adicionales específicas de enemigos según sea necesario
337+
338+
Esta clase proporciona un punto de partida para la implementación de personajes enemigos con toda la funcionalidad base de actor heredada de RPGActor.
339+
340+
---
341+
197342
## RPGPotion.gd
198343

199344
Ítem consumible que aplica un efecto a lo largo del tiempo o instantáneamente.

0 commit comments

Comments
 (0)