Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

RPG style Turn Based Battle System

Discussion in 'Assets and Asset Store' started by MrDude, Jun 15, 2014.

  1. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Unfortunately I never heard of that one. I am trying to make a universal kit here. My main inspiration (and the types of games I want you to be able to make out of the box) are EnchantedArm, Final Fantasy and Disgaea/FinalFantasyTactics

    There is still lots more to do and this kit is a loooooooong way from being finished. The amount of features I still want to add took me about an hour just to write down last time I did... then my entire website went down a few days later. :(

    But yeah, loads more to come... Healing, multiple targets, status effects, online multiplayer, improved projectile support, the ability to design your battlefields in advance with raised and lowered platforms, holes in the map (so you can battle around boulders etc), predefined movement ranges/patterns, attacks based on range and position rather than just choosing an enemy from a list, visual editors for all of those...hell I even have thoughts about some 2D features I might want to add... and that is just some of what I have planned for this kit...
     
  2. samusam

    samusam

    Joined:
    Mar 29, 2014
    Posts:
    48
    Hi, how do i do to insert a background image(one skybox or a background color trasparent) when begin the combat?
     
  3. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I'm afraid I am not entirely sure what it is you are trying to do... You want to change the skybox? I have never changed a skybox at runtime but I'm sure there should be something in the Unity documentation that explains that. Maybe access the Camera on the MainCamera and change the fill mode to solid color instead of skybox? Again, that is something you will need to look up in the Unity docs. It's not something I've ever had to do so I don't know how to myself...

    As for the transparent background image... There I am completely lost. What is it you are trying to do? Are you just asking me how to load an image???
    Code (csharp):
    1. Resources.Load<Texture2d>("mypicture")
    ? But you say you want it in the background... background of what? The entire scene? (The scene has moving cameras) Just during the loading screen? The main menu or whenever there is a turn change? Just behind the battlefield but standing in the middle of the scene? I really don't understand what you are trying to do, unfortunately.

    In any event, if you know how to load an image and you are just asking me "How can I load it when the battle starts" well then I can help. As it is the tbbBattlefield component actually broadcasts a message as soon as it's loaded and that message tells everything else to get themselves ready so if you just write your code into a new script, add that script to the battlefield object and respond to that message, then the battlefield will trigger your code as soon as it's loaded. That sounds like what you wanted. Yes?

    ...but before I go into details, please explain to me what it is you are after, exactly, so I can help you properly, rather than guessing and hoping I get it right :) Thanks, mate. :)
     
  4. samusam

    samusam

    Joined:
    Mar 29, 2014
    Posts:
    48
    hi, tnks for interess. I have my battlefield that don't fill all space. And i see the background blue. I would insert a background with image. Of course, how you say, i need find the code for set background in runtime mode.
     
  5. Garou1337

    Garou1337

    Joined:
    May 20, 2016
    Posts:
    1
    Sup, apprentice programmer here.

    Your battle system looks most interesting, but I have a couple questions. Well, to summarize my questions: Would this system be suited for a fire emblem like tactic RPG game? More specifically...
    - Can all units (friend or foe) navigate the whole grid?
    - Can you "disable" some squares to simulate them being occupied by an obstacle?
    - Do the units in "Manhattan" units? (square by square at 90 degrees angles) Or do they just move in diagonal lines?
    - Do you have the option of having turns alternate in between individual moves (each time a unit is given an order) rather than moving all units from one faction before the other faction can play?

    Sorry if these are questions that you have answered already, just wanted to make sure before getting the asset. Your answers are much appreciated.
     
  6. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Unfortunately I don;t know that game so I can't answer THAT way but I can answer your individual questions:

    1. You do have that option yes. Simply en/disable the Constrain boolean in the inspector to lock a faction to a side or to enable the entire grid

    2. That is planned but not yet implemented, no

    3. You can use either square or hex layouts so you are definitely not forced to 90degree movements. Having said that, the current implementation is rather basic. I just take a radius of X tiles around the player and say "Pick one of these locations". A future update will provide you with an editor in which you can restrict a player's movement in any way you like from "entire board" to "only the three tiles in front of him, horizontally or one tile back" or any other way you want. For now, it's calculated via radius but you are free to update that module as you see fit. I tried real hard to compartmentalize everything as much as I could so each part could be edited without having to rewrite the entire kit.

    Having said that, I've been busy with an update to this kit and basically what I've done is rewrite the entire kit :p Oh the sweet irony :p

    4. Yes. Plain and simple. The kit offers "Immediate" or "PerFaction" play modes.

    Any more questions, feel free to ask.
     
  7. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    When do you plan to release the update with the random map generator?
     
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I meant to release the next update months ago already but I just have way too many things on my plate to even venture a guess on the release dates of anything :( Sorry.

    that is the bad news. The good news is that this change is really, really, really simple to make so if you contact me via email I can help you integrate this into your project. (Will take about 5 minutes) The code is so simple and little that you can do it in almost no time at all. The biggest problem is creating a tile prefab that is 3D, as opposed to the current 2D one you have. I know, right? Super hard to do, right? :p

    So yeah, contact me via email (not pm. PM is useless) and I will send you the prefab, the code snippets and instructions on how to integrate it into the existing kit and that way you won't have to wait for my schedule :) the only issue now is that I don't yet have a visual editor so you will have to set the heights manually if you want to pre-design your levels...

    Example:
    Code (csharp):
    1. <Heights>
    2.     <row>num=0
    3.         <col>x=0; h=2
    4.         <col>x=1; h=2
    5.         <col>x=2; h=2
    6.         <col>x=3; h=2
    7.         <col>x=4; h=2
    8.         <col>x=5; h=2
    9.         <col>x=6; h=2
    10.     <row>num=1
    11.         <col>x=0; h=1.5
    12.         <col>x=1; h=1.5
    13.         <col>x=2; h=1.5
    14.         <col>x=3; h=1.5
    15.         <col>x=4; h=1.5
    16.         <col>x=5; h=1.5
    17.         <col>x=6; h=1.5
    18.     <row>num=2
    19.         <col>x=0; h=1
    20.         <col>x=1; h=1
    21.  
     
  9. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    I can wait tell update as really need Ugui to be working before i press forward on this project
     
  10. mtv31

    mtv31

    Joined:
    Feb 24, 2017
    Posts:
    2
    Have just purchased the kit from the asset store. Can u add an example scene with a larger map so that the player party can move in-turn through movement tiles until they are in range of the enemy party. Something like the scene from post #49 would be good.
     
  11. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Do you mean "move closer but not close enough to attack this turn"? Currently the phases go "select character, move on the map, select target, attack". If that is what you mean then what you are asking for is already in there although it is currently useless since all attacks have infinite range. Being able to move and NOT being able to attack that turn is definitely something that I have my eye on!
     
  12. mtv31

    mtv31

    Joined:
    Feb 24, 2017
    Posts:
    2
    I'm looking to have movement tiles on terrain, firstly i wanted to see how the random map generator would place the tiles then i could add extra movement tiles. Since post #58 i was wondering if there was a scene for the random map generator. For the battle to be active then maybe i could implement a raycast system or a sphere collider which detects enemy tags and then in the meantime only move and end turn could be the only player party options. My main objective is getting the characters of the player party to have their own movement tiles. This kit has saved me the time and made things easier to get to a playable stage.
     
  13. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Just a little update. I know they are few and far between. I am just spread very thin is all. Version 2 of this kit is still under production and as I said before, it is a completely new system built from the ground up rather than just a few tweaks and mods added here and there.

    I am working real hard to make this entire system be 100% GUI free so that you can add or remove whatever GUI elements you want and create your own without having to change the code of the kit itself. For instance, when selecting a target I will send an event to say that a target was selected. In your own prefab all you have to do is query the selected targets and display them however you choose.

    And for those with sharp eyes, yes, I said targets. Each attack now has a minimum and maximum number of targets you can select. Attacks like "uppercut" won't make sense to have more than 1 target but that I leave up to you to decide what attack has how many targets. Attacks now also allow you to choose whether they deal damage or heal and can target either enemy or allays or both (or none).

    Both movement and attacks now offer you three different types: infinite (any character attacks any other character from anywhere. i.e. Final Fantasy), ranged (can only move 4 squares and attack enemies who are within 2 squares from you: Final Fantasy Tactics) or pattern (each character has a set distance and direction that they can move, like chess pieces, and attacks only target tiles that are a certain distance behind or in front of the current position, based on any pattern you assign to it...)

    Screen Shot 2017-08-23 at 01.14.49.jpg

    Like I said... new system :D Version 2 will be released at a higher price since I am spending a lot of time on it but those of you who already bought the original version, you will get the update for free. The new system will replace the old system, not be a new product on the store.

    I am currently in the testing phase to make sure everything works as it should and then I need to move on to the GUI section where I create a sample GUI for you to start with, like in the original version. This update still has some distance to go before it is ready to release but I think you will love the updates.

    For instance, I now include a system that allows you to map the keyboard and up to 8 controllers (the in-game GUI part you need to do yourself. Get the button, save it in the correct slot) and I will save your changes and automatically load your mappings. Thus, you can have up to 8 controllers and a keyboard all mapped to do the same actions but to whatever button you chose... and to make sure player 1 and player 2 doesn't interfere with each other you can simply call mbsInputManager.SetActiveController(0); to determine which controller's input get scanned. 9 control systems, auto loaded and saved for you...

    ...good thing too since I am adding UNET support to the game also so whether you play a single player game or decide to do a multiplayer arena thing, it's all good.

    Creating your own custom components is now a lot easier also since all data is stored in a data module while all actions are performed externally. Put another way, I am working towards giving you an data-view-control system where the battle's data, on screen stuff and functionality are split into those three distinct things. So to go from a Final Fantasy style game to a Magic The Gathering type game, simply remove the GameModeFF script and drop in a GameModeMTG script. Remove the Final Fantasy style GUI stuff and drop in Card prefabs. I still tell you "A new target was selected" and "You are now in the [move / attack select / target select] phase" so adding completely new game types is a trivial thing now.

    This is where the control system shines also. Before I had a function that tested the state of the statemachine and based on that I called loops that tested buttons etc... and while I tried to make it as humanly readable as possible so that it is as easy as possible to modify in this new version I take a completely different approach. Here you actually tell it on a state by state basis "When I press this button, do that". It means a lot more coding but there is now 0 learning curve. Only need the accept and cancel buttons for this state? Only declare those. Want the up and left arrow to do the same thing? Just make them call the same function. Want to make use of every single button on your gamepad? Go right ahead.

    0 learning curve. Example...
    Screen Shot 2017-08-23 at 03.07.35.jpg
    As simple as that... Notice TargetSelect state uses the D button (mapped to space on keyboard by default) to select one of the multiple targets for this attack before using A (mapped to enter/return by default) to lock it down. Notice none of the other stats use button D. Notice that while moving the character (NewLocationSelect state) each of the arrow keys does a different thing but in the other states up and left always do the same while right and down do the same. Except for Character selection. There I forgot to add in the up and down arrows.

    I am betting that just by looking at the code above you already know EXACTLY how to add that in... and by adding those 2 lines of code, all 9 input methods are configured to do the appropriate action. Simple as that.

    Like I said, a completely new system and I think you are gonna love what it has to offer...
     
    Last edited: Aug 23, 2017
    LNMRae likes this.
  14. mictator

    mictator

    Joined:
    Sep 8, 2017
    Posts:
    1
    Hello,
    I'm looking for a turn based strategy game kit with that i can make a ww2 alternative game that play like Front Mission 1.
     
  15. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    247
    this is the only turn based combat (like JRPG) in the store.
    it's will really be great a version 2.
     
  16. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Claudius...
    See two posts above yours... :)
     
    LNMRae and claudius_I like this.
  17. Ttravi

    Ttravi

    Joined:
    Jan 22, 2018
    Posts:
    32
    Hello, do your framework support 2D games?
     
  18. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Officially the answer is no, the system was designed for 3d.

    Even so, you can use any prefab for your character and one of my customers showed me how he used sprites drawn by his young children as characters. 2D characters in a 3D environment...

    Recently I worked on a project for a client who wanted a 2D scene. Since I can place the camera anywhere I want I simply set the camera at an appropriate angle, set the camera to ortho and then used 3D models in a 3D scene and it looked 2D.

    So technically you can make it look 2D,yes, but officially , no.
     
  19. Ttravi

    Ttravi

    Joined:
    Jan 22, 2018
    Posts:
    32
    Ok, thanks for the detailed explanation =D
     
  20. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Time for a long overdue update :)

    So I have redone version 2 from scratch about 6 times so far but it is finally behaving the way I want it to. Apart from the obvious UGUI support the major change between versions 1 and 2 is the insane amount of freedom you now have in terms of creating custom behaviour.

    Since all data is stored in a central location and is available to the entire system at any time it means I can add new stuff so easily that... well... one entire class is only 4 lines of code long. The last one I created was only 23 lines long and that includes namespaces, includes and whitespace. In terms of actual code there is only 3 functions and a total of 6 lines of code in that class. So what could such a simple class possibly do? Well, this particular one hides itself whenever you are NOT selecting targets for your attack, shows itself when you are, lists the buttons with which you 1. select your targets and 2. confirm the attack... and also displays how many targets you currently have selected from the max amount of targets allowed by the particular attack...

    In version 1 I tried to to keep the functionality code and the GUI code as separate from each other as I could but due to me using OnGUI there was an unbreakable link between the GUI and the actions you could take. In version 2 everything is handled via events and thus the entire system now works without needing any GUI at all... meaning you are now free to develop any custom GUI elements as you see fit since they don't HAVE to do anything at all to make the kit work. For touch devices, for example, I am making the UGUI buttons send the same event that hitting the return button would have done and thus the GUI _CAN_ be made functional... but doesn't have to be.

    Your GUI's can now be as custom as you want them to be and in version two, instead of having a GUI.cs component that handles everything GUI related... in true UGUI spirit it now includes a very simple, short and sweet component for each individual part of the GUI. Want to remove the button hints section? Just remove it from the prefab. Want to keep the large character display but show more info about the character on it? Well, it's a super simple script with hardly any code in it so making it do your custom bidding is a piece of cake.

    Configurable data (battlefield and grid related) is stored in ScriptableObjects and in most cases the various components are so self reliant that you don't even have to set anything in the inspector. Simplicity and customisation are the names of this game... :)

    As you can see in the included image, I now display a larger graphic of the selected character and the currently selected targets (definitely need graphics bigger than the 128x128 I have now :p) and I even have components that I use for debugging purposes like telling me what state the game is in, the state of the character configuration and even showing me the character's current position, proposed location and space required during the re-positioning phase. With all data being exposed all the time you can get real creative and with everything running on events you can automate a lot of it by simply responding to events... See the code sample below. This is the class that I mentioned above...

    Code (csharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3.  
    4. namespace MBS {
    5.     public class TBBButtonGuidanceView : MonoBehaviour
    6.     {
    7.         [SerializeField] Text selection_text;
    8.  
    9.         void ShowThis() => selection_text.text = $"Selected {tbbData.last_configured_turn.targets.Count} of {tbbData.last_configured_turn.SelectedAttack.max_targets}";
    10.  
    11.         void OnBattleStateChanged() {
    12.             gameObject.SetActive( tbbData.char_sel_state.CompareState( ECharSelModes.TargetSelect ) );
    13.             if ( tbbData.char_sel_state.CompareState( ECharSelModes.TargetSelect ) )
    14.                 ShowThis();
    15.         }
    16.  
    17.         void Start() {
    18.             tbbData.notifications.Add( ENotifications.TargetSelected, ShowThis );
    19.             tbbData.notifications.Add( ENotifications.BattleStateChanged, OnBattleStateChanged );
    20.         }
    21.     }
    22. }
    Another thing you might have noticed is that it now supports multiple targets. Another feature I recently added was a new movement mode. In version 1 you could make the characters fight from their current location or make them run to the enemy at lightning speeds. Version 2 now includes an option to lift the pieces and place them in front of the enemy like chess pieces. Then there is the all new "Wait" attack option... I'm thinking Rest might work better... thoughts?

    Other changes (which are currently not implemented but just made available to you in case you want to do something with it) include the character selection section now allowing you to show a character's elemental affiliation / guild / rank or whatever other graphic you wish to display next to the avatar. Since I intend to implement a status modification system (I call it "afflictions") I now include space to show up to 8 affliction icons on the character select panel.

    All and all, this entire kit has been rewritten more than half a dozen times and is finally working as I intended it to. This means progress is finally happening really fast now but unfortunately I still have a few features that I need to add so it's not quite there yet... but it coming along nicely.

    Thank you all for your patience thus far. Touch wood, the wait is almost over :D

    TBB2.JPG
     
    Last edited: Feb 21, 2018
  21. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Just to back up my earlier claim about the components being self reliant, check out the included screenshot

    With this being the case and the kit is able to run itself in the background with cosmetic GUI elements I intend to include a proper 2D demo scene, tactics scene and possibly even a chess scene in future updates. First I need sprites and chess pieces... unless I make chess 2D also... Hmmm... I want to show the kit supports 2D but don't want to give the impression that this is a 2D system... Time will tell :D

    TBB2b.jpg
     
    LNMRae likes this.
  22. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    _TBBSpawnZones.JPG
    Just a teaser of one of the new features in the Turn Based Battle kit update. Spawn Areas. I have replaced the original "Main menu -> Battle -> Main menu" sequence with a "Game -> Battle -> Game" sequence to make the flow more clear to people starting out with the kit.

    Inside your game these spawn areas would obviously not have these coloured cubes I added to them for the sake of this demo scene. These would be invisible zones which each specify what enemies are native to that area and maximum how many of them to use when forming a party to challenge the player. Thus, when on the beach place one of these along the entire shore and fill the enemies list with crabs and mermaids. When they enter the jungle just cover the entire jungle with with one of these and specify monkeys and snakes. Dungeons? Skeletons, vampires, trolls, orcs.... whatever.

    In this new demo scene I save the player's position and rotation, go into battle, return to the game scene when done and position the character exactly where it was before.

    I also provide a script you can place either on the player or on NPCs to decide if the player should check at regular intervals if it is within a trigger area and then spawn a battle... or if a battle is spawned only if / when / after the player collides with an NPC.

    K. till later
     
    Last edited: Apr 11, 2018
  23. aoberthuer

    aoberthuer

    Joined:
    Jun 15, 2017
    Posts:
    3
    Hey there,

    I recntly bought your turn-based battle and I liked it on first sight! I was planning on integrating your current toolkit in my game - but reading all the cool stuff on the upcoming version I wonder whether I should not rather wait a little longer.

    Don't want to push you as I can do a lot of other things first - but any idea on the availability of v2?

    Kind regards,
    Aloys
     
  24. aoberthuer

    aoberthuer

    Joined:
    Jun 15, 2017
    Posts:
    3
    ...just discovered the post on your Facebook site. Question is probably answered already ;-)
    I'll wait for v2 then.

    Kind regards,
    Aloys
     
  25. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Version 2 is technically ready, yes,since it can do what version 1 can do and it does the extra stuff I set out to do. Having said that, version 2 will once again be released as a beta version because there is simply too much that I still want to add.

    As for a release date, every day I sit down and say "today" but then life gets in the way and I get hardly any work done. I will be releasing the kit with two completely separate gameplay styles as pre-built prefabs in order to show you how you can adapt this kit from one game type to another. In contrast with version 1 this means duplicating some scripts and then branching off the main game into another direction from there. Most of the code is identical but each new game mode changes things up ever so little.

    Let me explain: The current version allows you to re-position your characters but that is meaningless because the attacks work on all enemies all over the board. In the new version I allow you to disable that movement state with a simple tick of a checkbox... and while that is still there I decided to create a true Final Fantasy style game play mode where you and the enemy are assigned your positions at the start of the match and you do not move from that position apart from attacking. So for this Final Fantasy mode I completely removed the ability to move around the board simply by changing what state one of the buttons take you to (i.e. I skip from character select to attack select directly, bypassing the movement state altogether) and thus I needed to tweak a function or two in the game mode script.

    For the second mode that I am including with the game I am basing it on the game Enchanted Arm and in this version your movement around the board is vital because each attack you do is based on a pattern starting from your current position. This means that where you are standing determines what enemies you can hit and that is determined by the attack you select... this means that selecting your attack automatically selects your targets for you based on their reach. This means that I can go from Attack select state back to character select state and bypass target select state. I just have to do that part where I select the targets for you and then this mode is done. As such, if I get a good day in then this asset is about a day away from being completed.

    Now there are two more issues holding me back:
    1. One of my develop friends is telling me I should do what I did with version 1 and comment every public variable and function and class in the entire project and then let you read about classes and functions in the auto generated doxigen pages. This time around I am more inclined to skip all the code comments and rather write you a very detailed PDF explaining how things fit together so you can understand things better and be better equipped to modify this for your own ends. I am already half way through this documentation but I am not sure which approach I should take and since both will take much effort, both options will delay release so should I go for both or which one should I choose? That ismy dimella. Both options are at half-way done status...

    2. Which brings me to the other thing that might cause a delay. In past I have been asked about 2D play and while back then I said "You can fake it, sure", the new system works independently from the GUI and basically it just works. If you can keep track of everything in your head you can play an entire game without any graphics or any game objects in the entire scene. With nothing but Debug.Log statements you can play an entire game if you were so inclined :p Thus, I would really like to include a 2D sample game mode also but I am not sure if I should launch now or delay until after that third mode is in there. It will most likely bebased on the Final Fantasy mode and just use 2D instead of 3D so it SHOULD be fast but I will be delayed by making all the animations for all the sprites that I will still need to source... so yeah... not sure if I should launch with two game modes or three.

    But the first mode (what you had in version 1, minus being able to move around the board) that is done. Moving based on predefined patterns, that is done (8 patterns included), attacking based on an attack pattern, that is done (37 attack patterns included), graphical editors for you to define your own patterns, done... I just have to do the auto targeting code and then debug for any tweaks (oh, and new enemy Ai. Almost forgot that!) so yeah, I just need one good day of solid work and version two will be ready with 2 complete game modes and if you are willing to learn by example and not via documentation then we are good to go...

    If you can wait a little longer, please do. If you want to use the admittedly buggy, incomplete but functional version NOW, just shoot me an email with your invoice number and I'll organise a beta copy for you. :) I have set myself a deadline of this weekend so that is what I am focusing on doing... If I failed, then contact me on Monday for the latest version at that time :)

    In the mean time, though, your opinion on which documentation format you would prefer would be most welcome.Thanks :)
     
  26. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    A little code preview. I just wanted to demonstrate how much work is involved in changing one game mode into another....
    The final class in the hierarchy is the input class that defines what each button does per state. That derives from the game class that contains custom versions of functions declared in the game mode base class. most of that is just copy paste and is identical but it is placed in a subclass because other, future game modes MAY want to tweak some of that.

    So: Base class does most of the grunt work, game mode overwrites some functions with custom tweaks and then the input scripts determine what functions actually get called. You will agree that the final class is the most important since 3 million functions mean nothing if they are not called by anything, right? So here are the COMPLETE scripts for the two input modes.

    Code (csharp):
    1. namespace MBS
    2. {
    3.     public class TBBInputsFF : TBBGameModeFF
    4.     {
    5.         override protected void Start()
    6.         {
    7.             base.Start();
    8.  
    9.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.A, ChooseCharacter );
    10.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.B, ReturnToPreviousCharactersConfig );
    11.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DUp, SelectPreviousCharacter );
    12.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DRight, SelectNextCharacter );
    13.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DDown, SelectNextCharacter );
    14.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DLeft, SelectPreviousCharacter );
    15.  
    16.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.A, SelectAttackType );
    17.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.B, RevertToCharacterSelect );
    18.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DUp, SelectPrevAction );
    19.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DDown, SelectNextAction );
    20.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DLeft, SelectPrevAction );
    21.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DRight, SelectNextAction );
    22.  
    23.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.A, ConfirmRefinement );
    24.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.B, RevertToAttackSelect );
    25.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DUp, RefineAttackPrev );
    26.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DDown, RefineAttackNext );
    27.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DLeft, RefineAttackPrev );
    28.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DRight, RefineAttackNext );
    29.  
    30.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.A, ConfirmTargets );
    31.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.B, RevertToRefinement );
    32.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.D, SoftSelectTarget );
    33.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.DUp, TargetPrev );
    34.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.DDown, TargetNext );
    35.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.DLeft, TargetPrev );
    36.             SetStateAction( ECharSelModes.TargetSelect, mbseButtons.DRight, TargetNext );
    37.         }
    38.  
    39.     }
    40. }
    and
    Code (csharp):
    1. namespace MBS
    2. {
    3.     public class TBBInputsEA : TBBGameModeEA
    4.     {
    5.         override protected void Start()
    6.         {
    7.             base.Start();
    8.  
    9.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.A, ChooseCharacter );
    10.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.B, ReturnToPreviousCharactersConfig );
    11.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DUp, SelectPreviousCharacter );
    12.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DRight, SelectNextCharacter );
    13.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DDown, SelectNextCharacter );
    14.             SetStateAction( ECharSelModes.SelectCharacter, mbseButtons.DLeft, SelectPreviousCharacter );
    15.  
    16.             SetStateAction( ECharSelModes.NewLocationSelect, mbseButtons.A, ChooseLocation );
    17.             SetStateAction( ECharSelModes.NewLocationSelect, mbseButtons.B, RevertToCharacterSelect );
    18.             SetStateAction( ECharSelModes.NewLocationSelect, mbseButtons.DUp, ChooseTileAbove );
    19.             SetStateAction( ECharSelModes.NewLocationSelect, mbseButtons.DRight, ChooseTileRight );
    20.             SetStateAction( ECharSelModes.NewLocationSelect, mbseButtons.DDown, ChooseTileBelow );
    21.             SetStateAction( ECharSelModes.NewLocationSelect, mbseButtons.DLeft, ChooseTileLeft );
    22.  
    23.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.A, SelectAttackType );
    24.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.B, RevertToLocationSelect );
    25.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DUp, SelectPrevAction );
    26.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DDown, SelectNextAction );
    27.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DLeft, SelectPrevAction );
    28.             SetStateAction( ECharSelModes.SelectAttackType, mbseButtons.DRight, SelectNextAction );
    29.  
    30.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.A, ConfirmRefinement );
    31.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.B, RevertToAttackSelect );
    32.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DUp, RefineAttackPrev );
    33.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DDown, RefineAttackNext );
    34.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DLeft, RefineAttackPrev );
    35.             SetStateAction( ECharSelModes.RefineSelection, mbseButtons.DRight, RefineAttackNext );
    36.         }
    37.     }
    38. }
    That's it. Notice that one class simply doesn't have any inputs for the TargetSelect state while the other has no functions for the NewLocationSelect state. This is how the new kit works. You duplicate a script at some part in the chain, mod it like this and that is your new game mode.

    Like I kept saying all this time: I tried to make it easy to use! :D I hope it is received as such and that it is not just I who thinks this approach is the most simple and logical...
     
  27. aoberthuer

    aoberthuer

    Joined:
    Jun 15, 2017
    Posts:
    3
    Hey MrDude,

    thanks for the really detailed answer. As I wrote I can surely wait a little longer - I'll hopefully have more time in June anyway ;-)

    As for the documentation: I personally do prefer having a .pdf which will explain how to get started or how to achieve something specific. From there pointers to the code on where to tweak what would be great. If one has it basically up and running you can still dig into the code - where I usually can find my way if comments point out what should happen where and how. I would not need every public variable to be commented.

    As for the 2D mode: This sounds a lot like something you might factor out into a second asset. Thus you could have a common code base and from there sell a 3D and a 2D turn based system. I am not really sure but would assume that not that many projects mix both and thus require it in one asset. Also this might help you to get v2 finished and focus on the 2D aspect from there.

    BTW.: Also appreciating your code example!

    I hope this helps!
    Aloys
     
    MrDude likes this.
  28. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
  29. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Can this do grandia2 style combat??
     
  30. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I just Googled it and based on what I can see I am going to go with no :)

    Version 2 is made to be very modular with most of the kit being able to be pulled out and replaced and as such new game modes should be easy enough to add, sure. I like to think of it as MOD-able...but that is not just a slight tweak, that is a lot of changes! :O First major change I can see is that it is real time, not turn based, and you can actually interrupt an enemies attack after it started. Secondly, unless this is a massive grid with small tiles (I support hex grids, not showing the grid and being able to travel on your side and the enemy side) this looks like they choose their location on the terrain via some unknown system. Unfortunately, as customizable as this system is, it still relies on a grid.

    Having said all of that, I will consider this question a request. I was planning on making a 2D mode next followed by a Chinese Checkers template :p I then wanted to work on a Final Fantasy Tactics / Disgaea style system since someone once asked me about it and I thought "what a cool idea". This was another cool idea. So yeah, please keep the cool ideas coming so I don't run out of them ;)



    Style 2, mode 1...
     
  31. sanspants

    sanspants

    Joined:
    Jan 3, 2017
    Posts:
    1
    Yo!

    I'm really thinking that this might be the system I'm looking for, but I wouldn't mind some feedback from the developer on this one.

    I grabbed a couple of tools that I'm gonna cobble together, but having a turn-based RPG engine that I can customize the view of for battle scenarios would be super awesome. Simply, I'm aiming for something more Wizardry-esque (see:
    ) .

    From the way this looks, I should just be able to check for combat potential at the end of my walk cycle and if true, just... call combat? I figure I can go with instantiating the enemy grid and handling the populating of baddies through your system (I'm thinking planes that I can just throw an image on) and go from there?

    I'd love to hear your thoughts!
     
  32. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    sanspants likes this.
  33. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Well, the day has finally arrived: TBB v2.0 is finally released! :D

    I can't say when it will finally appear on the Asset Store (anywhere between next week and never. Outside my control) but it is busy uploading to my store as I am typing this!

    If you already purchased the TBB kit on the Asset Store you will receive version 1 if you download the kit using 2017.4 or earlier. If you download it using 2018.1 you will receive version 2.

    If you buy it on my website life is a little less complicated. You will receive a download link to both versions and can download either at any time. The version on my website supports 2017.3 as minimum Unity version

    Version 2 is released as a perpetual beta since new features will be added constantly. Unfortunately, as a beta product be advised that some features are not yet implemented and others might not work as expected. Not saying that is the case, but saying it might be the case.Just be aware.

    Right, so, quick recap of the major changes:
    1. UGUI in stead of OnGUI
    2. Entirely state and event driven
    3. 2 completely different game types included
    4. Support for health and damage spells (health spell plays damage sound and animation at the moment. Known issue)
    5. Supports multiple target selecting
    6. Doesn't work with WebGL build target since it doesn't support threads. If there is a huge demand for it I suppose I can ugly up the code and add support for it... but I would prefer not to.
    7. New controller class supports up to 9 input devices (you have to create your own button config screen) but the native Vita support has been removed

    The rest has been covered before. Jut wanted to highlight those again.
    Since this now runs on UGUI and can be run entirely with touch input it is finally usable on mobiles! :)

    One final reminder, I recommend buying on my website rather than on the store if you want bleeding edge versions. The asset store limits me in how fast I can deliver updates. My website is only limited by my ADSL line speed ;)

    Thank you for your patience. I hope you enjoy this new version! :D
    http://mybadstudios.com/product/turn-based-battle-system/
     
  34. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
  35. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    Does this work for 2D styled games? For example games like Grand Kingdom, Persona 1 and 2, South Park Stick of Truth and Fractured But Whole, etc...?

    Also does this require code to set up in our games or is it drag and drop to mess with?
     
    Last edited: Aug 15, 2018
  36. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi @EHEBrandon

    For your first question, please scroll up. I speak of that in very great detail a few times on this very page. Far more detailed than just yes or no :)

    As for your second question...
    As I explained above, the kit includes two complete game types (Final Fantasy style and Enchanted Arm style). In order to customise these you can duplicate existing prefabs and just drag in new character meshes for it to use or drag in a new special effect for it to perform etc. As long as you are happy with the game modes as they are (see the videos above) then you can build your custom game entirely by just using the custom editors or setting values in the inspector, yes.

    Having said that, the asset is made for programmers. I made it as easy as possible to customise and tweak things and allow you to create entirely custom, tailor made game modes where anything goes...but that is definitely not a drag and drop solution if you want that.

    So really it boils down to this: If you are happy with my default game modes then,yes,this is drag and drop. Just pay close attention to the demos. If you want to build a custom game mode then no, definitely not drag and drop.

    I hope that clarifies things for you. If not, feel free to ask anything else you would like to know
     
  37. Magasenakwa

    Magasenakwa

    Joined:
    Oct 13, 2018
    Posts:
    86
    We are considering doing a competition in order to start the new section on our website (http://www.mybadstudios.com) and were wondering if there would be any interest in this...

    We want to start showcasing works that make use of our assets so basically you would send us screenshots of your game and we would then post it on our site. Free advertising for you, complete with a link to your site and possibly even a writeup telling people about your game. In order to get this started we are thinking of saying "Send us your submissions and the top 10 received at date X will get a free asset of their choice. Everyone still gets featured on the site"

    Images, youTube videos, it's all good. Show us what you've got!
    Would anyone be interested in participating in an event like this?
     
  38. Magasenakwa

    Magasenakwa

    Joined:
    Oct 13, 2018
    Posts:
    86
    Please note all the previous links provided are no longer working. Please see http://www.mybadstudios.com/ for the product and all other related info.

    Thanks
     
  39. unity_FxrmGRS31qA98A

    unity_FxrmGRS31qA98A

    Joined:
    Jan 15, 2019
    Posts:
    1
    Why this plugin deprecated? I can't buy now?
     
  40. Magasenakwa

    Magasenakwa

    Joined:
    Oct 13, 2018
    Posts:
    86
    The asset is still available on the website @ https://mybadstudios.com
    All assets are removed from the Asset Store only, apart from that the products are still being updated and maintained from the website