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!

Script idea: House Paint

kirax2

Wanderer
Script idea: House Paint

Hi folks, it's been awhile. I had an idea today while working on map for my shard. I don't have time to mess around with it myself right now, but I thought it was a fun idea, so I decided to throw it out here. Please note that I am not requesting anything, only suggesting; it will be awhile before my shard is in a state to need a script like this. ^^;

What if your player could buy or make a can of paint with which they could paint their custom house? I searched the script archive and I didn't see anything quite like this. The paint could be used to hue one item at a time that was, say, static and basewall or basefloor, and owned by the using player. Judicious choosing of inside-facing and outside-facing walls could allow a player to paint the inside of a house one color and the outside another; or different rooms different colors. I figured the paint can itself would be like the dye tub, where the color is chosen first. A player could also get a "striped" effect by painting alternating walls (like some tents have).

What do you think?
-kirax2
 
AFAIK, the only part the client wouldn't support would be allowing the insides and outsides to be different colors. If you hue an item/static, it hues the whole item. But as far as scripting a dye tub to hue walls/floors, seems completely doable
 

Lokai

Knight
For this issue, you need to think 3-dimensionally.

You will never see both sides of any wall, since the view in UO does not shift around, therefore you should have no problem hue-ing the outside of the house one color and the inside another. Inside walls are never seen from the outside, and outside walls are never seen from the inside.
 

HellRazor

Knight
You'd have to do it with packets to the individual clients inside the house though, because if you re-hue the walls when someone enters, people outside the house will see that hue as well.

If you worked out a trick using packets, however, you could recolor the wall only for the client who entered the house.
 
Actually Lokai is right... paint the South and East walls the exterier color, and the North and West walls the interier color... no fiddling with packets or anything else.
 

LadyRhia

Wanderer
house paints

question what is wrong with making the walls hueable and having a special dyetub to dye them? Just a thought
 

HellRazor

Knight
Anti-Basic;680954 said:
Actually Lokai is right... paint the South and East walls the exterier color, and the North and West walls the interier color... no fiddling with packets or anything else.

Ahhhhh I see what you mean. I guess that could work. Would it be completely seamless tho?
 

Lokai

Knight
After looking at this a bit, I do not see how it can be done without wiping any Statics along the way. In other words, the Hue may only be set on Items, not on Statics, not directly anyway. When a house is built, it is made up of Statics, not Items. (See the picture. The wall of the house is [props'd on the left, and the Wall I added as an Item is [props'd on the right.)

In order for this to work, it could only be applied to Houses made up entirely of Items, not statics. This would increase the Item count, and possibly cause other problems.

If you try to say "[set Hue 777" on the Static wall, the one that's part of the house, it says "This command does not work on that."
 

Attachments

  • HousePaint.jpg
    HousePaint.jpg
    133.7 KB · Views: 117
actualy it could be done for both types
the houses are not true statics inless they were made to be that way by an admin and added to the patches

you can even hue statics until they are frozen and then of course patched to be seen

but the problem is that houses, boats and other multis are treated diffferently than other objects in the game - when a person comes close to them, the info for the whole things is sent to the client and placed in a cache (that is why there is a setting in the option for each player of how many houses to cache, so it does not have to keep reloading them)

would be easier with custom houses, because they have a "building tool" all ready, standard houses would be a lot harder to do.

but basicaly you would need to have a new "tool" on the custom menu for the house building for coloring or basicaly copy its routines for the "tub" to do it

it would be a lot of work, but once it was finished, it could be a very nice system

I do not see them adding this into the runuo scripts themselves, but a 3rd party could probably make it and many many people would be happy for it
 
his method does not actualy paint the item
he dupes the item with the new color and sets up unmovable
there are still problems with that method, like item count, etc
and also, sometimes when 2 items take the same spot, so get seen, some don't depending on the log in time :) (this log in it works, next log in old house is seen, etc - depends a lot on the client patch)

it was a good idea he had, but overall will cause problems down the road (like removed houses that are still there as a shell, etc
 

Lokai

Knight
Lord_Greywolf;682549 said:
his method does not actualy paint the item
he dupes the item with the new color and sets up unmovable
there are still problems with that method, like item count, etc
and also, sometimes when 2 items take the same spot, so get seen, some don't depending on the log in time :) (this log in it works, next log in old house is seen, etc - depends a lot on the client patch)

it was a good idea he had, but overall will cause problems down the road (like removed houses that are still there as a shell, etc

Some problems I am still working on. Instead of making the item Non-movable, now I am making it Locked Down. This will help with several things. One, it will keep people from going crazy on their house, since it affects the number of Lockdowns they can have. Two, it will reduce Item-count lag.

I still need to find a way to have the Item self-desruct if they try to move it.

Basically, I set out to create a system that would not require re-inventing the House Customization gump. (That would be a pain.) I am still hoping I will succeed. If nothing else, it has sparked some interesting ideas.
 
do you want it to self destruct if they try to move it or if they remove the house?

if when they try to move it - can use this routine:
Code:
   public override bool OnDragLift( Mobile from )
  {
   from.SendMessage ("You are unable to move the wall, and it then crumbles form the attempt");
   this.Delete();
   return false;
  }

if you want them to go poof when the house is destroyed,
then add something to declare this is a painted house it - like they are all "basepainteditems"
then find the part in the house gumps for the call to demolish the house, go to the call, and in there have it check the house region 1st and have it delete all of the type "basepainteditems" in that houses region or area, etc
 

Lokai

Knight
Yeah, I ended up using OnDragLift, but just made it return false unless it was a GM. I kept trying to use OnMovement(), and it wasn't working, then I found OnDragLift(), and it works great.

I think I found a way to remove the items easily on House Chop. I will post the instructions to the Script Release thread.
 
Top