forums | blogs | polls | tutorials | downloads | rules | help

Creating Wands

Goal: Create ranged weapons for CMs and NMs, each would be skill_class = "Nature Magic" or "Combat Magic"

The model would be like a torch, but the SFX at the end would be based on the element of the wand. So ice wands would have a blue flame, lightning would have a white flame, etc. Their animation would be like that of a throwing weapon; looks like you're swinging a sword but then the projectile flies. The ammo would be in relation to the element.

Is there enough in game to accomplish this already? (I saw some mobs in LoU that were throwing stars with the sword swing animation, so it should be?)

You might wish to look at some of the weapons that Francisco 'Omniscient_Colossus' Athens did for Dungeon Siege Revived and Dungeon Siege Revived LoA I think some of his whip staffs and whip maces might give you a starting point.

Elf

With enough trial and error with changing parameters in [attack], I was able to figure out how to make them work. Here is the code just to show what I used and what I did to make it happen:

EDIT: the code apparently doesn't wand to format itself properly when copy/pasted, so I tried quote and it still doesn't. Ugh...

[t:template,n:base_wand_combat]
{
doc = "Bow";
specializes = weapon_ranged;
[aspect]
{
material = arrow;
[voice]
{
[put_down]
{
* = s_e_gui_put_down_bow;
}
}
}
[attack]
{
ammo_attach_bone = weapon_grip;
attack_class = ac_sword;
attack_range = 9.0;
damage_max = 4;
damage_min = 2;
is_projectile = true;
is_two_handed = false;
reload_delay = 0.0;
skill_class = "Combat Magic";
}
[body]
{
[bone_translator]
{
handle = grip;
middle = ap_trace02;
tip = ap_trace01;
}
}
[gui]
{
inventory_icon = b_gui_ig_i_w_dgr_006;
active_icon = b_gui_ig_i_ic_m_fire-ball;
inventory_height = 2;
inventory_width = 1;
equip_slot = es_weapon_hand;
}
[physics]
{
velocity = 15.0;
}
}
[t:template,n:base_wand_nature]
{
doc = "Bow";
specializes = weapon_ranged;
[aspect]
{
material = arrow;
[voice]
{
[put_down]
{
* = s_e_gui_put_down_bow;
}
}
}
[attack]
{
ammo_attach_bone = weapon_grip;
attack_class = ac_sword;
attack_range = 9.0;
damage_max = 4;
damage_min = 2;
is_projectile = true;
is_two_handed = false;
reload_delay = 0.0;
skill_class = "Nature Magic";
}
[body]
{
[bone_translator]
{
handle = grip;
middle = ap_trace02;
tip = ap_trace01;
}
}
[gui]
{
inventory_icon = b_gui_ig_i_w_dgr_006;
active_icon = b_gui_ig_i_ic_w_mag_light;
inventory_height = 2;
inventory_width = 1;
equip_slot = es_weapon_hand;
}
[physics]
{
velocity = 15.0;
}
}
[t:template,n:spear_wand_fire]
{
specializes = base_arrow;
[aspect]
{
model=m_w_misc_016;
}
[attack]
{
damage_max = 1;
damage_min = 1;
skill_class = "Combat Magic";
}
[common]
{
screen_name = "Spear";
[template_triggers]
{
[*]
{
action* = call_sfx_script("spear_fire_wand");
condition* = receive_world_message("WE_ENTERED_WORLD");
single_shot = true;
}
}
}
[physics]
{
angular_velocity = 0,0,10.0;
gravity = 3;
}
}
[t:template,n:spear_wand_frost]
{
specializes = base_arrow;
[aspect]
{
model=m_w_misc_016;
}
[attack]
{
damage_max = 1;
damage_min = 1;
skill_class = "Nature Magic";
}
[common]
{
screen_name = "Spear";
[template_triggers]
{
[*]
{
action* = call_sfx_script("spear_frost_wand");
condition* = receive_world_message("WE_ENTERED_WORLD");
single_shot = true;
}
}
}
[physics]
{
angular_velocity = 0,0,10.0;
gravity = 3;
}
}
[t:template,n:lloyd_wand_fire]
{
doc = "wand ranged caster";
specializes = base_wand_combat;
[aspect]
{
is_selectable = true;
model = m_w_misc_fire_poker;
[voice]
{
[attack]
{
* = s_e_swing_01;
* = s_e_swing_03;
}
}
}
[attack]
{
ammo_appears_jit = true;
ammo_template = spear_wand_fire;
attack_range = 12;
damage_max = 16;
damage_min = 8;
reload_delay = 0.3;
}
[common]
{
is_pcontent_allowed = true;
screen_name = "Flame Wand";
[template_triggers]
{
[*]
{
action* = call_sfx_script("torch_small");
condition* = receive_world_message("WE_EQUIPPED");
single_shot = true;
}
}
}
[gui]
{
is_droppable = true;
equip_requirements = intelligence:15,combat magic:8;
}
[pcontent]
{
[base]
{
f modifier_max = 15.000000;
f modifier_min = 0.000000;
}
}
[magic]
{
[enchantments]
{
[*]
{
alteration = alter_ranged_damage_min;
value = -8;
description = "Inflicts Fire Damage";
duration = #infinite;
is_permanent = true;
is_single_instance = false;
}
[*]
{
alteration = alter_ranged_damage_max;
value = -16;
duration = #infinite;
is_permanent = true;
is_single_instance = false;
}
[*]
{
alteration = alter_custom_damage_ranged;
custom_damage = fire;
value = 8;
max_value = 16;
duration = #infinite;
is_permanent = true;
is_single_instance = false;
}
}
}
}
[t:template,n:lloyd_wand_frost]
{
doc = "wand ranged caster";
specializes = base_wand_nature;
[aspect]
{
is_selectable = true;
model = m_w_misc_fire_poker;
[voice]
{
[attack]
{
* = s_e_swing_01;
* = s_e_swing_03;
}
}
}
[attack]
{
ammo_appears_jit = true;
ammo_template = spear_wand_frost;
attack_range = 12;
damage_max = 16;
damage_min = 8;
reload_delay = 0.3;
}
[common]
{
is_pcontent_allowed = true;
screen_name = "Frost Wand";
[template_triggers]
{
[*]
{
action* = call_sfx_script("torch_small_frost");
condition* = receive_world_message("WE_EQUIPPED");
single_shot = true;
}
}
}
[gui]
{
is_droppable = true;
equip_requirements = intelligence:15,nature magic:8;
}
[pcontent]
{
[base]
{
f modifier_max = 15.000000;
f modifier_min = 0.000000;
}
}
[magic]
{
[enchantments]
{
[*]
{
alteration = alter_ranged_damage_min;
value = -8;
description = "Inflicts Cold Damage";
duration = #infinite;
is_permanent = true;
is_single_instance = false;
}
[*]
{
alteration = alter_ranged_damage_max;
value = -16;
duration = #infinite;
is_permanent = true;
is_single_instance = false;
}
[*]
{
alteration = alter_custom_damage_ranged;
custom_damage = cold;
value = 8;
max_value = 16;
duration = #infinite;
is_permanent = true;
is_single_instance = false;
}
}
}
}

