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

Add new comment

HardLess's picture

If I really understand the question and the code here it is.

I could be wrong but I think that the drop is hardcoded and the only thing I can do is trying to help you by a bit of guess

A chest have a item_power_max and a item_power_min as it's described here:

				[oneof*]
				{
					chance = 0.4;
					il_main = #weapon/50-108; //Here a weapon min = 50 and max = 108
				}

When open the chest create a weapon like this:

power = item_power_min + item_power_max / 2

(In this case power = 79)

if it's a weapon :

power = power - (power * ((((item_power_max - item_power_min) / 2) / power) / 10))

(In this case power = 79 - (79 * ((((108 - 50) / 2) / 79) / 10)), so power = 76.1)

Here is a part I can't really help:

I think that the specific type of a weapons is 50 chance to be a ranged or melee like in DS2 ???

Then if it's a melee weapon it's an axe, an hammer or a sword 33% chance ???

If it's an axe power = power * 0.79365

(Here power = 60,396765)

Take a look at "pcontent.skrit" for more info.

I hope it helps,

HardLess.