Difference between revisions of "Talk:Unturned: OpenMod"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
(Created page with "==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...")
 
(removed data due to scam alert: new section)
 
(2 intermediate revisions by one user not shown)
Line 15: Line 15:
  
 
If you're setup using Rocket permissions, yes
 
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
 +
 +
== removed data due to scam alert ==
 +
 +
 +
Installing OpenMod for Unturned (RocketMod plugin)
 +
#Download the latest OpenMod Installer Plugin for RocketMod.
 +
#Move it to the /Rocket/Plugins folder and restart your server.
 +
#Run /openmod install and follow the instructions.
 +
 +
* Instructions echo'd from: https://openmod.github.io/openmod-docs/userdoc/installation/unturned.html
 +
* Download from: https://github.com/openmod/OpenMod.Installer.RocketMod/releases/tag/1.0.0-beta3
 +
 +
== Installing and Updating Plugins ==
 +
There are two ways to install plugins:
 +
 +
Option 1: Installing plugins from NuGet. You can install plugins from NuGet using the openmod install <package id> command, e.g. openmod install Kr4ken.NewEssentials. To install specific versions, use openmod install <package id>@<version>. If you want to enable installation of pre-release versions, add the -Pre option: openmod install <package id> -Pre. To update plugins, run openmod install <package id> again.
 +
 +
Option 2: Installing plugins manually. You can install plugins manually by moving the plugin dll file and all libraries of the plugin to the openmod/plugins folder. You can also install libraries with openmod install <package id> instead. To update plugins replace the .dll file with the newer one.
 +
 +
You must reload OpenMod with openmod reload to apply changes after installing or updating plugins.
 +
 +
== Specific Plugins (examples) ==
 +
=== SilK's ShopsUI ===
 +
To install the SilK's Plugin called ShopsUI you must first purchase the plugin from imperialplugins.com
 +
 +
1. Purchase the plugin and obtain the license key.
 +
 +
2. Download the zip file from your purcahase.  In this case it is openmod-ImperialPluginsLoader.zip
 +
 +
3. With the Unturned server running execute the following commands in the console:
 +
openmod install OpenMod.EntityFrameworkCore.MySql
 +
openmod install SilK.Unturned.Extras
 +
 +
4. Stop the Unturned Server and ensure it is not running. Extract contents and then upload them to the Unturned serer.  Specific files go in specific places. 
 +
* Copy (2) files from the archive folder called "native" to: Servers/unturned/OpenMod/native
 +
:* Those two files are ImperialPluginsNativeLoader.dll and ImperialPluginsNativeLoader.so
 +
* Copy (2) files from the  archive folder called "plugins to: Servers/unturned/OpenMod/plugins
 +
:* Those two files are ImperialPlugins.Loader.dll and K4os.Compression.LZ4.dll
 +
 +
5. Now edit "config.yaml" in the OpenMod/Plugins/ImperialPlugins.Loader folder.
 +
* Edit Servers/unturned/OpenMod/plugins/ImperialPlugins.Loader/config.yaml
 +
:* Here you will have to use YOUR license key.  In this example I show a DUMMY KEY that will not work.  Replace with your valid key that you received when you purchased the plugin.
 +
Plugins:
 +
- Product: "Shops-UI"
 +
  Branch: "openmod"
 +
  BranchPassword:
 +
  LicenseKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
 +
  Enabled: true
 +
 +
6. Edit the WorkshopDownloadConfig.json file where all of the IDs of your various mods are located.  Add the following to the list:
 +
2412328215
 +
 +
7. Start your Unturned server.  New directories will be created.  Once fully loaded shut down the server once again.
 +
 +
8. Now edit Servers/unturned/OpenMod/plugins/ShopsUI/config.yaml
 +
* configure the connection string for your MySQL database.  See example:
 +
default: "Server=192.168.54.16; Database=openmod; Port=3306; User=myusername; Password=somepassword"
 +
* configure other options, like if you want to enable the blacklist and whitelist.
 +
 +
9. Start the server.
 +
 +
There are many configuration options.  One of the more difficult options is taking advantage of the blacklist and whitelist feature.  Lets do an example where we want just certain things in the shop to only be purchasable by players in a specific permissions group.  We will have vehicles that only players in the cardealer group can buy, but other players can not.  First, we must add the car to the shop, then whitelist the car to the cardealer permissions group.  Use these command examples:
 +
