Ark: Survival Evolved - ArkShop

[Official] Ark: Survival Evolved - ArkShop 3.02

No permission to download

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
This is used for the official forum announcements from the staff team.
Hey, I have a few questions and a bit of an odd one. I am currently rebuilding our servers' shop file (Bordering 6k lines of code for our Primal Fear/Gaia server) and am learning how this all of this goes together. We have a single server with a couple dino overhaul mods, a vanilla-like cluster across 4-5 maps/servers, and are in the process of adding another server with a different dino overhaul mod.

The first is what parts of the code are optional and which are mandatory. Some are obvious, like the blueprint path while others are less so, like ForceBlueprint. (Though I'm leaning towards that one being mandatory because it follows the 'cheat gfi <itemid> 1 0 0' format of having those '1 0 0' in.) I am also including a file which /should/ have been cut down to the most basic coding I can manage and still be functional, allowing for the fact that it has variables instead of actual values. It's got extra little questions if anyone wants to help with that and knows the coding intimately.

My second question will lead to my third. Is there any way I can, for the purposes of organizing a massive list of codes, add in subheadings under "ShopItems"? I want to be able to sort things out for my personal benefit to make sure I'm not missing stuff like "Resources" will have metal, wood, etc. "Artifacts" will have all of the artifacts. "Trophies" will have all of the trophies under it. To clarify I am NOT trying to make a kit or a bundled deal. I do NOT want someone to buy the "Artifacts" category and get all of them. I want them listed for separate purchase, but if I need to add one, remove one, etc I want an easy way to find that category and change stuff up. (Say I wanted to add a lower wood amount purchase or something.) Even knowing I can make headings using a comment code would be awesome and I would completely use that if I knew it wouldn't break anything.

My final question is the oddball. Does anyone know of a way to use any sort of IF statements in this json file so I can easily enable/disable batches of shop items? My goal would be to have all of the vanilla Ark resources loaded in normally, then slot mod items into those IF statements. I would then have the variables listed at the top of the file (Primal Fear = 1, Gaia = 0, etc) and could just turn sections on or off at a whim. This way we can have a single shop file that we copy out to be used by the servers I mentioned and just make that slight alteration based on the mods we have installed. This will help us keep things much more consistent and make updating the shops less of a pain.

My last question could be solved if, when the shop tries to actually execute the code to give a player the requested item and doesn't find it, the whole thing just says it can't happen and doesn't take the points. The 'WrongID' in the Messages section seems to point at this, but I want to be 100% sure before I leave it to that. We've had a case of someone trying to buy something and it taking points without giving the item in question, but I don't remember if that was because the item didn't exist on the server (mod was removed) or if the item was just disabled, so it was /technically/ still there.

If you've managed to read through all of this and can help me at all then thank you so very much! Once I get all of this sorted I'll probably be back asking how to sort out the whole MySQL thing for a single server, but that's for another day.
 
Oh, forgot to add a feature request. Could we get an extra line in the Groups section allowing us to set a discount for that rank?
Eg:

"Groups":{
"Default":{
"Amount":50
},
"Admin":{
"Amount":100
},
"VIP":{
"Amount":150
"Discount": .90 // Lowers all prices to 90% (A 10% discount) for this rank.
}
}
 
Not sure what I am doing wrong, Trying to use Mysql (version 8.0.14) but allways give an error code 1114. With Sqlite works normal.

ArkShop Config
Code:
{
  "Mysql":{
    "UseMysql":true, // Changing to false, uses sqlite and works ok.
    "MysqlHost":"localhost",
    "MysqlUser":"root",
    "MysqlPass":"xxxxxxxx",
    "MysqlDB":"apitest"
  },

Permissions Config
Code:
{
  "Database":"mysql", // Changing to sqlite, uses sqlite and works ok.
  "MysqlHost":"localhost",
  "MysqlUser":"root",
  "MysqlPass":"xxxxx",
  "MysqlDB":"apitest",
  "MysqlPort":3306,
  "DbPathOverride":""
}

In the images sent, You can see that I can connect to the database in mysql, and it's listening on port 3306. Port 3306 it's open in windows firewall and modem firewall.
I need to create the tables or the api create them?
Maybe some permission in the mysql database issue? I tried as root and another user with admin permission. (Tried also with case sensitive users)
If you can help me set up to run with mysql, I appreciate.

Thanks a lot.
 
Last edited:
Not sure what I am doing wrong, Trying to use Mysql (version 8.0.14) but allways give an error code 1114. With Sqlite works normal.
It only means that plugin can't connect to the db. Do you use legacy authentication?

Hey, I have a few questions and a bit of an odd one. I am currently rebuilding our servers' shop file (Bordering 6k lines of code for our Primal Fear/Gaia server) and am learning how this all of this goes together. We have a single server with a couple dino overhaul mods, a vanilla-like cluster across 4-5 maps/servers, and are in the process of adding another server with a different dino overhaul mod.

....

Example config description mostly says about options which are optional. If you are unsure, better keep it.
Categories are not supported right now. However, they can be added later.
Unfortunately, json doesn't support 'IF' statements or comments too.
If shop entry doesn't exist, you will see that 'Wrong ID' error. But plugin doesn't check your blueprint paths, so make sure they are correct and up to date.
About your config, "DefaultKit":"" - it would be empty.
Kits can only have items or dinos. The name does matter.
 
@Michidu any chance of adding ChangeKitAmount, ArkShop.Reload, ResetPoints, ResetKits to the rcon commands? I'm most interested in ChangeKitAmount... I want to automate my discord bot to add kits to people who are subscribers to a twitch stream.... i have all the discord and rcon side handled... just need to be able to changekitamount thru rcon.

This is the best plugin ever for ARK! Thanks for your time!

-B
Have you gotten this to work? I would like to implement that too.
 
Good idea, will look at it.

Has this been implemented? I would like to use the /sell function as a resource converter instead of using mods. So like my server on the island the player could sell 100 Stone and receive 500 Sand or 100 Wood for 50 Fungal Wood. If this has been implemented sorry for the double post but I read all 78pgs and didn't find it.
 
Hello,

Is there a way to reward all new players with a score of X points on their first joining?
Have tried it with a kit but did not manage it.

Many Thanks.
 
Thanks for the reply! Knowing that will help me work out what I need to do now.

Another feature I thought about, when buying a dino with the shop we have the option of setting a level for it. Would it be possible to set the level to be "max" and have it match the maximum level for the server the dinosaur is spawned on? It would save a lot of trouble when using the same shop across servers with different caps.
 
I have created this little piece of code in Python to merge sqlite ArkShop databases into one. You have to move all databases that you want to merge into one folder and set the folder in folder variable. Then you have to set in variable kits what kits you want to have in new merged database, as i havent gone that far to merge kits, only points. It will create a MergedArkShop.db with all points merged. It maybe helps to somebody.

Python:
import sqlite3
import glob
from sqlite3 import Error


def create_connection(db_file):
    try:
        conn = sqlite3.connect(db_file)
        return conn
    except Error as e:
        print(e)

    return None


def add_data(conn, data):
    cur = conn.cursor()
    l_data = data
    cur.execute("SELECT * FROM players")

    rows = cur.fetchall()

    for row in rows:
        steamid = row[1]
        points = row[3]
        if steamid in l_data:
            l_data[steamid] = l_data[steamid] + points
        else:
            l_data[steamid] = points

    return l_data


def main():
    folder = "C:\\sqlite\\"
    kits = "{""starter"":{""Amount"":0}}"

    dbs = glob.glob(folder + "*.db")
    data = {}
    for i in dbs:
        try:
            # create a database connection
            conn = create_connection(i)
            with conn:
                data = add_data(conn, data)
        except:
            print("Error on database " + i)

    database = folder + "MergedArkShop.db"
    try:
        conn = create_connection(database)
        cur = conn.cursor()
        cur.execute("CREATE TABLE Players (Id integer primary key autoincrement not null,SteamId integer default 0,Kits text default '{}',Points integer default 0)")
        for i in data.keys():
            cur.execute("INSERT INTO players (STEAMID,KITS,POINTS) VALUES (?,?,?)", (i, kits, data[i],))
        conn.commit()
    except:
        print("Error creating merged database")


if __name__ == '__main__':
    main()
 
Last edited:
@Michidu Is there a way to sell items to the shop and get back other items? For example selling 100x Stone and getting back 500x Sand?
 
Has this been implemented? I would like to use the /sell function as a resource converter instead of using mods. So like my server on the island the player could sell 100 Stone and receive 500 Sand or 100 Wood for 50 Fungal Wood. If this has been implemented sorry for the double post but I read all 78pgs and didn't find it.
Unfortunately, not yet. But still planned :)
Hello,

Is there a way to reward all new players with a score of X points on their first joining?
Have tried it with a kit but did not manage it.

Many Thanks.
The easiest way is modify default points value in the db.
 
"quetztek":{
"Permissions":"Admins,Premiums,VIP1,VIP2,VIP3",
"Type":"dino",
"Description":"Quetztek pour les vip ",
"Level":250,
"Price":1500,
"MinLevel":1,
"MaxLevel":330,
"Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Quetzalcoatlus/BionicQuetz_Character_BP.BionicQuetz_Character_BP'"
},
j'arrive pas a mettre la permission
 
Hi guys, perhaps its a quick fix and something on my side (I don't know, my first time ever dealing with this)

The ark points work on my server, the kits at spawn work, however, when it comes to buying things from the shop /buy doesn't work.
I have attached my config. Any help would be appreciated. I didn't want to get too far in, just incase it didn't work.
 
So I thought I was doing everything okay, ran the code through a json verifier, etc. But I can't seem to get this code to load properly. It doesn't help that I don't have access to the server itself (just an admin, not the server owner). I followed examples from this page's examples list to get the code formats and the only deviation I made was to place two extra whitespace lines between batches of code to help myself sort where different things were. Basically two enters between }, and "nextitem":{ in the "ShopItems" section.

Is this what is screwing up my code? I'd fix it and try it again, but due to different timezones I probably won't get the file loaded until tomorrow night and I'd like to get it right this time (will be the 4th attempt).

Any advice would be welcomed.
 
Hello,

Currently when you type /kit in the shop it says NO MESSAGE even tho there is kits has anyone else had this issue? same with /shop 1
 
Last edited:
Rogue Vikings Discord Server - Rogue Vikings Gaming Servers - Minecraft Prison Servers - Minecraft Creative Servers
Monetize your ARK server
Tempest Dedicated Servers
Tebex
Back
Top