From 0e8e2d346384540ac192b2a6fcefcd5369ee3f7a Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 27 Dec 2019 14:36:55 +0100 Subject: [PATCH] Split the enums, and globals into smaller doc pages. Also added Pets, and networking pages. Finished EntityEnums. --- docs/entities/networking.rst | 10 ++ docs/entities/pets.rst | 18 +++ docs/general/enums.rst | 8 -- docs/general/enums/entity_enums.rst | 152 +++++++++++++++++++++++ docs/general/enums/index.rst | 13 ++ docs/general/enums/item_enums.rst | 32 +++++ docs/general/enums/spell_enums.rst | 28 +++++ docs/general/globals.rst | 10 -- docs/general/globals/data_manager.rst | 9 ++ docs/general/globals/globals.rst | 16 +++ docs/general/globals/profile_manager.rst | 8 ++ docs/index.rst | 6 +- 12 files changed, 290 insertions(+), 20 deletions(-) create mode 100644 docs/entities/networking.rst create mode 100644 docs/entities/pets.rst delete mode 100644 docs/general/enums.rst create mode 100644 docs/general/enums/entity_enums.rst create mode 100644 docs/general/enums/index.rst create mode 100644 docs/general/enums/item_enums.rst create mode 100644 docs/general/enums/spell_enums.rst delete mode 100644 docs/general/globals.rst create mode 100644 docs/general/globals/data_manager.rst create mode 100644 docs/general/globals/globals.rst create mode 100644 docs/general/globals/profile_manager.rst diff --git a/docs/entities/networking.rst b/docs/entities/networking.rst new file mode 100644 index 0000000..ea9cf77 --- /dev/null +++ b/docs/entities/networking.rst @@ -0,0 +1,10 @@ +.. _doc_entities_networking: + +Networking +========== + +warnings + +architecture + conventions + +vrpc + visibility \ No newline at end of file diff --git a/docs/entities/pets.rst b/docs/entities/pets.rst new file mode 100644 index 0000000..4071a6f --- /dev/null +++ b/docs/entities/pets.rst @@ -0,0 +1,18 @@ +.. _doc_entities_pets: + +Pets +==== + +warn not yet implemented + +how it will work + +add_pet -> setup + +pet talents + +need to make ui + +mind control + + diff --git a/docs/general/enums.rst b/docs/general/enums.rst deleted file mode 100644 index 0de8800..0000000 --- a/docs/general/enums.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _doc_general_enums: - -Enums -===== - -Big Enums - -Ent ... \ No newline at end of file diff --git a/docs/general/enums/entity_enums.rst b/docs/general/enums/entity_enums.rst new file mode 100644 index 0000000..74ce781 --- /dev/null +++ b/docs/general/enums/entity_enums.rst @@ -0,0 +1,152 @@ +.. _doc_general_entity_enums: + +:ref:`Entity Enums ` +======================================= + +Contains common Entity-related enums. + +It has an unnamed enum containing the following values: + +MAX_LEVEL = 50, +BASE_XP = 50, +GENDER_COUNT = 2 + +Unfortunately, to chenge these, you will need to recompile the engine. +This will be fixed later. + +:ref:`EntityType ` +----------------------------------------------- + +Entity type, like beast, creature, object, humanoind, etc. + +See :ref:`Entity.sentity_flags `, and :ref:`Entity.centity_flags `. + + +:ref:`EntityController ` +----------------------------------------------------------- + +Is the entity controlled by a player, or an ai. Will be used for pets, can be used for +narrative things aswell, also mind control like effects. + +See :ref:`Entity.sentity_flags `, and :ref:`Entity.centity_flags `. + + +:ref:`EntityFlags ` +------------------------------------------------- + +Contains generic flags, like untargetable, hidden, interactable, etc. + +See :ref:`Entity.sentity_flags `, and +:ref:`Entity.centity_flags `. + + +:ref:`EntityStateTypeFlags ` +------------------------------------------------------------------- + +Contains flags for effects. For example Stun, Root, Fear etc. Use these to check if +an entity has a particular effect. + +.. note:: Don't set flags directly with the :ref:`Entity.sentity_flags ` + property, because the flags are calculated (refcount). Seen the (EntityStateTypeIndexes) + section below. + +This is how you can check serverside if an entity is stunned: + +.. code-block:: gdscript + + if entity.gets_state() & EntityEnums.ENTITY_STATE_TYPE_FLAG_STUN != 0: + print('stunned') + +See :ref:`Entity.sentity_flags `, +and :ref:`Entity.centity_flags `. + +:ref:`EntityStateTypeIndexes ` +----------------------------------------------------------------------- + +For ease of use, Entity refcounts states, this is the enum, used to do it. When you want to add a state to an +entity, you need to use See :ref:`Entity.sadd_state_ref() `, +when you want to remove states use :ref:`Entity.sremove_state_ref() `. + +.. note:: This in only available serverside. + +For exmaple let's add a stun to an Entity: + +.. code-block:: gdscript + + entity.sadd_state_ref(EntityEnums.ENTITY_STATE_TYPE_INDEX_STUN) + +Let's remove it: + +.. code-block:: gdscript + + entity.sremove_state_ref(EntityEnums.ENTITY_STATE_TYPE_INDEX_STUN) + +Since these states are refcounted, everything will work, even if you have multiple sources stunning an entity. + +.. note:: add, and remove_ref will recalculate, and set the :ref:`Entity.sentity_flags ` + whenever needed. Also note, that :ref:`Entity.sentity_flags ` will + syncronize itself over the network, into :ref:`Entity.centity_flags `. + +:ref:`EntityImmunityFlags ` +----------------------------------------------------------------- + +You can set entity immunities with this. + +See :ref:`Entity.simmunity_flags `. (Serverside only). + +Let's make an entity immune to stun, and root: + +.. code-block:: gdscript + + entity.simmunity_flags = EntityEnums.ENTITY_IMMUNITY_FLAG_STUN | ENTITY_IMMUNITY_FLAG_ROOT + +:ref:`CharacterSkeletonPoints ` +------------------------------------------------------------------------- + +Contains all the points/bones of the standard skeleton. With the current implementation, these are the bones, +that you can apply equipments to, add effects to, etc. + +Of course it's up to each skeleton setup, to determine what to implement, and how to handle these in the end, +so even though this has it's limitations, there is still a lot of flexility. For example if you create a beast +skeleton, that class can just ignore any equipment's visuals. + +.. note:: I do have some issues with this solution, because you will need to change, and recompile to add your own bones, + I'm thinking about a better solution. The main reason it's not that easy, is because this gives huge amounts + of convenience when creating equipment for example. You can check :ref:`ItemVisual ` to see why. + +:ref:`AIStates ` +------------------------------------------- + +The run of the mill AI FSM states. + +:ref:`PetStates ` +--------------------------------------------- + +Will be merged into AIStates, because it will make pet support a lot simpler. + +:ref:`EntityInteractionType ` +--------------------------------------------------------------------- + +How an entity should interact when an another one wants to :ref:`interact ` with it. + +Speak, Loot, Use, etc. + +:ref:`EntityClassPlaystyleType ` +--------------------------------------------------------------------------- + +For ai scripts. So they can tell whether a class is ranged or not. + +:ref:`EntityGender ` +--------------------------------------------------- + +Well. gender. It's an enum, because it saves work on bindings. Look at the c++ code of +:ref:`ItemVisualEntry ` if you want to see why. + +:ref:`EntityWindows ` +----------------------------------------------------- + +Allows the server to open different windows on the client. For example loot window, interaction windows, etc. + +.. note:: The bindings in entity for this are using ints, so you can implement you own windows really easily. + The ide is similar to NOTIFICATION-s in Node, and derived types. + diff --git a/docs/general/enums/index.rst b/docs/general/enums/index.rst new file mode 100644 index 0000000..0c8d501 --- /dev/null +++ b/docs/general/enums/index.rst @@ -0,0 +1,13 @@ +.. _doc_general_enums: + +Enums +===== + +.. toctree:: + :maxdepth: 1 + :caption: Enums + :name: sec-enums + + entity_enums + spell_enums + item_enums \ No newline at end of file diff --git a/docs/general/enums/item_enums.rst b/docs/general/enums/item_enums.rst new file mode 100644 index 0000000..63ee465 --- /dev/null +++ b/docs/general/enums/item_enums.rst @@ -0,0 +1,32 @@ +.. _doc_general_item_enums: + +Item Enums +========== + +Contains Entity-related enums. + +ItemRarity +---------- + +ItemRarityFlag +-------------- + +ItemType +-------- + +ItemSubtype +----------- + +ItemSubSubtype +-------------- + +EquipSlots +---------- + +ArmorType +--------- + +EntityTextureLayers +------------------- + + diff --git a/docs/general/enums/spell_enums.rst b/docs/general/enums/spell_enums.rst new file mode 100644 index 0000000..02f1028 --- /dev/null +++ b/docs/general/enums/spell_enums.rst @@ -0,0 +1,28 @@ +.. _doc_general_spell_enums: + +Spell Enums +=========== + +DamageType +---------- + +SpellCategory +------------- + +SpellType +--------- + +DiminishingReturnCategory +------------------------- + +TriggerEvents +------------- + +AuraType +-------- + +ColliderType +------------ + +TargetType +---------- diff --git a/docs/general/globals.rst b/docs/general/globals.rst deleted file mode 100644 index 9efde1d..0000000 --- a/docs/general/globals.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _doc_general_globals: - -Globals -======= - -Autoloads - -Tell about them -Data -ProfileManager diff --git a/docs/general/globals/data_manager.rst b/docs/general/globals/data_manager.rst new file mode 100644 index 0000000..7b455f1 --- /dev/null +++ b/docs/general/globals/data_manager.rst @@ -0,0 +1,9 @@ +.. _doc_general_data_manager: + +Data Manager +============ + + +Tell about them +Data +ProfileManager diff --git a/docs/general/globals/globals.rst b/docs/general/globals/globals.rst new file mode 100644 index 0000000..57874c4 --- /dev/null +++ b/docs/general/globals/globals.rst @@ -0,0 +1,16 @@ +.. _doc_general_globals: + +Globals +======= + +Autoloads + +Tell about them + +.. toctree:: + :maxdepth: 1 + :caption: Globals + :name: sec-globals-cat + + data_manager + profile_manager diff --git a/docs/general/globals/profile_manager.rst b/docs/general/globals/profile_manager.rst new file mode 100644 index 0000000..74bb397 --- /dev/null +++ b/docs/general/globals/profile_manager.rst @@ -0,0 +1,8 @@ +.. _doc_general_profile_manager: + +Profile Manager +=============== + +Tell about them +Data +ProfileManager diff --git a/docs/index.rst b/docs/index.rst index ffeff75..4a47476 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,8 +30,8 @@ Indices and tables :caption: General :name: sec-general - general/globals - general/enums + general/globals/globals + general/enums/index .. toctree:: :maxdepth: 1 @@ -52,6 +52,8 @@ Indices and tables entities/crafting entities/skeleton entities/ai + entities/pets + entities/networking entities/other .. toctree::