Jump to content

Adding a new spell token


johnmedgla

Recommended Posts

At the bottom of spells.txt, where the tokens are linked to blueprints, I copied the % fire damage token used in a High Elf buff and modified it in an effort to create a similar effect for Poison damage. It doesn't crash, but neither does it work - I'm curious if there's something I'm overlooking, or if these effects are hard coded away somewhere in addition to linked in the Token list at the foot of spells.txt.

 

What I've added:

 

mgr.addTokenBonus( {"et_damage_poison_rel", 135 })  -- 135 = bb_bonusdamage_poi

 

135 in blueprint.txt is:

 

newBonus = {
--  name = "bb_bonusdamage_poi",
 rating = 0,
 basedonskill = "SKILL_INVALID",
 type = "BONUS_DAMAGE_ANY_REL",
 spez = "DMG_POISON",
 spez2 = "",
 usagebits = 65535,
 minconstraints = {0,0,0},
 difficultyvaluerange0 = {0,0,0},
 difficultyvaluerange1 = {1,0,0},
 difficultyvaluerange2 = {2,0,0},
 difficultyvaluerange3 = {3,0,0},
 difficultyvaluerange4 = {4,0,0},
}
mgr.createBonus(135, newBonus);

 

And the CA in question:

 

mgr.defineSpell( "dr_nm_wacherverstand", {
eiStateName = "cSpellCast",
fxTypeCast = "FX_DR_WACHERVERSTAND_C",
fxTypeSpell = "FX_DR_WACHERVERSTAND",
fxTypeCastSpecial = "FX_DR_CAST_K",
duration = 10.000000,
animType = "ANIM_TYPE_SM17",
animTypeApproach = "ANIM_TYPE_INVALID",
animTypeRide = "ANIM_TYPE_INVALID",
animTypeSpecial = "ANIM_TYPE_RIDESM04-SPECIAL",
causesSpellDamage = 1,
tokens = {
	entry0 = {"et_duration_sec", 1500, 5, 0, 8 },
	entry1 = {"et_regAnyAspect", 300, 5, 0, 41 },
	entry2 = {"et_addattr_intelligence", 200, 200, 0, 41 },
               entry3 = {"et_damage_poison_rel", 195, 5, 0, 41 },
	entry4 = {"et_regThisCool", 495, 5, 1, 8 },
	entry5 = {"et_addattr_intelligence", 75, 75, 2, 41 },
	entry6 = {"et_reduce_debuffs", 200, 5, 3, 41 },
	entry7 = {"et_addattr_intelligence", 75, 75, 4, 41 },
	entry8 = {"et_addAttackspeed", 200, 0, 5, 41 },
	entry9 = {"et_regAnyAspect", 150, 5, 6, 41 },
},
fightDistance = 525.000000,
aspect = "EA_DR_NATUREMAGIC",
cooldown = 60.000000,
soundProfile = 0,
cost_level = 150,
cost_base = 100,
focus_skill_name = "skill_DR_naturemagic_focus",
lore_skill_name = "skill_DR_naturemagic_lore",
spellClass = "cSpellDrWacherVerstand",
spellcontroltype = "eCAtype_b_boost_friendly",
sorting_rank = 4,
})

 

The skill isn't broken, it does everything else it's meant to, it just doesn't provide the boost to poison damage (on weapon, CA or sigma list) at all. At this point my suspicion is that the list of valid tokens are declared somewhere else (which is probably hidden away) and the list of definitions in spells.txt is only used to link them with blueprint effects.

 

Any help would be appreciated.

Edited by johnmedgla
Link to comment

The skill isn't broken, it does everything else it's meant to, it just doesn't provide the boost to poison damage (on weapon, CA or sigma list) at all. At this point my suspicion is that the list of valid tokens are declared somewhere else (which is probably hidden away) and the list of definitions in spells.txt is only used to link them with blueprint effects.

 

Any help would be appreciated.

 

Its basically what you've said here. You can only use the tokens that are listed at the end of spells.txt.

 

You could use something like et_weapondamage_poison to add poison weapon damage/et_spelldamage_poison for poison CA damage, but I don't think there is generic poison %increase token.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up