{"id":18048265,"url":"https://github.com/relintai/entity_spell_system","last_synced_at":"2025-07-22T09:31:43.050Z","repository":{"id":49832999,"uuid":"182400914","full_name":"Relintai/entity_spell_system","owner":"Relintai","description":"An entity and spell system c++ godot engine module, for complex (optionally multiplayer) RPGs.","archived":false,"fork":false,"pushed_at":"2023-01-09T19:39:22.000Z","size":2298,"stargazers_count":162,"open_issues_count":0,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T09:59:17.712Z","etag":null,"topics":["engine-module","entities","game","godot","multiplayer"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Relintai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-20T12:02:16.000Z","updated_at":"2025-03-25T12:11:27.000Z","dependencies_parsed_at":"2023-02-08T13:46:42.794Z","dependency_job_id":null,"html_url":"https://github.com/Relintai/entity_spell_system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Relintai/entity_spell_system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Fentity_spell_system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Fentity_spell_system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Fentity_spell_system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Fentity_spell_system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Relintai","download_url":"https://codeload.github.com/Relintai/entity_spell_system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Fentity_spell_system/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266465103,"owners_count":23933067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["engine-module","entities","game","godot","multiplayer"],"created_at":"2024-10-30T20:12:15.766Z","updated_at":"2025-07-22T09:31:42.877Z","avatar_url":"https://github.com/Relintai.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entity Spell System\n\nAn entity and spell system for the GODOT Engine, that is usable for both 2d, and 3d games. The main purpose of this \nmodule is to handle spells, auras, and most entity-related things like spawning, items, inventory, containers, \nvendors, interaction, targeting, equipment (+ visuals), loot, crafting, talents, pets, npcs, etc ...\n\nThe module supports networking. It is designed to be authoritative, so players shouldn't be able to cheat by design.\n\nIt is a c++ engine module, which means you will need to compile it into godot. (See compiling)\n\n## Godot Version Support\n\nThis branch tries to follow godot's master branch (as much as I have time).\n\nFor different godot versions look at the other branches.\n\nStatus for this branch: Update for 4.0 is still work in progress. Godot's virtual method binding rework hit this module \nextremely hard, to the point where I'm seriously considering reworking most of the virtuals \nto use a `_notification()`-like interface.\n\n## Project setup tl;dr\n\n### First \n\nYou need to create an `ESSResourceDB` resource somewhere in you project. (Or alloocate it dynamically.)\n\nNow you can either:\n\n-Go to `ProjectSettings-\u003eEss-\u003eData`, and set the `ess_resource_db_path` property also make sure that `automatic_load` is on.\n\n-Or you can load it yourself and set it into the `ESS` singleton either using the `resource_db` property.\n\n### Second\n\nYou need to add an `ESSEntitySpawner` somewhere into your SceneTree. I recommend that you create an autoload for it.\nThis is where you have to implement your spawning logic.\n\n### What the module doesn't cover\n\nMovement, and controls.\n\nUnfortunately, there isn't a one-stop-shop solution for movement, especially if we throw networking into the mix,\nand the same is true for targeting. This means that this module cannot really do much in this regard, but it will \ngive you as much help to set everything up as possible.\n\n## Optional Dependencies\n\nMesh Data Resource\n\nhttps://github.com/Relintai/mesh_data_resource.git\n\nAdds mesh (MeshDataResource) support to ModelVisuals.\n\n## Pre-built binaries\n\nYou can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases) \nrepo, should you want to. It contains all my modules.\n\n## Overview\n\nThe module provides a huge number of script callbacks, usually as virtual methods they usually start with an underscore.\n\nDo not call methods with underscores, all of them has a normal counterpart, always call that.\n\nFor example entity has `crafts(int id)` and `_crafts(int id)` (virtual). Always use `crafts(int id)`, it will\ncall `_crafts(int id)`.\n\nFor networked classes, every variable is broken up into clientside, and serverside. This makes it easier to \ndevelop games that can also run locally, with less overhead and simpler logic. \nE.g. this makes it easy to use the visibility system even when you play locally on the server, because you just use the clientside variables,\nand your logic will work the same way.\n\n## Settings\n\nEntity and spell system comes with quite a few settings, you can find these under `ProjectSettings-\u003eEss`.\n\n## Singletons\n\nThe module contains 2 singletons. `ESS`, and `ProfileManager`. Both are accessible from scripts.\n\n### The ESS singleton\n\nContains the active `ESSResourceDB` instance, and for convenience a reference to the active `ESSEntitySpawner` \ninstance. Also loads/handles/processes all of the entity and spell system related ProjectSettings, so if you need\nany ESS related value from ProjectSettings, don't query it directly, get it from this singleton.\n\nCustomizable enums values are preprocessed, and you usually have multiple ways of getting them.\n\n### The ProfileManager singleton\n\nContains methods to easily load/save/handle `PlayerProfile`s.\n\n#### PlayerProfile\n\nContains player-related data, most notably `ClassProfile`s.\n\n#### ClassProfile\n\nContains class-related data, most notably `ActionBarProfile`s, and `InputProfiles`.\n\n#### ActionBarProfile\n\nContains the data for a set of actionbars.\n\n#### InputProfileswd\n\nContains the keybind data for a class.\n\n## Enums\n\nESS needs lots of enums to work, and to reduce complexity with includes they ended up in a few separate classes.\n\nI'm still in the process of converting these to be customizable (`ESS` singleton / ProjectSettings).\n\n(Only the ones that worth it will be converted.)\n\n### EntityEnums\n\nContains Entity-related enums, like AIStates, skeleton attach points, entity flags, immunity flags,\nstate flags.\n\n### ItemEnums\n\nContains item-related enums, like rarity, armor type, item types.\n\n### SpellEnums\n\nContains spell-related enums, like aura types, damage types, spell categories, spell types, trigger types, \nand quite a few notification constants.\n\n### Customizable enums\n\nOpen `ProjectSettings`, and then go to `ESS/Enums`.\n\nAll of the string properties are customizable enums. These require a comma-separated list.\nThey are essentially a godot comma separated property hint enum string.\n\nThey all have defaults.\n\nFer example:\n\nIf you want you game to work with the following stats: Agility,Intellect,Crit,Weapon Damage,Stamina\nand you want Agility,Intellect,Stamina as you main stats.\n\nFirstly you want to put you main stats at the beginning, because the system will take the first `main_stat_count` \nstats as main stats.\n\nAnd then just enter `Agility,Intellect,Stamina,Crit,Weapon Damage` into the `stats` setting, and then \nset `main_stat_count` to 3.\n\nWhen these values are expected to be used as properties, the `ESS` singleton will create snake_cased versions automatically.\n`String stat_get_property_name(id: int) const` inside the ESS singleton for example.\n\nSo in the example case `ESS.stat_get_property_name(4)` would return `weapon_damage`.\n\n## ESSResourceDB\n\nThis is a class that maps ids to resources for quick lookups.\nThis is necessary in order to support networking, because you don't want to send resource paths over the network \nevery time somebody casts a spell for example. \n\n### ESSResourceDBStatic\n\nSimple static resource db. Just drag and drop all your data that you use into it with the inspector.\n\nStores the data as vectors.\n\nSupports id remapping, which means that it can assign new ids to all added resources, so they don't clash.\nThe added resource's index will be set as it's id.\n\nThis is useful for modding support, as you can just collect every mod's resource dbs, and add them to a static db,\nand with this option enabled the ids will not clash.\n\nYou can see an example of this [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/game_modules/DataManager.gd).\n\n### ESSResourceDBMap\n\nStores everything as a vector, and a map.\n\n#### ESSResourceDBFolders\n\nInherited from `ESSResourceDBMap`.\n\nIt will load everything from the folders that you set up into it's `folders` property.\n\n## Entity\n\nThis is the main class that can be used for players/mobs/npcs and also other things like chests. \n\nI ended up merging subclass functionality into it, because\nthat way it gains a lot more utility, by sacrificing only a small amount of memory.\nFor example this way it is easy to make chests attack the player, or make spell that animate objects.\n\n## Entity Body\n\nOriginally entities used to be inherited from `Spatial` or `Node2D`, so they could contain/drive their own models, \nbut eventually on order to support both 2d, and 3d, bodies were separated from them. This unfortunately \ncomplicates the setup a bit, but the upsides overweight the downsides, as this way you don't need to create different\nentities for every model/body you have.\n\nBodies are stored at `EntityData-\u003eEntitySpeciesData-\u003eModelDatas (SpeciesModelData)-\u003eBody`\n\nWhen an `Entity` gets initialized, it will instance it's body automatically, but if you want to intance it yourself,\nyou can call `void instance_body(entity_data: EntityData, model_index: int)` on an `Entity`.\n\nThe `model_index` property tell the `Entity` which one it should use.\n\nInstancing bodies does not happen immediately, but you will probably want to set an `Entity`'s position right where \nyou create it, a few helpers were added:\\\n\n`void set_transform_2d(transform: Transform2D, only_stored: bool = false)`\\\n`void set_transform_3d(transform: Transform, only_stored: bool = false)`\n\nYour body implementation then can get this from an entity an set itself to the right place.\n\n### CharacterSkeletons\n\nCharacterSkeletons handle the looks of your characters.\n\nThey come in two variants, one for 2d, one for 3d.\n\nThey have quite a few helper methods.\n\nThey can store ModelVisuals, and ModelVisualEntries.\n\nThey support attach points. For example a character's hand.\nIt adds properties based on the selected entity_type.\nThese are based on the values from `ProjectSettings-\u003eESS-\u003eEnums-\u003eskeletons_bone_attachment_points`.\n\nIf you want to merge meshes this is where you can implement it.\n\n#### CharacterSkeleton3D\n\nThe 3d variant.\n\n[Complex 3d skeleton scene](https://github.com/Relintai/broken_seals/blob/master/game/models/entities/human/models/armature_huf.tscn) \\\n[Complex 3d skeleton script](https://github.com/Relintai/broken_seals/blob/master/game/player/CharacterSkeletonGD.gd)\n\n#### CharacterSkeleton2D\n\nThe 2d variant.\n\n[Simple 2d roguelike skeleton script](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/characters/SimpleCharacter.gd) \\\n[Simple 2d roguelike skeleton scene](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/characters/SimpleCharacter.tscn)\n\n#### ModelVisual\n\nA collection ModelVisualEntries.\n\nYou will need to use this to define a look. For example if you have an item that will change your character's clothes,\nyou will use this.\n\n##### ModelVisualEntry\n\nContains meshes, textures, texture tints, mesh transforms.\n\nIt has 2 modes, `Bone` and `Attachment`.\n\nIn the bone mode, you need to select an entity type, and then a concrete bone. This is the \"merge this into the final character mesh\" mode.\n\nIn the attachment mode, you need to select a common attach point (`ProjectSettings-\u003eEss-\u003eenums-\u003eskeletons_bone_attachment_points`), \nand the containing mesh will be put on to that point by the CharacterSkeleton. This is how you can implement weapons for example.\n\n### EntitySpeciesData\n\nContains data related to a species, like `SpeciesModelData`s, and species specific spells, and auras.\n\n#### SpeciesModelData\n\nContains a scene of a species's body and it's customizations.\n\nThe `customizable_slots_string` and `customizable_colors_string` should be filled with a comma separated string,\nthey will add properties. Currently you need to click on something else, and back on the resource for these to show up,\nafter a change to the strings.\n\nThe body can be any scene, Entity will instance it, and set it to it's body property.\n\nThe body should handle movement based on the player's input, it should handle sending position information through the network, \nif you want networking, it might (`CharacterSkeleton`s can also do it) also drive your animations/animation players if you have it.\n\nBodies does not need to handle the graphics themselves (`ModelVisualEntries` for example) (you can implement your logic here \nif you want to), but the `CharacterSkeleton` classes exist for that purpose.\n\n[Complex 3d body script](https://github.com/Relintai/broken_seals/blob/master/game/player/Body.gd) \\\n[Complex 3d body scene](https://github.com/Relintai/broken_seals/blob/master/game/models/entities/human/models/HumanFemale.tscn)\n\n[Simple 2d roguelike body script](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/player/Body.gd) \\\n[Simple 2d roguelike body scene](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/player/Body.gd)\n\n#### SpeciesInstance\n\nThis class will store character model customization data. E.g. which hairstyle you want for an `Entity`.\n\nNot yet finished!\n\n### Spawning\n\nSince spawning (= creating) entities is entirely dependent on the type of game you are making, ESS cannot do\neverything for you. It will set up stats, equipment etc, but there is no way to set up positions for example.\n\nYou can implement your spawning logic by inheriting from `ESSEntitySpawner`, and implementing `_request_entity_spawn`.\n\nYou should only have one spawner at any given time. It will register itself into the ESS singleton automatically.\n\nSince it is inherited from Node, I recommend that you create an autoload for it.\n\nThe ESS singleton also contains convenience methods to request spawning an Entity.\n\n[Sample 3d spawner implementation](https://github.com/Relintai/broken_seals/blob/master/game/player/bs_entity_spawner.gd) \\\n[Sample 2d spawner implementation](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/player/bs_entity_spawner.gd)\n\n#### EntityCreateInfo\n\nEntity spawning usually requires a lot of complexity and hassle, this helper class aims to make it painless.\n\nAll methods that deal with spawning will take this as a parameter.\n\n### EntityData\n\nSince setting up Entities as scenes is usually quite the hassle, `EntityData` had to be created.\n\nIt stores everything an entity needs.\n\nIn order to spawn an entity you need it.\n\n#### EntityClassData\n\n`EntityClassData` holds class-related information, like specs (`CharacterSpec`), spells, start spells, start auras, \nalternative ais, `EntityResource`s (mana for example).\n\n#### CharacterSpec\n\n`CharacterSpec` holds spec-related information, most notably talents.\n\n#### EntityResource\n\nEntityResources are things like mana, health, or speed. These add greater flexibility over stats.\n\nThe resource system is quite flexible, if you add a resource serverside, it will be automatically\nadded clientside. (You have to add `EntityResource`s to the active `ESSResourceDB`!)\n\nBy default all entities have the build in speed and health resources, as a set index \n(`EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH` and `EntityEnums::ENTITY_RESOURCE_INDEX_SPEED`).\n\nThere is also the `EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN` constant, so you have \nthe current offset where the custom resources start.\n\nEntity allocates these in it's  `_initialize()` virtual method, if you want to customize them.\n\nNote that `EntityClassData` contains an array, so you can add more resources easily to classes,\nthese will be automatically added when the system initializes an `Entity`.\n\n##### EntityResourceHealth\n\nThe standard health resource implementation.\n\n##### EntityResourceSpeed\n\nThe standard speed resource implementation.\n\n#### EntityResourceCostData\n\nThis is the class taht lets you implement resource costs. For example mana cost for a spell.\n\n##### EntityResourceCostDataResource\n\nThe standard resource cost implementation.\n\n##### EntityResourceCostDataHealth\n\nThe standard health resource cost implementation.\n\nIt has a resource property, so you can just assign any resource to this.\n\n### Interactions\n\nIf you want your player to interact with it's target. For example a vendor, or loot.\n\nFirst make sure that you can interact, by checking `Entity.cans_interact()` or `Entity.canc_interact()`.\nIf this returns true, you can call `Entity.crequest_interact()`. This will call `Entity.sinteract()` serverside.\n\nInteractions are handled by `EntityData` by default. It has the same methods. If `EntityData` is not set, the `Entity` \nwill try to call the same overridable on itself.\n\nYou can see an example implementation [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/entities/EntityDataGD.gd).\n\n### AI\n\nYou can implement ai by extending `EntityAI`, and then assigning it to an `EntityData`.\n\nWhen an `Entity` gets spawned it will create a copy for itself, so you can safely use class variables.\n\n#### AIFormation\n\nNot yet finished, it was meant as a way to calculate offset pet positions, (If an `Entity` has let's say \n4 pets you don't just want them all to stay on top of their controller).\n\nIf this functionality ends up in `EntityAI`, after pets are finished, this will be removed.\n\n### Pets\n\nUnfortunately pet support is not yet finished.\n\nIt is mostly done though, so you will see pet-related methods scattered around.\n\n### Bags\n\nStores items. See `Bag`. It has quite a few virtual methods, you should be able to implement most inventory types\nshould you want to.\n\nEntity will send these over the network.\n\nAlso Entities have a target bag property. For example this makes vendors easily implementable.\n\n### VRPCs\n\nEntities has a networked visibility system. The method itself is called `vrpc`, it works the same way as normal rpcs.\nIf you want to send data to every client that sees the current entity, use this. \n\n## Spells, Auras, Talents\n\nSpell is the class you need to create both spells, and aura.\\\nIt stores the data, and also it has the ability to be scripted.\\\nTalents are actually just spells used as Auras. Right now the system just applies them as a permanent aura.\\\nYou don't need to worry about applying auras, cast them as spells instead. It they are set to permanent, or they have a duration set they will be applied as an aura automatically.\n\nTalent ranks are implemented by deapplying the earlier rank first, then applying the new rank.\n\n### How to\n\nRequest casting a spell clientside: `void spell_crequest_cast(spell_id: int)` \\\nRequest to learn a spell clientside: `void spell_learn_requestc(id: int)`\n\nRequest talent learning clientside: \\\n`void character_talent_crequest_learn(spec_index: int, character_talent_row: int, character_talent_culomn: int)` or \\\n`void class_talent_crequest_learn(spec_index: int, class_talent_row: int, class_talent_culomn: int)` \n\n#### Cast a spell\n\nNote that you should only do this serverside.\n\n```\n# Or get it from the active ESSResourceDB, etc\nexport(Spell) var spell : Spell\n\nfunc scast_spell() -\u003e void:\n\tvar sci : SpellCastInfo = SpellCastInfo.new()\n\n\tsci.caster = info.caster\n\tsci.target = info.target\n\tsci.has_cast_time = spell.cast_enabled\n\tsci.cast_time = spell.cast_cast_time\n\tsci.spell_scale = info.spell_scale\n\tsci.set_spell(spell)\n\n\tspell.cast_starts(sci)\n\n```\n\n#### Apply an aura\n\nNormally you shouldn't do this, this is for more advanced uses. Cast the aura as a spell instead.\n\nNote that you should only apply auras serverside, they will be sent to clients automatically.\n\n```\n# Or get it from the active ESSResourceDB, etc\nexport(Spell) var aura : Spell\n\nfunc sapply_aura() -\u003e void:\n    var ainfo : AuraApplyInfo = AuraApplyInfo.new()\n            \n    ainfo.caster = info.caster\n    ainfo.target = info.caster\n    ainfo.spell_scale = 1\n    ainfo.aura = aura\n\n    aura.sapply(ainfo)\n\n```\n\n#### UI\n\n[Complete UI Implemetation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player)\n\n[Player UI Core Implemetation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/player_ui)\n\n[Aura Frame Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/auraframe) \\\n[Castbar Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/castbar) \\\n[Unitframe Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/unitframes)\n\n[Actionbar Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/actionbars)\n\n[Character Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/character) \\\n[Inventory Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/bags) \\\n[Crafting Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/crafting) \\\n[Loot Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/loot_window) \\\n[Talent Window Implemetation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/talents) \\\n[Spellbook Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/spellbook)  \\\n[Vendor Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/vendor_window) \\\n[Trainer Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/trainer)\n\n[3D Nameplate Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/world/nameplates) \\\n[2D Nameplate Implementation](https://github.com/Relintai/broken_seals_roguelike/tree/master/game/ui/nameplates)\n\n### Infos / Pipelines\n\n#### SpellCastInfo\n\nStores information about the state of a spell's cast.\n\n#### AuraApplyInfo\n\nHelps to apply auras\n\n#### SpellDamageInfo, SpellHealInfo\n\nThese are used in the damage and heal calculation. For example these can be used to implement immunities, or absorb effects \nby modifying their damage values in aura callbacks.\n\n### Projectiles\n\nSpells support projectiles, they are created/set up inside `void handle_projectile(info: SpellCastInfo)`.\n\nThe default implementation will instance `Spell`'s projectile scene (if set), and then it will try to call a \n`void setup_projectile(info: SpellCastInfo)` on it if exists.\n\nYou can override this behaviour by implementing your own `_void handle_projectile(info: SpellCastInfo)` on `Spell`\n\nNote that the module already adds `SpellFollowProjectile3D`, but this has not been finished yet.\n\n## Items\n\nItems are implemented using 2 classes, `ItemTemplate`, and `ItemInstance`.\n\n`ItemTemplate` contains all information for a potential item. You can generate `Iteminstance`s with this,\nusing it's `ItemInstance create_item_instance()` method. You can also implement your custom item creation logic\nusing the `void _create_item_instance()` virtual.\n\n`ItemInstance` is the actual item.\n\n### Loot\n\nLooting can be implemented using `Entity`'s target bag functionality.\n\nYou can see an example implementation [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/entities/EntityDataGD.gd). \\\nAnd an example ui implementation [here](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/loot_window).\n\n## XP\n\nYou can set all the xp values for your levels in `ProjectSettings-\u003eEss-\u003exp`.\n\nNow you can start distributing xp, for whatever you'd like to Entities, using `Entity.xp_adds(vlaue : int)`\n\n## Examples\n\nEventually I'll create a separate repository with a few examples/demos, but for now you can check the game \nI've been working on for examples.\n\n3d:\nhttps://github.com/Relintai/broken_seals.git\n\n2d turn based:\nhttps://github.com/Relintai/broken_seals_roguelike\n\n2d: \nhttps://github.com/Relintai/broken_seals_2d.git\n\n## Compiling\n\nFirst make sure that you can compile godot. See the official docs: https://docs.godotengine.org/en/3.x/development/compiling/index.html\n\n1. Clone the engine if you haven't already:\n\nIf you want Godot 3.x:\n```git clone -b 3.x https://github.com/godotengine/godot.git godot```\n\nIf you want Godot 4.0:\n```git clone https://github.com/godotengine/godot.git godot```\n\n2. go into the modules folder inside the engine's directory\"\n\n```cd godot```\n```cd modules```\n\n3. clone this repository\n\n```git clone https://github.com/Relintai/entity_spell_system.git entity_spell_system```\n\n(the folder needs to be named entity_spell_system!)\n\n4. Go up one folder\n\n```cd ..```\n\n5. Compile godot.\n\nFor example:\n\n```scons p=x11 t=release_debug tools=yes```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelintai%2Fentity_spell_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelintai%2Fentity_spell_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelintai%2Fentity_spell_system/lists"}