Skill Trees ~ Environment interactions based on skill characteristics - uchicago-cs/chiventure GitHub Wiki

Many games have skills with unique or common characteristics that can be used and/or trigger interactions with the environment; for example, certain types of combat spells being able to destroy or change certain compatible items, certain types skills (like fire) being able to change the environment (lighting torches), or certain areas that are locked without certain skills (and the absence or presence of certain skills may also trigger hints and/or NPC interactions).

This wiki page documents examples of the above functionality in video games, how this can be achieved in Chiventure, and what implementation is missing and can be taken on by future teams.

In Other Video Games

Skill Type Interactions with Environment

In many video games, different types of skills (fire, light, water, etc.) can interact with compatible objects or environments. A great example is God of War, which has several hidden collectibles and areas that can only be revealed once a user shoots a light arrow into a light crystal; burns away bramble with a fire-type weapon; freezes an object with an ice-type weapon; etc. Other examples include various RPGs like Skyrim in which fire spells can alight puddles of oil or explode canisters.

Skills Triggering Changes / Prompts

In many video games, the possession or absence of certain skills will change the environment or prompt the player. For example, in God of War and Tomb Raider, many areas are shown to the user throughout the game that cannot be accessed until the user acquires certain skills and backtrack to those areas. Moreover, attempting to use incompatible skills on an object will prompt hints and/or NPCs to notify the user that they don't have the skills necessary.

In Chiventure

After some research and thought, I believe the above functionality can be achieved in Chiventure by adding an enum or a tag into the skill struct that denotes the type of the skill, which can then correspond with relevant objects of the same type. Then, equality checks can be used to determine if, at the point of the skill's activation, the skill's tag matches the object's tag, and yield a result if true. Moreover, if the result is false, a prompt or NPC interaction can be triggered to hint at the player that they don't have the required skills. However, this may not be the most scaleable method, as it requires modifying each individual skill and object necessary and adding the relevant type.

Alternatively, I believe the type can be added as a string to the function that the skill points to. Right now, skill functions are parsed by WDL to create the relevant effects in the environment. As such, this would require additional WDL functionality to look for skill types in the skill functions and match them with environmental objects and areas. This would most likely then be less of a skilltrees issue and more of a WDL/WDL++ issue. However, this would probably be a much more scaleable implementation, as it would only require a parsing function capable of understanding the skill type and direct the effects to the relevant object / environment.