From c3af13367f4b29faa9aaa969552fb19466072f23 Mon Sep 17 00:00:00 2001 From: Mimi Momo Date: Sat, 14 Jan 2023 12:35:19 -0600 Subject: [PATCH] gdd terms --- src/blessfrey-gdd/skill | 49 ++++++----------------------- src/blessfrey-gdd/story | 51 +++++++++++++++++++++++++++++++ src/blessfrey-gdd/terms | 17 ++++++----- src/names | 68 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 138 insertions(+), 47 deletions(-) create mode 100644 src/names diff --git a/src/blessfrey-gdd/skill b/src/blessfrey-gdd/skill index e9ffc19..c4be3ae 100644 --- a/src/blessfrey-gdd/skill +++ b/src/blessfrey-gdd/skill @@ -1,46 +1,20 @@

description

-

Skills are individual powers usable by entities. They can take 8 at a time on their skillbar. They can be used for combat, puzzle-solving, and roleplaying. They are acquired through exploring.

+

Skills are individual powers usable by entities. They can take 8 at a time on their skillbar. They can be used for combat, puzzle-solving, and roleplaying. They are acquired through exploring.


structure

-

A skill is defined as a JSON file housed at res://res/text/skills/. Its filename is its base id, and all data and keywords are expressed through JSON.

-
-

A SkillEquip contains a skill's base id. SkillEquips are housed at Skillbar/Skill SlotX's skill variable and the entity's arsenal.

-
-

A SkillEquip contains a DMV. A DMV handles the flow of the skill and collects skill data, including its tags.

+


logic

-

Every skill is built from a JSON dictionary, and its functionality is built from a list of nested dictionaries.

-
-

At ready, the SkillBase singleton uses the JSONreader singleton to convert all the JSON files into an array of skill dictionaries, accessed using the desired skill's base id.

-
-

A character's skill library's skill_library holds an array of all the base_ids for the skills he knows. When a skill is learned, it is added to the skill_library and passes the skill and the character through the MessageBus to the LearnSkill event handler.

-
-

The LearnSkill handler instances a SkillEquip and adds it to the character. The character entity appends the SkillEquip to its skill_arsenal and adds it as a child to the SkillBase. If the character has an empty slot on his skillbar, the skill is equipped onto the character. The character's Skillbar/Skill SlotX's skill variable holds the SkillEquip.

-
-

The character decides to use a skill. The character find_skill(slot index) returns the SkillEquip, whose use method takes the skill's dealer and taker.

-
-

If it doesn't fail, the SkillEquip creates a cooldown timer and sets cooling to true and sets up and enters its DMV.

-
-

The DMV publishes 'skill_used' along with {id,dealer,taker}. Then it runs the activation time, consumes the skill cost, adds its tags, then registers the skill.

-
-

Skill registry at the DMV involves registering each keyword and its activation requisites.

-
-

If the keyword is an 'if', it parses the keyword's conditional statement, it registers the accompanying "then" keyword. Ifs are one-time conditionals, so if it's not true at registry, the whole keyword chunk misses its chance.

-
-

If the keyword is 'when', it generates a 'when' event handler from res://skills/keyword/when/when.tscn and connects the 'happened' signal to registering the accompanying then keyword. Tags are added for the 'when', support for removal by tag is set up, and the 'when' is entered.

-
-

'When' has a 'repeat', so it can trigger as many times as desired. Once is the assumed 'repeat', and -1 is an infinite repeat. The 'when' subscribes to its signal and provides itself as the handler. If it's conditional signal is just 'duration', a timer is set up and publishes to 'duration'. When the desired signal triggers, it verifies whether the full conditions of the 'when' are satisfied and should emit a 'happened' (and the DMV should register 'then'). If 'repeat' - 1 isn't 0, it goes around again.

-
-

If the keyword is 'expire', it frees the relevant keyword.

-
-

If the keyword is 'refresh', it resets the relevant keyword.

-
-

If the keyword is just a 'keyword', it instances the relevant keyword object, tags it, sets up removal by tag, adds it as a child, then enters it, doing whatever special code the keyword does.

+

end

+

A skill naturally ends after completion. After all the keywords are complete, the skill will complete.

+
+

A skill prematurely ends if it is removed (the remove keyword targets applied skills) or reapplied (a duplicate skill ends earlier instances of the skill then is applied normally).

+
+

When a skill ends for any reason, all keywords must also end.


challenges/known issues

-

Skill stuff -> character level but maybe should be entity level

+



-

I think every character has a skill equip for every known skill in his arsenal. Is that too many? Should one copy be on the SkillBase?


works for...