Jump to content

[Server Plugin] Shop, Currency & Kits v2.3


Michido

Recommended Posts

  • Replies 292
  • Created
  • Last Reply

having issues with installing this on host havoc it's not generating a .db file nor is it starting when the server starts any way u can hop into my discord with me and my crew it would be much appreciated . we went through all the steps and watched about 15 dif videos and still can't get it to work we can't even get the points to start .. were not stupid it's just there is no information on where to put it on a rented server or how to start the installation process after the folder is in the server we can give u better details on what we did and live video to help this process we love your mod/api

Discord: 

                 https://discord.gg/cet2yDX

Link to comment
Share on other sites

3 hours ago, Semideus said:

having issues with installing this on host havoc it's not generating a .db file nor is it starting when the server starts any way u can hop into my discord with me and my crew it would be much appreciated . we went through all the steps and watched about 15 dif videos and still can't get it to work we can't even get the points to start .. were not stupid it's just there is no information on where to put it on a rented server or how to start the installation process after the folder is in the server we can give u better details on what we did and live video to help this process we love your mod/api

Host havoc might block external .dll or .exe, so you would need to ask them about it. Anyway, installation on shared hosting should be same as on dedicated server. Everything you need to is extract all files from ArkApi folder to Win64 (means dll's such as version.dll should be in the same folder as ShooterGameServer.exe). If it works, it would generate dump.json (i assume you dont' see a server console).

 

On 12/17/2017 at 7:55 PM, Zinf said:

Hello. Is it possible to make a plugin that will help RCON support Unicode?

Not likely, as the issue seems to be deeper.

Link to comment
Share on other sites

On 2017/3/9 at 3:55 PM, Michido said:

Ingame shop, custom currency and kits for ARK. Config already contains some examples of what is possible, but you can change/add anything. Use JSON Validator to make sure that the config is still correct.

Features:

  • Add any item, dino or beacon to the shop
  • Points trading system
  • Create custom kits with items and dinos inside
  • Players can receive points for the time spent on server
  • SQLite Database
  • Customizable config

Chat Commands:

  • /points - show current amount of points
  • /buy<ItemID> <Amount>- buy the item from shop
  • /trade<'SteamName'> <Amount>- Send points to other player (' '- are necessary)
  • /kit - Show all kits
  • /kit<KitName>- redeem the kit
  • /buykit<KitName> <Amount>- buy a kit (if kit has price)
  • /shop<Page>- show a list of available items in the shop

Console Commands (For Admins):

  • AddPoints<SteamID> <Amount>- add points to the player
  • SetPoints<SteamID> <Amount>- set player's points
  • GetPlayerPoints<SteamID>- print how many points player has
  • AddKits<SteamID> <KitName> <Amount>- add kits to the player
  • ReloadShopConfig - Reload a config file. Example: "cheat ReloadShopConfig"
  • ResetPoints - reset points for all players
  • ResetKits - reset kits for all players

RCON Commands (For Admins):

  • AddPoints<SteamID> <Amount>- add points to the player
  • GetPlayerPoints<SteamID>- print how many points player has
  • SetPoints<SteamID> <Amount>- set player's points

Config:

Some config explanations:

General:


"TimedPointsReward":{
	"Enabled":true, // Can be true or false
	"Interval":5, // Interval in minutes
	"Amount":5 // Amount of points to give. Currently it means: 'give 5 points for every 5 minutes spent online'
},
"ItemsPerPage":20, // Amount of entries per page (for /shop command)
"ShopDisplayTime":15.0 // Shop display time in seconds

Kits:


"starter":{ // Name of kit
  "DefaultAmount":2, // Default amount of kit. Can be 0 if you want to give this kit to players manually
  "Price": 90, // If you remove price, players won't be able to buy it
  "Items":[ // List of items in kit, you can add as many as you want
    {
      "amount":2,
      "quality":0,
      "forceBlueprint":false,
      "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponPike.PrimalItem_WeaponPike'"
    }, // ',' is necessary only if this item is not last, otherwise you don't need it
    {
      "amount":1,
      "quality":0,
      "forceBlueprint":true,
      "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponStoneClub.PrimalItem_WeaponStoneClub'"
    }
  ],
  "Dinos":[ // can be empty if you don't want to add dinos
    {
      "level":20,
      "className":"Ptero_Character_BP_C"
    }
  ]
}

Shop:


"ingots100":{ // Item ID, should not contain white spaces
  "type":"item", // Type of item, can be "item", "dino" or "beacon"
  "description":"Metal Ingot (100x)", // Description for the /shop command
  "price":15,
  "items":[ // List of items, works the same way as in kits
    {
      "quality":0,
      "forceBlueprint":false,
      "amount":100,
      "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_MetalIngot.PrimalItemResource_MetalIngot'"
    }
  ]
},
"para":{ // Dino
  "type":"dino",
  "description":"Parasaurolophus",
  "level":10,
  "price":20,
  "className":"Para_Character_BP_C"
},
"crate25":{ // Beacon
  "type":"beacon",
  "description":"SupplyCrate Lvl 25",
  "price":100,
  "className":"SupplyCrate_Level25_Double_C"
}

After server will be started with this plugin, "ArkDb.db" file will be created in Win64 folder. It will contain all information about how many kits/points players have, so backup it sometimes.

Installation:

1) Install ARK Beyond API

2) Copy plugin's folder to "BeyondApi/Plugins".

 

Download:http://beyondmods.rocks/ark/files/file/41-shop-currency-kits/

Source code:https://github.com/Michidu/Ark-Server-Plugins

Other plugins:

Random Dino Colors

Extended Rcon

Custom Chat Commands (http://beyondmods.rocks/ark/files/file/42-custom-chat-commands/)

how to change language?sir

Link to comment
Share on other sites

3 hours ago, Zinf said:

I was advised here this --->  You'd need someone that knows how to work a disassembler and look at the RCONClientConnection and URCONServer structures. If you reimplement some of those methods you could probably get it to work.

You would need to rewrite a lot then. Ark is using FSocket which supports only ansi char. So it needs to convert wide string to ansi string.

Link to comment
Share on other sites

8 hours ago, Michido said:

You would need to rewrite a lot then. Ark is using FSocket which supports only ansi char. So it needs to convert wide string to ansi string.

 

it's bad that I'm not a programmer. And it's unlikely that anyone will do this kind of work (and more.In the Extended Rcon plugin some commands started to break the server, for example, the ListPlayerDino command

Link to comment
Share on other sites

11 hours ago, Semideus said:

ok i got the plugin to work now the only issue is editing the shop / starter kits i already have the starter kit working but i cant get a one time use dino working with a saddle that comes with it any chance you can help me with my file?

"starter":{ 
  "DefaultAmount":1, 
  "Price": 90,
  "Items":[ 
    {
      "amount":1,
      "quality":0,
      "forceBlueprint":false,
      "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Armor/Saddles/PrimalItemArmor_PteroSaddle.PrimalItemArmor_PteroSaddle'"
    }
  ],
  "Dinos":[
    {
      "level":20,
      "className":"Ptero_Character_BP_C"
    }
  ]
}

Something like this should work..

Just curious, was Host Havoc blocking loading or how did you fix it?

Link to comment
Share on other sites

Michido, fantastic job with this plug-in, I am really enjoying it and it's features. 

I have a question on implementing a command for when a player were to claim a starter kit. Items and dinos I understand, and have had no problems implementing. As a test for a cluster, I wanted to attempt to add experience to a character (long story short, its going to be progression  based, and the beginning of it will be primitive +, so for the starter kit on the next "tier" of the cluster, we want to add experience as well to make it as if it were a legit transfer in). Is it possible to do so, or is the plug in explicitly items and dinos?

Thank you very much for your time and efforts! 

Link to comment
Share on other sites

5 hours ago, Nappa3XL said:

Michido, fantastic job with this plug-in, I am really enjoying it and it's features. 

I have a question on implementing a command for when a player were to claim a starter kit. Items and dinos I understand, and have had no problems implementing. As a test for a cluster, I wanted to attempt to add experience to a character (long story short, its going to be progression  based, and the beginning of it will be primitive +, so for the starter kit on the next "tier" of the cluster, we want to add experience as well to make it as if it were a legit transfer in). Is it possible to do so, or is the plug in explicitly items and dinos?

Thank you very much for your time and efforts! 

Not at the moment. However, i might add it. Still, if you know a bit of c++, it's not hard to do it yourself.

Link to comment
Share on other sites

So, I don't know what I am doing wrong here.   I've gotten the API to load fine,  and extended rcon  loads fine,  but the shop and currency stuff doesn't load at all.    But the shop stuff doesn't load at all.  The shop folder is in the same directory as the Extended rcon folder,  and I have the default .json file in there to load until it works.    Is there anything specific I am supposed to do to get it running?  

Link to comment
Share on other sites

Okay,  So the shop plugin finally loaded with the server,  And I have been trying to work up a shop for the server.   I have run it through a validator, and I keep getting the same error on some of the lines.

This is what I have so far,

Spoiler

{
  "General":{
    "TimedPointsReward":{
      "Enabled":true,
      "Interval":10,
      "Amount":5
    },
    "ItemsPerPage":20,
    "ShopDisplayTime":20.0
  },
  "Kits":{
    "starter":{
      "DefaultAmount":5,
      "Price": 20,
      "Items":["Pick, Hatchet, Pike and Food"
        {
          "amount":1,
          "quality":0,
          "forceBlueprint":false,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponPike.PrimalItem_WeaponPike'"
        },
        {
          "amount":100,
          "quality":0,
          "forceBlueprint":true,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Consumables/PrimalItemConsumable_CookedMeat.PrimalItemConsumable_CookedMeat'"
        },
        {
          "amount":1,
          "quality":0,
          "forceBlueprint":true,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponMetalHatchet.PrimalItem_WeaponMetalHatchet'"
        },
        {
          "amount":1,
          "quality":0,
          "forceBlueprint":true,
       "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponMetalPick.PrimalItem_WeaponMetalPick'"
        }
      ],
    }
  },
    "forge":{
      "DefaultAmount":,
      "Price": 30,
      "Items":["Indust Forge, 100 gas"
        {
          "amount":1,
          "quality":0,
          "forceBlueprint":false,
          "blueprint":"Blueprint'/Game/Mods/BoostedFab/Forge/PrimalItemStructure_IndustrialForge_2.PrimalItemStructure_IndustrialForge_2"
        },
        {
          "amount":100,
          "quality":0,
          "forceBlueprint":true,
     "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Gasoline.PrimalItemResource_Gasoline'"
      ],
    }
     "tranq":{
      "DefaultAmount":,
      "Price": 20,
      "Items":["Tranq Rifle, 100 rounds"
        {
          "amount":1,
          "quality":0,
          "forceBlueprint":false,
          "blueprint":"Blueprint'/Game/Mods/BoostedFab/Tranq/PrimalItem_TranqRifle.PrimalItem_TranqRifle"
        },
        {
          "amount":100,
          "quality":0,
          "forceBlueprint":true,
     "blueprint":"Blueprint'/Game/Mods/BoostedFab/Tranq/PrimalItemAmmo_TranqBullet.PrimalItemAmmo_TranqBullet"
      ],
    }
  },
  "ShopItems":{
    "ingots5000":{
      "type":"item",
      "description":"Metal Ingot (5000x)",
      "price":20,
      "items":["5000 Metal Ingots"
        {
          "quality":0,
          "forceBlueprint":false,
          "amount":5000,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_MetalIngot.PrimalItemResource_MetalIngot'"
        }
      ]
    },
    "pearls2500":{
      "type":"item",
      "description":"Silica Pearls (2500x)",
      "price":20,
      "items":["2500 Silica Pearls"
        {
          "quality":0,
          "forceBlueprint":false,
          "amount":5000,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Silicon.PrimalItemResource_Silicon'"
      ]
    },
    "oil2500":{
      "type":"item",
      "description":"Oil (2500x)",
      "price":20,
      "items":[2500 Oil"
        {
          "quality":0,
          "forceBlueprint":false,
          "amount":2500,
          "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Oil.PrimalItemResource_Oil'"
      ]
    },
    "redgem500":{
      "type":"item",
      "description":"Red Gems(500x)",
      "price":30,
      "items":["500 Red Gems"
        {
          "quality":0,
          "forceBlueprint":false,
          "amount":2500,
          "Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_Gem_Element.PrimalItemResource_Gem_Element'"
      ]
    },
    "gasball500":{
      "type":"item",
      "description":"Congealed Gas(500x)",
      "price":30,
      "items":["500 Congealed Gas Balls"
        {
          "quality":0,
          "forceBlueprint":false,
          "amount":500,
          "Blueprint'/Game/Aberration/CoreBlueprints/Resources/PrimalItemResource_Gas.PrimalItemResource_Gas'"
      ]
    },
    "Tools":{
      "type":"item",
      "description":"Tools (Metal Hatchet, Metal Pick)",
      "price":15,
      "items":["Better Tools
        {
          "quality":2,
          "forceBlueprint":false,
          "amount":1,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponMetalHatchet.PrimalItem_WeaponMetalHatchet'"
        },
        {
          "quality":2,
          "forceBlueprint":false,
          "amount":1,
          "blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponMetalPick.PrimalItem_WeaponMetalPick'"
        }
      ]
    },
    "Anklyo":{
      "type":"dino",
      "description":"Anklyo",
      "level":100,
      "price":20,
      "className":"Ankylo_Character_BP_C"
    },
    "Angler":{
      "type":"dino",
      "description":"Anglerfish",
      "level":100,
      "price":20,
      "className":"Angler_Character_BP_C"
    },
    "crate25":{
      "type":"beacon",
      "description":"SupplyCrate Lvl 25",
      "price":100,
      "className":"SupplyCrate_Level25_Double_C"
    },
    "crate2":{
      "type":"beacon",
      "description":"Artifact Crate 2",
      "price":100,
      "className":"ArtifactCrate_2_C"
    }
  }
}

And this is the error I get

Spoiler

Parse error on line 15:
...e and Food"        {          "amount"
----------------------^
Expecting 'EOF', '}', ':', ',', ']', got '{'

I have tried changing around and checking it in the validator,  but every time I change something,  It just moves the error down one line.

 

Link to comment
Share on other sites

  • Michido changed the title to [Server Plugin] Shop, Currency & Kits v1.5

Updated:

  • Added per player point amount override for timed rewards (thanks to tsebring)
  • Fixed bug with points

You should update as soon as possible!

 

10 hours ago, Kater said:

Okay,  So the shop plugin finally loaded with the server,  And I have been trying to work up a shop for the server.   I have run it through a validator, and I keep getting the same error on some of the lines.

There were a lot of errors, basically in every item. This seems to be a fixed version (untested) https://pastebin.com/QFsfUut3
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...