RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Custom Artwork How-To

Nockar

Sorceror
Does anyone know a way to copy a bunch of gumps, art, and tiledata and move it other spots? When I first started I added a bunch of things to the bottom. Well, I found out I needed thoes space for the male / female items. So I ended up deleting them. I still have a backup of all the work. If I could some how copy it all and move it all it sure would save a lot of time! Maybe create a big patch file some how and change where the patch puts the files?

I am not even sure if this is possible.
 

Lady_askarii

Wanderer
A few questions first how do i get a small picture to put it the art(s) part. Is it like the one you get from inside uo for a ground tile. And my second is the scripts, I dont know anything about writing scripts can i modify the one you wrote for the cloak for diffrent things like weapons, hair,armor, etc. And if so what parts should I modify ?
Thank you for helping me
 

Nockar

Sorceror
Lady_askarii;837457 said:
A few questions first how do i get a small picture to put it the art(s) part. Is it like the one you get from inside uo for a ground tile. And my second is the scripts, I dont know anything about writing scripts can i modify the one you wrote for the cloak for diffrent things like weapons, hair,armor, etc. And if so what parts should I modify ?
Thank you for helping me

The big picture is your gump.
The small picutre is the ground tile. Some of the art i have came with pre-made ground tile images. But they dont look very good. So what I did was open either insideUO or UoFiddler and go in and find the ground tile artwork your want. So go find the image for the cloak when its on teh ground. Then usually you just right click it and save it to a BMP file.

Scrips. The one I gave up there is only for cloaks. What you can do is look in your RunUO folder
RunUO\Scripts\Items\
In there youll find armor, weapon, and clothing folder. you can look at them, copy them to other places, and change them. So to make that cloak scrip that I posted, I opend up - in notepad -
RunUO\Scripts\Items\Clothing\Cloaks.cs
I found that cloak that I wanted to copied that code into another file that I made. Then I added a few things that it was missing up at the top. Then I went and changes the name form Cloak to Cloak_01 and changes that 0x1234 number thing.

If you go look in the weapons folder youll see all the seperate weapon scrips - where as the cloaks is one .cs file that has like 6 or so cloaks in int. So with loaks you would have to copy out the code. If you just wanted to make a new katana you can just go copy the katan.cs file and past it some where else (like in your custom folder) and change it in there. For what you are doing all you wold need to do is change katana to kantan_01 or what ever you wanted. Then change that 0x1234 number to be the number for your small ground tile.

--------------------------------------

Below you can compare the normal katan file from from one of hte ones I made for the "new" kantan i added artwork for. They are alsmo identical.

Scripts\Items\Weapons\Swords\Katana.cs
Code:
using System;
using Server.Network;
using Server.Items;

namespace Server.Items
{
	[FlipableAttribute( [B]0x13FF, 0x13FE[/B] )]
	public class [B]Katana[/B] : BaseSword
	{
		public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.DoubleStrike; } }
		public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }

		public override int AosStrengthReq{ get{ return 25; } }
		public override int AosMinDamage{ get{ return 11; } }
		public override int AosMaxDamage{ get{ return 13; } }
		public override int AosSpeed{ get{ return 46; } }
		public override float MlSpeed{ get{ return 2.50f; } }

		public override int OldStrengthReq{ get{ return 10; } }
		public override int OldMinDamage{ get{ return 5; } }
		public override int OldMaxDamage{ get{ return 26; } }
		public override int OldSpeed{ get{ return 58; } }

		public override int DefHitSound{ get{ return 0x23B; } }
		public override int DefMissSound{ get{ return 0x23A; } }

		public override int InitMinHits{ get{ return 31; } }
		public override int InitMaxHits{ get{ return 90; } }

		[Constructable]
		public [B]Katana[/B]() : base( 0x[B]13FF[/B] )
		{
			Weight = 6.0;
		}

		public [B]Katana[/B]( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}


Scripts\Customs\My Scrips\Custom Weapons\New Weapons\Swords\Katana_05.cs
Note: it does not matter where you pust scrips in the script folder. I just put my new katana in this folder for orginization purposes.
Code:
using Server.Items;

