Jump to content
MuhKuh

Trader Change Tool

Recommended Posts

Comming in the next version ;)

 

For some reason are the traders in napf badly named, here are some sql commands to make it look better:

(I dont know if the ids are correct)

 

UPDATE `Server_TRADERS` SET `desc`='Ammunition Friendly Schratten' WHERE `id`='144';
UPDATE `Server_TRADERS` SET `desc`='Schratten Weapons Friendly ' WHERE `id`='145';
UPDATE `Server_TRADERS` SET `desc`='Schratten Ammunition Friendly ' WHERE `id`='144';
UPDATE `Server_TRADERS` SET `desc`='Schratten Friendly Vehicles' WHERE `id`='146';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg General Store' WHERE `id`='147';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg Weapons neutral' WHERE `id`='148';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg Ammunition Neutral' WHERE `id`='149';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg Neutral Building/Parts' WHERE `id`='150';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg Vehicles Neutral' WHERE `id`='153';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg Black Market Vendor' WHERE `id`='154';
UPDATE `Server_TRADERS` SET `desc`='Schratten Friendly Building/Parts' WHERE `id`='155';
UPDATE `Server_TRADERS` SET `desc`='Schratten General Store 2' WHERE `id`='157';
UPDATE `Server_TRADERS` SET `desc`='Schratten Medical Supplies' WHERE `id`='158';
UPDATE `Server_TRADERS` SET `desc`='North Wholesaler' WHERE `id`='161';
UPDATE `Server_TRADERS` SET `desc`='Emmen General Store 3' WHERE `id`='162';
UPDATE `Server_TRADERS` SET `desc`='North Boat Vendor' WHERE `id`='164';
UPDATE `Server_TRADERS` SET `desc`='Emmen Weapons neutral 2' WHERE `id`='165';
UPDATE `Server_TRADERS` SET `desc`='Emmen Ammunition Neutral 2' WHERE `id`='166';
UPDATE `Server_TRADERS` SET `desc`='Emmen Vehicles Neutral 2' WHERE `id`='167';
UPDATE `Server_TRADERS` SET `desc`='Emmen Neutral Building/Parts' WHERE `id`='168';
UPDATE `Server_TRADERS` SET `desc`='Emmen Medical Supplies 2' WHERE `id`='169';
UPDATE `Server_TRADERS` SET `desc`='Lenzburg Medical Supplies 3' WHERE `id`='170';
UPDATE `Server_TRADERS` SET `desc`='Pauls Boat Trader 2' WHERE `id`='171';
 

Share this post


Link to post
Share on other sites

i get this error i just know that i have logged in with the right details

 

MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts.
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.Driver.Open()
   at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
   at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at TraderEditor.DatabaseConnector.getTraders(String instance)
 
can anyone help me
 
thanks

Share this post


Link to post
Share on other sites

Looks you took the wrong connection parameters (hostname, password, etc) or your MySql database dosen't allow external connections (in my case the server hoster has a check box to allow external connections)

Share this post


Link to post
Share on other sites

Good job on this tool, but i seem to be having some issues with it.  When I log on everything starts right and I get no errors and the traders show up on the left hand side.  But when I click on a trader most of them the categories don't show up, but the Black Market - Olsha does, but only Black Market Ammo, and Black Market Weapons show up items on the right.  And even those items are not everything in the database.  

 

7f0ec533-1890-4551-bf40-659a491e558d_zps

Share this post


Link to post
Share on other sites

Strange. I took two simple queries:

 

Get categories (All TIDs for the specific trader): "Select id, name FROM Trader_TIDS where trader = '" + trader + "' ORDER BY name;";

Get items (All Items for the selected TID): "Select id, item, qty, buy, sell FROM Traders_DATA where tid = '" + tid + "' ORDER BY item;";

 

Perhaps your database scheme is structured differently?

Maybe you could send me a database export as sql file.

Share this post


Link to post
Share on other sites

I'm using the default sql from Epoch and I installed Private Hive tools.  Now I hate Sql so i don't know if i did this right but https://www.dropbox.com/s/rq8x27qfpslfwlu/epoch_testing.sql .  This is a Sql of my Epoch_testing DB and server not my live server just the name is different.

 

Also I have been using this tool instead  works.

 

I also have remote users setup on my DB so any host can connect.  

 

If that is not the right SQL export let me know how to do it differently, i'm using HeidiSQL.

Share this post


Link to post
Share on other sites

Hmmm... seems there is some trouble with the case sensitivity of the table names. I got some MySQL errors from your snapshot.

 

After I renamed the tables into Server_TRADERS, Trader_TIDS and Traders_DATA it works fine.

 

I will look for a better way to handle this.

 

But its strange that you only got a part of the items of the specific category.

 

kx7iri33.png

Share this post


Link to post
Share on other sites

Yes and only like 2 traders actually worked with displaying anything.  My tables are like that from the Epoch.sql script they give you when you install.  If you need any other info or help let me know.

 

Capt-O

Share this post


Link to post
Share on other sites

Thanks very much i will test out today.

 

 

Edit: Works great

 

Request:  Can you add the TID to the top right so you can change it.  Meaning if i put a Assault Rifle in the LMG's by accident I can just change the TID and it would move it to the correct one.

 

Thanks

Share this post


Link to post
Share on other sites

I am having a similar problem that Capt-O reported, I click on a category and no items show in the list. No errors or anything, my table names are all lower case and I have set them to such in the configuration.

Share this post


Link to post
Share on other sites

It seems to be issues in the database.  In mine some of my TIDs are not even correct or even match correctly to my server_traders.sqf file.  I've adjusted a few of them to make it work, but some of the other traders in the program still don't work b/c of my database isn't correct.  But they work correctly in game.

 

Maybe you can load the data from the server_traders.sqf file as that is correct and that's what decides to spawn and what TIDs are linked.   https://www.dropbox.com/s/cgkrofb9p1p96b3/server_traders.sqf

 

Link to my server_traders.sqf file which is all correct and loads correctly.  But if you match it to my database its all sorts of wrong in the database.  Even the descriptions for the traders is wrong.

Share this post


Link to post
Share on other sites

It seems to be issues in the database.  In mine some of my TIDs are not even correct or even match correctly to my server_traders.sqf file.  I've adjusted a few of them to make it work, but some of the other traders in the program still don't work b/c of my database isn't correct.  But they work correctly in game.

 

Maybe you can load the data from the server_traders.sqf file as that is correct and that's what decides to spawn and what TIDs are linked.   https://www.dropbox.com/s/cgkrofb9p1p96b3/server_traders.sqf

 

Link to my server_traders.sqf file which is all correct and loads correctly.  But if you match it to my database its all sorts of wrong in the database.  Even the descriptions for the traders is wrong.

 

Weird, I will take a look and see if mine is like that (I have a sneaky suspicion it is :|). I will report back once I get home and check it out.

Share this post


Link to post
Share on other sites

Weird, I will take a look and see if mine is like that (I have a sneaky suspicion it is :|). I will report back once I get home and check it out.

Now granted i'm still using 1.3.0.1 you might be using the more recent version.

Share this post


Link to post
Share on other sites

please help

what do i put for the instance ID? i put 11 then it started working but now only the black market dealers items are showing up. the traders and the categories are showing up but when i click on the categories the items dont show up. please help

Share this post


Link to post
Share on other sites

please help

what do i put for the instance ID? i put 11 then it started working but now only the black market dealers items are showing up. the traders and the categories are showing up but when i click on the categories the items dont show up. please help

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...