UO Fiddler - TileData Flags

Discussion in 'Third Party Program Support' started by Macil, Jan 2, 2011.

  1. Macil Sorceror

    Message Count:
    4,713
    Just wondering if anyone knew of a place that explained what the flags are and more importantly what they do in the TileData tab in UO Fiddler. I've been bumpin' around the internet on Google and searching these forums and UO Fiddler and I either really suck at searching for things or the answer just isn't in an obvious enough place for me to find, because I looked all night and couldn't find out anything.

    Futher more. I'm mostly trying to figure out how to edit flags on a stool since all the stools in UO in taverns are the foot stool graphic and those don't let you sit on them like the normal stools with the cross supports on the legs do.

    Any help is greatly appreciated, I've been scratching my head all night on this one, I'd really like to put it to rest. =)
  2. Jeff Lord

    Message Count:
    27,982
    From RunUO
    Code (text):
        public enum TileFlag : long
        {
            None            = 0x00000000,
            Background        = 0x00000001,
            Weapon            = 0x00000002,
            Transparent        = 0x00000004,
            Translucent        = 0x00000008,
            Wall            = 0x00000010,
            Damaging        = 0x00000020,
            Impassable        = 0x00000040,
            Wet            = 0x00000080,
            Unknown1        = 0x00000100,
            Surface            = 0x00000200,
            Bridge            = 0x00000400,
            Generic            = 0x00000800,
            Window            = 0x00001000,
            NoShoot            = 0x00002000,
            ArticleA        = 0x00004000,
            ArticleAn        = 0x00008000,
            Internal        = 0x00010000,
            Foliage            = 0x00020000,
            PartialHue        = 0x00040000,
            Unknown2        = 0x00080000,
            Map            = 0x00100000,
            Container        = 0x00200000,
            Wearable        = 0x00400000,
            LightSource        = 0x00800000,
            Animation        = 0x01000000,
            NoDiagonal        = 0x02000000,
            Unknown3        = 0x04000000,
            Armor            = 0x08000000,
            Roof            = 0x10000000,
            Door            = 0x20000000,
            StairBack        = 0x40000000,
            StairRight        = 0x80000000
        }
    Every item gets linked to TileData, the tile data explains information about he item, if its a door, roof, armor, weapon, passable, impassable, etc.... The client uses these to help it render, and help it do things like not let you walk through walls, etc.
  3. Macil Sorceror

    Message Count:
    4,713
    I understand that bit, its things like "Article A" or "Unknown2" and other flags titled similar names that aren't so obvious that I'm having a hard time figuring out. Also in the case of my stool, it only seemed to say Article A and Surface, which flag would suggest an ability to sit on the graphic like a normal chair?
  4. Jeff Lord

    Message Count:
    27,982
    Well not sure about Article, but Unknown2 is pretty obviously that its Unknown... Most of the time, Unknown is something no longer used (it was used in Alpha, or beta and then discontinued.)
  5. kegmeister Sorceror

    Message Count:
    50
    I believe ArticleA refers to the grammatical article. Each stool has ArticleA and likewise each armoire has ArticleAn, leading to "a stool" and "an armoire".

    Perhaps someone else can explain why some items have both ArticleA and ArticleAn, for example 3334 lilypad.
    Macil likes this.
  6. HellRazor Knight

    Message Count:
    19,624
    When you place the item in game, it has the default name from tiledata.mul (unless otherwise specified via script). Article A and An refers to how it will be displayed: for example, "a chair" or "an apple".

    Chair IDs are hardcoded in the client, you can't make something sitable via tiledata.mul flags.

    Partial hue refers to items that has hueable grey areas in the art - for example, this is how GM robes vs. Seer robes are done (they contain the same yellow colored bands from the gump, but the grey/white areas are hued - this tiledata flag tells the client "this item has a partial hue, hue only the white/grey areas".

    One of the values which tends to get renamed in different tiledata editors is the Anim/Gump offset flag, which is used to tell the client "this item is equippable/wearable" and points to the gump ID of the item.

    This web site has a pretty good patching tutorial to include a description of many of the tiledata flags.

    http://sorea.profitux.cz/patching
    otimpyre and Macil like this.
  7. Macil Sorceror

    Message Count:
    4,713
    Wow, good stuff guys. Looks like I've got some reading material to keep me up late tonight. Thanks a ton guys! =)
  8. otimpyre Sorceror

    Message Count:
    2,001
    Very informative thank you everyone.
  9. Macil Sorceror

    Message Count:
    4,713
    Okay, I think I've got this ALL figured out except one problem. And its driving me up the wall (no pun intended lol). I've tried this with Muleditor, Mulpatcher AND UO Fiddler with ALL the same results. When I edit my tiledata.mul and set various flags regarding some new artwork, they always refuse to acknowledge the name I've given the item. For instance, I'm trying to add a new style of plaster wall and I've named it "plaster wall." The tile data matches a traditional plaster wall to the letter, every option is ticked and numbered identicle. But when I copy the new tiledata.mul and art files into my client folder and add a wall, it appears completely empty in-game. You hover over it while its movable and it appears completely blank. If you click it, the journal says "You see:" then nothing. Am I doing something wrong here or is there additional code required to make the item have a name somewhere?

    Here is a comparison of the original plaster wall versus the new plaster wall. You can see the name works for the original one, but not the new one.
    [IMG][IMG]

    And here is what the tiledatas look like in UO Fiddler:

    [IMG]
    [IMG]
    I've also done this with some of the wooden shelf images I found at this one site, this [IMG]in particular. I added it in-game and it appears just fine. But when I add it to the furniturecontainer.cs file to be one of the additional flip images of the empty bookcase, it appears just fine but when you flip the empty bookcase it goes from saying "empty bookcase" to no name at all again, just like the wall. However this time, in addition to the wall problem, the bookcase suffers from having a backpack gump art when it opens, and also sounds like a backpack when it is opened. All I've done is simply added the artwork, set the tiledata, overwrote my old art and tiledata files, and added the two graphics to the flippable attribute in emptybookcase, shouldn't it take the same properties of a normal bookcase? Sorry if this is all a little long-winded. Its irritating the living daylights out of me right now, heh.

    Here is the bookcase script (I've highlighted the flippable attribute as well where the new artwork is located):
    Code (text):
    using System;
    using System.Collections;
    using Server;
    using Server.Multis;
    using Server.Network;

    namespace Server.Items
    {
        [Furniture]
        [Flipable( 0x2815, 0x2816 )]
        public class TallCabinet : BaseContainer
        {
            [Constructable]
            public TallCabinet() : base( 0x2815 )
            {
                Weight = 1.0;
            }

            public TallCabinet( 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();
            }
        }

        [Furniture]
        [Flipable( 0x2817, 0x2818 )]
        public class ShortCabinet : BaseContainer
        {
            [Constructable]
            public ShortCabinet() : base( 0x2817 )
            {
                Weight = 1.0;
            }

            public ShortCabinet( 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();
            }
        }

        [Furniture]
        [Flipable( 0x2857, 0x2858 )]
        public class RedArmoire : BaseContainer
        {
            [Constructable]
            public RedArmoire() : base( 0x2857 )
            {
                Weight = 1.0;
            }

            public RedArmoire( 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();
            }
        }

        [Furniture]
        [Flipable( 0x285D, 0x285E )]
        public class CherryArmoire : BaseContainer
        {
            [Constructable]
            public CherryArmoire() : base( 0x285D )
            {
                Weight = 1.0;
            }

            public CherryArmoire( 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();
            }
        }

        [Furniture]
        [Flipable( 0x285B, 0x285C )]
        public class MapleArmoire : BaseContainer
        {
            [Constructable]
            public MapleArmoire() : base( 0x285B )
            {
                Weight = 1.0;
            }

            public MapleArmoire( 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();
            }
        }

        [Furniture]
        [Flipable( 0x2859, 0x285A )]
        public class ElegantArmoire : BaseContainer
        {
            [Constructable]
            public ElegantArmoire() : base( 0x2859 )
            {
                Weight = 1.0;
            }

            public ElegantArmoire( 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();
            }
        }

        [Furniture]
        [Flipable( 0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c )]
        public class FullBookcase : BaseContainer
        {
            [Constructable]
            public FullBookcase() : base( 0xA97 )
            {
                Weight = 1.0;
            }

            public FullBookcase( 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();
            }
        }

        [Furniture]
        [COLOR=rgb(255, 0, 0)][Flipable( 0xa9d, 0xa9e, 0x3810, 0x3811 )][/COLOR]
        public class EmptyBookcase : BaseContainer
        {
            [Constructable]
            public EmptyBookcase() : base( 0xA9D )
            {
            }

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

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

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

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

                if ( version == 0 && Weight == 1.0 )
                    Weight = -1;
            }
        }

        [Furniture]
        [Flipable( 0xa2c, 0xa34 )]
        public class Drawer : BaseContainer
        {
            [Constructable]
            public Drawer() : base( 0xA2C )
            {
                Weight = 1.0;
            }

            public Drawer( 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();
            }
        }

        [Furniture]
        [Flipable( 0xa30, 0xa38 )]
        public class FancyDrawer : BaseContainer
        {
            [Constructable]
            public FancyDrawer() : base( 0xA30 )
            {
                Weight = 1.0;
            }

            public FancyDrawer( 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();
            }
        }

        [Furniture]
        [Flipable( 0xa4f, 0xa53 )]
        public class Armoire : BaseContainer
        {
            [Constructable]
            public Armoire() : base( 0xA4F )
            {
                Weight = 1.0;
            }

            public override void DisplayTo( Mobile m )
            {
                if ( DynamicFurniture.Open( this, m ) )
                    base.DisplayTo( m );
            }

            public Armoire( 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();

                DynamicFurniture.Close( this );
            }
        }

        [Furniture]
        [Flipable( 0xa4d, 0xa51 )]
        public class FancyArmoire : BaseContainer
        {
            [Constructable]
            public FancyArmoire() : base( 0xA4D )
            {
                Weight = 1.0;
            }

            public override void DisplayTo( Mobile m )
            {
                if ( DynamicFurniture.Open( this, m ) )
                    base.DisplayTo( m );
            }

            public FancyArmoire( 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();

                DynamicFurniture.Close( this );
            }
        }

        public class DynamicFurniture
        {
            private static Hashtable m_Table = new Hashtable();

            public static bool Open( Container c, Mobile m )
            {
                if ( m_Table.Contains( c ) )
                {
                    c.SendRemovePacket();
                    Close( c );
                    c.Delta( ItemDelta.Update );
                    c.ProcessDelta();
                    return false;
                }

                if ( c is Armoire || c is FancyArmoire )
                {
                    Timer t = new FurnitureTimer( c, m );
                    t.Start();
                    m_Table[c] = t;

                    switch ( c.ItemID )
                    {
                        case 0xA4D: c.ItemID = 0xA4C; break;
                        case 0xA4F: c.ItemID = 0xA4E; break;
                        case 0xA51: c.ItemID = 0xA50; break;
                        case 0xA53: c.ItemID = 0xA52; break;
                    }
                }

                return true;
            }

            public static void Close( Container c )
            {
                Timer t = (Timer)m_Table[c];

                if ( t != null )
                {
                    t.Stop();
                    m_Table.Remove( c );
                }

                if ( c is Armoire || c is FancyArmoire )
                {
                    switch ( c.ItemID )
                    {
                        case 0xA4C: c.ItemID = 0xA4D; break;
                        case 0xA4E: c.ItemID = 0xA4F; break;
                        case 0xA50: c.ItemID = 0xA51; break;
                        case 0xA52: c.ItemID = 0xA53; break;
                    }
                }
            }
        }

        public class FurnitureTimer : Timer
        {
            private Container m_Container;
            private Mobile m_Mobile;

            public FurnitureTimer( Container c, Mobile m ) : base( TimeSpan.FromSeconds( 0.5 ), TimeSpan.FromSeconds( 0.5 ) )
            {
                Priority = TimerPriority.TwoFiftyMS;

                m_Container = c;
                m_Mobile = m;
            }

            protected override void OnTick()
            {
                if ( m_Mobile.Map != m_Container.Map || !m_Mobile.InRange( m_Container.GetWorldLocation(), 3 ) )
                    DynamicFurniture.Close( m_Container );
            }
        }
    }
  10. otimpyre Sorceror

    Message Count:
    2,001
    Having same problem with flags here. If I add a wall it retains all properties I set in flags except the "name".
  11. Jeff Lord

    Message Count:
    27,982
    Are you using the SVN version (meaning you compiled it from SVN) of UO Fiddler?
  12. Macil Sorceror

    Message Count:
    4,713
    Nope. I'm afraid I've still to this day, through several tutorials, have never figured out how to use the SVNs, heh.
  13. Jeff Lord

    Message Count:
    27,982
    Well, if you are using the latest client, the downloadable version of UO Fiddler will not work. You have to use the SVN version.
  14. Macil Sorceror

    Message Count:
    4,713
    Hrm. I'm still using RunUO 2.0 and my client is the Mondains Legacy client using 7.0.8.0 patch.
  15. Jeff Lord

    Message Count:
    27,982
    ah, then i have no idea :(
  16. kegmeister Sorceror

    Message Count:
    50
    If uofiddler is retaining everything else that you set, i suspect it's also retaining the name.

    What you're looking at in your screenshot where you log in and look at the hover text is not the name in the tiledata. The hover text doesn't use the name stored in the tiledata; very few things do. By default it's using the localization entry at 1020000 + itemid. Change the text by overriding your item's LabelNumber or Name, or even AddNameProperty, AddNameProperties, or GetProperties. Or insert localized text at your desired entry.
  17. Macil Sorceror

    Message Count:
    4,713
    Is that saying I'd have to code all that and make a script for each new item I make, or is that information all in the tiledata somewhere?

    *Added* I only say that because I looked and looked for a .cs file containing information regarding the normal plaster wall and I couldn't find it anywhere. Just a few txt files oddly enough. I just figured that the walls that came with the game and what not were all hard coded in the client somewhere or something in such a way that I couldn't touch it unless I wanted to recompile the core or whatever. My understanding on that might, and probably is, very off. But that was my assumption.

Share This Page