namespace Server.Items
{
	[FlipableAttribute( 0x[B]7FDD[/B])] 
	public class [B]Katana_05[/B] : BaseSword
	{
		public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.DoubleStrike; } }
		public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }

		public override int AosStrengthReq{ get{ return 25; } }
		public override int AosMinDamage{ get{ return 11; } }
		public override int AosMaxDamage{ get{ return 13; } }
		public override int AosSpeed{ get{ return 46; } }
		public override float MlSpeed{ get{ return 2.50f; } }

		public override int OldStrengthReq{ get{ return 10; } }
		public override int OldMinDamage{ get{ return 5; } }
		public override int OldMaxDamage{ get{ return 26; } }
		public override int OldSpeed{ get{ return 58; } }

		public override int DefHitSound{ get{ return 0x23B; } }
		public override int DefMissSound{ get{ return 0x23A; } }

		public override int InitMinHits{ get{ return 31; } }
		public override int InitMaxHits{ get{ return 90; } }

		[Constructable]
		public [B]Katana_05[/B]() : base( 0x[B]7FDD[/B] )
		{
			[B]Name = "Katana";[/B]
			Weight = 6.0;
		}

		public [B]Katana_05[/B]( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}

-------------------------------------------------------------------------------------------------------------------

The thing in red below will probably not be in yours. I think that is something I added to give clothing duribitly.
public override int InitMinHits { get { return 10; } }
public override int InitMaxHits { get { return 20; } }



Scripts\Items\Clothing\Cloaks.cs
Code:
using System;
using Server.Engines.VeteranRewards;
using Server.Engines.Craft;
using Server.Network;
using System.Collections.Generic;

namespace Server.Items
{
	public abstract class BaseCloak : BaseClothing
	{
		public BaseCloak( int itemID ) : this( itemID, 0 )
		{
		}

		public BaseCloak( int itemID, int hue ) : base( itemID, Layer.Cloak, hue )
		{
		}

		public BaseCloak( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}

[B]	[Flipable]
	public class Cloak : BaseCloak, IArcaneEquip
	{[/B]
        public override int InitMinHits { get { return 10; } }
        public override int InitMaxHits { get { return 20; } }
		#region Arcane Impl
		private int m_MaxArcaneCharges, m_CurArcaneCharges;

