Limit on Item properties?

sahisahi

Well-Known Member
Jan 13, 2016
721
29
So im playing around with item properties i added this to my scimitar.cs


C#:
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( "<BASEFONT COLOR=#FF9633>1<BASEFONT COLOR=#FF9633><BASEFONT COLOR=#FFFFFF>");
list.Add( "<BASEFONT COLOR=#FF9633>2<BASEFONT COLOR=#FF9633><BASEFONT COLOR=#FFFFFF>");
list.Add( "<BASEFONT COLOR=#FF9633>3<BASEFONT COLOR=#FF9633><BASEFONT COLOR=#FFFFFF>");
list.Add( "<BASEFONT COLOR=#FF9633>4<BASEFONT COLOR=#FF9633><BASEFONT COLOR=#FFFFFF>");
list.Add( "<BASEFONT COLOR=#FF9633>5<BASEFONT COLOR=#FF9633><BASEFONT COLOR=#FFFFFF>");
}

in game it only shows number 4 and 5, why?

this is my baseweapon.cs getproperties method:


C#:
        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );
///////////////////////
        //    XmlTitle.AddTitles(this, list);
    /////////        ///////
            if ( m_Crafter != null )
                list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~

            #region Factions
            if ( m_FactionState != null )
                list.Add( 1041350 ); // faction item
            #endregion

            if ( m_AosSkillBonuses != null )
                m_AosSkillBonuses.GetProperties( list );

            if ( m_Quality == WeaponQuality.Exceptional )
                list.Add( 1060636 ); // exceptional

            if( RequiredRace == Race.Elf )
                list.Add( 1075086 ); // Elves Only

            if ( ArtifactRarity > 0 )
                list.Add( 1061078, ArtifactRarity.ToString() ); // artifact rarity ~1_val~

            if ( this is IUsesRemaining && ((IUsesRemaining)this).ShowUsesRemaining )
                list.Add( 1060584, ((IUsesRemaining)this).UsesRemaining.ToString() ); // uses remaining: ~1_val~

            if ( m_Poison != null && m_PoisonCharges > 0 )
                list.Add( 1062412 + m_Poison.Level, m_PoisonCharges.ToString() );

            if( m_Slayer != SlayerName.None )
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer );
                if( entry != null )
                    list.Add( entry.Title );
            }

        /*    if( m_Slayer2 != SlayerName.None )
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer2 );
                if( entry != null )
                    list.Add( entry.Title );
            }*/

            base.AddResistanceProperties( list );

            int prop;

            if (Core.ML && this is BaseRanged && ((BaseRanged)this).Balanced)
                list.Add(1072792); // Balanced


            int phys, fire, cold, pois, nrgy, chaos, direct;

            GetDamageTypes(null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct);



            list.Add( 1061168, "{0}\t{1}", MinDamage.ToString(), MaxDamage.ToString() ); // weapon damage ~1_val~ - ~2_val~
          
            if (Core.ML)
                list.Add(1061167, String.Format("{0}s", Speed)); // weapon speed ~1_val~
            else
                list.Add(1061167, Speed.ToString());

            if ( MaxRange > 1 )
                list.Add( 1061169, MaxRange.ToString() ); // range ~1_val~

            int strReq = AOS.Scale( StrRequirement, 100 - GetLowerStatReq() );

        //    if ( strReq > 0 )
        //        list.Add( 1061170, strReq.ToString() ); // strength requirement ~1_val~

            if ( Layer == Layer.TwoHanded )
                list.Add( 1061171 ); // two-handed weapon
            else
                list.Add( 1061824 ); // one-handed weapon

            if ( Core.SE || m_AosWeaponAttributes.UseBestSkill == 0 )
            {
                switch ( Skill )
                {
                    case SkillName.Swords:  list.Add( 1061172 ); break; // skill required: swordsmanship
                    case SkillName.Macing:  list.Add( 1061173 ); break; // skill required: mace fighting
                    case SkillName.Fencing: list.Add( 1061174 ); break; // skill required: fencing
                    case SkillName.Archery: list.Add( 1061175 ); break; // skill required: archery
                }
            }

            if ( m_Hits >= 0 && m_MaxHits > 0 )
                list.Add( 1060639, "{0}\t{1}", m_Hits, m_MaxHits ); // durability ~1_val~ / ~2_val~
            // mod to display attachment properties
            Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);
        }
 

