I've working on adding new effects to the QoT Mod I've been developing. The final (successful) method took me a while to figure out, so I thought I'd post an example here so others wouldn't have to waste time replicating my failed methods. The method was exactly as DeadMG and others described in the thread on Hooking in Demigod. However I find that an actual example goes a long way towards understanding.
The effect: A new color for Bramble Shield
Download the mod at www.box.net
The key problem I was having was finding the correct syntax for the Effect Template. The following is the contents of the modded \lua\EffectTemplates.lua
Code: c++
- do
- EffectTemplates.Buff['Bramble02'] = {
- Small = {
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_01_rings_h_emit.bp',
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_01_rings_l_emit.bp',
- },
- Medium = {
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_03_medrings_h_emit.bp',
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_03_medrings_l_emit.bp',
- },
- Large = {
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_05_lrgrings_h_emit.bp',
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_05_lrgrings_l_emit.bp',
- },
- Huge = {
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_07_hgerings_h_emit.bp',
- '/mods/EffectExample/hook/effects/emitters/buffs/bramble/b_brm2_07_hgerings_l_emit.bp',
- },
- }
- end
Again it was fairly straightforward from the previous instructions, but exactly how to do it escaped me for quite some time.