Open LordMidas opened 2 months ago
I like the variant of passing an empty string as the first argument, when we want the name to be fetched dynamically.
The other variants seem very unwieldy because of their length.
I don't see how scripts/skills/
is needed in that path, when the Skill+
prefix already specifies where this script is roughly located.
Sometimes you want to refer to a skill in a hyperlink to a nested tooltip e.g.
[Stunned|Skill+stunned_effect]
. However, this requires you to manually type the name of the skill as the text i.e.Stunned
. If a mod or something changes the name of the actualstunned_effect
to something likeStupefied
then the hyperlink text doesn't know about this.A proposal to make it possible to dynamically generate the text could be to add another flag for parseString such as
[Obj/
. Any hyperlinks starting from this inside parseString will be parsed with a special system:Obj/
starter tag tells the system that there is some script defined ahead.Name
tells which field of the script we want.instance.m[field]
will be accessed and set as the text value wherefield
is what's given in point 2.Perhaps this can be made even simpler for frequently used items:
We pass an empty string as text and instead of
Skill
we useSkillName
because Name is probably the most commonly accessed field for this purpose.This also brings me to a second point: Instead of using only filenames perhaps we should require entire script paths in the ExtraData. Because the curent system of only filename necessitates that two file names never match in the entire
skills/
folder. Perhaps this is an unnecessary restriction and we can instead do:[Stunned|Skill+scripts/skills/effects/stunned_effect]
and that's fine?In this case the above problem can be solved as: