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

Add new comment

When I released a similar mod for Lazarus,
some people wanted to know more about how I did it.
The process for Dungeon Siege is much simpler.
And like most of my workarounds,
came upon it by accident.

I was researching how to make one of my mods for Lazarus
capable of draining the Mana completely from foes.
Which is an altercation.
So I invariably found a list of all possible altercations.
Here I noticed a patter I was never able to truly
examine with Lazarus (since they do things so different),
the enchantment block.

I went on to take a look at the pcontent file,
and found several examples of enchantments,
and knowing that Dungeon Siege potions use
enchantments to heal and restore,

	[magic]
	{
		[enchantments]
		{
			[*]
			{
				alteration          = alter_life;
				value               = 200;
				max_value           = 200;
				//description         = "healing potion";

				duration            = 0;
				frequency           = 0;

				is_value_limited    = true;
				is_enhancement      = true;
				is_permanent        = true;
				is_transmissible    = false;
				is_single_instance  = false;
				is_active           = false;
				effect_script_equip = health_potion_small;
			}
		}
	}

wondered if they could be applied to the potions.
At first no.

Looking a the Magic block I came upon a solution.
A spell that is cast on the self must have the target type
specified.
So what if these were set in the potions?
And bingo.

	magic:target_type_flags = tt_self;
	magic:usage_context_flags = uc_passive;

So you could turn a regular potion into an enchantment potion with this code:

	[magic]
	{
	target_type_flags = tt_self;
	usage_context_flags = uc_passive;
		[enchantments]
		{
			[*]
			{
				alteration          = ALTER_INTELLIGENCE;
   				value = 1;
   				//multiply_value = true;
   				duration = #infinite;
   				is_permanent = true;
   				is_single_instance = false;
				effect_script_equip = rejuv_potion_small;
			}
		}
	}
}

In the game the UI shows the altercations as enhancements or liabilities.
Red or Blue.
But seem to be permanent.
I plan to make an inventory UI that shows more attributes in the future.

"Have fun storming the Castle!"