House Increase Scroll

Lagatha

Well-Known Member
Aug 28, 2016
123
27
Idaho. USA
Hi all what i'm trying to do is take deed I have from run uo and and make it work in serveuo. no luck so far. I have players able to have up to 2 house but would like to add the deed so they can add up to 2 more. Any help would be great.
 

Attachments

Asteria

Well-Known Member
Sep 4, 2018
85
10
29
legendsofsosaria.wixsite.com
Shard Name
Legends of Sosaria
Donate
Donate money to this user
we had tried this deed when we added in extra house slots on our server and had no luck with it. the solution for us ended up being added in a section into basehouse for an extra house slots tag as well as into our playermobile, then we essentially just made a deed that adjusts the number in that tag.
 
  • Like
Reactions: Lagatha

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,265
211
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
Look at BaseHouse, method CheckAccountHouseLimit().

In there it checks to see if a Mobile is at the shard's housing limit. It should be easy enough to modify that method to first check the Shard Limit of 2, then pull the Mobile's Account, check for the Account tag created by the Scroll, and allow them to proceed if it finds more slots for them.
 

Lagatha

Well-Known Member
Aug 28, 2016
123
27
Idaho. USA
we had tried this deed when we added in extra house slots on our server and had no luck with it. the solution for us ended up being added in a section into basehouse for an extra house slots tag as well as into our playermobile, then we essentially just made a deed that adjusts the number in that tag.
Well that sounds like what i will have to do. Only lol I dont know how. :) May I see How it is written?
 

Lagatha

Well-Known Member
Aug 28, 2016
123
27
Idaho. USA
Look at BaseHouse, method CheckAccountHouseLimit().

In there it checks to see if a Mobile is at the shard's housing limit. It should be easy enough to modify that method to first check the Shard Limit of 2, then pull the Mobile's Account, check for the Account tag created by the Scroll, and allow them to proceed if it finds more slots for them.
I have changed the players amount of houses all may have, but i was looking for how to only change one player at a time. But thank you for your effort.
 

magik hatt

Active Member
Apr 7, 2018
39
4
I was attempting to get this to work on my ServUO. I updated BaseHouse, Account, and used the ExtraHouseDeed file posted. It says it increases the house slots, but I'm still limited to 1 house.
 

Violet Joy

Member
Sep 29, 2018
10
3
I was attempting to get this to work on my ServUO. I updated BaseHouse, Account, and used the ExtraHouseDeed file posted. It says it increases the house slots, but I'm still limited to 1 house.
A config entry is used to get the account house limit for all players. If this value is zero and you used the deed, your total allowed houses becomes one.
I believe if the config entry doesn't exist in the config text files, the value returned is still zero. You may need to add the config entry.
 

Lagatha

Well-Known Member
Aug 28, 2016
123
27
Idaho. USA
I was attempting to get this to work on my ServUO. I updated BaseHouse, Account, and used the ExtraHouseDeed file posted. It says it increases the house slots, but I'm still limited to 1 house.
Ya I never got it work on my shard, but i found a work around. I make the player staff and transfer the house to them.. Then i return them to player
 

magik hatt

Active Member
Apr 7, 2018
39
4
I can't say exactly what the problem was, but I upgraded to the latest release of ServUO and a slightly higher UO client. House increase appears to be working as it should for me now.
 

magik hatt

Active Member
Apr 7, 2018
39
4
I used the ExtraHouseDeed.cs file Violet Jay posted then edited my BaseHouse.cs and Account.cs files based on the extra house edits in the files Violet Jay posted.

BaseHouse has 1 edit.
C#:
public static int GetAccountHouseLimit(Mobile m)
        {
            //added extra house here
            #region ExtraAccountHouses
            if (m.Account != null)
            {
                if (m.Account is Account)
                {
                    Account account = m.Account as Account;
                    return AccountHouseLimit + account.ExtraAccountHouses;
                }
                else
                {
                    return AccountHouseLimit;
                }
            }
            #endregion ExtraAccountHouses

Account has 3 edits.
C#:
[PropertyObject]
    public class Account : IAccount, IComparable, IComparable<Account>
    {
        //added extra house accounts here
        #region ExtraAccountHouses

        private int m_ExtraAccountHouses = 0;

        [CommandProperty(AccessLevel.Counselor, AccessLevel.Administrator)]
        public int ExtraAccountHouses
        {
            get
            {
                return m_ExtraAccountHouses;
            }
            set
            {
                if (value < 0)
                    value = 0;

                m_ExtraAccountHouses = value;
            }
        }
        #endregion ExtraAccountHouses
        //end extra house edits
C#:
public Account(XmlElement node)
        {
            //added extra house accounts here
            #region ExtraAccountHouses

            m_ExtraAccountHouses = Utility.GetXMLInt32(Utility.GetText(node["extraAccountHouses"], "0"), 0);

            #endregion ExtraAccountHouses
            //end extra house here
C#:
public void Save(XmlTextWriter xml)
        {
            xml.WriteStartElement("account");

            //added extra house accounts here
            #region ExtraAccountHouses

            xml.WriteStartElement("extraAccountHouses");
            xml.WriteString(m_ExtraAccountHouses.ToString());
            xml.WriteEndElement();

            #endregion ExtraAccountHouses
            //end extra house here
 
Last edited:
  • Like
Reactions: Lokai

jayates

Well-Known Member
Nov 13, 2013
82
3
50
Shard Name
Ultima Online Eternal Vengence
I used these files too and just like
magik hatt
I couldn't get this to work either. I tried to just replace my basehouse script with the posted one and got a ton of errors so, I put mine back and edited it like
magik hatt's post and it didn't work.
Post automatically merged:

Of course I edited the account.cs and added the ExtraHouseDeed.cs too.
Post automatically merged:

we had tried this deed when we added in extra house slots on our server and had no luck with it. the solution for us ended up being added in a section into basehouse for an extra house slots tag as well as into our playermobile, then we essentially just made a deed that adjusts the number in that tag.
Will you share your work?
 
Last edited:
  • Like
Reactions: Lagatha

Lagatha

Well-Known Member
Aug 28, 2016
123
27
Idaho. USA
I never got this to work for me but at least people are still posting and some seem to be able to make it work. So i have hope
 

Violet Joy

Member
Sep 29, 2018
10
3
Account needs to hold and serialize the number of extra houses it has. This is a new property which needs to be added.
Next, in 'BaseHouse.cs' you need to modify the method 'GetAccountHouseLimit(Mobile m)' to return the total houses allowed for that mobile.
To do this, you need to verify the mobile has an account and then add the house bonus from the account to the number returned.