Ruby Radiance
Snuck in some nice, if probably unneeded, code
Chest sizes it's Inventory to the number of Items. Then stacks similar items. Removes Empty Slots. Then adds slots so it fills the 3-slot-wide section neatly.
Ruby Radiance
Snuck in some nice, if probably unneeded, code
Chest sizes it's Inventory to the number of Items. Then stacks similar items. Removes Empty Slots. Then adds slots so it fills the 3-slot-wide section neatly.
Ruby Radiance
Chest loots seem to be stacking properly!
Still can't stack from different Chests, but it'll have to do for now.
Now to write the proper loot tables...
#gamedev #rpg #godot #roguelike #gdscript #rougelight #godotengine
I've been busy.. 😅
#godot #godotengine #gdscript #gamedev #coding #vscode #javascript
If you are using #gdunit4 and struggle asserting signals - make sure to use the exact same amount of variables when asserting. Otherwise the assert will always timeout.
class emitter:
signal test(a,b)
e = monitor_signals(emitter.new())
# exact values
e.test.emit(1,2)
assert_signal(e).is_emitted(e.test,1,2)
# any values
e.test.emit(1,2)
assert_signal(e).is_emitted(e.test,any(),any())
# timeout
e.test.emit(1,2)
assert_signal(e).is_emitted(e.test)
Ruby Radiance
Loot Make proof-of-concept is working
Current issue: All Items are created as Unique i.e. they can't stack with each other, even if they are identical :(
I suppose I could write a big "Are these the same?" function, but it seems a bit hacky?
Anyway, more to do
#gamedev #godot #rpg #gdscript #roguelike #godotengine #rougelight
Main trick that I'm using to speed up integration of a story (which I plan on making pretty complex) is embedding #GDScript function bodies into my Resources and then generating new script types from them at runtime. This greatly reduces boilerplate of copy-pasted script files which are 99% identical, though I do need to make a cleaner method of building the larger script source that goes *around* that body.
Ruby Radiance
Next: Random Loot Generator.
Ideas: Move loot generator to its own script
create Base Items, in Categories (Armour: Leather, Maille, Plate. Consumable: Apple, Potion, Scroll. etc) (RESOURCE)
Functions to add Effects to Base Items, creating actual Items, including 2d and 3d representations (RESOURCE)
Category will determine what Effects can be added
More as I start building.
#gamedev #rpg #godot #roguelike #gdscript #rougelight #godotengine
Didn't knew how much I missed seeing unit test runs in #Godot
This really should be part of the internal editor and framework.
And since I am already dreaming:
Please push the two refactoring feature requests to completion that add rename refactoring to the godot editor.
And the one that makes the debugger a separate floatable window.
With these I would never wanna leave the godot editor.
Ruby Radiance
A quick review of progress:
World: UI, Player, current_scene
Inventory
Items: Item_data resources feed into Inventory, and pick_up_items
Town:
random pick_up_items, shops, chest, portal to Dungeon
Shops: Dialogic conversations and buy/sell
NPCs: dialogic
Dungeon:
proc-gen rooms/corridors
Random loot/chests
Spawn foes
portals up/down
foes: Enum State machine to patrol/chase/etc
#gamedev #godot #rpg #roguelike #gdscript #rougelight #godotengine