Talk:Unturned: OpenMod

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 08:40, 10 April 2022 by Littleguy (Talk | contribs)

Jump to: navigation, search

ShopsUI Permissions Whitelist

I have vehicle 31 in the shop right now for testing. I am trying to make it so only a specific player can buy it

SilK — Today at 12:21 AM

So for example, if I do /shop whitelist add medkit medic, only players with the ShopsUI:groups.medic permission will be able buy medkits

For that you could do /vshop whitelist add 31 test and then only people with the ShopsUI:groups.test permission could buy that vehicle

xxxxx — Today at 12:22 AM

So it is using the group permissions from Rocket/Permissions.config.xml  ?

SilK — Today at 12:22 AM

If you're setup using Rocket permissions, yes

Shops UI

Usage

Players can simply use /shop (or /vshop to directly access the vehicle shop). See the media on this page to view an example of the UI.

At the moment, commands must be used to configure the shop. More info on configuring the shops can be found in the Commands section.

  • Shop whitelists/blacklists are supported. The permission you specify in the commands for setup are not exact however. If you put eaglefire as the whitelist permission, the actual permission would be *ShopsUI:groups.eaglefire. The permission you specify has ShopsUI:groups. added to the front.

Migration

If you wish to migrate from ZaupShops, you can simply run the command /shop migrate.

If you used whitelists and blacklists with ZaupShop, you must also change some of your permissions. All existing permissions starting with zaupgroups. must be changed to start with ShopsUI:groups.. For example, the following permissions show their original and their migrated permissions:

zaupgroup.epicguns → ShopsUI:groups.epicguns
zaupgroup.vip → ShopsUI:groups.vip
zaupgroup.mvp → ShopsUI:groups.mvp

Commands

Commands for UI:

/shop - Opens the shop UI.
/vshop - Opens the shop UI directly to the vehicle tab.

Commands for shop management:

Basic commands:

/shop add <buy | sell> <item> <price> - Adds the item to the shop to be bought or sold.
/shop remove <buy | sell> <item> - Removes the buyable/sellable item from the shop.
/vshop add <vehicle> <price> - Adds the vehicle to the shop to be bought.
/vshop remove <vehicle> - Removes the buyable vehicle from the shop.
/shop reload - Reloads the shops from the database.
/sellbox - Opens a virtual storage for selling items.

UI-related management commands:

/shop order <item> <order> - Sets the order of items in the shop UI.
/vshop order <vehicles> <order> - Sets the order of vehicles in the shop UI.

Whitelist/blacklist commands:

/shop whitelist <add | rem> <item> <permission> - Manage item shop whitelists.
/shop blacklist <add | rem> <item> <permission> - Manage item shop blacklists.
/vshop whitelist <add | rem> <vehicle> <permission> - Manage vehicle shop whitelists.
/vshop blacklist <add | rem> <vehicle> <permission> - Manage vehicle shop blacklists.

The permission you specify has ShopsUI:groups. added to the front of it. abc turns into ShopsUI:groups.abc.

Alternative buy/sell commands:

/buy <item> [amount] - Buys the item from the shop.
/sell <item> [amount] - Sells the item to the shop.
/vbuy <vehicle> - Buys the vehicle from the shop.

Sellbox

The /sellbox command feature allows players to quickly sell items by placing them in a virtual storage.

The default sellbox size is configurable in the config.yaml file.

To set sell box sizes for certain permission roles, simply add the following lines below the data entry of a role (change width and height to what you'd like).


sellbox:

 width: 8
 height: 12

Click to reveal an example using the default OpenMod permissions file

Permissions

Basic User Permissions

Grant access to the /buy command:

ShopsUI:commands.buy

Grant access to the /cost command:

ShopsUI:commands.cost

Grant access to the /sell command:

ShopsUI:commands.sell

Grant access to the /shop command to see the shop UI:

ShopsUI:commands.shop

Grant access to the /vshop command to directly navigate to vehicle shops in the UI:

ShopsUI:commands.vshop

Administrative Permissions

Grant access to manage item shops:

ShopsUI:commands.shop.*

Grant access to manage vehicle shops:

ShopsUI:commands.vshop.*

Configuration

Click to reveal default configuration

Translations

You can change the color of both UI and command text translations by using Unity's rich text format.

For example, to change the balance color to blue in the UI, change:

Balance: {CurrencySymbol}{Balance:0.00}

to

Balance: "<color=blue>{CurrencySymbol}{Balance:0.00}</color>"

or

Balance: "<color=#0000FF>{CurrencySymbol}{Balance:0.00}</color>"

Click to reveal default translations

Installation

Run the following commands to install necessary libraries:

openmod install OpenMod.EntityFrameworkCore.MySql
openmod install SilK.Unturned.Extras

Specify the openmod branch in your Imperial Plugins config.

Add the following workshop id to your WorkshopDownloadConfig.json file:

2412328215

Change the connection string in your new ShopsUI/config.yaml file to allow ShopsUI to connect to your MySQL server.

Crashing problem happens whenever approx 16 or more playrs are on.

Crashing problem happens whenever approx 16 or more playrs are on. ever since nelson update 8 days ago No, i dont know what triggers the error. maybe /shop could be anything

SilK — Yesterday at 7:45 PM Delete everything in your packages folder except the packages.yaml file. This will force an update of OpenMod For safe measure, you can manually reinstall the module too https://github.com/openmod/openmod/releases/download/3.0.33/OpenMod.Unturned.Module.zip

yes i just found /Servers/unturned/OpenMod/packages

I am deleting 119 total files which is all except for packages.yaml