Difference between revisions of "Unturned: OpenMod"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m
m (SilK's ShopsUI)
Line 61: Line 61:
  
 
9. Start the server.
 
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==
 
==Removing Plugins==

Revision as of 01:43, 22 January 2022

OpenMod is the successor of RocketMod. OpenMod supports all RocketMod plugins. Plugins add new functionality to your server. OpenMod provides commands to download, install, update, and remove plugins at runtime. You can convert from RocketMod to OpenMod using their installation and conversion script. Plugins from https://imperialplugins.com/ mostly require OpenMod, if not exclusively.

Installation

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.