Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by VFe View Post
    Networking would imho be very difficult to do in a "one size fits most" approach.

    The slower your game the more lenient it is on latency and the more options open up to you. ex: for a truly turn based game simple http/json communication can be a very robust way to manage multiplayer.

    But for a battle system thats quicker or maybe incorporates some ATB style elements you need some kind of UDP object system.
    Ok, that's useful to know. For the toolkit I will be building it to work as a true turn based game out of the box, so if this is relatively simple to achieve, this is what I'll aim for.

    Originally posted by Saffron View Post
    Si, though its a bit wonky I can switch a pawn from one grid to the other, still only having 1 grid manager and my sub grid. The path finding works in the sense that whatever grid its on currently it can path to, so you cant switch between them by moving, I had to add a button which basically teleported the pawn between the 3 i had set up. But this of-course doesn't really work when you take other things into consideration, like AI pathing and attacking, so my current implementation literally only has pawn movement on the sub grid. I imagine getting the rest working maaay be a bit rough. Anyway I'll link you to the sub grid blueprint and the functionality I made to allow the user to switch between using the main grid and sub grid when I get home from work! Hopefully it will help the brainstorm a bit more.
    Great to hear you've got that much working already. I'd appreciate if you share the blueprint with me and we can hopefully figure something out together. With your help I might be able to get this feature done a lot quicker than I anticipated

    Originally posted by Hinato View Post
    Hi Monokell really great toolkit! Thanks a lot for all of your work!
    Unfortunately I'm running into a problem with box triggers on pawn overlap. The blueprint doesn't seem to recognize the pawn (Unit_player_melee) overlapping the trigger box. Overlapping doesn't even display a string! Maybe you could help with this?
    [ATTACH=CONFIG]34551[/ATTACH]
    Hi Hinato, if you're using the default pawns that's really not that surprising as they have no collision and generate no overlap events. To change this modify the blueprints of the pawns you are using and enable collision as appropriate on their skeletal meshes. Hopefully this will solve your problem.

    Originally posted by Hinato View Post
    Edit: I'm having another problem with the same setup. There is a door which rotates as soon as a pawn overlaps the triggerbox (--> enable input) and a button is pressed. For now I forced Input by setting 'AutoReceiveInput' to player0 (to skip the problem explained on top). As soon as I press the button the door rotates, but disabeling collision (what worked in projects without the toolkit) didn't let the pawn pass through the door. I tried changing the edge costs (set edge costs to all 0 for closed and all 1 for opened) via blueprint but this doesn't work (doesn't seem to update the edge costs at all). Changing the edge costs of the door manually to all 1 enables my pawn to pass. Any help would be appreciated!
    [ATTACH=CONFIG]34607[/ATTACH]
    There might be many reasons for this happening, but here is one suspicion: When the pathfinding has been run modifying walkability does nothing until you run pathfinding again. In other words modifications to edge costs has to be done before you run the pathfinding function.

    Edit: I looked again at your screenshot and found the reason. Modifying edge costs on a tile does nothing after the game has started. The edge cost variables on tiles are put into arrays at event begin play and afterwards they are never called. To change the edge costs of the door at runtime you have to get the EdgeCosts array from the Grid Manager, get the struct at the array index that equals the index variable and set that struct to whatever new values you want. Check out the Add Viewport Terrain To Arrays function for examples of how to do this.

    Originally posted by Hinato View Post
    Also changing the mouse cursor when hovering over the object doesn't work either...
    [ATTACH=CONFIG]34552[/ATTACH]
    That isn't too surprising as the version currently on the marketplace uses the default player controller which does not show the mouse cursor. Making a new player controller with show cursor set to true should hopefully fix your problem.
    Last edited by Monokkel; 04-11-2015, 01:50 PM.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Thanks a ton!
      Easily solved the first problem, for the third one: I already had a player controller with show mouse cursor enabled. I just forgot to enable mouse over events XD

      The problem with the edge costs might take some time since I'm relatively new to UE4 but I think I get what you mean

      Edit: Unfortunately no more time today.. Still trying to change the edge cost but that'll have to wait 'til tomorrow
      This looked most promising thus far but something still doesn't work how I think it would..
      Click image for larger version

