RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Resource icon

[2.x] Full Cellar Addon 1.2

No permission to download
Was not aware this was an issue, this is the first Ive heard. I'll look into it.


Great. Bye the way the other nasty problem I had was this. If a player decides to move his house the cellar could get left behind without staff knowing about it. Also my setup auto deletes accounts that have not logged in for over 6 months. Following that the houses drop and the cellars stayed.

I am not saying this would happen with your cellar - just saying it may be worth a look. Must be a way to make it tied to the house so it deletes if the house drops.

I hope you get this worked out because I think it would be a great addition.
 

Tru

Knight
How are you preventing people from Marking in a house as by default you can, so obviously can mark in your cellar?

As for leaving the cellar behind it is an Addon so it will act as any other addon when a house falls.

If you do the distro edit to BaseHouse (the IsInside edit) this will make your cellar truly part of your house.
 

otimpyre

Sorceror
Is this exclusively for TownHouses or any house? After editing basehouse.cs and placing a custom house with houseplacement tool. It creates a house with no sign or stairs. Then I addoncellardeed and it creates the cellar and says this in console


Code:
RunUO - [www.runuo.com] Version 2.4, Build 5043.26752
Core: Running on .NET Framework Version 4.0.30319
RandomImpl: CSPRandom (Software)
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...done (3012 items, 748 mobiles) (3.82 seconds)
Regions: Loading...done
World: Loading...done (107228 items, 2663 mobiles) (4.27 seconds)
Restricting client version to 7.0.3.0. Action to be taken: LenientKick
 