They use the Fire Poker as their weapon model, and shoot the Jade Gargoyle's green spear with a varying color for the SFX attached based on what type of wand it is. I plan on making more for each type of custom damage. They equip in the ranged slot and are held and swung like a 1-handed melee weapon, but fire the projectile like normal. The damage on them is low because custom damage apparently does piercing damage, so I don't want them to be too overpowered. I have more pcontent levels for them... this is just the lowest level one that I have at the bottom of the code showing (1 for nature and 1 for combat).

I replaced the [quote] [/quote] around your templates with <CODE> and </CODE> which is the proper way to post something like a template. I though it would be quicker to do it than to tell you how to do it.

Yeah, that's what I originally did but it wasn't formatting correctly, but then all of a sudden it worked when it quotes. I don't know what was going on there..

Nice work. I'm curious to know if the weapons scale with magic skill, based on the minimum and maximum "alter ranged damage" ranges. Could you post a screenshot of the weapon in action?

there is a minor issue with these wands: because they are attack_class = AC_SWORD;, they get pcontent modifiers that have 'melee' or 'sword' in their object_type list. This means I'm getting modifiers like life_bonus and mana_steal which only work with melee weapons on this. There's also an SFX issue with the wand itself that's making it so the little 'flame' at the tip isn't staying on consistently.... maybe it's an event issue. Other than that, these work well and are a solid ranged weapon slot option for mages.