ARC Nitro SQL & FurnitureData Generators.

Morohara

Member
May 18, 2020
92
55
Releasing both a FurnitureData and SQL generator for Arcturus DB.

Make sure to have python 3.11.3 installed both are scripts so will need to be ran in console.

SQL Generator:
import os

try:
with open("test.txt", "a") as f:
pass
except FileNotFoundError:
with open("test.txt", "w") as f:
pass
finally:
with open("test.txt", "a") as f:
for path, subdirs, files in os.walk(r'INPUT DIRECTORY IN HERE.'):
n = 47151
page_id = 783
for furni_name in files:
name_for_insert = furni_name.split(".")[0]
f.write(f"INSERT INTO items_base (id, sprite_id, public_name, item_name) VALUES ('{n}', '{n}', '{name_for_insert}', '{name_for_insert}');\n")
f.write(f"INSERT INTO catalog_items (id, item_ids, page_id, catalog_name) VALUES ('{n}', '{n}', '{page_id}', '{name_for_insert}');\n")
n += 1
This will just generate a file and inside will have sql change "n = 47151" to largest id in items_base.
Edit "page_id" to the page you want the furni to be added to and create the catalog page with the id you've chosen.

FurnitureData generator:
import os
import json
import random
import glob


canlayon = ('false')
ydim = random.randint(1, 1)
xdim = random.randint(1, 1)
defaultdir = random.randint(0, 0)
rentofferid = random.randint(-1, -1,)
revision = random.randint(59005, 59005)
specialtype = random.randint(0, 0)

with open("output.txt", "a") as w:
for path, subdirs, files in os.walk(r'INPUT DIRECTORY IN HERE'):
n = 47151
for filename in files:
f = os.path.splitext(filename)[0]
x = {
"id":"",
"classname":"",
"revision":"",
"category":"unknown",
"defaultdir":"",
"xdim":"",
"ydim":"1",
"partcolors":{"color":[]},
"name":"",
"description":"",
"adUrl":"",
"offerid":"",
"buyout":"",
"rentofferid":"-1",
"rentbuyout":"false",
"bc":"false",
"excludeddynamic":"false",
"customparams":"",
"specialtype":"0",
"canstandon":"false",
"cansiton":"false",
"canlayon":"false",
"furniline":"",
"environment":"",
"rare":"false"
}
x["id"] = n
x["classname"] = f
x["name"] = f
x["offerid"] = n
x["xdim"] = xdim
x["ydim"] = ydim
x["defaultdir"] = defaultdir
x["rentofferid"] = rentofferid
x["revision"] = revision
x["specialtype"] = specialtype
y = json.dumps(x)
print(y.replace('"false"', "false",).replace(" ", "").replace('"unkown"', "unknown").replace('"rare":false}', '"rare":false},'))

n += 1


IMPORTANT

This will generate in console copy+paste all code and replace "rare":false} with "rare":false},

Please change "n = 47151" to latest ID or mimic the SQL generator.

Eventually planning to update and fix but for now this will do as I haven't been able to find one released by someone else.

Happy to offer support.

Edit: Fixed the ending of each furnitiredata entry to contain "," as was blank previously.



Credits to Tim for the Sql Generator. <3
 
Last edited:

Users who are viewing this thread

Top