1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
0/5,

Modifiable Lockdowns and Secure Storage

Summary of the tutorial

This tutorial is for those who want to modify the lock down and secure storage values of a house using the following command: [area interface where basemulti

This was not previously working with the distro because the devs left some crucial definitions out of both the ServUO and RunUO repositories; most likely because they didn't think it was necessary.

I am under the school of thought that what is necessary is up to the individual and if you have something as cool as this to share, submit it and let the community decide if they want to use it.

With that said, I hope everyone enjoys this little housing tweak:


In BaseHouse.cs:

Look For The Snippet Below:

Code (C#):
  1.  
  2. [CommandProperty(AccessLevel.GameMaster)]
  3. public virtual double BonusStorageScalar { get { return (Core.ML ? 1.2 : 1.0); } }
  4.  
Under The Above Code Add:

Code (C#):
  1.  
  2. #region Modifiable Secure Storage [01-02]
  3. //[area interface where basemulti
  4.  
  5.         [CommandProperty(AccessLevel.GameMaster)]
  6.         public bool UseAosSecures
  7.         {
  8.             get;
  9.             set;
  10.         }
  11.  
  12. #endregion
  13.  
  14. #region Modifiable Lockdown Count [01-02]
  15. //[area interface where basemulti
  16.  
  17.         [CommandProperty(AccessLevel.GameMaster)]
  18.         public bool UseAosLockdowns
  19.         {
  20.             get;
  21.             set;
  22.         }
  23.  
  24. #endregion
  25.  
Look For The Method Below:

Code (C#):
  1.  
  2. public virtual int GetAosMaxSecures()
  3. {
  4.  
Replace All Code In That Method With:

Code (C#):
  1.  
  2. #region Modifiable Secure Storage [02-02]
  3. //[area interface where basemulti
  4.  
  5.             HousePlacementEntry hpe = GetAosEntry();
  6.  
  7.             if (hpe == null)
  8.             {
  9.                 return 0;
  10.             }
  11.  
  12.             if (UseAosSecures)
  13.             {
  14.                 return (int)(hpe.Storage * BonusStorageScalar);
  15.             }
  16.             else return m_MaxSecures;
  17.  
  18. #endregion
  19.  
Then Look For The Next Method:

Code (C#):
  1.  
  2. public virtual int GetAosMaxLockdowns()
  3. {
  4.  
Replace All Code In That Method With:

Code (C#):
  1.  
  2. #region Modifiable Lockdown Count [02-02]
  3. //[area interface where basemulti
  4.  
  5.             if (hpe == null)
  6.             {
  7.                 return 0;
  8.             }
  9.  
  10.             if (UseAosLockdowns)
  11.             {
  12.                 return (int)(hpe.Lockdowns * BonusStorageScalar);
  13.             }
  14.             else return m_MaxLockDowns;
  15.  
  16. #endregion
  17.  
A Special Thank You To Enroq, Vorspire, Dexter_Lexia, and Zerodowned For Guiding The Way!