Attachments

Last edited:

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,198
189
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
Not sure, but those BASEFONT tags seem strange to me. Try this instead:

C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>2</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>3</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>4</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>5</BASEFONT>");
}
 
  • Like
Reactions: sahisahi

PyrO

Well-Known Member
Jan 27, 2015
1,074
75
that is because there are only a handful cliloc entries available, so you override them yourself.

you can however try to do stuff like this
C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>2</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>3</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>4</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>5</BASEFONT>");
}
or even cleaner in this case
C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1\n" +
              2\n" +
              3\n" +
              4\n" +
              5</BASEFONT>");
}
 
  • Like
Reactions: sahisahi

sahisahi

Well-Known Member
Jan 13, 2016
721
29
Not sure, but those BASEFONT tags seem strange to me. Try this instead:

C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>2</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>3</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>4</BASEFONT>");
    list.Add( "<BASEFONT COLOR=#FF9633>5</BASEFONT>");
}
i removed every properti in baseweapon.cs and left the dmg one.

tried that this is the way it looks sci.png
Post automatically merged:

that is because there are only a handful cliloc entries available, so you override them yourself.

you can however try to do stuff like this
C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>2</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>3</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>4</BASEFONT>\n" +
              "<BASEFONT COLOR=#FF9633>5</BASEFONT>");
}
or even cleaner in this case
C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1\n" +
              2\n" +
              3\n" +
              4\n" +
              5</BASEFONT>");
}
the first one looks like the pic just posted quoting lokai, the 2nd one doesnt compile it has an error somewhere
 

PyrO

Well-Known Member
Jan 27, 2015
1,074
75
oh yea forgot to add the quotes back in

should have been.
C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1\n" +
              "2\n" +
              "3\n" +
              "4\n" +
              "5</BASEFONT>");
}
Post automatically merged:

Works as said :p well besides the 5, if you remove the </BASEFONT> at the end the 5 is centered too

13331
 
Last edited:
  • Like
Reactions: sahisahi

sahisahi

Well-Known Member
Jan 13, 2016
721
29
oh yea forgot to add the quotes back in

should have been.
C#:
public override void GetProperties( ObjectPropertyList list )
{
    base.GetProperties( list );
    list.Add( "<BASEFONT COLOR=#FF9633>1\n" +
              "2\n" +
              "3\n" +
              "4\n" +
              "5</BASEFONT>");
}
Post automatically merged:

Works as said :p well besides the 5, if you remove the </BASEFONT> at the end the 5 is centered too

View attachment 13331
!! yes that worked thank you. im getting an error

C#:
 public override void GetProperties( ObjectPropertyList list )
        {
              base.GetProperties( list );
         list.Add( "#FF9633>Legendary " +
              "<BASEFONT COLOR=#7FCAE7>Required Level:{0},m_RequiredLevel\n" +
              "3\n" +
              "4\n" +
              "5</BASEFONT>");
err.png
 

PyrO

Well-Known Member
Jan 27, 2015
1,074
75
No wizards were hurt during this experiment :p

C#:
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);
            list.Add("<BASEFONT COLOR=#FF9633>Legendary " +
                 "<BASEFONT COLOR=#7FCAE7>Required Level: {0}\n" +
                 "<BASEFONT COLOR=#3FCB47>Primary Ability: {1}\n" +
                 "<BASEFONT COLOR=#8F2537>Secondary Ability: {2}\n" +
                 "<BASEFONT COLOR=#FFFFFF>", DefaultWeight, PrimaryAbility.GetType().Name, SecondaryAbility.GetType().Name);
        }
13333
 
  • Love
Reactions: TheDoc and sahisahi

sahisahi

Well-Known Member
Jan 13, 2016
721
29
Nice! thanks, question: is there a way to edit that alpha region square or its client side?