Name:	EdgeCost.jpg
Views:	1
Size:	116.7 KB
ID:	1072355
      Last edited by Hinato; 04-11-2015, 03:31 PM.

      Comment


        You're on the right track, Hinato The only problem I can see here is that you've incorrectly referenced the Grid Manager. Instead of casting to BP_Grid_Manager cast to ATBTT_PlayerController and from the output node of the cast get a reference to the GridManagerRef variable. From this variable get the edge array and proceed like you've done. Remenber to be finished with all alterations to the edge array before you run the pathfinding.
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          Hi Monnokel, fantastic job with this blueprint. Just had a question - probably more in the future, but with the way this is set up I haven't had too much trouble implementing what I need to. I am trying to change the Inititative/current pawn features up some, so I can have a time where the player isn't actually controlling any pawns. At the start of their turn, they would not have any pawns selected (I assume this would require Current Pawn variable to be null) and they could either select one of their pawns, or perhaps click on a space with an object or an enemy pawn to view more details, but not actually take control of a pawn unless they click on one of their own. Any tips on how I might start this out?
          Along with that, I plan on my final product being a "simultaneous" turn based game (similar to Civ V) where any AI would perform their actions right away, but the player and any other people they are playing with (multiplayer) would take their turn, press end turn, and the game would wait for all player's end turn vars to be set to true. Obviously any multiplayer feature is very far off for both of us at the moment, but do you see this being a possibility with a modified version of this toolkit?
          Much thanks!

          Comment


            Hello Sreno1 and thank you! What you have been requesting has been requested a few times before, and I'm planning to include it when I start making my example maps. I actually probably won't bother making CurrentPawn blank. I would keep a current pawn just like now, but just refrain from running pathfinding, placing the current pawn marker or auto-panning to the current pawn until a pawn is clicked. As far as the player is concerned that will be identical to not having a pawn selected.

            As for different players deciding actions i parallel and activating them simultaneously, I believe it is certainly possible, but will take quite a bit of work. You will at the very least have to modify the system so that you can have multiple pathfinding arrays at once so players don't keep overwriting one another. I would only try tackling this problem when you really feel you have mastered and understand everything in the toolkit.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              Awesome, sounds like you have some sweet features in the works. When you update any features, how will those updates behave with projects already using the toolkit? For example, you mentioned splitting up the toolkit into multiple blueprints (if I understood correctly) - in order to take advantage of these updates would we have to re-create and re-modify what has already been edited? Not only as far as the modular blueprints go, but any update for that matter - how will they affect projects in general? Just out of pure curiosity, because I've never worked with an in-progress external source like this before.

              Comment


                Actually I've just finished completing the new update a few minutes ago, so in the unlikely event that Epic is quick with adding the update you'll know firsthand very soon. In principle, migrating a new version of the toolkit to a project running an older version will override everything, so you would have to keep a copy of the old project and copy over any new code you've made as necessary. Even though this is also true for a modular setup, having it modular means I can specify what parts of the toolkit have been changed in an update, and you can safely replace any other blueprints with your own modified versions. This will not be true for this update of corse, as it is the most radical change to the toolkit I'm likely to make.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Thanks for the input but you lost me there:

                  Originally posted by Monokkel View Post
                  Instead of casting to BP_Grid_Manager cast to ATBTT_PlayerController and from the output node of the cast get a reference to the GridManagerRef variable. From this variable get the edge array
                  I can't cast to ATBTT_PlayerController. Only to 'PlayerController' (with an Object Input) and when I drag from that output note I can get a referance to the GridManagerRef but these won't be connected. Same goes for the edge array from the GridManagerRef.

                  Are we talking about the same version of ATBTT?

                  Also congrats on finishing the update! Looking foreward to that!
                  Would it be better to pause with that until the update is released because I'd have to redo it anyways?
                  Last edited by Hinato; 04-11-2015, 08:18 PM.

                  Comment


                    Ah, you're right of course. My suggestion is only possible in the new version. Instead you should do something that works in both versions. Make a variable of the type Grid_Manager_Class and set its default value to Grid_Manager. Put it in your event graph, drag out its pin and get all actors of class. From the array you then get, get element 0 and cast it to Grid_Manager. For an example see the constriction script of Tile_parent.

                    If I knew Unreal was to upload the new version in a couple of days I guess it would make sense to wait, but since they still haven't uploaded the version I sent them two weeks ago I wouldn't hold my breath. Converting your additions shouldn't take too long in any case. I recommend putting a new, unused variable get at all places you make changes so you can easily find them again by searching for the variable.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      Thanks! The door is now working as planned
                      Sucks that Unreal's taking so long for uploading finished updates.. Hopefully they get stuff done soon

                      I just noticed that enemy pawns won't attack anymore. Maybe that is because I changed collision of the player pawns but not
                      the enemy pawns.. Gonna look into that right now

                      Comment


                        Excellent Glad it worked. My guess for your other bug is that the player pawns now block the trace that checks visibility for the AI. Make sure their collision is not set to block pathtrace or rangetrace.

                        I haven't sent the update in yet, as it might not get noticed during the weekend. I'll wait until monday, early in the workday on the US east coast.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Originally posted by Monokkel View Post
                          Make sure their collision is not set to block pathtrace or rangetrace.
                          Thanks but it seems like these 2 parameters also aren't in the version I'm currently using
                          Maybe I'll focus on the UI right now and just wait for the release

                          Comment


                            Originally posted by Hinato View Post
                            Thanks but it seems like these 2 parameters also aren't in the version I'm currently using
                            Maybe I'll focus on the UI right now and just wait for the release
                            No, PathTrace and RangeTrace are in the version currently on the marketplace. They are trace channels that can be checked in the collision options of meshes with collisions. Maybe you didn't add the project properly and the Config files were not included? This would happen if you migrated the files to another project, for instance. Check in Project Settings -> Engine -> Collision to see if the custom trace channels are there. If they are not, try creating a brand new project with the toolkit and copying the config files from this project (Likely located in Documents/UnrealProjects/[Project_name]) over to your old project.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post
                              Actually I've just finished completing the new update a few minutes ago, so in the unlikely event that Epic is quick with adding the update you'll know firsthand very soon. In principle, migrating a new version of the toolkit to a project running an older version will override everything, so you would have to keep a copy of the old project and copy over any new code you've made as necessary. Even though this is also true for a modular setup, having it modular means I can specify what parts of the toolkit have been changed in an update, and you can safely replace any other blueprints with your own modified versions. This will not be true for this update of corse, as it is the most radical change to the toolkit I'm likely to make.
                              Hi Monokkel,

                              Can you share a sort of release notes where you explain the details of this new release?
                              I remember you summarized a list of new features with completion percentage but I can't figure out what will be changed exactly with this new release.

                              Sorry if my question is not so wise, maybe I missed something.

                              Edit:

                              I can explain better. Considering your list:

                              Planned Features (Percentage Completed)
                              - Have movable and visible tiles in range meshes conform to the underlying landscape (95%)
                              - Auto generate walkability and grid maps based on terrain without having to place tile meshes (95%)
                              - Add more options for displayng and calculating visibility and pathfinding (sprinting, multi-turn movement (Civ-style), displaying walkability and visibility simultaneously) (95%)
                              - Adding the option of spreading demanding operations over multiple ticks, improving performance on weaker hardware (50%)
                              - Improved support for using sprites and 2D assets (30%)
                              - Touch controls (10%)
                              - Increase modularity of blueprints.
                              - Add example maps of more specific TBS genres with custom code:
                              --- 4X strategy (building and exploring)
                              --- XCOM-like (Cover system ++)
                              --- D&D-like (Dungeon visibility, complex game mechanics)
                              - True height maps with overlapping grids.
                              - Multiplayer support.
                              - Units larger than one tile.

                              We can expect what points?
                              Are you also including the new blueprint version with the five sections instead of the single Grid Manager?
                              Last edited by Wisdom-HELLy; 04-13-2015, 09:50 AM.
                              Fantasy Turn-Based Tactical Game
                              STEAM: https://store.steampowered.com/app/9...Arcane_Legacy/
                              IG: https://www.instagram.com/arcanelegacyofficial/
                              FB: https://www.facebook.com/ArcaneLegacy/
                              WEB: http://www.arcanelegacy.com

                              Comment


                                @Wisdom-Helly: The list of planned features can be seen in the original post on this thread. It is quite general, however, and the list of added features for each update will be more specific. Here is the list of added features coming in the new update. I've probably forgotten a few things since I've changed and added so much, but this is the gist of it:
                                1. Walkability can now be generated automatically without placing a single tile. This means that you can use whatever static meshes you want or even the terrain tool and a grid will be generated based on what you have placed, as long as they have collision set to block PathTrace. Generates height information and can optionally be set to generate edge costs automatically based on height differences between tiles.
                                2. Tiles in range and the various other markers can now optionally be set to decals instead of static meshes, meaning they will conform to any underlying terrain. Static meshes will also change rotation depending on the rotation of underlying meshes, though this only looks good in trully tile based games.
                                3. Done a massive reorganization of the toolkit blueprints, making the toolkit more modular and making user modication much simpler. The blueprint is now organized as follows:
                                  • Grid_Manager creates the visible grid and holds all grid arrays. Holds all functions pertaining to the grid, including pathfinding and visibility. The grid manager does not call any functions on its own during runtime, but exists to be queried by other blueprints.
                                  • ATBTT_GameMode sets up the toolkit by spawning the grid camera and HUD and handles the turn based structure, including selecting the current pawn and starting and ending turns.
                                  • ATBTT_PlayerController handles all mouse input, which mostly means deciding what happens when a tile is clicked or hovered over. Posesses the Grid_Camera.
                                  • Grid_Camera works like before and is responsible for panning, rotating and zooming as well as following the current pawn if this is enabled. Does no longer have to be placed in the viewport.
                                  • ATBTT_AIController controls the current active pawn if it is controlled by the AI and decides what action the AI takes during its turn.
                                  • Unit_Parent handles the physical movement of units across the grid as well as attacking, taking damage and being killed/destroyed. Does not handle animation.
                                  • Unit_[varies] handles the animation of the various units in conjunction with Anim_BP_Parent.
                                  • Tile_Parent functions as before.

                                4. Added new options for calculating movement and visibility. These include:
                                  • Calculating visibility and movement simultaneously. This is now the default. If the unit has movement points left it only checks visibility to enemies in range, not every single tile.
                                  • Displaying tiles that units can move to in subsequent turns making it easy to add features like running in XCOM or setting up movement over several turns like in Civ.
                                  • Visibility in diamond shape patterns (on square grids).
                                  • Minimum range of visibility, for units that can only attack beyond a certain range.
                                  • Corner crossing, diagonal movement and splitting up turns can be set individually for each pawn. Speed and acceleration along the spline can also be set up individually.

                                5. Added option for displaying the grid as a plane with a repeating texture instead of meshes (currently only supports square grids)
                                6. Option for sorting pawns in initiative based on an initiative value (not fully implemented by default, but easy to set up)
                                7. New macros for handling spreading loops over multiple ticks (unused at the moment, but included for users who want to try them out)
                                8. Lots of small improvements and improved commenting in general.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X