Npc Shop 2d
|Version:||2019.100||Requirements:||uMMORPG2d, Tools||Script Define:||None|
|Core Changes:||No||Tutorial Video:||No|
The Npc Trading window now looks like the Item mall. Allows category filters for items. Selling also changed: You can simply switch buy/sell mode and the window content/action updates accordingly. Simple but effective!
- [Required] Add the new “UCE NpcShop” object to your canvas via drag and drop.
- [Required] In your canvas, disable the old “NpcTrading” object.
- [Required] In your canvas, on the “NpcDialogue” object, drag and drop the new “NpcShopPanel” object into the “NpcTradingPanel” slot. Its the child object of the new UCE_NpcShop, not the parent one.
- [Optional] On each item, you can now assign a “Category” – this determines where in the shop the item will show up. But it works without categories as well (leave them all empty).
- [Optional] On each NPC prefab, there is now a list of “Categories” – this determines how many lists the Npc displays. Each sold item has to appear in one of the lists or it wont show up. But its possible to leave them all empty as well (so you will have just one big list).
- ShopKeepers use the default “saleItems” list of uMMORPG3d by default (for more information see below).
- Make sure to add at least one item to the default uMMORPG3d “saleItems” list or the AddOn won’t work properly (core issue).
- If you dont want to use shop categories, you still have to create one category and leave it empty.
- Also supports selling of items, there is a button that allows the player to switch between buy and sell mode.
- The items available for sale can change when the Npc changes its level (it uses uMMORPGs default saleItems list by default), there is an extra “levelled Sale Item List” for that. For example a level 3 shopkeeper can offer different items, you simply have to create a levelled sales items list with at least 3 entries.
- You can also scale the shop inventory by the level of the player, using the levelSaleItems list and ticking the checkbox. It will calculate a ratio from maxPlayer to currentPlayer level and choose the highest available levelSalesItems index.