[RELEASED] TradeSys 2.x - A trading and manufacturing system

Currently removed from the asset store but I am developing a new version
Code can be found on github here

TradeSys is an item trading and manufacturing system and can be used as a core element of many games. If you have any items in your game which you wish to be tradable, then use TradeSys!

TradeSys 2.0 brings many new and improved features to make its use even easier! The whole system has been rewritten from the ground up with performance at the heart. The result of this is a system which can now easily cope with over 2000 trade posts, a significant improvement over the previous version.

TradeSys is a simple to set up and use system which allows for the trading of different in game commodities. Items can be manufactured at trade posts, allowing the game to be more interesting. TradeSys will automatically tell traders where to go with new user defined options allowing you to change what determines the best trade for a trader to make.

Pricing of items at trade posts is done automatically by TradeSys which allows the prices to be different at different trade posts depending on the numbers that are in stock. As the numbers of items fluctuates across the trade posts, the prices will change too, making your game more dynamic and interesting.

Manual | Print friendly manual | Asset Store | TradeSys Lite

Notes:

  • Due to Dropbox removing support for HTML rendering, the demo scenes will download a html file which is then playable in a browser.
  • The quick scene example is not included with TradeSys

Features:

  • Simple to set up
  • Automatic stock pricing
  • Item manufacturing at trade posts and on traders
  • Trader management
  • Custom inspectors making set up simpler
  • Fully commented source
  • Plus many more

Asset Store

All for $25!

More features to be added in the future!

Comparison between TradeSys and TradeSys Lite

If you are updating from TradeSys 1.x, please delete the TradeSys directory and import TradeSys 2.x. This is due to files being rearranged and some removed.

New update!
This adds the ability for traders to carry multiple types of item, you can now disable items at trade posts, so will not be traded. Also added expendable traders where TradeSys will create a trader at the start post and destroy it when it gets to the required post.

This looks really interesting. I’m not sure if I can use this for my project as is. I’m not saying I couldn’t use it, I’m just not good at coding stuff. Do you have plans of having an example that is integrated into a vendor system? Like a vendor NPC ( Capsule ) with a window showing what they have for sale and being able to buy and sell stuff.

I will be adding code snippets that could be used to make the window, probably something similar to code behind the trade post window in the web player demo. But will also include the code to use when a player is buying or selling items, and will probably include an example of using the different code segments together.

Version 1.2 has been released!

This version adds:

  • A custom inspector for the traders, and has buttons for easy trade post finding, or location setting
  • Units for goods based on their mass
  • A manufacturing checker, saying if an item will increase, decrease or stay the same, and will give a value to show how quickly it will change
  • A fully commented player script and a scene demonstrating the use (one of the webplayer examples is of the scene that you will get). This includes a fully functioning shop mode, and the ability to click on a trader and view the information.
  • Added methods to make it easier to enable / disable posts and items.
  • Fixed item pricing
  • Some UI Tweaks

Check the manual for how to use TradeSys, more information on the changes that have been included and using the extra methods that have been added.

Version 1.3 has been released!

This version adds:

  • Spawners with traders able to collect the items
  • Groupings - it is now possible to group trade posts together, so that not every trade post trades with every other one
  • An overview to the controller, showing information about groups, goods and manufacturing
  • Can view trade links, spawn sphere radius and radar sphere in the scene view
  • Update interval option to the controller, so the update frequency of post prices, and possible trades may be reduced to improve performance
  • Massive UI update to make TradeSys even easier to use and set up!

Check the 12 page manual for how to use TradeSys, more information on the changes that have been included and using the extra methods that have been added.

I was writing my own smiliar system but just found out about yours now and with this price im sure going to buy this at the next pay day.

Just one question though, are we able to define different type of products? And if so, how do we do that? By inheriting from a base item class?

Briefly, is this anything smiliar to X3 games trading system at all?

Adding different items is very simple as it is done in the inspector. Once the controller script has been added, there is a goods tab where you can add and define all of the products. The screenshot below shows the inspector where you add the goods.

I hadn’t heard of the X3 games before, but after some researching, the manufacturing aspect does appear to be similar, I can’t seem to find too many details about other aspects, but it does include other things that I had planned to included in later versions.

Version 1.4 has been released!

This version adds:

  • Factions - you can now select factions for trade posts and traders
  • Option to view the trade links while a trade post has been selected, making it easier when editing groups or factions

Check the 14 page manual for how to use TradeSys, more information on the changes that have been included and using the extra methods that have been added.

I have made a quick demo scene using TradeSys as an example of how quickly and easily it can be added into a game to provide one key aspect of gameplay. The scene wont be included with TradeSys because it makes the download much larger, and is unnecessary for most projects as it is only a demo, so requires more editing.

The scene is using a new version of TradeSys which I will upload once I have made a few more edits - creating the scene meant that I found some areas that could be improved upon, so that will be sorted first.

Here is the link to try for yourself: https://dl.dropbox.com/s/dfin38lco8ejfji/4.html

