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

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

Modding weapons to use combat magic and intelligence stats for damage

I have been trying to figure out how to mod weapons so that way my mage can also use melee without having to gimp myself as a hybrid.

I'm afraid I can't help with your question, but I emailed you a weapon mod that seems very similar to what you are looking to do.

Sharkull's picture

I believe this can be done by creating custom (or modified) weapons using a different skill base... instead of melee, either NM or CM (a weapon could be one or the other, not both). I don't have DS installed, so I can't look up the exact code for you... but it will be in the weapon templates (or base templates).

may have to make a new weapon base and assign the experience to nature/combat

I have made several weapons (bows) that give a mage or melee fighter the ability to use ranged weapons.
This bow is for either a nature mage or combat mage in either DS2 or DS2 Broken World. You are welcome to use it or modify it. Just make sure if you add it to a mod you give me credit.

////////////////////////////////////////////////////
// TEMPLATE: bw_ranged_wizard
//
// ITEM: swift mage Bow
//
// Created By: Bare_Elf
////////////////////////////////////////////////////
[t:template,n:bw_ranged_wizard]
{
specializes = base_bow_template;
doc = "swift_melee_longbow";
[aspect]
{
model = m_w_bow_purestrike;
[textures]
{
0 = b_w_bow_purestrike;
}
}
[attack]
{
attack_range = 25.0;//Made the range longer, the original range was 10
damage_min = (0.75 * (3.0 + 0.65 * #item_level))*2;//Doubles the original damage.
damage_max = (1.25 * (3.0 + 0.65 * #item_level))*2;
}
[common]
{
screen_name = "Weird Wizard's Bow";
}
[gui]
{
equip_requirements = combat magic:#item_level-2.0|nature magic:#item_level-2.0;
inventory_icon = b_gui_ig_i_w_bow_purestrike;
inventory_height = 4;
inventory_width = 1;
}
[pcontent]
{
[base]
{
item_level = 36.0;
}
[var1]
{
item_level = 74.0;
}
[var2]
{
item_level = 83.0;
}
[var3]
{
item_level = 88.0;
}
[var4]
{
item_level = 92.0;

melee and ranged give exp to melee and ranged with these 
	[attack]
	{
		
		skill_class = melee;  (melee) 
                skill_class = ranged; (ranged)
	}

   --> change to 

[attack]
	{
		
		skill_class = "Combat Magic"; 
or

 skill_class =  "Nature Magic";
	}

probably would have to make same templates for each combat and nature.


the bow example Bare_Elf gave is good but experience will still goto ranged.

Sharkull's picture

DE, that's what I was thinking of.

BE's would allow equipping by mages, but the extra code by DE is needed to get the experience going where you want it to.
Smile

I'm not sure what is going on here:

[t:template,n:bw_un_ice_c_m_s_r_nmagic]
{
category_name = "weapon";
doc = "Ice Bow";
specializes = base_bow;
[aspect]
{
model = m_w_bow_009;
}
[attack]
{
ammo_template = arrow_ice;
attack_range = 14;
skill_class = "Nature Magic";
damage_max = 13;
damage_min = 9;
reload_delay = 0.0;
}
[common]
{
screen_name = "Sage's Ice Bow";
}
[gui]
{
active_icon = b_gui_ig_i_ic_bow_004;
equip_requirements = intelligence:12;
inventory_height = 3;
inventory_icon = b_gui_ig_i_w_bow_087;
inventory_width = 1;
tooltip_color = nature_magic;
}
}

Using the bow still give experience to ranged and increases dex. I thought it might be neat to play around with a bow as a magic weapon but I don't understand what I am doing wrong. This is for DS1. btw.

Can't test for DS1 (Vista), but try changing the base template:

[t:template,n:base_bow_nature]
{
  doc = "Bow";
  specializes = weapon_ranged;
  [aspect]
  {
    material = arrow;
    [voice]
    {
      [put_down]
      {
        * = s_e_gui_put_down_bow;
      }
    }
  }
  [attack]
  {
    ammo_attach_bone = weapon_grip;
    ammo_template = arrow;
    attack_class = ac_bow;
    attack_range = 9.0;
    damage_max = 4;
    damage_min = 2;
    is_projectile = true;
    is_two_handed = true;
    reload_delay = 0.0;
    skill_class = "Nature Magic";  // ranged;
  }
  [magic]
  {
    magic_class = mc_nature_magic;
    skill_class = "Nature Magic";
  }
  [gui]
  {
    active_icon = b_gui_ig_i_ic_bow_001;
    equip_slot = es_shield_hand;
  }
  [physics]
  {
    velocity = 14.0;
  }
}
[t:template,n:base_bow_combat]
{
  doc = "Bow";
  specializes = weapon_ranged;
  [aspect]
  {
    material = arrow;
    [voice]
    {
      [put_down]
      {
        * = s_e_gui_put_down_bow;
      }
    }
  }
  [attack]
  {
    ammo_attach_bone = weapon_grip;
    ammo_template = arrow;
    attack_class = ac_bow;
    attack_range = 9.0;
    damage_max = 4;
    damage_min = 2;
    is_projectile = true;
    is_two_handed = true;
    reload_delay = 0.0;
    skill_class = "Combat Magic";  // ranged;
  }
  [magic]
  {
    magic_class = mc_combat_magic;
    skill_class = "Combat Magic";
  }
  [gui]
  {
    active_icon = b_gui_ig_i_ic_bow_001;
    equip_slot = es_shield_hand;
  }
  [physics]
  {
    velocity = 14.0;
  }
}

Tested in DS2, should work for DS1. Had to make a base arrow for mage also.
Arrow:

[t:template,n:base_arrow_mage]
{
  doc = "Base arrow template";
  specializes = ammo;
  [aspect]
  {
    is_selectable = false;
    max_life = 15;
    life = 15;
    life_state = LS_ALIVE_CONSCIOUS;
    material = arrow;
    megamap_icon = ;
  }
  [attack]
  {
    attack_class = ac_arrow;
    ammo_attach_bone  =  ap_grip;
    is_projectile = true;
    skill_class = "Nature Magic";  // ranged;
  }
  [body]
  {
    [bone_translator]
    {
      handle = ap_grip;
      middle = ap_tip;
      tip = ap_tip;
    }
  }
  [common]
  {
    is_pcontent_allowed = false;
    [template_triggers]
    {
      [*]
      {
        action* = call_sfx_script("arrow_tracer");
        condition* = receive_world_message("we_weapon_launched");
      }
    }
  }
  [physics]
  {
    orient_to_trajectory = true;
    angular_velocity = 0,0,20.0;
    elasticity = 0.925;
    fire_resistance = 1;
    deflection_angle = 0;
    fire_effect_params = [scale(0.4)][ignite()fdamage(.5,1.2,.8)];
    sim_duration = 7;
  }
}
[t:template,n:arrow_mage]
{
  doc = "Basic arrow";
  specializes = base_arrow_mage;
  [aspect] { model=m_w_arw_001; }
  [common] { screen_name="Arrow"; }
}

Bow:

[t:template,n:base_bow_mage]
{
  doc = "Bow";
  specializes = weapon_ranged;
  [aspect]
  {
    material = arrow;
    [voice]
    {
      [put_down]
      {
        * = s_e_gui_put_down_bow;
      }
    }
  }
  [attack]
  {
    ammo_attach_bone = weapon_grip;
    ammo_template = arrow_mage;
    attack_class = ac_bow;
    attack_range = 9.0;
    damage_max = 4;
    damage_min = 2;
    is_projectile = true;
    is_two_handed = true;
    reload_delay = 0.0;
    skill_class = "Nature Magic";  // ranged;
  }
  [gui]
  {
    active_icon = b_gui_ig_i_ic_bow_001;
    equip_slot = es_shield_hand;
  }
  [physics]
  {
    velocity = 14.0;
  }
}

Don't forget to add the "specializes = base_bow_mage;" and "ammo_template = arrow_mage;" to your bow template. also.

That worked like a charm, thank you so much PhoeniX. Heh, I still think of you as Volkan. Smile