/vshop add 31 120
 +
/vshop whitelist add 31 cardealer
 +
We added a sedan to the shop at a cost of $120.  The whitelisted it so only people in the permission group cardealer can buy it.  Now we have to edit Permissions.config.xml to create the cardealer group and give it the correct permission for ShopUI whitelist.  See this example entry:
 +
    <Group>
 +
      <Id>cardealer</Id>
 +
      <DisplayName>cardealer</DisplayName>
 +
      <Prefix />
 +
      <Suffix />
 +
      <Color>white</Color>
 +
      <Members>
 +
        <Member>7656119XXXXXXXXXX</Member>
 +
        <Member>7656119XXXXXXXXXX</Member>
 +
      </Members>
 +
      <ParentGroup>default</ParentGroup>
 +
      <Priority>100</Priority>
 +
      <Permissions>
 +
        <Permission Cooldown="90">essentials.kit.shopkeeper</Permission>
 +
        <Permission Cooldown="1">ShopsUI:commands.vshop</Permission>
 +
        <Permission Cooldown="1">ShopsUI:commands.buy</Permission>
 +
        <Permission Cooldown="0">ShopsUI:groups.cardealer</Permission>
 +
      </Permissions>
 +
    </Group>
 +
You wont need the kit entry, but it is present to demonstrate how the inherited permissions work.
 +
 +
==Removing Plugins==
 +
To remove plugins which have been installed using openmod install, use openmod remove <package id>. If you installed the plugin manually instead, delete the .dll file.
 +
 +
==Troubleshooting==
 +
Problems arise from time to time when Nelson releases Unturned updates that create incompatibilities with OpenMod.  The track record is that server performance issues, crashing, and excessive error entries in the log are the result of OpenMod incompatibilities or specific mods like ShopUI that use OpenMod.  Developers follow up with updates that typically resolve this issues.  It is important to watch for OpenMod to release an update within a day or two after an Unturned update and then apply that update ASAP.
 +
 +
* Obtain the latest OpenMod Update from: https://github.com/openmod/openmod/releases/
 +
* Apply the OpenMod Update to the path: /Servers/unturned/OpenMod/packages
 +
 +
In Better Detail: NELSON RELEASED HIS USUAL FRIDAY UPDATE THAT BREAKS THE HELL OUT OF IMPERIALPLUGINS AND OPENMOD
 +
 +
You have to let the Unturned Server update.  It needs to update and finish loading completely.  Then you need to shut it down when you
 +
notice that your ImperialPlugins and OpenMod plugins are not working.
 +
 +
Follow these steps:
 +
 +
# Download the file OpenMod.Unturned.Module.zip from https://github.com/openmod/openmod/releases
 +
# Navigate to /home/container/Modules/OpenMod.Unturned
 +
# Delete /home/container/Modules/OpenMod.Unturned
 +
# Copy contents of OpenMod.Unturned.Module.zip which is the OpenMod.Unturned folder to /home/container/Modules/

Latest revision as of 02:49, 11 June 2022

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

removed data due to scam alert

Installing OpenMod for Unturned (RocketMod plugin)

  1. Download the latest OpenMod Installer Plugin for RocketMod.
  2. Move it to the /Rocket/Plugins folder and restart your server.
  3. Run /openmod install and follow the instructions.

Installing and Updating Plugins

There are two ways to install plugins:

Option 1: Installing plugins from NuGet. You can install plugins from NuGet using the openmod install <package id> command, e.g. openmod install Kr4ken.NewEssentials. To install specific versions, use openmod install <package id>@<version>. If you want to enable installation of pre-release versions, add the -Pre option: openmod install <package id> -Pre. To update plugins, run openmod install <package id> again.

Option 2: Installing plugins manually. You can install plugins manually by moving the plugin dll file and all libraries of the plugin to the openmod/plugins folder. You can also install libraries with openmod install <package id> instead. To update plugins replace the .dll file with the newer one.

You must reload OpenMod with openmod reload to apply changes after installing or updating plugins.

Specific Plugins (examples)

SilK's ShopsUI

To install the SilK's Plugin called ShopsUI you must first purchase the plugin from imperialplugins.com

1. Purchase the plugin and obtain the license key.

2. Download the zip file from your purcahase. In this case it is openmod-ImperialPluginsLoader.zip

3. With the Unturned server running execute the following commands in the console:

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

