Jump to content

Change magicstaff attack


Recommended Posts

Hello guys,

I am a modding newbie and would like to know if and how you could change how magic staffs are attacking. I would like to have meele staffs without the ranged attack.(really really hate the sound of magic staff attacks) kind of like it was before the dlc if I remember right.
In a few words: if its possible to deactivate the range attacks of magic staffs?

Link to comment

In the unmodded game, you need the Magic Staffs skill to make them ranged.

However, most mods enable that ranged attack by default to prevent a bug that came from dual wielding a staff and a different weapon. It also has the side effect of allowing the TG and SW to use ranged staffs even though they don't have access to the skill. How to go about reverting this, I unfortunately don't know.

Edited by idbeholdME
Link to comment

I don't know much about this topic yet, but what I do know is that all ranged attacks (besides blowpipes if you're not playing the addendum) are actually spells defined in spells.txt. Arrows, energy weapons, all of them.

staffs have those two CAs:

mgr.defineSpell( "magicstaff_CA", {
	eiStateName = "cSMZealhit",
	fxTypeCast = "",
	fxTypeSpell = "",
	fxTypeCastSpecial = "",
	duration = 0.000000,
	animType = "ANIM_TYPE_ATTACKA",
	animTypeApproach = "ANIM_TYPE_INVALID",
	animTypeRide = "ANIM_TYPE_RIDEMAGICA-SPECIAL",
	animTypeSpecial = "ANIM_TYPE_INVALID",
	causesSpellDamage = 0,
	tokens = {
	},
	fightDistance = 325.000000,
	aspect = "EA_ENEMY_ANY",
	cooldown = 1.000000,
	soundProfile = 0,
	cost_level = 0,
	cost_base = 0,
	focus_skill_name = "skill__enemy_focus",
	lore_skill_name = "skill_tactics_lore",
	spellClass = "cSpellSMove",
	spellcontroltype = "eCAtype_a_weapon_attack",
	sorting_rank = 0,
})

mgr.defineSpell( "magicstaff_projectile", {
	eiStateName = "cSpellCast",
	fxTypeCast = "",
	fxTypeSpell = "FX_GEN_FIREBALL5",
	fxTypeCastSpecial = "",
	duration = 0.000000,
	animType = "ANIM_TYPE_ATTACKA",
	animTypeApproach = "ANIM_TYPE_INVALID",
	animTypeRide = "ANIM_TYPE_RIDEATTACKA-HORSE",
	animTypeSpecial = "ANIM_TYPE_RIDEATTACKA-SPECIAL",
	causesSpellDamage = 0,
	tokens = {
	},
	fightDistance = 325.000000,
	aspect = "EA_ENEMY_ANY",
	cooldown = 1.000000,
	soundProfile = 0,
	cost_level = 0,
	cost_base = 0,
	focus_skill_name = "skill__enemy_focus",
	lore_skill_name = "skill_tactics_lore",
	spellClass = "cSpellProjectile",
	spellcontroltype = "eCAtype_a_missile_attack",
	sorting_rank = 0,
})

The former is meelee and the latter ranged.

Link to comment

Just for clarity "magicstaff_CA" is an invention to try to trick NPC's with spellcaster AI into using their staves to shoot projectiles once in a while.

The real staff projectile is "magicstaff_projectile".  I doubt it would be as simple as deleting this spell entry as it would likely crash the game whenever you tried to attack with staves.  Someone with the know-how would have to edit the game code to revert staves to the pre-Ice and Blood behavior.

  • Like! 1
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