Search Unity

TurnBased-Toolkit (TBTK)

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

  1. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Hi, I'm looking to make a panzer general clone with the basic 2d graphics etc.

    Would this toolkit be suitable? From what I've seen it looks good, but not seen anything about using 2d sprites for units.
     
    Last edited: Apr 16, 2019
  2. eggor83

    eggor83

    Joined:
    Nov 28, 2018
    Posts:
    1
    Hello,
    Looks like a very nice package, but I have some suggestions:
    - would be great to be able to use various height levels for terrain Nodes?
    - is there a way to assign particular effect for specified terrain Nodes? (for example to add attack modifier for unit standing on hill node)
    Cheers!
     
    Last edited: Apr 17, 2019
  3. Afassolas

    Afassolas

    Joined:
    Apr 10, 2013
    Posts:
    78
    Hello, I am currently developing a game using the Adventure Creator asset pack. https://assetstore.unity.com/packages/templates/systems/adventure-creator-11896 to create a game. I need a small part of the game to include turn-based fight similar if not the same as your product offers. My question is this. The AC deals with everything about my game. Cameras included.
    1. How easy is it for TBTK to allow another program to use the camera when the fight takes place.
    2. Is there a way to pass information about the units and generally the fight to a third party solution like AC from TBTK ?
     
  4. unity_n8-0yVN_7kUwpw

    unity_n8-0yVN_7kUwpw

    Joined:
    May 16, 2019
    Posts:
    2
    im currently using unity 2018. when i spawn in a new unit while the game is running. the unit cannot be selected and controlled. im not very good at code but i have worked out some values are not being assigned i just cant figure out how to fix it.
     
  5. unity_n8-0yVN_7kUwpw

    unity_n8-0yVN_7kUwpw

    Joined:
    May 16, 2019
    Posts:
    2
    also after a few more hours of digging through it i have identified that noticeable differences between units that are spawned during deployment phase have all their proper values assigned while a unit spawned via the ability is missing assigned values. units spawned with the ability also appear in unitys default layer while units spawned during deployment dont appear to actually have an assigned layer.
     
  6. hallzazad

    hallzazad

    Joined:
    Nov 7, 2018
    Posts:
    1
    Are there a way to fix the fog of war for playable fraction, the ai fraction always hide from player, but when player and player they all show on the map
     
  7. The_Ash

    The_Ash

    Joined:
    Apr 9, 2017
    Posts:
    2
    Does the 3.0 version have the Overwatch functionality?
     
  8. Angiel

    Angiel

    Joined:
    Jan 6, 2015
    Posts:
    13
    Sorry there are any tutorials or written documentation?
     
  9. Asdrubal

    Asdrubal

    Joined:
    Dec 1, 2014
    Posts:
    2
    I want to upgrade my original TBK to 3.0 but I'm little worry the lack of activity in this forum from author, does he reply your question in any other way?
     
  10. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    He has been pretty responsive when I sent him private messages. I've been really busy and haven't gotten back to him on a few things, but when I did message him it was pretty quick.
     
  11. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    @songtan Hi are you around?

    Reading through the previous posts, It looks like you get an issue with notifications.
     
    Last edited: Jun 28, 2019
  12. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Sorry for not responding to all your posts. I have indeed missed the new post notification (the system won't send you another one if you don't respond to it even if there's further new post). I'll tried to answer all the question I missed. I'll keep it short since some of you might have figure out the answer on your own. If it's not clear, please post your question again.

    Yes. From what I've seen you might need to remove a few line of code that rotate the unit otherwise you should be good.

    For certain grid setting, you can have various height levels. But there will be some trade off for performance.

    You can't assign effect to individual node I'm afraid.

    I can't really say how easy it's to implement your own camera solution. It depends. But the camera script in TBTK is entirely optional. You can easily remove it and replace it whatever you need.

    Yes. There's an example in the package doing that (the mini-campaign in the demo). However you probably will have to do some coding to get exactly what you want.

    I'm afraid not. The thing is the framework only support hot-seat multiplayer. It's kind of pointless to hide one player faction from another since everyone is looking at the same screen.

    Yes

    There's a pdf document that brief you about the framework. It should give you a good start on how to use the framework.

    I'm still here if not for the annoying notification system. Just fyi, when in doubt, send me email. :)


    @unity_n8-0yVN_7kUwpw, Thanks for letting me know about the issue. I'll look into it and do a necessary fix and update asap.
     
  13. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Hi @songtan I've been playing around with the persistent game demo and have a few questions.

    1) The perks picked/unlocked in the pregame scene don't seem to get loaded into any other scene, I can't find the code to generate a cache like with the unit list.. Is it supposed to work?

    2) What would be the best way to add units to the unit list that are always present, regardless of the players choice in units. For example: I want to have 6 base units present in every mission, but allow the player to purchase additional units.

    I've been working with your toolkit since late April and must say it is fantastic.

    Screen1.jpg
     
  14. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Thanks for your compliment.

    1. The perk has it's own persistent system. You simply need to check both the 'Load From Cache On Start' and 'Save To Cache On End' option for each PerkManager in your game.

    2. The easiest way would be to just add a custom unit list in UnitManager. You can then directly assign those base units on the Inspector. Then in code, you simply add those units in the list to the startingUnitList of player's faction. The loading of unit from the cache is executed in Init(). So you add those unit at the end of that function. Hopefully this make sense.
     
  15. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Strange, still having no joy with the perk persistent system, I'm just using you demo scenes and have tried all the Load from and save to combos possible.

    The custom unit list makes sense, I will test that out tomorrow.

    Thanks for getting back to me!
     
  16. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    I've just tested it myself. It seems there's a bug with the perks when you enable the persistent system. Try changing line19 of PerkManager to following:
    Code (CSharp):
    1. public static List<int> cacheUnlockedIDList=new List<int>();
    It should fix the problem.
     
  17. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    That has done the trick. Thanks songtan!
     
    Last edited: Jul 10, 2019
  18. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    When the scene is running, that information is stored in squadList of Demo_Persistent_PreGame.cs. The list then get cache to UnitManager when the game-play scene is loaded (by calling UnitManager.CacheFaction). The process is explained in the documentation under the section 'Integrating TBTK to Your Game'.
     
  19. duffjones

    duffjones

    Joined:
    Dec 18, 2015
    Posts:
    1
    Hi,

    Can you describe more clearly how to add custom prefab Obstacles and Walls to the Grid Editor in 3.0? The documentation does not cover this subject. For example, if we wanted to create 4 different types of obstacles, and select any of them from the editor, how would we add them?
     
  20. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Sorry if this is not made clear. On game-object 'GRID_MANAGER_GENERATOR', there's a component GridGenerator. If you expand the 'Show default editor' option in the Inspector, you will find the assignment of all the grid object. The obstacle and wall specifically are a list, an object assigned to the list will be available as the prefab option on GridEditor when you try to add obstacle/wall to the grid. Hope this help.
     
  21. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Hey, got a question regarding GameControl.GameOver(), I've have made my own script that calls roundCounter, to allow the currant level to finish after 5 turns. it is attached to the GameManager object.


    Code (CSharp):
    1.        
    2.         int roundCounter = gameObject.GetComponent<TurnControl>().roundCounter;
    3.      
    4.             if (roundCounter >= 5)
    5.             {
    6.                 Debug.Log("limithit");
    7.                // SceneManager.LoadScene("Demo_Persistent_PreGame1");
    8.                   GameControl.GameOver();
    9.             }
    10.          
    11.         }
    12.     }
    13.  
    However its giving an error "No argument given... formal parameter 'fac' of gamecontrol.gameover(faction). I've tried adding 0 or 1, but that does not work. Also looking at gamecontrol.gameover, it's looks like it needed a bool and an int, both of which I have added to no joy.

    What am I missing here? It does work for just skipping to the next scene.
     
    Last edited: Jul 13, 2019
  22. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    What you need is to pass the winning faction. You can get the faction by using UnitManager.GetFaction(idx);, with idx being the index of the faction in question. Say the player's faction is the first faction and the player won, your code would look like this:
    Code (csharp):
    1. GameControl.GameOver(UnitManager.GetFaction(0);)
     
    Stexe likes this.
  23. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Thanks Songtan, works a treat.
     
  24. warsoul112

    warsoul112

    Joined:
    Jul 18, 2019
    Posts:
    1
    Did the asset is fully updated for Unity 2018.x or 2019.x ?
     
  25. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    It's tested and compatible up to Unity2018.3. I see no reason why it will not work on 2019.x.
     
  26. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,292
    Do you have a demo with Melee Humanoid ?
     
  27. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    You mean an example prefab? I'm afraid not. But if you send me your asset I can make an example prefab for you.
     
    Stexe likes this.
  28. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    You might want to make a generic one for everyone. That's what I'll be working on shortly with some humanoid melee characters as well.
     
  29. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Well the problem is I don't have a animated humanoid model of my own. I can't really (and don't want to) use a 3rd party asset and give it out to everyone.
     
  30. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    There are free ones that are used as general templates across the board.

    You can use the Unity Sample Assets humanoid model "Ethan" here: https://assetstore.unity.com/packages/essentials/asset-packs/standard-assets-32351

    Or "Space Robot Kyle" model that Unity put out: https://assetstore.unity.com/packages/3d/characters/robots/space-robot-kyle-4696

    Both of those are done by Unity themselves.
     
  31. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    I suppose I could. But 'Ethan' has only idle and move animation while 'Kyle' doesn't come with any animation at all.

    Anyway, I have setup an example prefab using Ethan. Obviously I have to use other animation (jump in this case) for the attack animation. If you want to, I can send you a copy.
     
  32. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    72
    Sure, I'd be interested. There is raw mocap data animations from Unity here that should work on Ethan or the model in that package too: https://assetstore.unity.com/packages/3d/animations/raw-mocap-data-for-mecanim-5330

    If you want a free asset with a bit more animations that are done by third parties I'd recommend Taichi Character Pack: https://assetstore.unity.com/packages/3d/characters/taichi-character-pack-15667

    Even just using one of those models + skins + animations would give a ton of flexibility and stuff. But I can understand you not wanting to have third party assets in your stuff even if they are free and the license allows it.

    Either way, that sounds awesome. Been super busy recently with other work but getting back to this project soon so it would be useful regardless.
     
  33. williamian

    williamian

    Joined:
    Dec 31, 2012
    Posts:
    113
    I would be interested in that pre-fab as well.
     
  34. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Here's the download link to the example prefab if anyone's interested. You will have to import it to an existing TBTK project to work as I haven't included all the dependencies.
     
  35. williamian

    williamian

    Joined:
    Dec 31, 2012
    Posts:
    113
    TY.
     
  36. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Hi @songtan I found a bug with the counter attack system.

    upload_2019-7-21_11-8-9.png

    This occurs when an enemy unit is killed during a counter attack. I noticed it in my game build, so have tested with a fresh project with only TBTK included. After the unit is killed the game freezes, no other units can move and the AI does not finish it's turn.
     
  37. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    I believe this has been fixed in the latest update which has only gone live a day or two ago. Try update your TBTK and see if the bug persists.
     
  38. Liberation85

    Liberation85

    Joined:
    Apr 16, 2019
    Posts:
    9
    Thanks Songtan, it all works and even a couple of other things I had noticed to seem to work fine now as well.
     
  39. dstovell

    dstovell

    Joined:
    Sep 19, 2013
    Posts:
    2
    Say I wanted to have multiple grids in a single game (say islands units can move between).

    If I only needed to show one grid at a time, and didn't need to show units moving between grids, would there be a way to handle this in your system?

    One solution that came to mind would be having a scene for each island, then load that as an additive scene when I was to display, and then unload it before i load another. This would require the ability to have an under lying game manager that managed state of things not being shown, and then the ability to load a given grid scene in a its current state.
     
    Stexe likes this.
  40. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    I'm afraid that is not supported by default. The biggest problem is that the framework is designed to have one grid at a time. Many of the class is designed to be singleton (only one instance at any given time). The good news is other than that I don't see any problem to have multiple independent grids in a game. So if the code is modified so that singleton is no longer the case, you should be able to do what you want. Granted you probably still need the control script to activate/deactivate the grids.
     
  41. dstovell

    dstovell

    Joined:
    Sep 19, 2013
    Posts:
    2
    well, you just acquired another customer
     
  42. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Thanks. But just so you know, there would be a fair amount of work required for the modification you need.
     
  43. September9

    September9

    Joined:
    Jan 20, 2016
    Posts:
    17
    Is it possible to change the playable faction to non-playable in the middle of the game? like auto battle mode.
     
  44. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    I've never try that before but I don't see why it won't work. That said, you will have to do it via code, and add additional in game interface for that.
     
  45. Warsoul

    Warsoul

    Joined:
    Sep 9, 2016
    Posts:
    35
    1- Where's the Patch Log for your asset ?
    2- It is possible to unit that take multiple square or hex ? Like giant unit.
    3- It is possible to add squads where their stats scale with the remaining squad members who still alive ?
     
  46. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    To answer your questions:
    1. You can find the patch log of all asset (if they have one) on the asset page. If you are using a browser on pc, it's in the releases tab, right below the screen shots. Having said that, the current version doesn't really have a patch log. I haven't add any major new feature since release several months ago and most of the updates are just for various bug fix.
    2. Not without modifying the code (extensively I might add).
    3. Not without modifying the code.
     
  47. PatBGames

    PatBGames

    Joined:
    Mar 28, 2009
    Posts:
    120
    I found a little bug in latest version (3.0 f6 released Sep 9, 2019)

    When importing the project with Unity 2018.3 or newer I got this message:
    Assets\TBTK\Scripts\Editor\W_CollectibleEditor.cs(78,30): error CS0103: The name 'unitObj' does not exist in the current context

    In "TBTK\Scripts\Editor\W_CollectibleEditor.cs" line 78 :
    Collectible selectedObj=unitObj.GetComponent<Collectible>();

    replace by :
    Collectible selectedObj=itemObj.GetComponent<Collectible>();
     
  48. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Thanks for letting me know. I've just uploaded another update that fixed the error. Should be live now.
     
  49. Andrey37

    Andrey37

    Joined:
    Oct 25, 2018
    Posts:
    2
    Is it possible to make heroes with their abilities and equipment using this engine?
     
  50. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,383
    Yes and no. Unit can have their own abilities. But there's no equipment to speak of.