Amadora

Member
I want the advanced tool to move all addons not just some can someone please help me out? I am using the newest servUo repo! For example my advance tool will move a custom addon I made but it will not move a stone table addon that was already in the game!
 

Attachments

  • AdvanceInteriorDecorator.cs
    25.1 KB · Views: 24
correct but I know you can make it move addons because I have seen it on several shards but I can not get it to work on mine
 
Looking at the code it seems that addons are handled by the block following:
else if (!house.IsLockedDown(item) && !house.IsSecure(item) && !isDecorableComponent)
And there rest is all else if, so you need an exception to allow addons to reach the block that handles all the movement etc
 
ok, I will have to figure it out because we want to be able to move addons and I know it can be done just having a hard time getting it to work correctly.
 
C#:
/*In the OnTarget method*/              
                else if (targeted is Item && CheckUse(m_Decorator, from))
                {
                    BaseHouse house = BaseHouse.FindHouseAt(from);
                    Item item = (Item)targeted;

                    bool isDecorableComponent = false;

                    if (m_Decorator.Command == DecorateCommand.Turn && IsKingsCollection(item))
                    {
                        isDecorableComponent = true;
                    }
                    else if (/*Include your item class here || */ item is AddonComponent || item is AddonContainerComponent || item is BaseAddonContainer)
                    {
                        object addon = null;
                        int count = 0;
                       
                        /* Include your item class here
                        else */ if (item is AddonComponent)
                        {
                            AddonComponent component = (AddonComponent)item;
                            count = component.Addon.Components.Count;
                            addon = component.Addon;
                        }
                        else if (item is AddonContainerComponent)
                        {
                            AddonContainerComponent component = (AddonContainerComponent)item;
                            count = component.Addon.Components.Count;
                            addon = component.Addon;
                        }
                        else if (item is BaseAddonContainer)
                        {
                            BaseAddonContainer container = (BaseAddonContainer)item;
                            count = container.Components.Count;
                            addon = container;
                        }

                        if (count == 1 && Core.SE)
                            isDecorableComponent = true;

                        if (item is EnormousVenusFlytrapAddon)
                            isDecorableComponent = true;

                        if (m_Decorator.Command == DecorateCommand.Turn)
                        {
                            FlipableAddonAttribute[] attributes = (FlipableAddonAttribute[])addon.GetType().GetCustomAttributes(typeof(FlipableAddonAttribute), false);

                            if (attributes.Length > 0)
                                isDecorableComponent = true;
                        }
                    }
 
I too am on the hunt to make deco that can be nudged with the interior decorator tool. A few attempts to force the code to make an exception has failed. I'm going to make another attempt to solve it code side today.
 
I've made it operational again and separated the classes. A similar, nicely designed version already existed; I'll get that running again too. You can take a look if you like.

1713429134565.png

Colors should be better integrated; they could be expanded, along with the design of the gump, perhaps making it more modern, and other existing functions. A similar version existed before but had more features—I would need to search for it. There are now 3 classes.
 

Attachments

  • AdvanceInteriorDecorator.rar
    4.3 KB · Views: 9
Added the following after line 315
InteriorDecorator.cs:
isDecorableComponent = true;

Still testing for any bugs that might follow but so for so good. Here is what I added to make addon deco deeds work with this tool :)
 
Post the script in full with your extension here, and I'll take a look at it. I've seen something similar about 20 years ago, but the Gump design was different back then. Ultimately, you can rebuild it as needed, so you can go all out and encourage others to become creative.
 
I've made it operational again and separated the classes. A similar, nicely designed version already existed; I'll get that running again too. You can take a look if you like.

View attachment 23733

Colors should be better integrated; they could be expanded, along with the design of the gump, perhaps making it more modern, and other existing functions. A similar version existed before but had more features—I would need to search for it. There are now 3 classes.
Errors:
+ Custom/Testing/AdvanceInteriorDecorator/InternalTarget.cs:
CS0246: Line 81: The type or namespace name 'EnormousVenusFlytrapAddon' could not be found (are you missing a using directive or an assembly reference?)
CS1501: Line 201: No overload for method 'OnFlip' takes 1 arguments
CS0246: Line 15: The type or namespace name 'BirdLamp' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 15: The type or namespace name 'DragonLantern' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 16: The type or namespace name 'KoiLamp' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 16: The type or namespace name 'TallLamp' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.



with your script I get this error
Of course, I'd be honored to share
Errors:
+ Custom/Testing/InteriorDecorator.cs:
CS0246: Line 335: The type or namespace name 'EnormousVenusFlytrapAddon' could not be found (are you missing a using directive or an assembly reference?)
CS1501: Line 482: No overload for method 'OnFlip' takes 1 arguments
CS0246: Line 268: The type or namespace name 'BirdLamp' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 268: The type or namespace name 'DragonLantern' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 269: The type or namespace name 'KoiLamp' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 269: The type or namespace name 'TallLamp' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.


With yours I get this lol
 
with your script I get this error

Errors:
+ Custom/Testing/InteriorDecorator.cs:
CS0246: Line 335: The type or namespace name 'EnormousVenusFlytrapAddon' could not be found (are you missing a using directive or an assembly reference?)
CS1501: Line 482: No overload for method 'OnFlip' takes 1 arguments
CS0246: Line 268: The type or namespace name 'BirdLamp' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 268: The type or namespace name 'DragonLantern' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 269: The type or namespace name 'KoiLamp' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 269: The type or namespace name 'TallLamp' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
I suspect you are running a different publication than I and thus are running into some one off errors. The Lamps and lantern for example were part of a later release.

I'm not sure what to say about OnFlip other than its linked to ItemInterface.cs ‍♂️ It could also be a shard version difference too.

EnormousvenusflytrapAddon is a 16 year anniversary reward.

So yeah my feed back is to just comment out those lines and then you will be ready for the next round of troubleshooting
 
I will find the one I am using and send the link it is Pub 58 before Xml quest was removed I downloaded it from here
 
I took the script from here modded it for RunUO 2.6 which should work for ServUO and fiddled with the gump a bit. Some of the cliloc will have to be edited because i don't think they are stock to game from what i saw so I added them but those are easy enough to do. Also gave option to do string text if you want.

decorate.jpg
 

Attachments

  • AdvancedInteriorDecorator.cs
    19.3 KB · Views: 3

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back