Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Assets and Asset Store' started by CallumP, Mar 2, 2013.

  1. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Liking the sound of the new agent based system, also inventory pro support is great.
     
    Tinjaw likes this.
  2. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Does this support Inventory Pro now? Instant buy from me if so as I already have IPro, and am looking at getting Love/Hate as well and all three working together will be magic!
     
  3. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Hi, I am currently working on the support for Inventory Pro. I was looking at attempting to push the data, however, I am unable to find a simple way of creating a new item that is used in Inventory Pro. As a result, currently it is necessary to set the item up in Inventory Pro and then the data can be pulled into TradeSys. I had also in the process realised that I need to add methods which will update the prices and item numbers between the two systems which is what I am now looking at.
     
  4. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Thought I should update. After spending quite some time trying to work out how to get them to work together and finding out how/where Inventory Pro does things, I have finally managed to get them to work together! The documentation is mostly done, need to do a couple more things as well as test the integration a little more, but hopefully if there isnt anything major, I should be able to get the update uploaded to unity by the end of the week.
     
    BackwoodsGaming and John-G like this.
  5. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    2.9 is now available!

    As previously mentioned, this update allows for integration with Inventory Pro. Details on how to do this can be found in the manual (page 22). Note, I used version 2.4.1 of Inventory Pro
     
    Tinjaw, Teila and BackwoodsGaming like this.
  6. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @CallumP,

    Does this Asset have Playmaker support?
     
  7. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    tradeSys currently does not have Playmaker support. I think with the current way the code has been written could make it quite difficult to get Playmaker support to work well. I will have another look at it and see how other assets have done their support and I may find a way to do so
     
  8. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @CallumP , great thx. I think Playmaker integration would better align this Asset with several others including Inventory Pro.
     
  9. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I just asked @jorisshh the developer of Inventory Pro about your integration. He was unaware of it. I suggest that you make life easier on yourself by contacting him. Jorisshh is working on some integrations right now, one with Love/Hate, and I bet you will find him helpful. Note, he said there were some changes to Inventory Pro V 2.5 that might effect your integration.
     
    boysenberry likes this.
  10. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    I have just messaged jorisshh about the integration and will take another look over the code to see if the integration could be improved. Thanks for letting me know about 2.5, I shall also take a look at any issues that arise from using it
     
    boysenberry and wood333 like this.
  11. Trevise

    Trevise

    Joined:
    Mar 31, 2014
    Posts:
    13
    Hey @CallumP I noticed you have all your stuff in TSVars serialized. Is that + the seed how I'd go about saving the state of the game? If not, can you point me in the right direction to be able to do that?

    Thanks!
     
  12. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Hi, apologies for the wait for a response, been trying to think and work out which variables you would need to save. The serialized parts in TSVars is mostly so that I can see the variables in the inspector before writing the custom inspectors for them.

    Keeping the seed value and using that to regenerate the locations is one thing to save. You would also need to save the number of each item that each trader/trade post/player has as well as the amounts of each currency. Then, on loading the game, generate the locations first, set the number of each item at the trade post etc., set all of the variables for the trader that i have listed below and then call GenerateDistances on the controller. This will automatically start the trading and will work out the prices and everything and will allow the traders to continue their routes to their destinations.

    You will also need to add the following code to the Average method found in the controller, below the other for loop that looks very similar to this.

    Code (CSharp):
    1. for (int t = 0; t < traderCount; t++)
    2. {//go through all traders
    3.     Stock current = traderScripts[t].stock[g].stock[i];
    4.     if ((current.buy || current.sell) && traderScripts[t].allowTrades)
    5.         total += current.number;//increase the total
    6. }//end for all traders
    Variables for traders:
    target, startPost, finalPost, postID, homeID, onCall, allowGo, spaceRemaining
     
    boysenberry and BackwoodsGaming like this.
  13. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    It might be worth updating the OP as it looks like this is abandonware: "Last edited: Aug 11, 2015"
    Also, all of the image links are broken.
     
  14. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Thanks, hadn't realised that the images were broken! I'll sort that now and update the list of features etc.
     
  15. Sanginius

    Sanginius

    Joined:
    Apr 21, 2013
    Posts:
    14
    Hi there,

    I just bought our asset and got this error after loading it :p

    Assets/TradeSys/Trader.cs(273,41): error CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `CallumP.TradeSys.Item'

    I'll try to fix it by myself but I don't know how to do that, yet ^^
     
    Last edited: Apr 23, 2017
  16. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Hi, this looks like it can be fixed by replacing the:

    Code (CSharp):
    1. Item droppedItem = (Item)Instantiate(controller.goods[groupID].goods[itemID].itemCrate, transform.position, Quaternion.identity);
    found either at line 273 or slightly above (in mine it seems to be line 271) in the Trader script with

    Code (CSharp):
    1.  Item droppedItem = Instantiate(controller.goods[groupID].goods[itemID].itemCrate, transform.position, Quaternion.identity).AddComponent<Item>();
     
  17. rmorph

    rmorph

    Joined:
    Apr 3, 2012
    Posts:
    87
    Hi,

    Is this asset still in development / under support? Last update was August 2016?
     
  18. Sanginius

    Sanginius

    Joined:
    Apr 21, 2013
    Posts:
    14
    Seems like there's not update in the near future, but you still get support from CallumP, see the post above yours.

    I must say as a programmer (new to C# however) this asset is really cool. It's very well written and documented and you can easily extend it. I just add some new setters and getters to it and some other calculations and use tradesys to assist for making ai decisions on what to buy and stuff like that.
     
  19. rmorph

    rmorph

    Joined:
    Apr 3, 2012
    Posts:
    87
    Well I took the chance and purchased :D, but straight away I get a compile error and several deprecation warnings:

    Error:

    Assets/TradeSys/Trader.cs(271,42): error CS0030: Cannot convert type `UnityEngine.GameObject' to `CallumP.TradeSys.Item'

    Warnings:

    Assets/TradeSys/Spawner.cs(46,16): warning CS0618: `UnityEngine.Random.seed' is obsolete: `Deprecated. Use InitState() function or Random.state property instead.'

    Assets/TradeSys/Example/CreatePostsTraders.cs(22,11): warning CS0618: `UnityEngine.Random.seed' is obsolete: `Deprecated. Use InitState() function or Random.state property instead.'

    There are inconsistent line endings in the 'Assets/TradeSys/Example/CreatePostsTraders.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

    There are inconsistent line endings in the 'Assets/TagManagement/ObjectTags.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.


    I hope at least the error is easily fixable? I'm not a programmer so it would be nice if the plugin worked out of the box :)

    For info I've installed the tag manager and am attempting to follow the manual instructions.
     
  20. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Hi, the error is sorted by following I think my last message on here. I will look at making an update that contains the fix though so it should work out of the box.


    The asset is definitely still supported, any issues etc I will try and sort within a couple of days of receiving an email or it being on the forum. I recently finished university so now have more time to write the update I had been hoping to do. This may take some time though and am currently putting all of the ideas and thoughts that I had written on pieces of paper over the last year or so all into one document.
     
    Teila and BackwoodsGaming like this.
  21. rmorph

    rmorph

    Joined:
    Apr 3, 2012
    Posts:
    87
    awesome thanks :) That fixed it!
     
    Last edited: Jun 28, 2017
  22. MarkVincent

    MarkVincent

    Joined:
    Nov 18, 2014
    Posts:
    26
    I'm getting a list of errors related to "TagManagement". Using Unity3D 5.6.1p3. Clean project.

    Assets/TradeSys/Controller.cs(5,15): error CS0234: The type or namespace name `TagManagement' does not exist in the namespace `CallumP'. Are you missing an assembly reference?

    Could you help me resolve this issue? Thanks!

    p.s. Solved by separately downloading the TagManagement Asset. Weird since it is from same developer.
     
    Last edited: Aug 17, 2017
  23. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Hi, glad you sorted it, have been away so was unable to check. I have the two assets because when separating the tags in TradeSys, I felt that it could potentially be useful as a standalone asset. This might be forgotten when starting a new project, however, doing this allows updates to be made independently, if fixes needed to be made.
     
  24. impi2

    impi2

    Joined:
    Jul 3, 2015
    Posts:
    43
    Hi,
    This looks interesting.

    One thing I didn't see in demos when selling was the price I purchased the item at and/or the profit. Which I'd consider important. Else player would be selling at a loss etc.

    I guess one could have multiple items at various purchase costs, but I suppose it's logical to sell cheapest first ... for most profit. Or that may need to be a UI? ... because in some item cases (eg. Food), you want to sell oldest first before it goes off.

    Also, it would be nice to have some concept of networking supported, obviously not implemented as there are many flavours, but supported in the design ... so db can easily be installed on a server. Not having seen the code it may be complimentary to that,but posts suggest author never thought about that.

    Has anyone had good/bad experience setting this up networked?
     
  25. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Hi,
    First of all, apologies for not having said anything in a long time. I had been finishing my uni degree and started a job not too long ago so haven't really had much time to sit and look at TradeSys.

    I intend to create a new update and have done for a while but due to not having time, have been unable to completely rewrite this without having a long gap in which I learnt more programming which would make the code better. To this end, I feel that for the time being, it will be best for me to depriciate both on the asset store so they are no longer available for new purchases. If you have already purchased this, you can still access and download it. Once I have made a new version, I will put them both back onto the asset store.

    I have no idea when I will have finished making a new version, but TradeSys will hopefully be back soon! Thank you to all of you who have supported it so far! If you do still have issues, I will still try to fix them, I just wont be releasing the changes on the asset store.
     
    mandisaw and John-G like this.
  26. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Ugh! I left it as a wishlist item for too long! I wish you would have given a week's notice before deprecating so those of us who wanted to still grab it could have, just in case life gets too busy for you and you dont get a new version out any time soon. :(

    Grats on finishing your degree and the new job.
     
  27. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Shawn, I did the same thing!!! I really wish he had given us notice too. :(
     
  28. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Well, Teila,

    That makes three of us.
     
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Yeah, very sad as the trade part was going to be really important in our game, but we had so much else to do until we would be ready to implement it that we just waited. Maybe someone else will make something similar, although..it seems to be very special.
     
  30. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    This was me as well. I kept putting it off because I was waiting until I needed it. Now I wish I'd got it so I'd at least have the source in case @CallumP doesn't get around to releasing a new version before I'm ready for it. :(
     
  31. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    Sorry, didn't realise it disappeared from the asset store quite so quickly! I'll have a look at it today/tomorrow to fix any glaringly obvious issues and then put it back on so you can download it if you still wish
     
  32. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oooo, thank you, Callum!
     
  33. impi2

    impi2

    Joined:
    Jul 3, 2015
    Posts:
    43
    4 of us :(

    It may soon pay for the degree!
     
    wood333 likes this.
  34. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Great news, @CallumP! I'll keep my eyes open for it. Were there unresolved issues? Or are you just talking about the fixes you were going to do in an update a couple months back?
     
  35. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    As a long time supporter of @CallumP, I for one am not surprised at this level of service and commitment - esp for such a niche asset; other, much larger assets could learn a lot from Callum.

    Congrats on the graduation & job Callum - much success in your future endeavors.
     
  36. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I will buy it without the fixes. At the very least, it would be good to learn from and that is worth the price.
     
    mandisaw and BackwoodsGaming like this.
  37. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Ditto
     
  38. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    I was mostly just going to be checking that it works properly with the most recent version so that there shouldnt be any issue with API changes for a short while at least. I'll check that the fixes I mentioned above are applied but I have already found and fixed one bug :) Hopefully tonight I will upload it and if not, tomorrow. I know I said a couple of days ago, sorry! I had less time than I thought.

    For those wanting it to learn from, the code is at times messy and I did have one review saying this (which is why I then have had to think about what I was going to do with it and hence decided to take it off for a time while I make a new version). It's not how I would approach programming it now because I have learnt a lot more. However, I hope that the logic behind some of the stuff that it does is sensible and is helpful
     
  39. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks so much, Callum. I am sure it will help. :) I appreciate you taking the time to do this and promise we will not bug you with a bunch of questions. Good luck with your graduate work. I remember those days well.
     
  40. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Ditto what @Teila said. I'm mainly wanting the functionality without having to reinvent the wheel. If it doesn't work 100% because of Unity changes in new versions, I have no problems digging in and figuring things out myself. The main thing I want is the code so I don't have to start from scratch in case you get busy and don't come back with a new version down the road. That is one of the main reasons I try to only buy assets that have source code in the first place. The only difference between the others and yours is that I know that you are going to be gone awhile. The others, I have the source in case of sudden disappearance of the authors. :)

    Also, to be honest, if you find you don't have time to do the stuff you are trying to do before re-uploading the asset I wouldn't have a problem picking up the asset as it was when you deprecated it.
     
    mandisaw, one_one and Teila like this.
  41. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    I've just uploaded it so it will hopefully appear again in a few days :) but will let you know when its back. I'll keep it up definitely until the end of February. Might stay on a little longer if I manage to not have enough time again but will post again giving a couple of days notice this time :)
     
  42. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thank you so much! :)
     
  43. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Awesome! Thanks for deciding to at least leave to end of Feb. Property taxes came in and killed this payday but I can grab around my 15th check. And thanks again for resubmitting it!
     
  44. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    It's now back on the asset store! As it has taken a while for it to go on, I'll most likely leave it on for a month or until the end of March. Either way, I'll say something on here first so it doesn't disappear immediately again.
     
    jovino likes this.
  45. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Thanks @CallumP! Just grabbed it. Thanks so much for reposting it for those of us who at least wanted to grab the source before you deprecated the current release! Hope you are able to eventually make it back for a new version. Either way, wish you the best in all you do!
     
  46. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    Does anyone know if this works with unity 2018 latest version before I buy it?
     
  47. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Since it is as is now, and not updated for 2018, probably not. But you could update it yourself maybe.
     
  48. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    Man that sucks, this is EXACTLY what I need for my game. Any recommendations on anything similar?
     
  49. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Nope, I know of nothing else. Sorry. The best thing is to buy this one and figure out the coding so you can update it. Otherwise, build your own from scratch.
     
    mandisaw likes this.
  50. CallumP

    CallumP

    Joined:
    Mar 2, 2013
    Posts:
    76
    I've had a look and from my fairly simple checking of the demos, it seems the only issue I noticed was a warning that can be fixed by changing part of line 286 in TSGUI.cs from saying "ShurikenLine" to "EyeDropperHorizontalLine". The API updater window will appear and the change it makes is okay, make sure you back up first though in case other stuff gets modified! There may, however, be other issues I didn't notice as it was just a quick check and fix.

    I also don't know how 7 months have passed! While I remember, I will take TradeSys off the store at the earliest the end of October.
     
    BackwoodsGaming likes this.