- Enemy droppt Loot bei Tod (Gold + Items basierend auf LootTable) - LootWindow zeigt Beute an mit "Alles aufheben" Button - Gold-Anzeige im HUD unter XP-Leiste - Beispiel LootTables: Goblin (2-8 Gold) und Skeleton (5-15 Gold) - Loot-System in World verdrahtet Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
921 B
Text
28 lines
921 B
Text
[gd_resource type="Resource" script_class="LootTable" format=3]
|
|
|
|
[ext_resource type="Script" path="res://loot_table.gd" id="1"]
|
|
[ext_resource type="Script" path="res://loot_entry.gd" id="2"]
|
|
[ext_resource type="Resource" path="res://equipment/steel_sword.tres" id="3"]
|
|
[ext_resource type="Resource" path="res://equipment/wooden_shield.tres" id="4"]
|
|
[ext_resource type="Resource" path="res://equipment/iron_helm.tres" id="5"]
|
|
|
|
[sub_resource type="Resource" id="entry_1"]
|
|
script = ExtResource("2")
|
|
item = ExtResource("3")
|
|
drop_chance = 0.1
|
|
|
|
[sub_resource type="Resource" id="entry_2"]
|
|
script = ExtResource("2")
|
|
item = ExtResource("4")
|
|
drop_chance = 0.12
|
|
|
|
[sub_resource type="Resource" id="entry_3"]
|
|
script = ExtResource("2")
|
|
item = ExtResource("5")
|
|
drop_chance = 0.15
|
|
|
|
[resource]
|
|
script = ExtResource("1")
|
|
min_gold = 5
|
|
max_gold = 15
|
|
possible_drops = [SubResource("entry_1"), SubResource("entry_2"), SubResource("entry_3")]
|