4. Stop the Unturned Server and ensure it is not running. Extract contents and then upload them to the Unturned serer. Specific files go in specific places.

  • Copy (2) files from the archive folder called "native" to: Servers/unturned/OpenMod/native
  • Those two files are ImperialPluginsNativeLoader.dll and ImperialPluginsNativeLoader.so
  • Copy (2) files from the archive folder called "plugins to: Servers/unturned/OpenMod/plugins
  • Those two files are ImperialPlugins.Loader.dll and K4os.Compression.LZ4.dll

5. Now edit "config.yaml" in the OpenMod/Plugins/ImperialPlugins.Loader folder.

  • Edit Servers/unturned/OpenMod/plugins/ImperialPlugins.Loader/config.yaml
  • Here you will have to use YOUR license key. In this example I show a DUMMY KEY that will not work. Replace with your valid key that you received when you purchased the plugin.
Plugins:
- Product: "Shops-UI"
  Branch: "openmod"
  BranchPassword: 
  LicenseKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  Enabled: true

6. Edit the WorkshopDownloadConfig.json file where all of the IDs of your various mods are located. Add the following to the list:

2412328215

7. Start your Unturned server. New directories will be created. Once fully loaded shut down the server once again.

8. Now edit Servers/unturned/OpenMod/plugins/ShopsUI/config.yaml

  • configure the connection string for your MySQL database. See example:
default: "Server=192.168.54.16; Database=openmod; Port=3306; User=myusername; Password=somepassword"
  • configure other options, like if you want to enable the blacklist and whitelist.

9. Start the server.

There are many configuration options. One of the more difficult options is taking advantage of the blacklist and whitelist feature. Lets do an example where we want just certain things in the shop to only be purchasable by players in a specific permissions group. We will have vehicles that only players in the cardealer group can buy, but other players can not. First, we must add the car to the shop, then whitelist the car to the cardealer permissions group. Use these command examples:

/vshop add 31 120
/vshop whitelist add 31 cardealer

We added a sedan to the shop at a cost of $120. The whitelisted it so only people in the permission group cardealer can buy it. Now we have to edit Permissions.config.xml to create the cardealer group and give it the correct permission for ShopUI whitelist. See this example entry:

   <Group>
     <Id>cardealer</Id>
     <DisplayName>cardealer</DisplayName>
     <Prefix />
     <Suffix />
     <Color>white</Color>
     <Members>
       <Member>7656119XXXXXXXXXX</Member>
       <Member>7656119XXXXXXXXXX</Member>
     </Members>
     <ParentGroup>default</ParentGroup>
     <Priority>100</Priority>
     <Permissions>
       <Permission Cooldown="90">essentials.kit.shopkeeper</Permission>
       <Permission Cooldown="1">ShopsUI:commands.vshop</Permission>
       <Permission Cooldown="1">ShopsUI:commands.buy</Permission>
       <Permission Cooldown="0">ShopsUI:groups.cardealer</Permission>
     </Permissions>
   </Group>

You wont need the kit entry, but it is present to demonstrate how the inherited permissions work.

Removing Plugins

To remove plugins which have been installed using openmod install, use openmod remove <package id>. If you installed the plugin manually instead, delete the .dll file.

Troubleshooting

Problems arise from time to time when Nelson releases Unturned updates that create incompatibilities with OpenMod. The track record is that server performance issues, crashing, and excessive error entries in the log are the result of OpenMod incompatibilities or specific mods like ShopUI that use OpenMod. Developers follow up with updates that typically resolve this issues. It is important to watch for OpenMod to release an update within a day or two after an Unturned update and then apply that update ASAP.

In Better Detail: NELSON RELEASED HIS USUAL FRIDAY UPDATE THAT BREAKS THE HELL OUT OF IMPERIALPLUGINS AND OPENMOD

You have to let the Unturned Server update. It needs to update and finish loading completely. Then you need to shut it down when you notice that your ImperialPlugins and OpenMod plugins are not working.

Follow these steps:

  1. Download the file OpenMod.Unturned.Module.zip from https://github.com/openmod/openmod/releases
  2. Navigate to /home/container/Modules/OpenMod.Unturned
  3. Delete /home/container/Modules/OpenMod.Unturned
  4. Copy contents of OpenMod.Unturned.Module.zip which is the OpenMod.Unturned folder to /home/container/Modules/