ServUO Custom Castle & Keep Sized Housing?

ronfellows

Member
Sep 9, 2017
9
1
Anyone able to help with this? I would love to add this to my server but I haven't found anything that works yet.

Thanks!
 

Falkor

Well-Known Member
Apr 11, 2018
89
24
wpshard.com
Shard Name
Whispering Pines
Of course you'll need a client new enough to have these multis.

My ServUO code is about a year old and I really don't want to update everything after finally getting so many scripts merged to my liking. Instead I worked on adding the new foundations and I think it was just a matter of adding this to HousePlacementTool.cs (around line 409):

Code:
            new HousePlacementEntry(typeof(HouseFoundation), 1060384,    2119,    1059,    2437,    1218,    42,    187000, 0,    10,    0,    0x147B), // 18x18 3-Story Customizable House
            new HousePlacementEntry(typeof(HouseFoundation), 1158538,    2625,    1312,    3019,    1509,    78,    525000, 0,    10,    0,    0x147C), // 23x23 3-Story Customizable Keep
            new HousePlacementEntry(typeof(HouseFoundation), 1158539,    4076,    2038,    4688,    2344,    78,    525000, 0,    10,    0,    0x147D)  // 32x32 3-Story Customizable Castle
The two new lines go under the old 18x18 entry, and be sure to add a comma after 0x147B), in the old entry.


Then in HouseFoundation.cs:

Code:
change

                    m_PlaneBuffers[i] = new byte[0x400];

to
                    m_PlaneBuffers[i] = new byte[0x1156];
That gets me 99% of the way there. I can add and customize the new plots with no problem. Deleting the plot seems to leave "a ghost" of parts of it on my client until I completely exit it and restart. I don't have the issue with regular castles so I'm not sure what's causing that.
Post automatically merged:

Oops, forgot PyrO's edit for HousePlacement.cs:

Code:
change

if (multiID >= 0x13EC && multiID < 0x1D00)
    HouseFoundation.AddStairsTo(ref mcl); // this is a AOS house, add the stairs

to

if ((multiID >= 0x13EC && multiID < 0x1D00) || (multiID >= 0x147C && multiID <= 0x147D ))
    HouseFoundation.AddStairsTo(ref mcl); // this is a AOS house, add the stairs
 
Last edited:

ronfellows

Member
Sep 9, 2017
9
1
Thank you so much. Ill give it a go!
Post automatically merged:

So when I try and place one the house placement took is working, the preview looks good but when you accept it it places a sign post in the middle of where the plot would be. Any ideas? 137341373513736
Post automatically merged:

Thank you so much. Ill give it a go!
Post automatically merged:

So when I try and place one, the house placement tool is working, the preview looks good but when you accept it it places a sign post in the middle of where the plot would be. Any ideas?

137341373513736
 
Last edited:

Falkor

Well-Known Member
Apr 11, 2018
89
24
wpshard.com
Shard Name
Whispering Pines
How old is your version of ServUO? I forgot that these new multis are not in the old MUL files but in the new UOP, and that required further editing of the core scripts to get the server to see it.

Your client can see the preview image because it recognizes the multi value being passed to it. The server sees nothing in that slot so you get no foundation when you commit.
 
  • Like
Reactions: sahisahi

Falkor

Well-Known Member
Apr 11, 2018
89
24
wpshard.com
Shard Name
Whispering Pines
Build numbers are different for everyone - depends on how many times you've compiled your core.

My code base is from April 2018 (says Build 7098 if it's useful.) I edited a couple of core scripts so I could use newer gumps and I updated MultiData.cs to be able to use multis from the new file format. I've attached that MultiData.cs file if you want to try compiling your core with it, and I'm also providing my compiled exe if you'd like to give it a try that way. Either way be sure to copy your existing files first so you can always switch back!

I also forgot a minor edit to PreviewHouse.cs that will be useful once you get the server to see the new multis.

Change
Code:
if (multiID >= 0x13ec && multiID <= 0x147b)
to

Code:
if (multiID >= 0x13ec && multiID <= 0x147D)
 

Attachments

  • Like
Reactions: ronfellows

ronfellows

Member
Sep 9, 2017
9
1
I was able to load the server replacing the multidata.cs, after that I tried using your compiled exe and received this error. I'm a pretty new to all of this so I'm clueless!
13747
Post automatically merged:

Just Kidding! After running the server in debug I was able to start right up!

THANK YOU!
 
Last edited:

Falkor

Well-Known Member
Apr 11, 2018
89
24
wpshard.com
Shard Name
Whispering Pines
My exe is compiled from code prior to the DeleteConfirm function being added, so this MultiData.cs and compiling it with the rest of your existing core is probably the best way to do it.

So you have the new plots working properly now?