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).

Understanding enchantable items in DS2...

Sharkull's picture

(I wrote this in response to a question over at SN but it seems to have just gone down and thought the info. might be appreciated here... It's a bit newbie'ish, but I didn't find this intuitive at all when I was looking for info. on enchantable items... :mrgreen: ).
(edit)
The question at SN was: "What's the best enchantable stuff?, Is there a list?" ..."Is there some sort of guide that explains what enchantable sword has the highest attack rating?"
(/edit)

What you're looking for are the [var#] blocks within item templates. The item stats are based on the item_level indicated within the block. For example (from logic\world\contentdb\templates\interactive\wpn_axe_1h.gas):

[t:template,n:ax_1h_ba]
{
	specializes = base_axe_template;
	doc = "battle_axe";
	[aspect]
	{
		model = m_w_axe_301-a;
		[textures]
		{
			0 =  b_w_axe_301-a;
		}
	}
	[common]
	{
		screen_name = "Battle Axe";
	}
	[gui]
	{
		equip_requirements = melee:#item_level - 2.0;
		inventory_icon = b_gui_ig_i_w_axe_301-a;
		inventory_height = 3;
		inventory_width = 1;
	}
	[pcontent]
	{
		[base]
		{
			item_level = 3.0;
		}
		[var1]
		{
			item_level = 12.0;
		}
		[var2]
		{
			item_level = 30.0;
		}
		[var3]
		{
			item_level = 42.0;
		}
		[var4]
		{
			item_level = 54.0;
		}
	}
}

This indicates that the non-magical form of this weapon (a one handed battle axe) is item_level 3 (because of the [base] block). The four slot enchantable version (var1) is at item_level 12. The six slot enchantable (var2) is at item_level 30, nine slot (var3) at item_level 42 and sixteen slot (var4) at item_level 54. You will notice that there are no damage stats in the template, for that you need to look for the template "base_axe_template" indicated by the template's "specializes" value.

Looking in the file wpn_bases.gas... (same folder as above).

[t:template,n:base_axe_template]
{
	category_name = "DS2_Weapon_Melee_Axe";
	doc = "Axe";
	specializes = weapon_melee;
	[aspect]
	{
		material = mediummetaledge;
		[voice]
		{
			[attack]
			{
				priority = high;
				* = s_ma_swing_sm_wpn;
			}
			[put_down]
			{
				* = s_ui_inv_place_axe_1h;
			}
		}
	}
	[attack]
	{
		attack_class = ac_axe;
		damage_min = 0.75 * (3.4 + 0.74 * #item_level);
		damage_max = 1.25 * (3.4 + 0.74 * #item_level);
		is_melee = true;
		reload_delay = 0.67;
		skill_class = melee;
	}
	[gui]
	{
		active_icon = b_gui_ig_i_ic_w_axe-1h-01;
		equip_slot = es_weapon_hand;
		inventory_height = 3;
		inventory_width = 1;
		use_class = IST_FIGHTER;
	}
}

This is where you will find the damage formulas, which you can use with your "item_level" to find out the damage for each weapon (in this case, about 32 min to 54 max for the Legendary enchantable version of ax_1h_ba).

To get a complete enchantable weapon list for DS2, you will need to look for each template that has [var#] blocks in these files:
wpn_axe_1h.gas
wpn_axe_2h.gas
wpn_bow.gas
wpn_cestus.gas
wpn_club.gas
wpn_crossbow.gas
wpn_dagger.gas
wpn_hammer_1h.gas
wpn_hammer_2h.gas
wpn_mace.gas
wpn_staff_fighter.gas
wpn_staff_mage.gas
wpn_sword_1h.gas
wpn_sword_2h.gas
wpn_thrown.gas

(The same logic process applies to armor, jewelry and books, but with different gas files...).

firebat's picture

looks nice, i only miss the reason why i must look there...

Sharkull's picture

firebat wrote:
looks nice, i only miss the reason why i must look there...

http://www.siegenetwork.com/forums/index.php?showtopic=11159

That's what my opening comment was about... or are you commenting on something else?

firebat's picture

Sharkull wrote:
What you're looking for are the [var#] blocks within item templates. The item stats are based on the item_level indicated within the block.

a lot of text...

Looking in the file wpn_bases.gas... (same folder as above).

knowing what to do is good but knowing why you do it is even better. so an explanation about why you look there( and maybe about the base_* items) would be nice..

Sharkull's picture

I thought the thread title was self-explanitory :? and I did edit the original post (adding in the SN question that was being addressed...). I do agree that a comment on the base templates being inherited would be good (I didn't explain this at all), and perhaps when I do that I'll put in a bit better explanation on the whole context of what I'm communicating.