Search Unity

TurnBased-Toolkit (TBTK)

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

  1. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hi Song, I checked out the latest version's web demo. Looks fantastic. One small thing I noticed is that on the campaign, if you load a battle level and then use to the options menu to go back to previous menu and load it again, you get all your money back but still get to keep the units you purchased last time. Therefore ... cheating the system.

    Excited for the release ... any idea when you plan to release it?
     
  2. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for letting me know. I'll fix it.

    I'm trying to get TBTK2 up as soon as I can. I'm working on the documentation atm. Once that is done then it's ready. So in a few days I hope.
     
  3. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    if i buy this and change everything (caues i plain on turnung this into a Naval game if i buy) would i beable to make money off of it?
     
  4. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Sounds good ... I'm no rush to be honest. I'm using an ancient version for my current project because upgrading causes Unity to crash for me when I enter a level. Not sure what I changed to cause it but with Unity crashing, I can't even debug it. However, for my next project, I'm going to start with a clean version of the code and build on it rather than try and upgrade my old project.
     
  5. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I'm guessing your question is related to licencing? Then yes, if you purchase this asset and use it in a game ... you can make money from it. Doesn't actually matter whether you change it or not, you can still use it commercially.
     
  6. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Just want to show a preview of the upcoming RPG / Dungeon Crawler I'm working on using this great kit. It will hit mobile and hopefully PC builds before the end of the year. Currently in the fine tuning and testing phases of chapter 1 of what will be a 3 chapter game. Players form a party of 6 heroes from a choice of 20 character classes and explore underground ruins and face ratmen, demons, undead, goblins and other monsters. It adds an XP / leveling system, a combat pinning system, inventory backpack, unit equipment slots and lots of other stuff to the core game to turn it into a dungeon crawler.


    Here are some screen shots to show what the game looks like. The following are the main title screens and team selection screens:








    Here's a youtube clip showing gameplay:

     
  7. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Just like Rajmahal said you can use this to build your own commercial game. You can even sell the demo as it's but I doubt you will be able to make any money from that. What you cannot do is sell it as another game kit after repackaging.

    @Rajmahal, that look awesome!! Let me know when it's out. I want to play it myself! Justout of curiousity, Are there any other 3rd kit/system you are using apart from TBTK?
     
  8. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Not really ... just your kit.
     
  9. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I see.

    Very impressive. You cant see me but but I'm tipping my hat non stop here. :)
     
    Last edited: Nov 29, 2014
    Rajmahal likes this.
  10. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Thanks Songtan ... could not have done it without your hard work.
     
  11. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    nice info happy to learn that's usefull :)
    yes why not for coming update
     
  12. Cogent

    Cogent

    Joined:
    May 14, 2013
    Posts:
    356
    @Rajmahal Looks nice!

    Good luck on release!

    :cool:
     
    Rajmahal likes this.
  13. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    ok so i just bought this and my First unit is haveing a problem...its moveing back words i even had the model in Blender face the other way it was facing the first time help?
     
  14. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    You need to make sure it faces the +ve z-axis when it's in idle rotation (0, 0, 0). You can compare it with the default prefab. Just drag any of them into the sceneView and compare it with your prefab.

     
  15. UnluckyPhil

    UnluckyPhil

    Joined:
    Feb 27, 2014
    Posts:
    3
    Song,
    Been hanging out for the new version and from what you've shown it looks great. It does mean that the upcoming release will remove my excuse for slacking off though....
    Phil
     
  16. W1ntermute

    W1ntermute

    Joined:
    Aug 24, 2014
    Posts:
    9
    Hi, I have a following problem: when I create a scene with hotseat mode on and unit generation - everything is ok, but if I enable unit placement - I have an error on load :
    NullReferenceException: Object reference not set to an instance of an objectGridManager.ClearAllIndicatorH () (at Assets/TBTK/TBTK (Base)/Scripts/C#/GridManager.cs:1243). This part of code in GridManager:
    publicstaticvoidClearAllIndicatorH(){
    for(inti=0; i<instance.indicatorH.Length; i++){
    instance.indicatorH.position=newVector3(0, 9999, 0);
    }
    }
    So, looks like indicatorH is null. Do you have an idea what am I doing wrong?
    Player ID0 and Player ID1 placements area are defined.
     
  17. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    It's a bug I'm afraid. But it doesnt seems to break anything when I test it on my end.

    To fix it, just add follwoing line to the first line of ClearAllIndicatorH() and ClearIndicatorH()
    Code (csharp):
    1. if(instance.indicatorH==null) return;
     
  18. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    how do i have it when you win the battle it changes to the next map? i tryed

    Game-control > Next Seance > "name here" but no luck when i test it in the build verson...also how would i have units spawn at a turn number?
     
  19. W1ntermute

    W1ntermute

    Joined:
    Aug 24, 2014
    Posts:
    9
    Looks like this works thank you!
     
  20. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @navy3000, if you have assign anything into NextScene slot in GameControl, you will be getting an error message if the level fail to load for some reason. So is there any error message? The way I see it, it's either the name of the level is wrong or it hasn't been add to the BuildManager.

    You cannot spawn a unit at specific turn. You will have to do some modification yourself. You can use UnitControl.InsertUnit() to add a unit to the grid and GameControl.roundCounter should tell you what turn it's.
     
  21. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106

    no error message it just doesn't load and does that GameControl.roundCounter also hide the unit untill then? cause in a mission the unit comes at the end to save everyone....and how would i go about creating you?
     
  22. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hi Song, I think I found a small bug. You may have fixed this already but just in case you didn't:

    In the script collectableTB, you have the following condition:

    if(enableAOE && aoeRange>1){
    List<Tile> list=GridManager.GetTilesWithinRange(occupiedTile, aoeRange);
    foreach(Tile tile in list){
    if(tile.unit!=null){
    tile.unit.ApplyCollectibleEffect(effect);
    }
    }
    }

    However, this doesn't apply the collectible effect to adjacent tiles if the value is set to 1. Therefore, I think the if statement should be:

    if(enableAOE && aoeRange>=1){
     
  23. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    You said eariler it doesnt load in the build, do you have the same problem when running it in editor? And I dont understand what exactly you are trying to do about adding unit to the grid. If you are trying to spawn a unit at a specific round, you need a script to check the roundCounter and spawn the unit when the condition is right. I dont get the part about hiding the unit and "it comes at the end to save everyone". Can you elaborate more about that.

    @Rajmahal, You are right. thanks for letting me know. :)
     
  24. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106


    ok so this is what happens with i build and run..

    play mission 1 win hit continue noting hit menu nothing open in unity the menu is set to "DemoMenu" and nextscean is set to "M2" but yat it does not work and i do have everything in the build



    what i mean with "it comes at the end to save everyone" like that mission you have to survive for 30 turns at turn 25 bigger numbers of hostile units come to a point (turn 28) you can't fight them all then a "Super-unit" comes and you use that and your units to well win
     
  25. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    If the level loading is fine in UnityEditor, I dont see why it doesnt work in build. I've never encounter this problem before. The only thing that I can think of is that the button doesn't work. What are the platform you are using?

    So yes, you'll need a custom script that keep checking with roundCounter. When it's at round25, add the hostile units to the grid and at round28, add the super unit. You dont need to hide the those units, just instantiate them when you need them.
     
  26. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106

    it does not chang to the next mission unity editer! or the menu...and how do i chang the Victory outcome? i looked in a script and there are 4
     
  27. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    There lies the problem then. If it doesnt work in unity editor. It wont work in the build. My guess is either you havent add the scene name to GameControl, or you havent add those scene you want to load to BuildSetting. Are you getting any error message?

    What do you mean by outcome? The victory text? Or something else?
     
  28. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106

    alright...il chang there names and try again


    well...how do i chang the Victory text? and by outcome i mean...

    Default
    Flag Grab
    defend
    Escort

    how do i chang from default to a nather?
     
  29. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I assume you are using the unity UI. To change the text, simply change the text in the code from "Victory!!" to whatever you want. The thing that I dont understand is what is "flag-grab, defend and escort"? Please try to elaborate what you are trying to do. I cant possibly guess from just fragment of words.
     
  30. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    in the script GameControl lines 50 - 53 how do i have one of thoes on?
     
  31. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Fyi those are just for show on the UI, the real mechanic of adding the points are actually written somewhere else. And depends on the condition. By default (if you just refer to the code), they are enabled when you use a single player game in persistent data mode. If you want it to execute whenever player win, just add them to the wherever outcomeTxt is set to "Victory". Else you would have to code your own custom condition.
     
  32. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106

    um....so....how would i like turn on defend mode for a level? :p
     
    Last edited: Dec 3, 2014
  33. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    What is defend mode? I dont recall having anything like that in the toolkit.
     
  34. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Btw folks, check this out, TBTK2 is now on AssetStore!

     
    testament32 likes this.
  35. UnluckyPhil

    UnluckyPhil

    Joined:
    Feb 27, 2014
    Posts:
    3
    Song, You are a champion!
    Just updated to the latest version and had a 5 sec look. I'm liking what I'm seeing at a glance, might see if I can find the time to have a better look on the weekend but I have a xmas party tomorrow.... might be minus a few brain cells...
    Phil
     
  36. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Amazing ... wish I could upgrade but it's just way too late into my project. Will be using this for the next game though. :)
     
  37. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106

    survive until a turn number then you win its in line 50 - 53 in that script
     
  38. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Seriously? Is there a defend mode? Was that added in a later version? I didn't see anything like that. It's a cool idea.
     
  39. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hey Songtan,

    Quick question. I noticed in your demo you mention "flanking" ... what exactly is that? Is that an advantage if attacking an enemy from a particular side or rear?
     
  40. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    New version looks awesome! Looking forward to trying it out when I'm done with my current project.
     
  41. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    It's not supported in the first place, you will have to do the modifiaction yourself. You can do it in GameControl, on every new round (where onNewRound() is called), check the roundCounter. If it exceed certain treshold, call BattleEnded().

    No, there never is a defend mode. It's quite tricky to fit it into the current framework. Too much conflicting elements to make it work. It's however a different matter if you want what your design is going to be and code it specifically to fit that.

    Yes, it's as you said.
     
  42. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Nice ... thanks for the tips. I may add that defend mode / survive until X turns to a later level in my game.

    So for flanking, can you explain a little more detail? This is a new feature, right? Does it work on hex or just square grids. Is there some way to have a unit face a particular direction at the end of the move so they don't expose their flank to an enemy?
     
  43. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Yes, Flanking is a new feature. It's pretty straight-forward, you can enabled/disabled it in GameControl. Once enabled, you can set the threshold angle as well as the damage bonus. The damage modifier can be set on individual unit as well.

    For lack of a way to coherently integrate it with current input scheme, I've disabled unit facing control. But you can easily enable it. Just look into GridManager.cs, enable the commented code in OnTileAlt() and that's it. If you cant tell from the code, it's right-clicking on any tile will change the selected unit facing.
     
  44. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Amazing ... I can't wait to play around with it. After I release my RPG that I posted earlier, I really want to use TBTK 3.0 to make a large scale war game like Infinite Legend. Giving the unit a choice of facing a particular direction (assuming it's not engaged in melee) would be really important. Any idea how it could be done on a touch interface?
     
  45. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    It's up to you really. What I would do is to make a unit ability for that purpose alone. Use the ability, click on an adjacent tile and the unit will turn to face that tile. The ability of course, use no AP, has no cooldown and can be use as many time as possible. Or not. :)

    All you need to do is create a new unit ability type and add it's function in _ApplyAbilityEffect() in AbilityManagerUnit.cs
     
  46. Fred69

    Fred69

    Joined:
    Oct 5, 2014
    Posts:
    6
    Hello ,
    For my current project, I am looking for a kit with a hexagonal grid.
    This tool seems to be exactly what I need ...

    I'm thinking about buying this toolkit, but I ask me some questions about the possibilities of the kit ...
    Is it possible to implement this type of tiles as prefab in the kit?


    Is it possible to have several levels of height for the grid of hexagons, like in the screenshot ?
    I indeed need to manage different heights, with consideration of lines of sight , cover ...

    In any case, the possibilities of the kit seem huge .....
    thank you for replies...

    Fred
     
  47. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @fred, yes you can use any custom tile in theory. However it doesn't really support multiple tile prefab type so you might find it a bit tedious when editing the grid.

    Regarding the height, the kit doesnt support varying height atm. But I suppose you can adjust the grid anyway (either manually or using code) to give it a varying height. Since the lines-of-sight and cover mechanism uses collider, it should still work with the right tweaking. But please note that when you do that, you will have to use an alternate grid setup that could significantly limit the grid dimension.
     
  48. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Regarding flanking, is it possible to have some units with flanks and some units that don't have flanks on the same game? I'm thinking of having blocks of troops that are vulnerable on the flanks and loose skirmishers that don't realy have a front or flank or rear?
     
  49. Fred69

    Fred69

    Joined:
    Oct 5, 2014
    Posts:
    6
    Thank you for the quick response ....
    I think I'll buy it and immerse myself in the code for study it...
    Fred
     
  50. Fred69

    Fred69

    Joined:
    Oct 5, 2014
    Posts:
    6
    I have one last question ...
    do you think it is possible to create a runtime map editor with this kit ?
    thank you
    Fred