Atherys / AtherysRPG

An RPG plugin created for the A'therys Horizons server
GNU General Public License v3.0
3 stars 3 forks source link

Configurable Skill Descriptions & Placeholders #108

Open cicetil opened 2 years ago

cicetil commented 2 years ago

Currently all skill descriptions are hard coded into each skill. This makes it less than ideal to frequently edit and adjust them for the average user. In order to allow much easier editing of skill descriptions, there should be a way to configure them within the skill graph config. I think a potential solution for this is to include an inherent description field on skills, much like skill id, energy cost and cooldown is.

Because descriptions are not static and can display changing values, the configurable descriptions also need to be dynamic and allow for placeholders. Placeholders can be written as %property% within descriptions where property is the name of the specific property. The placeholder will display as that property's value similar to how it's currently coded into the skill.

Example:

    "f884f8d6-2f65-4a41-8a42-a1375c8dab5d": {
      "skill-id": "shield",
      "description": "Raise your guard, gaining a shield which blocks up to %amplifier% damage for %time% seconds.",
      "cost": "20",
      "cooldown": "12000*(100/(100+SOURCE_CDR))",
      "properties": {
        "amplifier": "((10+0.4*SOURCE_CON)-1)",
        "time": "5000"
      }
    },
LJNIC commented 2 years ago

This gets a little more complicated when considering how different values get rendered. For example, the conversion of 5000 to 5 seconds. Will have to think about it.