diff --git a/doc_classes/AIFormation.xml b/doc_classes/AIFormation.xml index 04ae234..01e884c 100644 --- a/doc_classes/AIFormation.xml +++ b/doc_classes/AIFormation.xml @@ -1,6 +1,7 @@ + Class for scriptable AI formations. Not yet used. Needs pet support. diff --git a/doc_classes/ActionBarButtonEntry.xml b/doc_classes/ActionBarButtonEntry.xml index 2e3f335..461518c 100644 --- a/doc_classes/ActionBarButtonEntry.xml +++ b/doc_classes/ActionBarButtonEntry.xml @@ -1,6 +1,7 @@ + Stores the data for an actionbar button. ProfileManager uses it. diff --git a/doc_classes/ActionBarEntry.xml b/doc_classes/ActionBarEntry.xml index 171d2db..d47e134 100644 --- a/doc_classes/ActionBarEntry.xml +++ b/doc_classes/ActionBarEntry.xml @@ -1,6 +1,7 @@ + Stores the data for an actionbar. ProfileManager uses it. diff --git a/doc_classes/ActionBarProfile.xml b/doc_classes/ActionBarProfile.xml index 757ea49..9d7f2d0 100644 --- a/doc_classes/ActionBarProfile.xml +++ b/doc_classes/ActionBarProfile.xml @@ -1,6 +1,7 @@ + Stores all actionbar-related data for a class. ProfileManager uses it. diff --git a/doc_classes/Aura.xml b/doc_classes/Aura.xml index 27d1c6f..f9c322a 100644 --- a/doc_classes/Aura.xml +++ b/doc_classes/Aura.xml @@ -1,6 +1,8 @@ + Base Aura class. Contains data, and callbacks for aura scripts. Inherit from this to create auras with different functionality. + Future: Standard funtionality will be implemented by default, you will only need to inherit for unique spell effects. @@ -15,6 +17,7 @@ + Override to change the default damage calculation formula. Serverside only. @@ -25,6 +28,7 @@ + Override to change the default heal calculation formula. Serverside Only. @@ -33,6 +37,7 @@ + Called clientside when this aura is applied to an [Entity]. You can apply visual effects here. @@ -41,6 +46,7 @@ + Called clientside when this aura's duration is refreshed on an [Entity]. @@ -49,6 +55,7 @@ + Called clientside when this aura's is removed from an [Entity]. @@ -59,6 +66,7 @@ + Called clientside when an [Entity]'s cast fails. @@ -69,6 +77,7 @@ + Called clientside when an [Entity]'s cast finsihes. @@ -79,6 +88,7 @@ + Called clientside when an [Entity]'s cast starts. @@ -89,6 +99,7 @@ + Called clientside when an [Entity]'s cast state changes. Not yet used. @@ -99,6 +110,7 @@ + Called clientside when an [Entity] receives a [CategoryCooldown]. @@ -109,6 +121,7 @@ + Called clientside when an [Entity]'s [CategoryCooldown] is removed / expires. @@ -119,6 +132,7 @@ + Called clientside when an [Entity] receives a [Cooldown]. @@ -129,6 +143,7 @@ + Called clientside when an [Entity]'s [Cooldown] is removed / expires. @@ -139,6 +154,7 @@ + Called clientside for an [Entity] receives damage. @@ -149,6 +165,7 @@ + Called clientside for an [Entity] who deals damage. @@ -159,6 +176,7 @@ + Called clientside for an [Entity] who deals heal. @@ -167,6 +185,7 @@ + Called clientside for an [Entity] who dies. @@ -183,6 +202,7 @@ + Called clientside for an [Entity] when equipping an item fails. @@ -199,6 +219,7 @@ + Called clientside for an [Entity] when equipping an item succeeds. @@ -207,6 +228,7 @@ + Called clientside for an [Entity] when a global cooldown finishes. @@ -217,6 +239,7 @@ + Called clientside for an [Entity] when a global cooldown starts. @@ -227,6 +250,7 @@ + Called clientside for an [Entity] who receives heal. @@ -237,6 +261,7 @@ + Called clientside for an [Entity] who levels up. @@ -247,6 +272,7 @@ + Called clientside for an [Entity] whos spell cast succeeds. @@ -257,6 +283,7 @@ + Called clientside for an [Entity] who gains xp. @@ -267,6 +294,7 @@ + Called when this aura wants to deal damage. Serverside only. @@ -277,6 +305,7 @@ + Called when this aura wants to deal damage. Serverside only. @@ -285,6 +314,7 @@ + Called serverside when this aura gets added to an [Entity]. @@ -293,6 +323,7 @@ + Called serverside when this aura gets applied to an [Entity]. @@ -301,6 +332,7 @@ + Called serverside, apply damage passives of the caster [Entity] into the [SpellDamageInfo] in this method. @@ -309,6 +341,7 @@ + Called serverside, apply damage passives of the target [Entity] into the [SpellDamageInfo] in this method. @@ -317,6 +350,7 @@ + Called serverside, apply heal passives of the caster [Entity] into the [SpellHealInfo] in this method. @@ -325,6 +359,7 @@ + Called serverside, apply heal passives of the target [Entity] into the [SpellHealInfo] in this method. @@ -333,6 +368,7 @@ + Called when this aura is getting removed from an [Entity]. @@ -343,6 +379,7 @@ + This method sets up the given [AuraData] based on the given [AuraApplyInfo]. Override it, if you need to do something special. Serverside. @@ -355,6 +392,7 @@ + Gets called if an [Entity] wants to equip an [ItemInstance]. Return true, if tou want this [Aura] to prevent the equip. Serverside. @@ -371,6 +409,7 @@ + Called before an [Aura] gets applied to the [Entity] this [Aura] is on. @@ -381,6 +420,7 @@ + Called serverside before a cast starts by [Entity] this is on. @@ -391,6 +431,7 @@ + Called serverside before an [Entity]'s cast starts targeting the [Entity] this is on. @@ -401,6 +442,7 @@ + Called serverside before the [Entity] this [Aura] is on receives damage. @@ -411,6 +453,7 @@ + Called serverside before the [Entity] this [Aura] is on getting hit by a spell that deals damage. @@ -421,6 +464,7 @@ + Called serverside before the [Entity] this [Aura] is on receives heal. @@ -431,6 +475,7 @@ + Called serverside before the [Entity] this [Aura] is on getting hit by a spell that deals heal. @@ -441,6 +486,7 @@ + Called serverside when the [Entity]'s cast this [Aura] is on fails. (It moved for example, and the [Spell] did not allow it.) @@ -451,6 +497,7 @@ + Called serverside when the [Entity]'s cast this [Aura] is on finishes. @@ -461,6 +508,7 @@ + Called serverside when an [Entity] finishes a cast targeting the [Entity] this [Aura] is on finishes. @@ -471,6 +519,7 @@ + Called serverside when the [Entity]'s cast this [Aura] is on starts. @@ -481,6 +530,7 @@ + Called serverside when the [Entity] this [Aura] is on receives a [CategoryCooldown]. @@ -491,6 +541,7 @@ + Called serverside when a [CategoryCooldown] of the [Entity] this [Aura] is on gets removed. @@ -501,6 +552,7 @@ + Called serverside when the [Entity] this [Aura] is on receives a [Cooldown]. @@ -511,6 +563,7 @@ + Called serverside when a [Cooldown] of the [Entity] this [Aura] is on gets removed. @@ -521,6 +574,7 @@ + Called serverside when an [Entity] this [Aura] is dealt damage. @@ -531,6 +585,7 @@ + Called serverside when an [Entity] this [Aura] is on receives damage. @@ -541,6 +596,7 @@ + Called serverside when an [Entity] deals damage to the [Entity] this [Aura] is on. @@ -551,6 +607,7 @@ + diff --git a/doc_classes/AuraApplyInfo.xml b/doc_classes/AuraApplyInfo.xml index b999165..f39a8a1 100644 --- a/doc_classes/AuraApplyInfo.xml +++ b/doc_classes/AuraApplyInfo.xml @@ -1,6 +1,7 @@ + Helper class, which is used to apply an [Aura] to an [Entity]. diff --git a/doc_classes/AuraData.xml b/doc_classes/AuraData.xml index 0c9da2d..09c4e5a 100644 --- a/doc_classes/AuraData.xml +++ b/doc_classes/AuraData.xml @@ -1,6 +1,7 @@ + Stores an [Aura]'s runtime data on an [Entity]. diff --git a/doc_classes/AuraGroup.xml b/doc_classes/AuraGroup.xml index 7d7ebb6..40a1bfb 100644 --- a/doc_classes/AuraGroup.xml +++ b/doc_classes/AuraGroup.xml @@ -1,8 +1,12 @@ + Used to make some [Aura]s override each other. + Only one [Aura] with the same group is allowed on an [Entity] by the same caster by default. + + For example if an [Entity] wants to apply the same [Aura] except different ranks to a target, this is how you can prevent it easily. diff --git a/doc_classes/AuraStatAttribute.xml b/doc_classes/AuraStatAttribute.xml index b2869cb..4be839e 100644 --- a/doc_classes/AuraStatAttribute.xml +++ b/doc_classes/AuraStatAttribute.xml @@ -1,6 +1,7 @@ + Stores [Stat] modifiers for [Aura]s. diff --git a/doc_classes/AuraTriggerData.xml b/doc_classes/AuraTriggerData.xml index da3cc3c..bcf3295 100644 --- a/doc_classes/AuraTriggerData.xml +++ b/doc_classes/AuraTriggerData.xml @@ -1,6 +1,7 @@ + [Aura] effect trigger information. Not yet complete. diff --git a/doc_classes/Bag.xml b/doc_classes/Bag.xml index a376f59..e029341 100644 --- a/doc_classes/Bag.xml +++ b/doc_classes/Bag.xml @@ -1,6 +1,7 @@ + Stores [Entity] inventory. diff --git a/doc_classes/CategoryCooldown.xml b/doc_classes/CategoryCooldown.xml index bbc48f0..cb70d39 100644 --- a/doc_classes/CategoryCooldown.xml +++ b/doc_classes/CategoryCooldown.xml @@ -1,8 +1,10 @@ + Stores [Spell] category cooldown information during runtime. + These are interrupts in MMORPGS. diff --git a/doc_classes/CharacterSkeleton.xml b/doc_classes/CharacterSkeleton.xml index a01ff34..805290b 100644 --- a/doc_classes/CharacterSkeleton.xml +++ b/doc_classes/CharacterSkeleton.xml @@ -1,8 +1,14 @@ + Stores character visual information. + This is an abstraction, so [Entity] can equip items, and swap bodyparts without worrying about the implementation itself. + + This class does nothing, but it's not abstract, because you can use this when an [Entity] does not need to be ablke to equip items. + + For example some beasts, or chests, interactable items, etc. diff --git a/doc_classes/CharacterSkeleton3D.xml b/doc_classes/CharacterSkeleton3D.xml index 43d0cf8..ad283d6 100644 --- a/doc_classes/CharacterSkeleton3D.xml +++ b/doc_classes/CharacterSkeleton3D.xml @@ -1,6 +1,9 @@ + 3d implementation for [CharacterSkeleton]. + + Note: Most of the logic implementation for this is still in gdscript. It will be ported. diff --git a/doc_classes/CharacterSpec.xml b/doc_classes/CharacterSpec.xml index 2a56a7e..ba5619f 100644 --- a/doc_classes/CharacterSpec.xml +++ b/doc_classes/CharacterSpec.xml @@ -1,8 +1,10 @@ + Contains data for a character's specialization. + Specialization in ESS means talents, and talent tabs. diff --git a/doc_classes/ClassProfile.xml b/doc_classes/ClassProfile.xml index 025a55e..9bc4c03 100644 --- a/doc_classes/ClassProfile.xml +++ b/doc_classes/ClassProfile.xml @@ -1,6 +1,7 @@ + Contains all profile information for an [Entity]'s class. Related to [ProfileManager]. diff --git a/doc_classes/ComplexLevelStatData.xml b/doc_classes/ComplexLevelStatData.xml index 93fa525..2573145 100644 --- a/doc_classes/ComplexLevelStatData.xml +++ b/doc_classes/ComplexLevelStatData.xml @@ -1,6 +1,7 @@ + Per level stat information for an [Entity]. diff --git a/doc_classes/Cooldown.xml b/doc_classes/Cooldown.xml index c2f8e5b..8bdb98d 100644 --- a/doc_classes/Cooldown.xml +++ b/doc_classes/Cooldown.xml @@ -1,6 +1,7 @@ + Contains the runtime data for one of the [Cooldown]s of an [Entity]. diff --git a/doc_classes/CraftRecipe.xml b/doc_classes/CraftRecipe.xml index bcabe8d..e57da09 100644 --- a/doc_classes/CraftRecipe.xml +++ b/doc_classes/CraftRecipe.xml @@ -1,6 +1,7 @@ + Recipe data for the crafting system. diff --git a/doc_classes/CraftRecipeHelper.xml b/doc_classes/CraftRecipeHelper.xml index 163ec6d..fb9a739 100644 --- a/doc_classes/CraftRecipeHelper.xml +++ b/doc_classes/CraftRecipeHelper.xml @@ -1,6 +1,7 @@ + Contains one item entry for [CraftRecipes]s diff --git a/doc_classes/ESDragAndDrop.xml b/doc_classes/ESDragAndDrop.xml index d80581a..3dc221c 100644 --- a/doc_classes/ESDragAndDrop.xml +++ b/doc_classes/ESDragAndDrop.xml @@ -1,6 +1,7 @@ + Drag and drop helper class for the actionbars, and inventory. diff --git a/doc_classes/Entity.xml b/doc_classes/Entity.xml index e755d3c..b52a38f 100644 --- a/doc_classes/Entity.xml +++ b/doc_classes/Entity.xml @@ -1,8 +1,14 @@ + Represents an [Entity] inside the world. Entities can be players, mobs, chests, or any kind of interactable things. + Functions starting, or having an 's' in them (like adds_cooldown, or sapply_item etc) are only called, or meant to be called by serverside code. + Functions with a 'c' in them (like addc_cooldown, cdeapply_item etc) are only called, or meant to be called from clientside code. + + Functions that have a virtual variant starting with an underscore, should be called, they will call the virtual version. + They will check if the virtual properly exists, also usually they check if the parameters are valid, so you don't have to do it every time in gdscript. diff --git a/doc_classes/EntityAI.xml b/doc_classes/EntityAI.xml index aa17952..218f376 100644 --- a/doc_classes/EntityAI.xml +++ b/doc_classes/EntityAI.xml @@ -1,6 +1,7 @@ + You can implement AI for [Entities] with this. diff --git a/doc_classes/EntityClassData.xml b/doc_classes/EntityClassData.xml index 33ffb06..225eda9 100644 --- a/doc_classes/EntityClassData.xml +++ b/doc_classes/EntityClassData.xml @@ -1,6 +1,7 @@ + Contains all of information for an [Entity]'s class. (Ingame class) diff --git a/doc_classes/EntityCreateInfo.xml b/doc_classes/EntityCreateInfo.xml index 9c3c828..2aed9ef 100644 --- a/doc_classes/EntityCreateInfo.xml +++ b/doc_classes/EntityCreateInfo.xml @@ -1,6 +1,7 @@ + Helper class used for [Entity] creation, and setup. diff --git a/doc_classes/EntityData.xml b/doc_classes/EntityData.xml index ddd7b07..5a1ab60 100644 --- a/doc_classes/EntityData.xml +++ b/doc_classes/EntityData.xml @@ -1,6 +1,7 @@ + Contains all data for a given [Entity]. Think of this as all the data for a mob, or a player. diff --git a/doc_classes/EntityDataManager.xml b/doc_classes/EntityDataManager.xml index d3a008e..dce900a 100644 --- a/doc_classes/EntityDataManager.xml +++ b/doc_classes/EntityDataManager.xml @@ -1,8 +1,12 @@ + This class should be added as an autoload. (Or be present in the scene when you want to spawn entities). + + This loads in and stores all information required. + The main reason for this class is networking, when the server sends the client an aura, you need to be able to look it up by an id. diff --git a/doc_classes/EntityEnums.xml b/doc_classes/EntityEnums.xml index 96e2dde..e175b04 100644 --- a/doc_classes/EntityEnums.xml +++ b/doc_classes/EntityEnums.xml @@ -1,6 +1,7 @@ + Contains lots of general-use enums for entities. diff --git a/doc_classes/EntityResource.xml b/doc_classes/EntityResource.xml index 776acf8..6ca68a7 100644 --- a/doc_classes/EntityResource.xml +++ b/doc_classes/EntityResource.xml @@ -1,6 +1,7 @@ + An instance of an entity resource. Resource in this context is things like mana. diff --git a/doc_classes/EntityResourceCostData.xml b/doc_classes/EntityResourceCostData.xml index ce1d9a6..e273536 100644 --- a/doc_classes/EntityResourceCostData.xml +++ b/doc_classes/EntityResourceCostData.xml @@ -1,6 +1,7 @@ + Contains a resource cost. Resource in this context is things like mana. diff --git a/doc_classes/EntityResourceData.xml b/doc_classes/EntityResourceData.xml index d0360dc..044d552 100644 --- a/doc_classes/EntityResourceData.xml +++ b/doc_classes/EntityResourceData.xml @@ -1,6 +1,7 @@ + The data for an [Entity]'s resource. Resource in this context is things like mana. diff --git a/doc_classes/EntitySkill.xml b/doc_classes/EntitySkill.xml index 6388cf9..01eb5bc 100644 --- a/doc_classes/EntitySkill.xml +++ b/doc_classes/EntitySkill.xml @@ -1,8 +1,10 @@ + Contains runtime skill data for an [Entity]. + Skills can be things like axes. You can change values for these using scripts. diff --git a/doc_classes/EntitySkillData.xml b/doc_classes/EntitySkillData.xml index 7fd436a..4e03e8f 100644 --- a/doc_classes/EntitySkillData.xml +++ b/doc_classes/EntitySkillData.xml @@ -1,8 +1,10 @@ + Contains skill data for an [Entity]. + Skills can be things like axes. diff --git a/doc_classes/EntitySpeciesData.xml b/doc_classes/EntitySpeciesData.xml index 5ca2ab4..3486cca 100644 --- a/doc_classes/EntitySpeciesData.xml +++ b/doc_classes/EntitySpeciesData.xml @@ -1,6 +1,7 @@ + Contains visual data for a species. diff --git a/doc_classes/EquipmentData.xml b/doc_classes/EquipmentData.xml index eeb61c2..c1f8262 100644 --- a/doc_classes/EquipmentData.xml +++ b/doc_classes/EquipmentData.xml @@ -1,6 +1,7 @@ + Stores equipment information. diff --git a/doc_classes/EquipmentDataEntry.xml b/doc_classes/EquipmentDataEntry.xml index 6c2f1b4..b0ac176 100644 --- a/doc_classes/EquipmentDataEntry.xml +++ b/doc_classes/EquipmentDataEntry.xml @@ -1,6 +1,7 @@ + Stores equipment information. diff --git a/doc_classes/InputProfile.xml b/doc_classes/InputProfile.xml index 7448729..13632ac 100644 --- a/doc_classes/InputProfile.xml +++ b/doc_classes/InputProfile.xml @@ -1,6 +1,7 @@ + Will store keybind information. [ProfileManager] related. diff --git a/doc_classes/InputProfileModifier.xml b/doc_classes/InputProfileModifier.xml index 26701ee..af7d6b4 100644 --- a/doc_classes/InputProfileModifier.xml +++ b/doc_classes/InputProfileModifier.xml @@ -1,6 +1,7 @@ + Stores data for bindable modifiers. Not yet implemented. diff --git a/doc_classes/InputProfileModifierEntry.xml b/doc_classes/InputProfileModifierEntry.xml index de5bbd7..712558b 100644 --- a/doc_classes/InputProfileModifierEntry.xml +++ b/doc_classes/InputProfileModifierEntry.xml @@ -1,6 +1,7 @@ + One key entry for a key. diff --git a/doc_classes/ItemEnums.xml b/doc_classes/ItemEnums.xml index 8dd7ee9..b49b7e8 100644 --- a/doc_classes/ItemEnums.xml +++ b/doc_classes/ItemEnums.xml @@ -1,6 +1,7 @@ + Contains lots of general-use enums for items. diff --git a/doc_classes/ItemInstance.xml b/doc_classes/ItemInstance.xml index a62488f..ffeab51 100644 --- a/doc_classes/ItemInstance.xml +++ b/doc_classes/ItemInstance.xml @@ -1,6 +1,7 @@ + Runtime information for an item. diff --git a/doc_classes/ItemStatModifier.xml b/doc_classes/ItemStatModifier.xml index 56f9d75..6910bc7 100644 --- a/doc_classes/ItemStatModifier.xml +++ b/doc_classes/ItemStatModifier.xml @@ -1,6 +1,7 @@ + Runtime item [Stat] modifier data. diff --git a/doc_classes/ItemTemplate.xml b/doc_classes/ItemTemplate.xml index a3d940e..c942434 100644 --- a/doc_classes/ItemTemplate.xml +++ b/doc_classes/ItemTemplate.xml @@ -1,6 +1,7 @@ + Contains item information. diff --git a/doc_classes/ItemTemplateStatModifier.xml b/doc_classes/ItemTemplateStatModifier.xml index 532fa29..d121e4f 100644 --- a/doc_classes/ItemTemplateStatModifier.xml +++ b/doc_classes/ItemTemplateStatModifier.xml @@ -1,6 +1,7 @@ + [Stat] modifier data for [ItemTemplates]. diff --git a/doc_classes/ItemVisual.xml b/doc_classes/ItemVisual.xml index 1e3ac04..45c9ad0 100644 --- a/doc_classes/ItemVisual.xml +++ b/doc_classes/ItemVisual.xml @@ -1,6 +1,7 @@ + contains an item's visual information. diff --git a/doc_classes/ItemVisualEntry.xml b/doc_classes/ItemVisualEntry.xml index 02e6ffd..71405b1 100644 --- a/doc_classes/ItemVisualEntry.xml +++ b/doc_classes/ItemVisualEntry.xml @@ -1,6 +1,7 @@ + One Entry for [ItemVisual]. diff --git a/doc_classes/LevelStatData.xml b/doc_classes/LevelStatData.xml index 07464c8..f2a1150 100644 --- a/doc_classes/LevelStatData.xml +++ b/doc_classes/LevelStatData.xml @@ -1,6 +1,7 @@ + Base class for storing level stat information for entities. diff --git a/doc_classes/LootDataBase.xml b/doc_classes/LootDataBase.xml index cf2f23f..eb8362b 100644 --- a/doc_classes/LootDataBase.xml +++ b/doc_classes/LootDataBase.xml @@ -1,6 +1,7 @@ + Base class for storing loot information for entities. diff --git a/doc_classes/LootDataContainter.xml b/doc_classes/LootDataContainter.xml index a7458a2..9dc17d3 100644 --- a/doc_classes/LootDataContainter.xml +++ b/doc_classes/LootDataContainter.xml @@ -1,6 +1,7 @@ + Container class for storing loot information for entities. diff --git a/doc_classes/LootDataItem.xml b/doc_classes/LootDataItem.xml index 7ec717c..f7575e3 100644 --- a/doc_classes/LootDataItem.xml +++ b/doc_classes/LootDataItem.xml @@ -1,6 +1,7 @@ + Contains one item's loot information for entities. diff --git a/doc_classes/ProfileManager.xml b/doc_classes/ProfileManager.xml index bb90bcf..2bb0542 100644 --- a/doc_classes/ProfileManager.xml +++ b/doc_classes/ProfileManager.xml @@ -1,6 +1,9 @@ + Stores, saves, loads per class profile data. + + Should be added as an autoload, or at least is should be in the scene before spawning entities. diff --git a/doc_classes/SimpleLevelStatData.xml b/doc_classes/SimpleLevelStatData.xml index 51bf6d6..cbf4989 100644 --- a/doc_classes/SimpleLevelStatData.xml +++ b/doc_classes/SimpleLevelStatData.xml @@ -1,6 +1,7 @@ + Simple per-level [Stat] information for entities. diff --git a/doc_classes/SkeletonModelEntry.xml b/doc_classes/SkeletonModelEntry.xml index b46b86b..966571f 100644 --- a/doc_classes/SkeletonModelEntry.xml +++ b/doc_classes/SkeletonModelEntry.xml @@ -1,6 +1,7 @@ + Runtime model item entry helper for skeletons. Used by [CharacterSkeleton3D] for example. diff --git a/doc_classes/SpeciesModelData.xml b/doc_classes/SpeciesModelData.xml index 827d675..1fa9bf9 100644 --- a/doc_classes/SpeciesModelData.xml +++ b/doc_classes/SpeciesModelData.xml @@ -1,6 +1,7 @@ + Stores model information for [EntitySpeciesData]. diff --git a/doc_classes/Spell.xml b/doc_classes/Spell.xml index de6d9ca..fd84c16 100644 --- a/doc_classes/Spell.xml +++ b/doc_classes/Spell.xml @@ -1,6 +1,9 @@ + Base Spell class. Contains data, and callbacks for spell scripts. Inherit from this to create spells with different functionality. + + Future: Standard funtionality will be implemented by default, you will only need to inherit for unique spell effects. diff --git a/doc_classes/SpellCastInfo.xml b/doc_classes/SpellCastInfo.xml index 60317c8..193077d 100644 --- a/doc_classes/SpellCastInfo.xml +++ b/doc_classes/SpellCastInfo.xml @@ -1,6 +1,7 @@ + Contains spell cast related information, for easy manipulation with auras, spell callbacks, etc. diff --git a/doc_classes/SpellCooldownManipulationData.xml b/doc_classes/SpellCooldownManipulationData.xml index c53c36e..9898813 100644 --- a/doc_classes/SpellCooldownManipulationData.xml +++ b/doc_classes/SpellCooldownManipulationData.xml @@ -1,6 +1,7 @@ + Contains data for easy spell cooldown manipulations. Not yet implemented. diff --git a/doc_classes/SpellDamageInfo.xml b/doc_classes/SpellDamageInfo.xml index 933bf1e..f45a7aa 100644 --- a/doc_classes/SpellDamageInfo.xml +++ b/doc_classes/SpellDamageInfo.xml @@ -1,6 +1,7 @@ + Contains damage information. It is passed around in callbacks, so things can modify values. (absorbs, immunities etc.) diff --git a/doc_classes/SpellEffectVisual.xml b/doc_classes/SpellEffectVisual.xml index 92e19e1..e45eaac 100644 --- a/doc_classes/SpellEffectVisual.xml +++ b/doc_classes/SpellEffectVisual.xml @@ -1,6 +1,7 @@ + Base class for storing spell visual information, like particle effects. diff --git a/doc_classes/SpellEffectVisualSimple.xml b/doc_classes/SpellEffectVisualSimple.xml index 52f145f..5225010 100644 --- a/doc_classes/SpellEffectVisualSimple.xml +++ b/doc_classes/SpellEffectVisualSimple.xml @@ -1,6 +1,7 @@ + Simple implementation od [SpellEfectVisual]. diff --git a/doc_classes/SpellEnums.xml b/doc_classes/SpellEnums.xml index 17bc948..0a20909 100644 --- a/doc_classes/SpellEnums.xml +++ b/doc_classes/SpellEnums.xml @@ -1,6 +1,7 @@ + Contains lots of general-use enums for spells. diff --git a/doc_classes/SpellHealInfo.xml b/doc_classes/SpellHealInfo.xml index a2ffa73..aeade88 100644 --- a/doc_classes/SpellHealInfo.xml +++ b/doc_classes/SpellHealInfo.xml @@ -1,6 +1,7 @@ + Contains heal information. It is passed around in callbacks, so things can modify values. (absorbs, immunities etc.) diff --git a/doc_classes/Stat.xml b/doc_classes/Stat.xml index c7f35fc..9e5c5b1 100644 --- a/doc_classes/Stat.xml +++ b/doc_classes/Stat.xml @@ -1,6 +1,7 @@ + Contains the runtime data of a stat. diff --git a/doc_classes/StatData.xml b/doc_classes/StatData.xml index 1639cd2..433748b 100644 --- a/doc_classes/StatData.xml +++ b/doc_classes/StatData.xml @@ -1,6 +1,7 @@ + Contains a [Stat]'s data. diff --git a/doc_classes/StatDataEntry.xml b/doc_classes/StatDataEntry.xml index 7cec674..d3680f5 100644 --- a/doc_classes/StatDataEntry.xml +++ b/doc_classes/StatDataEntry.xml @@ -1,6 +1,7 @@ + One entry for [StatData]. diff --git a/doc_classes/StatModifier.xml b/doc_classes/StatModifier.xml index 9cc3392..1f10ac0 100644 --- a/doc_classes/StatModifier.xml +++ b/doc_classes/StatModifier.xml @@ -1,6 +1,7 @@ + Class for holding the runtime information for a stat modifier. diff --git a/doc_classes/TalentRowData.xml b/doc_classes/TalentRowData.xml index 0f87c8f..e41d8f4 100644 --- a/doc_classes/TalentRowData.xml +++ b/doc_classes/TalentRowData.xml @@ -1,6 +1,7 @@ + Contains one row of for a talent specialization. diff --git a/doc_classes/UnitFrame.xml b/doc_classes/UnitFrame.xml index 4efc174..6e3c6ab 100644 --- a/doc_classes/UnitFrame.xml +++ b/doc_classes/UnitFrame.xml @@ -1,6 +1,7 @@ + Unitframe's base class. Will probably be removed. diff --git a/doc_classes/VendorItemData.xml b/doc_classes/VendorItemData.xml index 05a8e8c..19480dc 100644 --- a/doc_classes/VendorItemData.xml +++ b/doc_classes/VendorItemData.xml @@ -1,6 +1,7 @@ + Contains vendor item data for an [Entity]/[EntityData]. diff --git a/doc_classes/VendorItemDataEntry.xml b/doc_classes/VendorItemDataEntry.xml index 50ab707..77a3634 100644 --- a/doc_classes/VendorItemDataEntry.xml +++ b/doc_classes/VendorItemDataEntry.xml @@ -1,6 +1,7 @@ + Contains one entry for a [VendorItemData]. diff --git a/doc_classes/WorldSpell.xml b/doc_classes/WorldSpell.xml index 93357e4..40bbca1 100644 --- a/doc_classes/WorldSpell.xml +++ b/doc_classes/WorldSpell.xml @@ -1,6 +1,7 @@ + Represents a [Spell] projectile in the world. diff --git a/doc_classes/WorldSpellData.xml b/doc_classes/WorldSpellData.xml index d3a0c88..691f336 100644 --- a/doc_classes/WorldSpellData.xml +++ b/doc_classes/WorldSpellData.xml @@ -1,6 +1,7 @@ + Stores the data for a [WorldSpell]. diff --git a/doc_classes/XPData.xml b/doc_classes/XPData.xml index 268900f..f4eff41 100644 --- a/doc_classes/XPData.xml +++ b/doc_classes/XPData.xml @@ -1,6 +1,7 @@ + Contains the XP values required to level up for entities. diff --git a/meshes/editor_import_collada_mdr.cpp b/meshes/editor_import_collada_mdr.cpp new file mode 100644 index 0000000..cf247c7 --- /dev/null +++ b/meshes/editor_import_collada_mdr.cpp @@ -0,0 +1,142 @@ +#include "editor_import_collada_mdr.h" + +String EditorImportColladaMdr::get_importer_name() const { + return "collada_mdr"; +} + +String EditorImportColladaMdr::get_visible_name() const { + return "Collada MDR"; +} + +void EditorImportColladaMdr::get_recognized_extensions(List *p_extensions) const { + p_extensions->push_back("dae"); +} + +String EditorImportColladaMdr::get_save_extension() const { + return "res"; +} + +String EditorImportColladaMdr::get_resource_type() const { + return "MeshDataResource"; +} + +float EditorImportColladaMdr::get_priority() const { + return 1.0; +} + +int EditorImportColladaMdr::get_preset_count() const { + return 0; +} + +String EditorImportColladaMdr::get_preset_name(int p_idx) const { + return ""; +} + +void EditorImportColladaMdr::get_import_options(List *r_options, int p_preset) const { + r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "offset"), Vector3(0, 0, 0))); + r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "rotation"), Vector3(0, 0, -(3.141592 / 2.0)))); + r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "scale"), Vector3(0.011, 0.011, 0.011))); +} + +bool EditorImportColladaMdr::get_option_visibility(const String &p_option, const Map &p_options) const { + return true; +} + +Error EditorImportColladaMdr::import(const String &p_source_file, const String &p_save_path, const Map &p_options, List *r_platform_variants, List *r_gen_files, Variant *r_metadata) { + Node *n = _importer->import_scene(p_source_file, 0, 15); + + if (n == NULL) { + n->queue_delete(); + return Error::ERR_PARSE_ERROR; + } + + for (int i = 0; i < n->get_child_count(); ++i) { + Node *c = n->get_child(i); + print_error(String::num(i)); + + if (c == NULL) { + continue; + } + + if (Object::cast_to(c)) { + MeshInstance *mi = Object::cast_to(c); + + Ref mesh = mi->get_mesh(); + + if (mesh.is_valid()) { + Ref mdr; + mdr.instance(); + + Array arrays = mesh->surface_get_arrays(0); + + mdr->set_array(apply_transforms(arrays, p_options)); + + n->queue_delete(); + + return ResourceSaver::save(p_save_path + "." + get_save_extension(), mdr); + } + } + } + + n->queue_delete(); + return Error::ERR_PARSE_ERROR; +} + + +Array EditorImportColladaMdr::apply_transforms(Array &array, const Map &p_options) { + Vector3 offset = p_options["offset"]; + Vector3 rotation = p_options["rotation"]; + Vector3 scale = p_options["scale"]; + + Transform transform = Transform(Basis(rotation).scaled(scale), offset); + + Array verts = array.get(Mesh::ARRAY_VERTEX); + + for (int i = 0; i < verts.size(); ++i) { + Vector3 vert = verts[i]; + + vert = transform.xform(vert); + + verts.set(i, (vert)); + } + + Array normals = array.get(Mesh::ARRAY_NORMAL); + + for (int i = 0; i < normals.size(); ++i) { + Vector3 normal = normals[i]; + + normal = transform.basis.xform(normal); + + normals.set(i, normal); + } + + Array tangents = array.get(Mesh::ARRAY_TANGENT); + + if (tangents.size() == verts.size() * 4) { + + for (int i = 0; i < verts.size(); ++i) { + + Plane p(tangents[i * 4 + 0], tangents[i * 4 + 1], tangents[i * 4 + 2], tangents[i * 4 + 3]); + + Vector3 tangent = p.normal; + + tangent = transform.basis.xform(tangent); + + tangents.set(i, tangent); + } + } + + array.set(Mesh::ARRAY_VERTEX, verts); + array.set(Mesh::ARRAY_NORMAL, normals); + array.set(Mesh::ARRAY_TANGENT, tangents); + + return array; +} + +EditorImportColladaMdr::EditorImportColladaMdr() { + _importer.instance(); +} + +EditorImportColladaMdr::~EditorImportColladaMdr() { + _importer.unref(); +} diff --git a/meshes/editor_import_collada_mdr.h b/meshes/editor_import_collada_mdr.h new file mode 100644 index 0000000..86ab48f --- /dev/null +++ b/meshes/editor_import_collada_mdr.h @@ -0,0 +1,47 @@ + +#ifndef EDITOR_IMPORT_COLLADA_MDR +#define EDITOR_IMPORT_COLLADA_MDR + +#include "editor/import/editor_import_plugin.h" +#include "core/ustring.h" +#include "scene/main/node.h" +#include "scene/resources/mesh.h" +#include "scene/3d/mesh_instance.h" +#include "core/io/resource_saver.h" +#include "core/array.h" +#include "core/math/basis.h" +#include "core/math/transform.h" + +#include "mesh_data_resource.h" +#include "editor/import/editor_import_collada.h" + +class EditorImportColladaMdr : public EditorImportPlugin { + + GDCLASS(EditorImportColladaMdr, EditorImportPlugin); + +public: + virtual String get_importer_name() const; + virtual String get_visible_name() const; + virtual void get_recognized_extensions(List *p_extensions) const; + virtual String get_save_extension() const; + virtual String get_resource_type() const; + virtual float get_priority() const; + + virtual int get_preset_count() const; + virtual String get_preset_name(int p_idx) const; + + virtual void get_import_options(List *r_options, int p_preset = 0) const; + virtual bool get_option_visibility(const String &p_option, const Map &p_options) const; + + virtual Error import(const String &p_source_file, const String &p_save_path, const Map &p_options, List *r_platform_variants, List *r_gen_files = NULL, Variant *r_metadata = NULL); + + Array apply_transforms(Array &array, const Map &p_options); + + EditorImportColladaMdr(); + ~EditorImportColladaMdr(); + +private: + Ref _importer; +}; + +#endif diff --git a/meshes/editor_plugin_collada_mdr.cpp b/meshes/editor_plugin_collada_mdr.cpp new file mode 100644 index 0000000..50ace10 --- /dev/null +++ b/meshes/editor_plugin_collada_mdr.cpp @@ -0,0 +1,22 @@ +#include "editor_plugin_collada_mdr.h" + +void EditorPluginColladaMdr::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + _importer.instance(); + + add_import_plugin(_importer); + + break; + case NOTIFICATION_EXIT_TREE: + remove_import_plugin(_importer); + + _importer.unref(); + + break; + } +} + +EditorPluginColladaMdr::EditorPluginColladaMdr(EditorNode *node) { + _node = node; +} diff --git a/meshes/editor_plugin_collada_mdr.h b/meshes/editor_plugin_collada_mdr.h new file mode 100644 index 0000000..4aff12e --- /dev/null +++ b/meshes/editor_plugin_collada_mdr.h @@ -0,0 +1,25 @@ + +#ifndef EDITOR_PLUGIN_COLLADA_MDR +#define EDITOR_PLUGIN_COLLADA_MDR + +#include "editor/editor_plugin.h" +#include "core/ustring.h" + +#include "editor_import_collada_mdr.h" + +class EditorPluginColladaMdr : public EditorPlugin { + + GDCLASS(EditorPluginColladaMdr, EditorPlugin); + +public: + EditorPluginColladaMdr(EditorNode *node); + +protected: + void _notification(int p_what); + +private: + EditorNode *_node; + Ref _importer; +}; + +#endif diff --git a/meshes/mesh_data_resource.cpp b/meshes/mesh_data_resource.cpp new file mode 100644 index 0000000..81a1ea3 --- /dev/null +++ b/meshes/mesh_data_resource.cpp @@ -0,0 +1,20 @@ +#include "mesh_data_resource.h" + +Array MeshDataResource::get_array() { + return _arrays; +} +void MeshDataResource::set_array(const Array &p_arrays) { + _arrays.clear(); + + _arrays = p_arrays.duplicate(true); +} + +MeshDataResource::MeshDataResource() { + +} + +void MeshDataResource::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_array"), &MeshDataResource::get_array); + ClassDB::bind_method(D_METHOD("set_array", "array"), &MeshDataResource::set_array); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "array"), "set_array", "get_array"); +} diff --git a/meshes/mesh_data_resource.h b/meshes/mesh_data_resource.h new file mode 100644 index 0000000..cd6194b --- /dev/null +++ b/meshes/mesh_data_resource.h @@ -0,0 +1,26 @@ +#ifndef MESH_DATA_REOURCE_H +#define MESH_DATA_REOURCE_H + +#include "core/resource.h" +#include "core/array.h" +#include "scene/resources/mesh.h" + +class MeshDataResource : public Resource { + + GDCLASS(MeshDataResource, Resource); + RES_BASE_EXTENSION("mdres"); + +public: + Array get_array(); + void set_array(const Array &p_arrays); + + MeshDataResource(); + +protected: + static void _bind_methods(); + +private: + Array _arrays; +}; + +#endif