UPDATE: The ability to change groups has been added, and the traders will no longer slide every so often. Turns out that I didn’t change the wrap mode for the animations, so the sliding was because the animation had finished.

questions

can the trading routes be set up by player(s), ie. regional regulations

so scenario like this: players control different regions, set prices in their regions and set routes between market locations (ie. decide who they are trading with = trading union)

maybe this controls it:
[A custom inspector for the traders, and has buttons for easy trade post finding, or location setting]

I like this:
[the update frequency of post prices, and possible trades may be reduced]

It may be possible for the player to set trade routes, but this would be done by selecting what groups the trade posts belong to, similar to what is done in the editor for each trade post. I haven’t tried this, but will have a go at adding it into the player script as an example of how it could be done.

The prices are currently only set by the controller, based on the number of items available at the trade post, this means that it is not possible for a player to set the prices, but custom pricing is something that I hope to add.

The custom inspector makes it easier for you to set up where the trader starts at in the game. By selecting the trade post, and pressing set location, the trader will be moved to the trade post, so you don’t have to move it, and the find post button is so that if a trader is close enough to a trade post, its location will be set to there, and the start post set.

The update frequency offers performance benefits because it isn’t having to update the prices or the trades occurring as often, but also means that when a player purchases an item, the price isn’t necessarily changed instantly, so possibly makes it feel slightly more realistic.

I hope this answered your questions, feel free to ask any more that you have!

UPDATE: I’ve added the ability to select groups in the player script, with an example in the most recent demo with the skeletons

Version 1.5 has been released.

This version adds:

  • More options!

  • Can now select the area shape for a spawner, and the rotation of the spawned items

  • The trader stop time has more options to determine the stop time and when they stop

  • The way manufacture pause works has been edited, and a cool down time option added

  • Can now add all the trader prefabs into the expendable trader list with the click of a button

  • Controller has a new tab which displays extra information when your game is playing

  • Added ability to select groups in the player script in game

Includes some other small fixes and improvements

Version 1.5.1 has been released!

This version fixes a problem with the trader pause times, but also means that it is now possible to use with versions of unity after 4.0.0!

A lite version of TradeSys is now available! Information of the comparison between the versions can be found in the first post

Just purchased after reading PDF and checking out the examples - looks perfect for my game as a starting out point.

Thanks!

One problem: This conflicts with TNet (TNManager.cs - TNPlayer). I’ll see what I can do to re-factor, just thought you should know.

Update: I changed your /Example scripts HitMe.cs and Player.cs to use TSPlayer - a quick check and both example scenes seemed to work.

Update 2: I had to add the “Item” tag in one of the example scenes

Thanks for letting me know about the name conflicts, I will try and sort them for the next version, hopefully adding TS to them should prevent any problems.

Regarding the item tag not being added, I don’t think it gets added if there are no objects with that tag in any of the scenes, and because it only appears with a spawner, it isn’t added. I have something lined up which should fix this problem.

Thanks for purchasing TradeSys and I hope that you find it useful in any games you make

Spent some time with my demo scene to find my way around. So far:

Revised the “shop” views
Buy - only shows “Buy” button for in-stock items
Buy and Sell - Items now display on 2-lines
Sell - only shows “Sell” button for items you have
Added a new “Info” section that (for now only) displays what each post manufactures.

Again, thanks and I left a (positive) review and oh yeah, raise the price - current price is a give-away.
:slight_smile:

Feature Request:

  1. Save/Load function
  2. Trade Post min/max item settings

Thanks for the positive review!

Glad you managed to work out how to show more of the information that TradeSys can show, and are customising the shop view script.

Saving and loading functions were something I had considered adding, but because I thought that people may have different preferred methods, I didn’t include it. Would a method which had a list of all of the different variables that should be saved be useful?

In the new version, trade posts can have custom pricing, but it is a set price which won’t change, but I will have a look at adding the min / max / base pricing similar to that found in the controller.

Thanks again for your feedback and for purchasing TradeSys! (I will be increasing the price)

Sweet! - I’m not kidding about the price :slight_smile:
Re: “Would a method which had a list of all of the different variables that should be saved be useful?” - Yes, you have “insider” knowledge that I’ll never have :wink:

Seriously though, send me an email to my username at gmail - com - I’d really like to send you a donation through PayPal if you can take it.

I’ll hack-in my min/max, using something like your Mfg-> needs process. This way I can create continual “demand” for goods. Oh and also I’m going to add some sort of consumption, kind of like an opposite spawner, a… wait for it… consumer. :slight_smile: Actually after typing that out, that sounds like it should become a function of a trade post, besides any manufacturing, kid of like a cost of doing business.

Okay, I’ll stop typing now… please, send me an email or just let me know that one listed in the store is good.

The consumer process could be done by having a manufacturing process which does not have any making items, only needing items, this way you can also set how long between each time items get used up.

I had misread your previous post - I thought it was min / max prices rather than min / max number of items, but I will have a look at what I can do

The email address on the store does work