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

Enchantable progressive weapons...?

Sharkull's picture

It's easy enough to make a progressive weapon using a "value" formula within a [magic] - [enchantments] - [*] block, but that makes the weapon magical and therefore not enchantable. So, what I've been trying to do is to put a formula in the [attack] block, using something dynamic (eg. #melee, #character_level, #str...), but nothing I've tried has worked.

Am I banging my head against the wall trying to do the impossible, or does anyone have any suggestions?

Hi Sharkull,

It has been a while since my last post, and I have been thinking about what could be wrong with my code, until I noticed something... The enchantments for my weapon were effected in-game, but the description text was failing to show what the change was, when I used a new, self-defined variable.

The problem was that my variables were not initialised, so whatever calculation I did in them returned null. I realised this when I was looking at some of the skrit files and remembered that I had read that skrit is similar to C in programming style. Variables have to be initialised before they can be used. Now, to bypass that problem, I am using pre-set variables to do my calculations for display in the description text.

As for the code snippet that I showed you, well... Really, I was testing which #variables I could use, nothing more. What I was also trying to do was create local 6lt;variables> with values from the global #variables, so as to use the variables in a non-desctructive fashion.

I suppose what I was trying to do, initially, was to show the percentile modifier values as a variable in the description, rather than writing it myself; e.g. description = "+<value_percent> Health Steal", with value_percent = * 100. This gave problems because my own variable was not initialised.

Say, about your idea to create progressively improving weapons that are still enchantable, that's a great idea! I suppose you have already tried setting the item-level to a character-dependent #variable? I don't know if it would work; I suspect that it would not. I don't think that #item_level is read at any other time than at item spawning time. Or would it be...? Hmm, sounds like a plan to find that out. Perhaps the item only needs to be re-equipped, or re-acquired (dump and pick up again)? Either way, I do think that setting #item_level is the important part in creating items of the type that you want. I will toy around with it as well, and I will let you know of my findings. Perhaps you could already tell me what you have attempted?

I briefly thought about creating an item that it recursively enchantable, even. But I don't immediately see how that would work... Also, I have yet to find out where the "enchantable" attribute is to be found in the game files. I imagine that the game picks a random item definitions file and looks if there are any items without a [magic] block, to add the prefix "Enchantable" to the item name --as well as setting it as "enchantable". I imagine that making any such modifications happen will require coding skrit or modifying existing code. I expect that some code for enchantable items is with the enchantress, where the item is set as unenchantable after enchanting. I will keep looking for anything useful.

Thanks for taking the time to sieve through my code snippet and telling me what you think. I do appreciate your help.

Sharkull's picture

I've tried everything I could think of (pertaining to making a progressive non-magical weapon). And as far as I can figure out, enchantable items cannot have any magical properties (otherwise they just become magical items...). Most of the concepts are listed in this thread for reference (if you want to give it a try).

AFAIK, item_level is indeed set at drop (i.e. is not dynamic). The hard part is in referencing dynamic character variables from outside the magic block of an item's template. Stare Although, I can't say that I remember trying to set the item_level to a dynamic variable, I don't believe that would work. If I can't reference a character value directly in the damage_min and damage_max formulas, I doubt passing dynamic variables within an item_level value (as a proxy) would work either (but you're welcome to try).

The enchantment flag is set within the item leaf template, with each of the variations including pre-set item_levels (for game balance). [base] = non-enchantable, [var1] = Good (2x2 slots), [var2] = Great (2x3), [var3] = Exceptional (3x3) and [var4] = Legendary (4x4). Non-magical var1-4 items are automatically enchantable.

Alternatively, Broken World does have the new Reagent Recipes, which could work, but only in a limited manner (each possible resulting progressive item would have to be coded manually Insane with a formula of it's own...).

Templarian Arch Sorcerer's picture

You could always make new reagents that have progressive properties. Smile

Sharkull's picture

That's true, and an interesting idea (although it's different than my original concept). The problem I see with progressive reagents would be in game balance... tough to not be overkill and still be useful (i.e. comparable to Sets / Uniques). Do you balance it for only one slot being progressive, or possibly all 16...?

About reagents and the here discussed progressive method by magic:enchantments, i have tried to turn once Lumilla's Salve into a reangent that gets new values for veteran and elite mode with #is_veteran and #is_elite variables.

Unfortunately, althougth these variables are char-independing and should be available form the beginning - at game start you always had to unequip and equip again items enchanted with such a reagent. Sad
Also when buying such reagents in/from a shop they never did display the right values, it was necessary to buy them first...

I even have tried to force actualizing the intended bonus value by an additional skrit component, however this was not flexible enough - you always had to check first if the magic bonus is probably applied already (eg. when going/coming form the inn) ...and the buy/shop problem wasn't solved neither.

So i sadly canceled this idea, all these exceptions and unpleasent side-effects are just not comfortable for playing and give a bad look when listing them in a readme file. Sad

.

I don't want to say it's completely impossible to make good progressive weapons anyhow, but actually the current game engine/code won't help us a lot.
Maybe the trials and intentsions here are more intense than my own ones, but better don't trust what you see in the first minute and try to think a little farer than GPG sometimes did*. Wink

(*: eg if GPG had thought on such 'minority cases' pets wouldn't loose all their bonues after dying.)

Okay So simply put this is a HUGE contreversy, im getting emails about it, well the hell with this =). Simply put, every unique item has a counter part enchantable item. With all 4 variations, according to the reagent grid gas file in the global section of UI. I know these 2 things - and before I start, and when I finish, I want you to remember to think "simplistic." No Skrit, no nothin. Just an enchanters mod that works like this -

I know that every item in this game, stems from a "base" item. Which again have variations. Well CHECK THIS OUT Wink -

Here is A rare Item From DS-2, OH WOW its "Warlords Sign From DS2 (Original)

[t:template,n:ring_set_as6_01]
{
	doc = "ring_set_as6_01";
	specializes = ring;

	[common]
	{
		allow_modifiers = false;
		screen_name = "The Warlord's Sign";
		base_screen_name = "Ring";
		rarity = set;
	}
	[gui]
	{
		equip_requirements = melee:#item_level-2.0;
		inventory_icon = b_gui_ig_i_it_ring_011;
		set = AS6_set;
	}
	[magic]
	{
		[enchantments]
		{
			[*]
			{
				alteration			= alter_max_life;
				value				= 125;
				description			= "+ Health";
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_melee_damage_min;
				value				= 20;
				description			= "Adds 20 to 25 Weapon Damage";
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_melee_damage_max;
				value				= 25;
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_ranged_damage_min;
				value				= 20;
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_ranged_damage_max;
				value				= 25;
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_magical_resistance;
				value				= 0.15;
				description			= "+15% Magic Damage Resistance";
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_power_reload;
				value				= 0.10;
				description			= "+10% Power Recharge Rate";
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
		}
	}
	[pcontent]
	{
		[base]
		{
			item_level = 54.0;
		}
 	}
 	[loot_drop_indicator]{}
}

Your Thinking okay Now What? OH YA THATS RIGHT - DUHHH I want to temporarily CONVERT this template to a close cousin, IE and enchantable ring - BUT I WANT TO KEEP THE TEMPLATE NAME THE SAME - (You Guys Are Gonna Love This)

[t:template,n:ring_set_as6_01]
{
	doc = "ornate ring";
	specializes = ring;

	[common]
	{
		screen_name = "Ornate Ring (Enchantable Warlords Set)";
	}
	[gui]
	{
		equip_requirements = uber:#item_level;
		use_class = IST_ALL;
	}

	[pcontent]
	{
		[base]
		{
			inventory_icon = b_gui_ig_i_it_ring_027;
 	 	 	item_level = 43;
		}
		[var1]
		{
			inventory_icon = b_gui_ig_i_it_ring_026;
 	 	 	item_level = 76;
		}
		[var2]
		{
			inventory_icon = b_gui_ig_i_it_ring_027;
 	 	 	item_level = 87;
		}
		[var3]
		{
			inventory_icon = b_gui_ig_i_it_ring_028;
 	 	 	item_level = 92;
		}
		[var4]
		{
			inventory_icon = b_gui_ig_i_it_ring_029;
 	 	 	item_level = 98;
		}
	}
}

BAM guess what now that TEMPLATE is converted to an enchantable item which means i can modify the name so I know which item it is, and add variations, all i did was rewrite the ENTIRE template so it can have variations.

As of right now this item you see is enchantable, but wait I WANT 16 dragon scale reagents (+alter_armor (vlue = 40;) but it wont fit in the stupid 4x4 reagent grid...hmmmmmmm OH YA thats right, the hell with increasing the reagent grid, lets do this instead, lets resize the reagents Wink - So instead of having BIG bulky little icons that are like 2x2 or 3x1 etc lets just make all the reagents 1x1....hmmm ya I think Ill do that -

[t:template,n:base_reagent]
{
	doc		= "base reagent template";
	specializes	= reagent;
	category_name	= "reagents";

	[aspect]
	{
		model = m_i_glb_key-01;
		[voice]
		{
			[put_down]
			{
				* = s_ui_2d_jewelry_putdown;
			}
		}
	}
	[common]
	{
		allow_modifiers = true;
		is_pcontent_allowed = true;
		preserve_vitals = true;
		screen_name = "Base Reagent";
	}
	[gui]
	{
		inventory_icon = b_gui_ig_i_it_rgt_branded_rune;
		inventory_height = 1;//Bingo - Tysapha
		inventory_width = 1;//Bingo - Tysapha
		item_level = 1;
	}
	[magic]
	{
		// 
		reagent_definition = reagent_test;
	}
}

And like I said I wanted 16 reagents, and i want to enchant a SET item with it and i want them to be armor reagents -

[t:template,n:rgt_dragon_scale]
{
	doc		= "dragon scale";
	specializes	= base_reagent;

	[aspect]
	{
		model = m_i_glb_rgt_dragon_scale;
		[voice]
		{
			[put_down]
			{
				* = s_ui_inv_place_rgnt_plate;
			}
		}
	}
	[common]
	{
		screen_name = "Dragon Scale";
		description = "Can enchant anything.\n";
	}
	[gui]
	{
		inventory_icon = b_gui_ig_i_it_rgt_branded_rune;
		inventory_height = 1;
		inventory_width = 1;
		item_level = 80;
	}
	[magic]
	{
		reagent_definition = reagent_dragon_scale;
	}
}

Okay, so now that I have the reagent template icons resized to 1x1 and i changed the inventory of every icon texture to 1x1 so they all look the same but have different reagent definitions, and I can enchant the warlords ring. Remember its not the reagent template that matters its the reagent definition that does. So now i got my reagents resized, set item ready to be enchanted. Now I need to do one more thing, simply put all I have to do now is make the reagent definitions more compatible for any item.

	[reagent_dragon_scale]
	{
		object_types	= armor,shield,weapon,amulet,ring,spellbook;
		skill_types	= fighter,ranger,mage,nmage,cmage;
		[armor]
		{
			alteration			= alter_armor;
			value				= 40;
			description			= "+ Armor";
			duration			= #infinite;
			is_permanent			= true;
			is_single_instance		= false;
			custom_effect			= "rgt_armor";		// must be unique to effect
			custom_effect_skrit		= world\global\enchantments\weapon_enchant.skrit;
		}
	}

Lastly, I need to reconfigure the shops so that I can start to enchant this stuff. At the same time ill need to make it so that if I start a new game with a new character it gives me 21000000000 gold, enchanting 16 reagents on just one item even can be pricey. So anywase all the enchantable set items uniques and enchantable crafted weapons (not all of em only the most powerful of which) can be bought at the reagent shop in act 1. All high power reagents are sold at the armor store in act - 1. In addition -

///////////////////////////////////////////////////////////////////////////////
//
// Quest:	Act I PQ3 (The Dryad Outpost)
// Task:	Begin Dryad Outpost quest
//
///////////////////////////////////////////////////////////////////////////////

[a1_pq3_dryad_outpost_begin]
{
	[all*]
	{
		player_drop_type = all;
		il_main = #amr_bdy_dryad;
		il_main = #sd_1h_ss:base;
		il_main = #bw_sh:base;
		il_main = spell_icebolt_1;
		il_main = spell_heal_1;
		il_main = spell_town_portal;
		il_main = spell_firebolt_1;
		il_main = scroll_resurrect;
		il_main = book_glb_magic_01;
		il_main = #potion_health_small;
		il_main = #potion_rejuvenation_small;
		il_main = #potion_mana_small;
		[gold*]
		{
			chance = 1.00;
			max = 2100000000;
			min = 2100000000;
            min_pile = 2;
            piles = 2 - 2;
        }
    }
}

[a1_pq3_dryad_outpost_begin_mp]
{
	[all*]
	{
		player_drop_type = catalyst;
		il_main = #spell_heal_fake:var4;
		il_main = spell_heal_fake:var4;
		il_main = #amr_bdy_dryad;
		il_main = #sd_1h_ss:base;
		il_main = #bw_sh:base;
		il_main = spell_icebolt_1;
		il_main = spell_heal_1;
		il_main = spell_town_portal;
		il_main = spell_firebolt_1;
		il_main = scroll_resurrect;
		il_main = book_glb_magic_01;
		il_main = #potion_health_small;
		il_main = #potion_rejuvenation_small;
		il_main = #potion_mana_small;
		[gold*]
		{
			chance = 1.00;
			max = 2100000000;
			min = 2100000000;
            min_pile = 2;
            piles = 2 - 2;
        }
    }
}

Conclusion - What I did to Make it Work
So Now I make a new game with a new character, get told off happily by the warden, got the gold, went to the reagent shop, payed for all the enchanted items i could ever want, then proceeded to enchant a set item, that the game now see's as an enchantable ring. So now that im done with enchanting, I guess Ill just save my game. Close the game take out the mod and restart the game. Now that ive done that, the game see's the template as a set item, again, but that it has reagent definitions (16 btw of the highest powered reagents of my choosing) and it apply the set item bonuses that came with the original template. The game writes the template and reagent definitions, not that the template itself has any variation, cause when you enchant the item, it looses its variation, or we'd be able to enchant an item twice.

Here's Some Enticing Images

Last But Not Least - Merry Christmas

Download Link -

http://www.freewebs.com/dsrealm/SupaEnchantaDec10+2--7.ds2res

Edited by Sharkull to fix some formatting issues...

Sharkull's picture

Thanks Tysapha for the information... not quite what I was looking for, but I appreciate you sharing your knowledge / method. When I started this thread I was considering how to make a number of special items as quest rewards for a potential map project (which died in the design stage). The method you suggest involves temporarily installing a mod, then removing it... which obviously wouldn't work for a user friendly mapping project.

However, some players (who don't care about game balance) might enjoy giving your mod a try...
Smile

Pages