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

Changing the tooltip color of an item

This item is from a mod I gave up on awhile back I dubbed "diablo flash back" . I figured out how to make a new color for the item's screen name. I used this incomplete soj for testing reasons.

in config\global_settings.gas I entered a new color in the tooltip_colors block I called crafting.

[tooltip_colors]
	{
		// All colors are in 0xaarrggbb ( alpha-red-green-blue ) format
		alter_stat_up	= 0xff00ffff;			// Cyan -- was 0xff6600ff;
		alter_stat_down = 0xff995422;			// Brown
		required		= 0xffff0000;			// Red
		nature_magic	= 0xff43ca83;			// Pale Green
		combat_magic	= 0xffeaa935;			// Orange
		magic			= 0xff6699ff;			// Medium Blue
		magic_var_2		= 0xff6699ff;			// Blue-r
		magic_var_3		= 0xff6699ff;			// Blue-est
		magic_var_4		= 0xff6699ff;			// Blue-est
		rare			= 0xff00ffff;			// Cyan
		unique			= 0xffcc66ff;			// Violet
		set				= 0xffffff00;			// Yellow
		enchantable		= 0xffc0c0c0;			// Silver
		enchanted		= 0xff00ff00;			// Green
		reagent			= 0xffebba55;			// ?
		// new colors Wyvante
		Crafting = 0xff6666CC

		

The file for SOJ I created is located in world\contentdb\templates\interactive\

// I was a d2 fan and modder!!! -Wyvern

//soj!!
[t:template,n:soj]
{
	doc = "Soj";
	specializes = ring;

	[common]
	{
		base_screen_name = "Ring";
		screen_name = "The Stone of Jordan";
		allow_modifiers = false;
		is_pcontent_allowed = false;
		rarity = unique;
	}
	[gui]
	{
		equip_requirements = uber:#item_level;
		use_class = IST_ALL;
		inventory_icon = b_gui_ig_i_it_ring_036;
 	 	item_level = 29;
 	 	tooltip_color = Crafting;
	}
	[magic]
	{
		[enchantments]
		{
			[*]
			{
				alteration			= alter_max_mana;
				value				= 20;
				description			= "+<value> Mana";
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_max_mana;
				value				= 1.25;
				description			= "+25% Mana";
				duration			= #infinite;
				multiply_value 		= true;
				is_permanent		= true;
				is_single_instance	= false;
			}
		}
	}
}

In the gui block tooltip_color = Crafting; refers to the color entry I put in global_settings.gas . This is really cool, since you can add any color to as many items as you want. The problem I had was not being able to change the rest of the item's look as noticed in the screenshot the inv backround color is the same as regular uniques. This also holds true when soj is on the ground.

Aditional info on item:

alteration = alter_max_mana; calculates the max mana then adds mana based on percent.

Eksevis's picture

When it comes to creating a custom rarity (specifically for DS2), I've figured out how to make it more efficient, but unfortunately the custom color only displays in the inventory.

// I was a d2 fan and modder!!! -Wyvern

//soj!!
[t:template,n:soj]
{
	doc = "Soj";
	specializes = ring;

	[common]
	{
		base_screen_name = "Ring";
		screen_name = "The Stone of Jordan";
		allow_modifiers = false;
		is_pcontent_allowed = false;
	}
	[gui]
	{
		equip_requirements = uber:#item_level;
		use_class = IST_ALL;
		inventory_icon = b_gui_ig_i_it_ring_036;
 	 	item_level = 29;
 	 	tooltip_color = Crafting;
	}
	[magic]
	{
		[enchantments]
		{
			[*]
			{
				alteration			= alter_max_mana;
				value				= 20;
				description			= "+ Mana";
				duration			= #infinite;
				is_permanent		= true;
				is_single_instance	= false;
			}
			[*]
			{
				alteration			= alter_max_mana;
				value				= 1.25;
				description			= "+25% Mana";
				duration			= #infinite;
				multiply_value 		= true;
				is_permanent		= true;
				is_single_instance	= false;
			}
		}
	}
}

Basically, you only need the tooltip_color under GUI to make the name became the new color. However, I've yet to figure out how to alter the name's color on the ground.

I have a theory it can be done through finding where the alteration effects are stored, but I've yet to figure out where that is.

Can't believe that was 13 years ago, lol. Yeah, I didn't figure it out back then. Custom inventory is pretty cool. Perhaps drops will be figured out.