Jump to content

[WIP] MySQL code generator for Traders


Recommended Posts

Hello,

 

Since I started working on my C++ skills, I thought I would make something that has use. 

 

What is it?

This tool is basically a normal console that allows you to generate the code that you use to add weapons, vehicles and items to the traders (Eg. ('["1Rnd_HE_M203",1]',10,'[4,"ItemGoldBar",1]','[2,"ItemGoldBar",1]',0,60,'trade_items')).

 

Any ETA?

Not yet, the coding process is long, because every item (weapon, vehicle and items)  have 10+ lines of code. I'm currently only done with adding the weapon list. Rough ETA: next week.

 

Why did I post it this early?

I want to know your guys opinion about it, if it's worth to keep going with this project.

 

Pictures:

hnVMwPe.png

JJ3EKHQ.png

 

Current ammount of lines: 464

Link to comment
Share on other sites

Darihon, I had a similar tool I wrote a while back to generate inventory / backpack strings for donors.

 

I found it immensely helpful when I moved the in game object data from hard coded arrays to a database.

 

 

If you want I can provide you with my tables I use that contain the weapon classname, description, and ammo classnames.

Link to comment
Share on other sites

Just a quick update: 

I am working on the generating code, which is the latest thing that I'll have to do before I'll release V1. This version contains only: weapons and some stuff will need to be edited by hand (edit some: '' to: "" and buy/sell price, since it generates both the same atm.).

 

Lines of code: 675 lines.

Link to comment
Share on other sites

  • 2 weeks later...

If you could send them, hambeast than that would one less pain in the ass. Working on strings right now, since I don't want 18k lines of code ..

Sorry Darthon, didn't see your reply until now.

 

I've PM'ed you a pastebin of my primary_weapons and secondary_weapons tables.  Hope they help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...