Core: Using standard save strategy
World: Saving...Closing Save Files.
Save done in 0.18 seconds.
System.NullReferenceException: Object reference not set to an instance of an obj
ect.
  at Server.Items.CellarAddon2.TryInitialise()
  at Server.Items.CellarAddon2.OnMapChange()
  at Server.Item.MoveToWorld(Point3D location, Map map)
  at Server.Commands.Add.Build(Mobile from, Point3D start, Point3D end, Constru
ctorInfo ctor, Object[] values, String[,] props, PropertyInfo[] realProps, List`
1 packs, Boolean outline, Boolean mapAvg)
 
  • Like
Reactions: Tru
Hi Tru,

I downloaded and edited BaseHouse.cs as suggested . . . works like a dream . . nice work.

Three questions (first two are maybe dumb).

1) If you place secures or lock downs in the cellar than remove the Addon with an axe, the secures are still under the house. They are still locked down - do they eventually decay?
2) Similar - if the house is dropped the lock downs in the cellar are still locked down under ground. Do they eventually decay?
3) have you thought about having walls being auto added around the floor of the cellar to make it look more realistic? (maybe use same type as the Stair Teleporter).

Thanks Tru - good work!
Karma to you.
 
  • Like
Reactions: Tru

Tru

Knight
Hi Tru,

I downloaded and edited BaseHouse.cs as suggested . . . works like a dream . . nice work.

Three questions (first two are maybe dumb).

1) If you place secures or lock downs in the cellar than remove the Addon with an axe, the secures are still under the house. They are still locked down - do they eventually decay?
2) Similar - if the house is dropped the lock downs in the cellar are still locked down under ground. Do they eventually decay?
3) have you thought about having walls being auto added around the floor of the cellar to make it look more realistic? (maybe use same type as the Stair Teleporter).

Thanks Tru - good work!
Karma to you.

1) They wont decay as long as they are in the House Region (as they are still locked down)

2) If the House is dropped there is no more House Region so anything left (including the cellar) should decay as normal.

3) I thought about walls but they would not be like regular walls (ie transparent)

Thanks to you for your feedback
Karma to you!
 
I have been testing this some more and found:

1) If you have the cellar placed then start Customizing (or doing additional customizing to) the house - the cellar is removed but the cellar deed does not go to the Moving crate. This means any player doing additional customizing will have all their lock downs trapped under the house until they can find another cellar deed. I have looked . . but so far I cannot find how to force the deed to go to the Moving crate like other addon deeds when the house is customized.

2) If you are in the cellar and use an axe on the floor, the deed goes in your pack and you are left trapped below the house. Is there a way to restrict use of the axe to the Bookcase only?

3) If you place the bookcase (making a cellar) and add various secure containers and other locked down items in the basement then use a house Interior Decorator to move the bookcase (or any paty of the cellar addon) it causes the entire addon to move which can leave some of the lockdowns stranded out in the black void. This bug also lets players move their cellars so they over lap the cellars in neighboring houses.

Maybe there is a way to edit Interior Decorator tools so they do not work on this particular addon but I am not sure how that edit could be done without affecting all addons.





Any ideas?

Thanks
 
Okay - I solved Number 2 and number 3 above but still cannot solve number 1.

Number 2:
Here is the commented bit I added into HarvestTarget.cs to prevent the addon being Chopped by a player while he is in the cellar under the house. (players could grief others by chopping the bookcase while the others are in the cellar but the others could use Help Stuck to get out I guess)

Code:
protected override void OnTarget( Mobile from, object targeted )
{
 
//************************************************************
if  ( targeted is AddonComponent )
{
CellarAddon2 cellar = new CellarAddon2();
if  ( !(targeted is CellarTeleporter3) )
{
from.SendMessage("You must use that on the bookcase to remove the cellar!");
return;
}
 
if (targeted is CellarTeleporter3)
{
         CellarDeed2 deed = new CellarDeed2();
if ( from != null )
{
cellar.Delete();
from.AddToBackpack(deed);
}
}
}
//************************************************************
Number 3:
And . . here is what I added to the Interior Decorator tool so players cannot move the cellar out from under their house
Code:
//**************************************************************
else if ( (item is AddonComponent) && ( (item.ItemID == 2711) || (item.ItemID == 1823) || (item.ItemID == 0x177D) || (item.ItemID == 0x31F4) || (item.ItemID == 0x51a) || (item.ItemID == 0x4ff) || (item.ItemID == 0x521) || (item.ItemID == 0x4b8) ) )
{
from.SendLocalizedMessage( 1062491 ); // You cannot use the house decorator on that object.
}
//**************************************************************
I am still trying to solve the problem of the CellarAddonDeed not getting put in the Moving Crate when a house is customized.

If anyone has any ideas on that part I would be glad to see them.
Thanks

PS: the answer has to be in BaseHouse.cs and your cellar script but I cannot find it.
 
NOTE: Do not use the solution I posted above for Number 2.

The answer for Number 2 must be found in the cellar script itself. Trying to solve it in the HarvestTarget script opens a big can of worms.

So . . problem Number 3 is solved but Numbers 1 and 2 remain. Problem number 2 is not the end of the world but Problem number 1 is a deal breaker because the Moving crate not only does not contain the Cellar Deed - or anything else - the Moving crate sits there and cannot be deleted after looking inside it to find it is empty.

If no one has a solution to this the script should not be recommended for a production shard.

Sorry
 

Tru

Knight
#1 Could probably make it so you have to remove items and cellar before customizing (as the cellar matches the dimensions of the house).

#2 Im still contemplating

#3 Good Job.

I will probably tinker with this this weekend.
 
Hey - Hi Tru

The biggest problem I see is #1 because 'Help Stuck' solves #2.

So far . . (#1) . . if the house is customized while the cellar is in place then the Moving Crate gets messed up.

If we could prevent any Customization through the House Sign unless the cellar is dropped first, it would work for my players. Better yet . . we should discover why Cellars are not re-deeded and put in the Moving Crate after House Customization like all other addons and items (as players would expect).

I love the idea of the script and my players who have tested it do as well - just a few awkward kinks to work out (which I am not able to do) and it will be an exceptional addition to the game.

Karma to you if you can get it working . . meanwhile we have been forced to hold it back.

Cheers
 
Okay . . . this 'work around' solves the problem for me. It may need more testing but for now it prevents players from customizing a house (or changing a classic to a customizable house) while a cellar exists inside the house region. This way they cannot accidentally lose the cellar and its lockdowns.

In BaseHouse.cs add this:

//*****************************************
public bool HasCellar
{
get
{
foreach ( Item item in Addons )
{
if ( item is CellarAddon2 )
return true;
}

return false;
}
}
//*****************************************

Then in HouseGumpAOS.cs add the following in the sections for:

case 0: // Convert Into Customizable House

and

case 1: // Customize This House

//*****************************************
if ( m_House.HasCellar )
{
from.Say("You realize you cannot perform this action while you have a cellar in this house.");
return;
}
//*****************************************
 
Top