Open LudwigVonChesterfield opened 4 years ago
For another example, a "Cultist" character from a mod, and effects.txt that looks like this:
"EFFECT_CULT_WORD"
{
invisible = True
}
"EFFECT_CULT_WORD_FLESH" inherit "EFFECT_CULT_WORD"
{
name = "hself"
}
"EFFECT_CULT_WORD_HEAL" inherit "EFFECT_CULT_WORD"
{
name = "leah"
}
"EFFECT_CULT_WORD_HURT" inherit "EFFECT_CULT_WORD"
{
name = "truh"
}
The cultists has a spell that creates a "Rune" creature(Immobile, low def, 0 attack)
A cultists has spells that apply above effects to this rune
And cultist has a spell that does something among the lines of:
"DO_SORCERY"
{
name = "sorcery"
description = "When near a rune with words do some magic stuff"
effect = {
FirstSuccesful {
FilterLasting "EFFECT_CULT_WORD_FLESH" FilterLasting "EFFECT_CULT_WORD_HEAL" Heal FLESH 10
FilterLasting "EFFECT_CULT_WORD_FLESH" FilterLasting "EFFECT_CULT_WORD_HURT" Damage 10
}
}
}
Essentially, implementing "combos".
Moddable fluff effect could be HatesDemons and demons could be modded to have a HatedByEffect = HateDemons. This would achieve a previous issue where i wanted that effect. The existing effects would not be moddable though.
The existing lasting effects could have a "fluffy" part (description, default duration...) and just the fluffy part could be moddable. So you could mod the description for bleeding without changing its behaviour.
Existing Lasting effects should and could be employed by the "fluffy" ones to actually "interact" with the creature(see on_tick, on_add, on_remove). Lasting effects could/should be removed to have those attributes to(that would allow to modify/remove a lot of on_tick checks)
Pretty sure custom lasting effects are already moddable now. Probably can close.
Allow a modder to create "custom" lasting effects in effects.txt, these would consist of:
Name - name of the effect Description - description of effect
All of the below have "default" values: Invisible = FALSE // whether this effect should be visible in effects tab Default_duration = 100
All of the below are optional: Effect on_tick - an effect they do on mob tick Effect on_add - an effect they would trigger on being added to the creature Effect on_remove - an effect they would trigger on being removed from the creature
Also would benefit from implementing #1551 but with search for these fluff effects.
Usages: quite unlimited, if used with #1551
A player could create effects to mark "targets", create "combo spells"(have multiple effects, and a spell that uses FilterLasting EFFECT_1 FilterLasting EFFECT_2 to cast a stronger spell via a combination of those two).