Search Unity

TurnBased-Toolkit (TBTK)

Discussion in 'Assets and Asset Store' started by songtan, Aug 11, 2013.

  1. wheelbarrow

    wheelbarrow

    Joined:
    Sep 12, 2011
    Posts:
    140
    That's a good idea, I will give that a shot - I'm currently using a prefab of an arrow I made, and it definitely doesn't work. Thanks for that :)

    Update: Tried it and the same error message that I listed above comes up, and I can't do anything else anymore, unfortunately, as soon as I attack the ai. Guess I will wait to see what Song comes up with.
     
    Last edited: Sep 6, 2013
  2. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Sorry for the slow respond guys, I fell asleep last evening! >.<

    Now to the issues:

    Unfortunately no, there's no such option atm.

    I'll try look into it.


    @wheelBarrow, Ive sent you a copy of the lastest scripts, please check your email.
     
  3. Lioncirth

    Lioncirth

    Joined:
    Apr 7, 2009
    Posts:
    111
    This looks excellent!

    Already have an idea where I might use this, just need to get my current project done :)
     
  4. GPSchnyder

    GPSchnyder

    Joined:
    Mar 23, 2013
    Posts:
    45
    I think this is a biggy, and it may be a pain in the Ass to implement, but is there a way to buy units while in fight? Like you get x$ per Round and they all have a price attached to them? I'd say buy, place and attack the next round. But if you do make it able to attack the round it spawned as a special ability... Would be a cool add to give the system even more depth. Or what about support units that arrive after x rounds? To have the Player fight with a hand full of units till the support arrives?

    George
     
  5. Bud-Leiser

    Bud-Leiser

    Joined:
    Aug 21, 2013
    Posts:
    86
    Bug: Audio Manager: Volume/Panning changes during and after Action Cam

    How to test:
    Add 3D Mp3 song to Audio manager music list
    Play a game with action cam enabled
    Listen with headphones (although speakers should be enough as the change is very dramatic) once the action cam is enabled the sound will pan/doppler as if really far away. When the action cam ends the sound does not return to normal.
     
  6. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    A good material for future development, but definitely not at the moment. I'm already kind of overwhelmed with what's on my plate right now. It's quite exhilarating tho. :)


    Thanks and consider that fixed! Please keep the bug report coming! I'll try to make the next update as bug free as possible. By the way you should really use 2D audio clip instead of 3D for the music. Then you wouldnt have this issue in the first place. Same goes for any FX for UI. The only audio clip that should be 3D is those that intend as if they come from within the game world.
     
    Last edited: Sep 7, 2013
  7. Bud-Leiser

    Bud-Leiser

    Joined:
    Aug 21, 2013
    Posts:
    86
    Once you start dealing with a lot of sounds it gets tricky. Can the audio manager/unit manager play the sound as it's assigned?
    Maybe this is a setting somewhere or outside of your control? Does anyone else have advice on this?
     
  8. Bud-Leiser

    Bud-Leiser

    Joined:
    Aug 21, 2013
    Posts:
    86
    Suggestion: Multiple randomized sounds per event.
    Why: If you have multiple of the same unit hearing the same sounds over and over is annoying.

    Suggestion: Sound for critical hit
    Why: Make this random event more exciting
     
  9. GPSchnyder

    GPSchnyder

    Joined:
    Mar 23, 2013
    Posts:
    45
    I got soundmanager pro for that. Havn't implemented it yet thou...
     
  10. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50

    Hi songtan. thanks for the video!
     
  11. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    As far as playing the assigned audio in game, It shouldnt be an issue. I used the similar system for TDTK without any problem. Mind you that is run in real-time with multiple unit on screen attacking, getting hit, and what not at the same time. But as for managing the audioClip in the sense of organizing them, that is not supported.

    Will try that when all the more cirtical issues has been dealt with.
     
  12. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    found a bug with bullets, if you make the speed of the projectile 40 the collision does not work (tested it on the Ipad).
    songtan which script is responsible for the collision?
     
  13. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Noted. I'll try fix it. The script responsible would be ShootObject.cs.
     
  14. yankee1950

    yankee1950

    Joined:
    Sep 9, 2013
    Posts:
    2
    Hi Guys:
    I am currently learning the Unity platform - having developed some games previously using Multimedia Fusion 2 Developer. I recently purchased the TBTK from the Unity asset store. After the purchase I noticed a OPEN UNITY EDITOR button on the page - which (I assume) is how I get access to the TBTK product. I clicked on this button and the Unity Editor opened - NOOB question - how do I access the TBTK asset? Any help would be greatly appreciated.

    Regards

    Yankee:)
     
  15. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Thanks for your purchase!

    First, open Window/AssetStore from the top panel, or short key ctrl+9. That will open assetStore in the unity editor. Then you can go to the TBTK page. Instead of purchase you will see a download button (Make sure you are log in). Just press that and it will download import the package for you. Alternatively there's a small download button on the top-left corner, pressing that will show you all the asset available to you.
     
  16. yankee1950

    yankee1950

    Joined:
    Sep 9, 2013
    Posts:
    2
    Thanks songtan - got it. Is there any documentation (PDF etc.) on the TBTK. This looks fabulous - just what i was looking for.

    Regards
     
  17. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Yes, there's a pdf documentation within the TBTK folder. Or you can try these two videos:

    http://www.youtube.com/watch?v=gU0GhvlNCGo
    http://www.youtube.com/watch?v=Lss7NDu9rsk

    That should be enough to get you started. However please note that the current version you are having is rather buggy at the moment. I'm still working on the next update. So apology in advance and please let me know if you come across anything peculiar
     
  18. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    proposal
    firing 3 4 5 bullets
    selection when firing: rocket, machine gun, laser or other
     
  19. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Can you elaborate? What is firing 3 4 5 bullets? Fire more bullet in 1 attack? And by the selection do you mean more attacking type/option for each unit?
     
  20. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    1)yes more bullet in 1 attack

    2)for example if a unit can shoot a missile or a laser and make the option of selecting a missile or a laser.
    I forgot that the damage depends on the type unit and not the type bullet.
    it only makes sense if the damages are calculated what type of bullet you are using (for example: the missile -2 health. laser - 4 Health). it's hard to do?
     
  21. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Just add more shootPoint to the unit. Each shootPoint will fire a shootObject

    Kind of. You are talking about having flexible and multiple attack stats on each unit. It can be pretty straight forward in the implementation of the mechanic. But to have the editor interface to configure all the stats as well as the in game interface to show the stats and interact with the options, that could be a lot of work there. It's an interesting idea and I might get to it at some point, but I cant say when.
     
  22. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    Thank you. I hope you will have time to do it.
    Thank you for your work, I'm glad I bought your package.
     
  23. Bud-Leiser

    Bud-Leiser

    Joined:
    Aug 21, 2013
    Posts:
    86
    "Just add more shootPoint to the unit. Each shootPoint will fire a shootObject"

    Ohhhh, that's what that option is. I kept meaning to ask. Gotta think of a new name for this in the editor ;)
     
  24. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    when firing 10 bullets at once the sound makes a strong echo. how do I make the sound play both when firing one bullet?
    (to remove echo)
     
    Last edited: Sep 12, 2013
  25. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    I think the problem is that the audioClip you are using resemble a strong echo sound on its own. I'll try have 10+ of shootObject in one shot using the default canon shoot fx without any echo problem.

    By the way I dont quite understand what do you mean by "play both when firing one bullet". Play both of what? Care to explain?
     
  26. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    10 shots at once = 10 times the sound plays a shot?
    better if 10 shots at once = 1 sound shot
    how to do, can you tell me again?

    sorry for bad english
    but it topic up
    ;)
     
    Last edited: Sep 12, 2013
  27. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    you need to look into UnitTB.cs, look for AttackRoutineRange(). There's a few section that loop through all the shootPoints like so: for(int i=0; i<shootPoints.Count; i++){. Basically you need to move the line audioTB.PlayRangeAttack(); out of the loop.

    It's a bit tricky if you are not familiar with coding. If that's the case, I would suggest you to wait for the next update. Then I'll modify that for you.
     
  28. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    thanks
    I'll try do it
     
  29. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    I did as you said. Now the sounds are working well. Thank you.
    Now I'm trying to replace the NGUI-free to a paid NGUI
    and get a lot of errors.
    may suggest any how to replace correctly NGUI
     
  30. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    You need to delete the NGUI-free folder (named "NGUI") before import NGUI full. That's about it.
     
  31. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    fine
    now the package is imported and there are no errors. very good
     
  32. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
  33. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    I forgot to remove a section of code used for debugging, Just remove the last section of GameControlTB.cs from line580 to line591.
     
  34. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    The new update is finally out on AssetStore. It has some really neat addition and fixed tons of bugs. Get your update now. The change log are as follow:

    Version Change – 1.0.2f5 (13 September 2013)
    addition/change
    • added XCom style cover system
    • added fog of war
    • added support for a all AI faction scene (no player faction)
    • Total Revamp of TurnMode and MoveOrder. More variant are now supported.
    • Better AI
    • Added more target area for unit-abilities (line, cone)
    • Editor interface change and renaming some of the unit stats.
    • tweak the aiming of the range attack visually so a hit look like a hit and a missed look like a missed
    • tweak the trajectory of projectile shootObject so it's more robust
    • Many tweaks across the whole framework
    bug fixes
    • lots of bug fix with regarding turn transition and logic
    • fix bug with unit placement
    • fix bug hit sound and hit animation is played even an attack is missed
    • projectile shootObject max shootAngle limit is now increase to 75
    • fix bug where projectile shootObject sometime bounce off or overshoot from the target
    • and tons of other bugs

    For detailed info about the new update, please visit my website.
     
  35. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    thanks for the update
    option "Randomize Upon Start" in IOS does not work. ceases to operate touch control (tested on Ipad)
     
  36. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Thanks for the feedback. Can you elaborate? In what way it doesnt work? It doesnt load or the grid-generation is incomplete? So the touch control has stop working entirely? Have you try on any other mobile device?
     
  37. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    Unity generated an error $85cbf9351e71.png

    I removed this line (//)

    I can not select a unit, or to attack the enemy
    only works NGUI
     
  38. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    noted, I'm working on it now.
     
  39. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    @Player2D, please send me an email so I can send you the fix.
     
  40. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    sent the
     
  41. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    I tested the fix
    everything works well
    Thanks for the quick help
     
  42. Player2D

    Player2D

    Joined:
    Feb 2, 2013
    Posts:
    50
    Last edited: Sep 23, 2013
  43. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Thanks for letting me know. I'll look into it and fix it as soon as I can.
     
  44. E1iTe

    E1iTe

    Joined:
    Aug 7, 2012
    Posts:
    47
    Amazing job once again! I had a few other questions:

    1. I was working on playmaker actions for game play since it was easier for me to make chances that way and not get lost in the code but after the rewrite it's kinda made it obsolete... any thing in the plan to have native playmaker support? the reason why is I need a few other things to happen when attacking mostly (ex. add xp for each successful hit, i'm using score flash to make a the hit's and xp scroll up). I've also started adding a weapon system so it changes some of the UnitTB values on the fly comming from another script I had. it was easy to do this and try things with playmaker but no so much with plain code.

    2. can the cover object be destroyed? or are there any plans for it?

    3. before i believe you had melee to be able to have a distance value, i could be wrong but can I still change the value to have the option for a unit to attack melee something like two squares up in the line like what was implemented in the last update?
     
  45. E1iTe

    E1iTe

    Joined:
    Aug 7, 2012
    Posts:
    47
    Also any change of height variation?
     
  46. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    @Player2D, I've just sent a fix to your email, please check it out.

    @E1iTe, Thank you! Now to answer your question:
    1. I'm sorry but I've no plan to add support to PlayMaker. I'm trying to keep my package clear of any dependency with NGUI being the only exception (Obviously default GUI is not up to the task). Plus I've no idea how PlayerMaker works

    2. I dont have plan for that for the time being. However this could change in the future.

    3. I dont think I've enable range setting for melee attack. But I suppose if you know how to code, it's quite easy to change that. Look for function GetAttackRangeMax() and GetUnitAttackRangeMax() in UnitTB.cs, change it so that it returns the normal attackRange regardless of the attack type.

    4. I can try to do that in the next update if you need it.

    Hope this answer your questions. I'm sorry that most of the answer seems to be a no.
     
  47. E1iTe

    E1iTe

    Joined:
    Aug 7, 2012
    Posts:
    47
    should the SingleUnitPerTurn mode allow switching? my understanding was:

    "All units (regardless of faction) take turn to move according to the individual unit stats. The round is completed when all units has moved. MoveOrder has no effect on this setting".

    I thought it would allow for one unit regardless of faction moves at a time based on stat. some units might move more then once before the round is over. like if a unit has a movement of 10 and another has a movement of 4, he would move twice before the other one would move in the round.
     
  48. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    Thing is, you can either allow unit switching, or predetermine the move based on stats. These two are mutually exclusive. Then there the how many move per round issue when you use stats to determine move order. Yes, it could be done the way you are describing. But then it's become pretty tricky to determine when a round ends. And without a clear end of round event, it become very tricky to keep track of the actual effects duration, which is based on round entirely. So until I can figure out how to solve this, I'm going to keep it as it's. But when I do, I'll just probably add a new turn mode rather than modify the existing one.
     
  49. E1iTe

    E1iTe

    Joined:
    Aug 7, 2012
    Posts:
    47
    Can you keep an array of all units, and then once the unit has moved remove from the array? then once array is empty start new round and repopulate array? or something along those lines?

    I would start trying to modify the code to fit the style of gameplay i am looking for but it seems that the framework is in the early stages and may be subject to another partial code rewrite or something and then I have to Redo all my changes and custom code in the new places as needed which is why i've been more inclined to ask you for changes and road maps as appose to diving in and making my own changes :(
     
  50. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,404
    I'll try and see if I can fit that in.

    I'm really sorry that I couldnt give you an accurate road map. Frankly I dont have one and even if I do, It's very unlikely that I will be following it religiously. Thing is although I have a rough idea of the direction I want it to go but I do take suggestion from here and there. And since I dont have a fix working schedule on it, there's no guarantee that I will the time to follow the plan through. Just fyi, I often needs to juggle different job and task. Financially it's just not viable for me to work full time on maintaining and developing my product on AssetStore.