/// Scripted by Hienrich Jager /// /// of /// /// The Land of Adventure /// /// With help from /// /// Tru and Raelis /// /////////////////////////////////////////// If you open in notepad turn off wordwrap!! If at anytime you get lost in my instructions here, refer to the included refrence files: Warning. These are all distro mods. ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Okies, first off lets do BaseArmor.cs Open your BaseArmor.cs and search for the line: public override bool CanEquip( Mobile from) { if(from.AccessLevel < AccessLevel.GameMaster) { Right after that, Add the lines: #region ItemID_Mods else if( m_Identified == false ) { from.SendMessage("You are hesitant to put on something that is unknown to you"); return false; } #endregion ---------------------- Now look for the line: if ((prop = ArtifactRarity) > 0) Right above that line add the line: #region ItemID_Modifications if (m_Identified) { then scroll down till you see: if (m_HitPoints >= 0 && m_MaxHitPoints > 0) Then add below that line: } else if ((ArtifactRarity) > 0 || (m_AosAttributes.WeaponDamage) != 0 || (m_AosAttributes.DefendChance) != 0 || (m_AosAttributes.BonusDex) != 0 || (m_AosAttributes.EnhancePotions) != 0 || (m_AosAttributes.CastRecovery) != 0 || (m_AosAttributes.CastSpeed) != 0 || (m_AosAttributes.AttackChance) != 0 || (m_AosAttributes.BonusHits) != 0 || (m_AosAttributes.BonusInt) != 0 || (m_AosAttributes.LowerManaCost) != 0 || (m_AosAttributes.LowerRegCost) != 0 || (GetLowerStatReq()) != 0 || ((GetLuckBonus() + m_AosAttributes.Luck)) != 0 || (m_AosArmorAttributes.MageArmor) != 0 || (m_AosAttributes.BonusMana) != 0 || (m_AosAttributes.RegenMana) != 0 || (m_AosAttributes.NightSight) != 0 || (m_AosAttributes.ReflectPhysical) != 0 || (m_AosAttributes.RegenStam) != 0 || (m_AosAttributes.RegenHits) != 0 || (m_AosArmorAttributes.SelfRepair) != 0 || (m_AosAttributes.SpellChanneling) != 0 || (m_AosAttributes.SpellDamage) != 0 || (m_AosAttributes.BonusStam) != 0 || (m_AosAttributes.BonusStr) != 0 || (m_AosAttributes.WeaponSpeed) != 0 || (GetDurabilityBonus()) > 0 || (ComputeStatReq(StatType.Str)) > 0 || (m_HitPoints >= 0 && m_MaxHitPoints > 0 )) list.Add(1060847, "
Unidentified
" ); #endregion ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Now for BaseWeapon.cs Search for the line: public override bool CanEquip( Mobile from) { if(from.AccessLevel < AccessLevel.GameMaster) { Right after that, Add the lines: #region ItemID_Mods else if( m_Identified == false ) { from.SendMessage("You are hesitant to use something that is unknown to you"); return false; } #endregion ---------------------- Now look for the line: if (this is IUsesRemaining && ((IUsesRemaining)this).ShowUsesRemaining) list.Add(1060584, ((IUsesRemaining)this).UsesRemaining.ToString()); // uses remaining: ~1_val~ And right after it add: #region ItemID Modifications if (m_Identified) { Now search for: if (m_Hits >= 0 && m_MaxHits > 0) list.Add(1060639, "{0}\t{1}", m_Hits, m_MaxHits); // durability ~1_val~ / ~2_val~ And after that add the lines: } else if (ArtifactRarity > 0 || (m_AosWeaponAttributes.UseBestSkill) != 0 || ((GetDamageBonus() + m_AosAttributes.WeaponDamage)) != 0 || (m_AosAttributes.DefendChance) != 0 || (m_AosAttributes.EnhancePotions) != 0 || (m_AosAttributes.CastRecovery) != 0 || (m_AosAttributes.CastSpeed) != 0 || ((GetHitChanceBonus() + m_AosAttributes.AttackChance)) != 0 || (m_AosWeaponAttributes.HitColdArea) != 0 || (m_AosWeaponAttributes.HitDispel) != 0 || (m_AosWeaponAttributes.HitEnergyArea) != 0 || (m_AosWeaponAttributes.HitFireArea) != 0 || (m_AosWeaponAttributes.HitFireball) != 0 || (m_AosWeaponAttributes.HitHarm) != 0 || (m_AosWeaponAttributes.HitLeechHits) != 0 || (m_AosWeaponAttributes.HitLightning) != 0 || (m_AosWeaponAttributes.HitLowerAttack) != 0 || (m_AosWeaponAttributes.HitLowerDefend) != 0 || (m_AosWeaponAttributes.HitMagicArrow) != 0 || (m_AosWeaponAttributes.HitLeechMana) != 0 || (m_AosWeaponAttributes.HitPhysicalArea) != 0 || (m_AosWeaponAttributes.HitPoisonArea) != 0 || (m_AosWeaponAttributes.HitLeechStam) != 0 || (m_AosAttributes.BonusDex) != 0 || (m_AosAttributes.BonusHits) != 0 || (m_AosAttributes.BonusInt) != 0 || (m_AosAttributes.LowerManaCost) != 0 || (m_AosAttributes.LowerRegCost) != 0 || (GetLowerStatReq()) != 0 || ((GetLuckBonus() + m_AosAttributes.Luck)) != 0 || (m_AosWeaponAttributes.MageWeapon) != 0 || (m_AosAttributes.BonusMana) != 0 || (m_AosAttributes.RegenMana) != 0 || (m_AosAttributes.NightSight) != 0 || (m_AosAttributes.ReflectPhysical) != 0 || (m_AosAttributes.RegenStam) != 0 || (m_AosAttributes.RegenHits) != 0 || (m_AosWeaponAttributes.SelfRepair) != 0 || (m_AosAttributes.SpellChanneling) != 0 || (m_AosAttributes.SpellDamage) != 0 || (m_AosAttributes.BonusStam) != 0 || (m_AosAttributes.BonusStr) != 0 || (m_AosAttributes.WeaponSpeed) != 0) list.Add(1060847, "
Unidentified
" ); #endregion ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Now for BaseJewel.cs Right After the line: public abstract class BaseJewel : Item, ICraftable { Add the lines: #region ItemID_Mods private bool m_Identified; [CommandProperty(AccessLevel.GameMaster)] public bool Identified { get { return m_Identified; } set { m_Identified = value; InvalidateProperties(); } } #endregion ---------------------- Then Look for the Lines: public BaseJewel( int itemID, Layer layer ) : base( itemID ) { m_AosAttributes = new AosAttributes( this ); m_AosResistances = new AosElementAttributes( this ); m_AosSkillBonuses = new AosSkillBonuses( this ); m_Resource = CraftResource.Iron; m_GemType = GemType.None; Layer = layer; } Add the code: #region ItemID_Mods public override bool CanEquip(Mobile from) { if (from.AccessLevel < AccessLevel.GameMaster) { if (m_Identified == false) { from.SendMessage("You are hesitant to put on something that is unknown to you"); return false; } } return base.CanEquip(from); } #endregion ---------------------- Then look for: public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); m_AosSkillBonuses.GetProperties( list ); int prop; And add after: #region ItemID_Mods if ( m_Identified ) { Then look for: base.AddResistanceProperties( list ); And add after it: } else if ((ArtifactRarity) > 0 || (m_AosAttributes.WeaponDamage) != 0 || (m_AosAttributes.DefendChance) != 0 || (m_AosAttributes.BonusDex) != 0 || (m_AosAttributes.EnhancePotions) != 0 || (m_AosAttributes.CastRecovery) != 0 || (m_AosAttributes.CastSpeed) != 0 || (m_AosAttributes.AttackChance) != 0 || (m_AosAttributes.BonusHits) != 0 || (m_AosAttributes.BonusInt) != 0 || (m_AosAttributes.LowerManaCost) != 0 || (m_AosAttributes.LowerRegCost) != 0 || (m_AosAttributes.BonusMana) != 0 || (m_AosAttributes.RegenMana) != 0 || (m_AosAttributes.NightSight) != 0 || (m_AosAttributes.ReflectPhysical) != 0 || (m_AosAttributes.RegenStam) != 0 || (m_AosAttributes.RegenHits) != 0 || (m_AosAttributes.SpellChanneling) != 0 || (m_AosAttributes.SpellDamage) != 0 || (m_AosAttributes.BonusStam) != 0 || (m_AosAttributes.BonusStr) != 0 || (m_AosAttributes.WeaponSpeed) != 0) list.Add(1060847, "
Unidentified
" ); #endregion ---------------------- Now for some Ser/deser fun! Increase the version by 1 I.E. writer.Write( (int) # ); // version Change this to writer.Write( (int) (#+1) ); // version And add right after: #region ItemID_Mods writer.Write( (bool)m_Identified ); #endregion Now go to Deser. and add the lines: #region ItemID_Mods case (#+1): { m_Identified = reader.ReadBool(); goto case #; } #endregion ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ For BaseClothing.cs Look for: public abstract class BaseClothing : Item, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability { And After the lines about factions, add: #region ItemID_Mods private bool m_Identified; [CommandProperty(AccessLevel.GameMaster)] public bool Identified { get { return m_Identified; } set { m_Identified = value; InvalidateProperties(); } } #endregion ---------------------- Search for the line: public override bool CanEquip( Mobile from) { if(from.AccessLevel < AccessLevel.GameMaster) { Right after that, Add the lines: #region ItemID_Mods else if( m_Identified == false ) { from.SendMessage("You are hesitant to use something that is unknown to you"); return false; } #endregion ---------------------- Now look for the line: if ( m_Quality == WeaponQuality.Exceptional ) list.Add( 1060636 ); // exceptional or if you are running SVn 187: if( RequiredRace == Race.Elf ) list.Add( 1075086 ); // Elves Only And right after it add: #region ItemID Modifications if (m_Identified) { Now search for: if (m_Hits >= 0 && m_MaxHits > 0) list.Add(1060639, "{0}\t{1}", m_Hits, m_MaxHits); // durability ~1_val~ / ~2_val~ And after that add the lines: } else if ((ArtifactRarity) > 0 || (m_AosAttributes.WeaponDamage) != 0 || (m_AosAttributes.DefendChance) != 0 || (m_AosAttributes.BonusDex) != 0 || (m_AosAttributes.EnhancePotions) != 0 || (m_AosAttributes.CastRecovery) != 0 || (m_AosAttributes.CastSpeed) != 0 || (m_AosAttributes.AttackChance) != 0 || (m_AosAttributes.BonusHits) != 0 || (m_AosAttributes.BonusInt) != 0 || (m_AosAttributes.LowerManaCost) != 0 || (m_AosAttributes.LowerRegCost) != 0 || (m_AosAttributes.BonusMana) != 0 || (m_AosAttributes.RegenMana) != 0 || (m_AosAttributes.NightSight) != 0 || (m_AosAttributes.ReflectPhysical) != 0 || (m_AosAttributes.RegenStam) != 0 || (m_AosAttributes.RegenHits) != 0 || (m_AosAttributes.SpellChanneling) != 0 || (m_AosAttributes.SpellDamage) != 0 || (m_AosAttributes.BonusStam) != 0 || (m_AosAttributes.BonusStr) != 0 || (m_AosAttributes.WeaponSpeed) != 0 || (ComputeStatReq(StatType.Str)) > 0 || (m_HitPoints >= 0 && m_MaxHitPoints > 0)) list.Add(1060847, "
Unidentified
" ); #endregion ---------------------- Now in the [Flags] section, change the end to look as follows //Added a comma to the end of the following line StrReq = 0x00000400, //ItemID_Mods added the line below Identified = 0x00000800 ---------------------- Now for some Ser/deser fun! Increase the version by 1 I.E. writer.Write( (int) # ); // version Change this to writer.Write( (int) (#+1) ); // version Then at the end of the SetSaveFlag list, add: //Added the line below for ItemID_Mods SetSaveFlag( ref flags, SaveFlag.Identified, m_Identified != false); ---------------------- Then in Deser: right after switch ( version ) { Add: #region ItemID_Mods case 6: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Resource ) ) m_Resource = (CraftResource)reader.ReadEncodedInt(); else m_Resource = DefaultResource; if ( GetSaveFlag( flags, SaveFlag.Attributes ) ) m_AosAttributes = new AosAttributes( this, reader ); else m_AosAttributes = new AosAttributes( this ); if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) ) m_AosClothingAttributes = new AosArmorAttributes( this, reader ); else m_AosClothingAttributes = new AosArmorAttributes( this ); if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) ) m_AosSkillBonuses = new AosSkillBonuses( this, reader ); else m_AosSkillBonuses = new AosSkillBonuses( this ); if ( GetSaveFlag( flags, SaveFlag.Resistances ) ) m_AosResistances = new AosElementAttributes( this, reader ); else m_AosResistances = new AosElementAttributes( this ); if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) ) m_MaxHitPoints = reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.HitPoints ) ) m_HitPoints = reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Crafter ) ) m_Crafter = reader.ReadMobile(); if ( GetSaveFlag( flags, SaveFlag.Quality ) ) m_Quality = (ClothingQuality)reader.ReadEncodedInt(); else m_Quality = ClothingQuality.Regular; if ( GetSaveFlag( flags, SaveFlag.StrReq ) ) m_StrReq = reader.ReadEncodedInt(); else m_StrReq = -1; if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) ) m_PlayerConstructed = true; if ( GetSaveFlag( flags, SaveFlag.Identified ) ) m_Identified = true; break; } #endregion NOTE: not sure why it was done like this, but it works. so good for me. ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Finally for ItemIdentification.cs Look for the line: else if ( o is BaseArmor ) ((BaseArmor)o).Identified = true; Then Add the following lines below it: //ItemID Mods Begin else if ( o is BaseClothing) ((BaseClothing)o).Identified = true; else if ( o is BaseJewel) ((BaseJewel)o).Identified = true; //ItemID Mods End ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ OPTIONAL1: If you want to make it so that playercrafted items are always already Identified, then add the following changes into your CraftItem.cs Look for the line: if ( item != null ) { And add under it: double chance = ((from.Skills[SkillName.ItemID].Value-10)*0.01); chance += (from.Skills[SkillName.ArmsLore].Value*0.001); if ( chance >= Utility.RandomDouble() ) { if ( item is BaseWeapon ) ((BaseWeapon)item).Identified = true; if ( item is BaseArmor ) ((BaseArmor)item).Identified = true; if ( item is BaseClothing) ((BaseClothing)item).Identified = true; if ( item is BaseJewel) ((BaseJewel)item).Identified = true; } ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ OPTIONAL2: If you want your artifact items to always show their stats, and will thus not have to be identified, then remove all refrences to "(ArtifactRarity) > 0" from my additions. Also make sure that that lins is not included in the regions that my modifications create. ///////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ NOTE: This mod was installed and tested on SVN 187 with MalGanis's ML script installed. This just changes where some of the locations are at. but not more than 1 or 2 lines. Note: You may want to set everything as already identified, othewise any loot drops that have already been dropped, and all your players items/armor will need to be ItemID'ed again as it will all go to Unidentified untill it is Id'd Thanks to Tru for pointing this out, and providing the command to make this change [global set Identified true items NOTE: Thanks to Raelis and all the help that he gave with this script! props man! Hienrich Jager