		[CommandProperty( AccessLevel.GameMaster )]
		public int MaxArcaneCharges
		{
			get{ return m_MaxArcaneCharges; }
			set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); }
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public int CurArcaneCharges
		{
			get{ return m_CurArcaneCharges; }
			set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); }
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public bool IsArcane
		{
			get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); }
		}

		public void Update()
		{
			if ( IsArcane )
				ItemID = 0x26AD;
			else if ( ItemID == 0x26AD )
				ItemID = 0x1515;

			if ( IsArcane && CurArcaneCharges == 0 )
				Hue = 0;
		}

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

			if ( IsArcane )
				list.Add( 1061837, "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ); // arcane charges: ~1_val~ / ~2_val~
		}

		public override void OnSingleClick( Mobile from )
		{
			base.OnSingleClick( from );

			if ( IsArcane )
				LabelTo( from, 1061837, String.Format( "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ) );
		}

		public void Flip()
		{
			if ( ItemID == 0x1515 )
				ItemID = 0x1530;
			else if ( ItemID == 0x1530 )
				ItemID = 0x1515;
		}
		#endregion

[B]		[Constructable]
		public Cloak() : this( 0 )
		{
		}

		[Constructable]
		public Cloak( int hue ) : base( 0x1515, hue )
		{
			Weight = 5.0;
		}

		public Cloak( Serial serial ) : base( serial )
		{
		}[/B]
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 1 ); // version

			if ( IsArcane )
			{
				writer.Write( true );
				writer.Write( (int) m_CurArcaneCharges );
				writer.Write( (int) m_MaxArcaneCharges );
			}
			else
			{
				writer.Write( false );
			}
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					if ( reader.ReadBool() )
					{
						m_CurArcaneCharges = reader.ReadInt();
						m_MaxArcaneCharges = reader.ReadInt();

						if ( Hue == 2118 )
							Hue = ArcaneGem.DefaultArcaneHue;
					}

					break;
				}
			}

			if ( Weight == 4.0 )
				Weight = 5.0;
		}
	}

	[Flipable]
	public class RewardCloak : BaseCloak, IRewardItem
	{
		private int m_LabelNumber;
		private bool m_IsRewardItem;

		[CommandProperty( AccessLevel.GameMaster )]
		public bool IsRewardItem
		{
			get{ return m_IsRewardItem; }
			set{ m_IsRewardItem = value; }
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public int Number
		{
			get{ return m_LabelNumber; }
			set{ m_LabelNumber = value; InvalidateProperties(); }
		}

		public override int LabelNumber
		{
			get
			{
				if ( m_LabelNumber > 0 )
					return m_LabelNumber;

				return base.LabelNumber;
			}
		}

		public override int BasePhysicalResistance{ get{ return 3; } }

		public override void OnAdded( object parent )
		{
			base.OnAdded( parent );

			if ( parent is Mobile )
				((Mobile)parent).VirtualArmorMod += 2;
		}

		public override void OnRemoved(object parent)
		{
			base.OnRemoved( parent );

			if ( parent is Mobile )
				((Mobile)parent).VirtualArmorMod -= 2;
		}

		public override bool Dye( Mobile from, DyeTub sender )
		{
			from.SendLocalizedMessage( sender.FailMessage );
			return false;
		}

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

			if ( Core.ML && m_IsRewardItem )
				list.Add( RewardSystem.GetRewardYearLabel( this, new object[]{ Hue, m_LabelNumber } ) ); // X Year Veteran Reward
		}

		public override bool CanEquip( Mobile m )
		{
			if ( !base.CanEquip( m ) )
				return false;

			return !m_IsRewardItem || Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( m, this, new object[]{ Hue, m_LabelNumber } );
		}

		[Constructable]
		public RewardCloak() : this( 0 )
		{
		}

		[Constructable]
		public RewardCloak( int hue ) : this( hue, 0 )
		{
		}

		[Constructable]
		public RewardCloak( int hue, int labelNumber ) : base( 0x1515, hue )
		{
			Weight = 5.0;
			LootType = LootType.Blessed;

			m_LabelNumber = labelNumber;
		}

		public RewardCloak( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version

			writer.Write( (int) m_LabelNumber );
			writer.Write( (bool) m_IsRewardItem );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_LabelNumber = reader.ReadInt();
					m_IsRewardItem = reader.ReadBool();
					break;
				}
			}

			if ( Parent is Mobile )
				((Mobile)Parent).VirtualArmorMod += 2;
		}
	}

	[Flipable( 0x230A, 0x2309 )]
	public class FurCape : BaseCloak
	{
        public override int InitMinHits { get { return 10; } }
        public override int InitMaxHits { get { return 20; } }
		[Constructable]
		public FurCape() : this( 0 )
		{
		}

		[Constructable]
		public FurCape( int hue ) : base( 0x230A, hue )
		{
			Weight = 4.0;
		}

		public FurCape( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}

Scripts\Customs\My Scrips\Custom Armor\Clothes\Cloak\Cloak_24.cs
Code:
[B]using System;
using Server.Items;

namespace Server.Items[/B]
{
	[Flipable]
	public class [B]Cloak_24[/B] : [B]BaseCloak[/B]
	{

[COLOR="red"]        public override int InitMinHits { get { return 10; } }
        public override int InitMaxHits { get { return 20; } }[/COLOR]

		[Constructable]
		public [B]Cloak_24[/B]() : this( 0 )
		{
		}

		[Constructable]
		public [B]Cloak_24[/B]( int hue ) : base( 0x[B]7E62[/B], hue )
		{
			[B]Name = "Cloak";[/B]
			Weight = 5.0;
		}

		public [B]Cloak_24[/B]( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			if ( Weight == 4.0 )
				Weight = 5.0;
		}
	}
}
 

Lady_askarii

Wanderer
thank you very much!! I will try it tommorrow and see if everything works. Thank you so much for your help it is greatly appreciated!!!!
 

Nockar

Sorceror
How do you add new furniture?

I have all the artwork. Adding it in is easy. But I don’t see how they get the right container to open up when you double click it. I cant find any where in any scripts where it opens up the container gump or in files them selves? When you do a wearable item you give the animation number. But I don’t see how other gumps are opened up, say a dresser opening the dresser container gump.

Any ideas on how to do this?
 
I believe most are preassigned in the client, but you can make others that are set up as containers in tiledata like so

public override int DefaultGumpID{ get{ return 0x3C; } }

in their script
just replace 0x3C with your gump id number (hex or dec)

for gump info there is a file called containers.cfg in the data directory
it "sort of" works
it allows you to assign a gump number to have a sound
and supposedly to assign the retangle bounds for the item also - this part does not always work - most of the time it does not (a client deal)
 

Nockar

Sorceror
Lord_Greywolf;837697 said:
I believe most are preassigned in the client, but you can make others that are set up as containers in tiledata like so

public override int DefaultGumpID{ get{ return 0x3C; } }

in their script
just replace 0x3C with your gump id number (hex or dec)

for gump info there is a file called containers.cfg in the data directory
it "sort of" works
it allows you to assign a gump number to have a sound
and supposedly to assign the retangle bounds for the item also - this part does not always work - most of the time it does not (a client deal)

Thanks for the help. I dded the code you gave. And added the ItemID to containers.cfg. The sound and gump both work fine. The bounds still are not right. But from what you said they dont work right most of the time.

Thanks for the help!

Code:
0x3E	33 36 109 112	0x42	0xE77,0xE7F, [B]0x3C68[/B] #AppleBarrel_01,
 

Nockar

Sorceror
Lord_Greywolf;837697 said:
I believe most are preassigned in the client, but you can make others that are set up as containers in tiledata like so

public override int DefaultGumpID{ get{ return 0x3C; } }

in their script
just replace 0x3C with your gump id number (hex or dec)

for gump info there is a file called containers.cfg in the data directory
it "sort of" works
it allows you to assign a gump number to have a sound
and supposedly to assign the retangle bounds for the item also - this part does not always work - most of the time it does not (a client deal)

Have another question if you would.

I don’t see how the Armoire swaps images when you open them and then back to a closed image when you close the gump? I am guessing this is doing in the client some how?

How would I go about doing that?
 

Nockar

Sorceror
Nockar;837738 said:
Have another question if you would.

I don’t see how the Armoire swaps images when you open them and then back to a closed image when you close the gump? I am guessing this is doing in the client some how?

How would I go about doing that?

Never mind. I see how its down. Its at the bottom of the script
 

Nockar

Sorceror
Does anyone know how to tune a addon into a container? If I add BaseContainer I get errors.
Is it even possible?

Thanks.


Code:
using System;
using System.Collections.Generic;
using Server;
using Server.Multis;
using Server.Network;

namespace Server.Items
{
	public class Desk_01_EastAddon : BaseAddon
	{
		public override BaseAddonDeed Deed{ get{ return new Desk_01_EastDeed(); } }
		//public override int DefaultGumpID{ get{ return 0x51; } } //Dresser

		[Constructable]
		public Desk_01_EastAddon()
		{
			AddComponent( new AddonComponent( 0x384A ), 0, 1, 0 );
			AddComponent( new AddonComponent( 0x384B ), 0, 0, 0 );

			Name = "Dark Redwood Desk";
			Weight = 25.0;
		}

		public Desk_01_EastAddon( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}

	public class Desk_01_EastDeed : BaseAddonDeed
	{
		public override BaseAddon Addon{ get{ return new Desk_01_EastAddon(); } }

		[Constructable]
		public Desk_01_EastDeed()
		{
			Name = "Dark Redwood Dresser Addon East";
		}

		public Desk_01_EastDeed( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}
 
it is possible, but takes some doing

there is a script that is tents as addons that you can place anywhere just about (script archives section i do believe -- not the ones that are houses)

in there they have a chest that gets added and is completely usable

should be able to convert it over for your use
 

Nockar

Sorceror
Oh ya, i know the script your talking about, with the tents. Ill take a look in there.
Once again, thanks for the info ;o)

You have over 12k posts. I have alwasy wondered. Do you post on here for fun and to help people? Or do you moderate or what? HAHA Just wondering is all.
 
i am not moderator or staff here at all, never even asked to be, or approached to be

I started posting back when i opened my 1st shard and was starting to learn C#
I am still learning C#, I have a lot more to learn yet
But i post when i have questions (not that often any more), but mostly to help others to learn C# also
i rarely make posts in "just chatty" ways, but i do once in a while

and believe it or not, helping others has its own rewards, besides the obvious, sometimes i get answers to other things i was thinking about, or other ways of doing things that would be better, or even "brain storms" of new ideas, variants, etc
 

dazedmouse

Sorceror
Ok I have done everything as per instructions... for wearables. I get it in game and everything looks good my only problem is that the Robe I made sits on the paperdoll above the hand that would hold a book.... I died laughing when I saw this.... And I have tried to fix it... to no luck it still sits on hand. Can any one enlighten me?
 
copy out an origional robe gump art pic

you will notice the black area around it, it needs to be the same with any robe added

basicaly the black space is the area for all of the stuff to be on, and they are all overlayed over each other and the black is transparent

so if you do not have it lined up correctly in the "box" of black, it will be out of alignemnt and appear in the wrong spot
 

dazedmouse

Sorceror
ok but i got that graphic off the forums.. But let me try a different on it might just be that graphic..

Thank you for your response.
 

Nockar

Sorceror
dazedmouse;839696 said:
ok but i got that graphic off the forums.. But let me try a different on it might just be that graphic..

Thank you for your response.

If i read your question right.

Some of the images I did had to be moved around a bit. And some other ones actually had different shades of dark gray or really dark blue that were not black. When I put them in there not noticing it and tested it in the game it would do funny thing because the game though that the dark blue was part of the image that was supposed to be visible.

So you have to use a art program in both situations and change the image its self. Then re-load it into the mul.
 

dazedmouse

Sorceror
Ok that worked... But when I sit down the dress disappears and Im neked.. seen this before but cant remember how to fix it ... any ideas?

Thank you for all your help
 
Top