Yeah, it is very important to think carefully about the amount of randomess in a turn based game. I think in Sword of the Stars: The Pit the randomness is too high and the game can be frustrating. The Banner Saga or Invisible, Inc. are great turn based games without randomness and the player can learn from his mistakes.
I think your approach is very good and i am looking forward to see more of your Advanced Turn Based Tile Toolkit.
Hey there!
You asked me next time I had a problem/issue to bring it up here so thats what im doing
I have duplicated out a hex cost tile and want to change it abit so when the player steps on it, there can be an interaction (A HUD widget appears asking if he wants to interact with the tile)
How would I go about that?
I have been looking around the toolkit blueprint but havent found a e.g āPlayer on tileā relevant event/function
Thank you!
@Wizard1200: Good to hear we seem to have similar views on this
@: Generally you can check if there is a unit on a specific tile by checking the appropriate tile index in the pawn array. However there is no built in way for the toolkit to know exactly when a unit steps on a specific tile. You would need to check this manually, but there is a variety of ways to automate it. The simplest way is probably to enable collision on the pawnsā static meshes and above the custom tile (not on the PathTrace or RangeTrace channels) and fire your custom functionality from within the tile on overlap.
Okay thanks I just wasnt sure if there was a built in way or not!
I am also interested in Imoninās question regarding an end turn button switching teams.
This is what i have set up so far, what else do i need? as iv tested and it doesnt work
@: It looks mostly correct, but if youāre after the same thing Imonin wanted you want the while loop to fire when the current pawn has faction player, not enemy.
I have just bought your tool kit. Iām not sure how to create a new project with it as the āadd to projectā button does not allow me to. When I add it to a project, two projects apear. When I create a new project and then add the tool kit to it, I am not able to drop the grid manager into it (The red circle with the line through it apears). When I right click the grid manager it says āfailed to load assets.ā. I can not drag the hex one in either. When I try to go to āeditā on the hex manager it says āBlueprint could not be loaded because it derives from an invalid class. Check to make sure the parent class for this blueprint hasnāt been removed!ā. If I for some reason try to duplicate the hex manager, unreal engine crashes. I can not drag in any pawns either.
I am new to the unreal engine forums and only did a quick search around for anyone who is experiencing problems like these so iām sorry if itās a commonly solved issue but, I have no idea whatās going on or what to do about it. Iām using ureal engine 4.8.0. I have a feeling this isnāt a specific problem with the tool kit. Iāve seen your guide to updating to 4.8 (not even sure if thatās still relevent) but as iām unable to even edit the grid manager, iām unable to do any of that.
/Edit:
Nevermind. After searching around some more I found out that it was because I didnāt update 4.8 to 4.8.3. After doing that the problems were solved.
I do have a question now however. Iām currently trying to add pawns that can heal. To do this I want to add friedly fire. This is to have the healing pawns do negative damage as well as to have players need to watch out for any allies while using AoE attacks. I have a feeling you mentioned it somewhere in one of your videos (all of which iāve watched) but, I donāt remember which and when. Iāve rewatched them but havenāt seen it.
Next would be creating a menu for actions much like final fantasy tactics. Just setting the menu up with a single attack should be enough for me to figure out how to add other attacks and things like deffending but, Iām not sure how to go about starting that. Upon watching your āadding new featuresā video, iām sure I can set up each attack; Getting a menu that allows for different attacks to be used is where iām confused. My thought is to create a variable called āActionsā, Give each button a number (ex. clicking āDeffendā on the menu makes āActionsā equal 3) and depending on the number, have an If branching statement link something like what you created in the video. It should then be: Menu pops up on playerās turn -> Player clicks ānormal attackā -> normal attack makes āattacksā variable equal 1 -> When āattacksā variable equals 1, and itās the default attack from there. Would this actually make any sense? Iād try it out before asking but iām unsure of how to even do the menu to try it. Do you know any links to tutorials showing how to set up menus that can do this? And lastly (Sorry for all the questions), How would I get said menu to recognize which pawn is active even when iām switching through ones that have yet to act?
I do want to say that this tool kit is awsome and iām planing to do major projects, proffesionally, with it eventually.
Iām still fairly new to unreal but, I learn quickly so iāll probably figure most of the menu out by trial and error after awhile; So if the menu stuff turns out to be really basic feel free to ignore that. Friendly fire seems to be the harder partā¦
I also agree that randomness in games (not just in TBS-games) can be good if they are designed properly, but they can just as easily be bad if they are designed badly.
I recently worked on expanding the toolkit to include randomness and it wasnāt that hard to do. Granted it may not have been the pretties stuff youāve seen, but it wasnāt that hard to set up something that handles randomness
I want to make an errata to what I said about this (after playing a bit more of Long War). On medium ship maps, some of the outer walls was rotated 45 degrees compared to that of the grid. The grid itself however is not rotated.
I apologize again for taking a while to reply. As mentioned Iām checking the thread and my e-mails somewhat less often while on vacation as Iāve filled up most days with activities. Iāll be living on a boat for some days next week and Iām uncertain if I will be able to check the thread at all during that time, but feel free to post questions and Iāll try to answer them as soon as Iām able.
Great that you managed to solve the problem yourself I hope it didnāt take too long to figure out.
Cooleyo has linked to the correct video in his comment above (thanks!). In it I cover how to make area attacks with friendly fire. Iām uncertain if youāll be able to simply input negative damage in the receive damage event in Unit_Parent to heal, but it should be trivial to modify the code to accept this if itās not the case. Even if it works you will probably want to add an if-statement that prevents unit from being healed beyond max health.
I think your solution sounds pretty reasonable, but it might be able to make it even simpler depending on what youāre after. Creating a switch that runs a different piece of code each time Attack Victim is called in Unit_Parent is useful if you want to input your custom attack and run all the code that usually leads up to a custom attack (like the unit moving to the victim before attacking). If so Iād use a switch like you suggest, but Iād use an Enum instead of an integer, so you can more easily distinguish between the different attacks by looking at your code. If however you want to add effects that can trigger instantaneously when you click whatever action button you have added you can simply have clicking the button trigger a piece of code directly, without going through a switch. This depends on what youāre after. I must admit that menus and buttons is one of those things I know very little of, as I havenāt used them in UE4 yet (Iām pretty specialized when it comes to my skills at the moment). Iām positive itās very simple to set up, though, but I cannot check from where I am at the moment. I imagine you can look at any tutorial for UMG and you will learn how you can run a specific blueprint event or function by clicking on a button you have added. Then youād simply need to change your enum variable and/or run your attack code.
No need to apologize. Thereās a lot of stuff to figure out once youāre starting out and Iām happy to help. Currently the current pawn is whichever pawn is currently selected, which means that if youāre switching between active pawns there is no way to figure out what is the ārealā current pawn (since there is no such concept in the toolkit). If you have a situation where a different pawn is selected, but another pawn is actually the real current pawn youāll have to add that yourself. I would add a new variable of type Unit_Parent in ATBTT_GameMode (called real current pawn or something else) and set this up when the current pawn is set up/switched in the game mode, but not switch it in ATBTT_PlayerController when you switch between units by clicking on them (the part in the bottom right of the blueprint graph if I remember correctly) if this is what youāre trying to achieve.
Thanks! Iām looking forward to seeing what youāll make. Feel free to ask me anything youāre unsure about in this thread, and Iāll try to answer as soon as Iām able (which will be quicker once Iām back from vacation at the end of this month).
Yeah, randomness shouldnāt be hard to do. Itās mostly just if-statements tied up to a random number in range which is again based on the value of some stat. Glad to hear you found it simple.
Ok, thanks for letting me know. That makes a lot more sense for me, as I thought it was odd for Firaxis to add such a fundamental change to the underlying grid system just to achieve a minor change on some maps. Rotated walls should be simple enough to do with the toolkit.
Hello , I have successfully added another character and replaced his animations. However I ran into a roadblock trying to create entirely new animations. I already added the new animation to the state machine and a transition, but I donāt know how you call your transitions. I see that events are called to change it, but I havenāt found where they are called from nor where to add a new one. If you point me in the right direction I think I can figure out the rest.
the transitions are run when a specific boolean is set to true. For all animations except for movement these booleans are set by custom events within the various unitās event graphs (Unit_Player_Melee etc.). Transitions back are done when that boolean is false. This is done by animation notifies at the end of the animations that fire a custom event in the event graph of the animation blueprint that sets the boolean to false. For movement the animation is set in the top part of the animation blueprintās event graph, where it modifies a blend space based on the speed value of the owner unitās current speed float.
I looked through all the threads and couldnāt find anything that related to my issue, so I hope this is not a repost, but I think I found a few bugs. Either that or I am definitely not selecting an option correctly?
Issue #1: When creating a custom grid (dropping tiles on a grid then hiding the default tiles), If I hover over the bottom portion under the tiles in the game play window it is setting the hover marker to the default tile grid 0 index, as shown here;
Issue #2: I am attempting to setup drag and drop units instead of click to move, when grabbing the unit and setting its location to the current mouse location it ends up āsnappingā to the default tile index 0. (I have selected āIgnore Snap to Custom Gridā on the Unit Parent and the child itself just to be sure.)
Hi, . You have indeed found an unresolved bug there. I usually test on much larger maps, in which case this bug will not be visible. This is happening because Iām using a large, invisible collision plane to detect collision (including hovering and clicking) on the tiles. Iām doing this because individual collisions for every tile is inefficient. This is unproblematic on square maps, but for hexagonal maps there will be small, empty triangular sections along all edges that are overlapped by the collision plane.
When the toolkit looks for tiles on these locations it finds nothing and returns false, which in turn causes it to return index 0 for the bottom of the map, or the index on the other side of the map and one row up/down for the left and right side. To fix this the best way would be to modifythe Get Hit Tile LLocation and Index function in BP_Grid_Manager and add a branch that checks if it returns an out of bounds value.
I canāt tell you exactly what you want to add as the input to this branch, as I cannot test it myself until Iām home in a couple of weeks. Iāll make sure to add it to the next update, though. Thanks for letting me know!
As for your other problem I cannot know exactly what is going wrong without knowing how you have implemented drag and drop. It seems likely that something similar is happening here to the first issue, and that the Get Hitā¦ function is returning 0. Grid snapping does not affect gameplay, only when working in the editor, so that shouldnāt matter. Tell me more of your drag and drop implementation and Iāll hopefully be able to provide more help.
It was definitely the collision plane issue. Just fixed it by creating a grid larger than the viewing area for the default grid so that the collision plane would exceed the bounds of the window and never default to 0 index. The same held true for the drag and drop functionality. Once I changed the grid to be 20x20 instead of 9x5 and updated the index of where to place the pawns all was well. I should also mention that I set the camera to never move, I doubt this would have been an issue if I had camera follow on lol.
For a custom grid with all kinds of possible weird shapes I can understand the difficulty of setting the collision plane to a specific bounds, but it would definitely be nice
Glad that sorted it out! After the next update you should be able to shrink the grid appropriately again. Until then it should be sufficient to extend the grid one tile in every direction. It might even be enough to only extend the grid only south and east by one tile.
Hey , I have a doubt regarding the performance and ease of usability between decals and instanced static meshes for tiles. In the latest live stream, Epic mentioned that decal support is coming to mobiles in UE v4.9. Usability wise, I think decals are easier to work with. But Iād like to get your opinions as well since youāve worked a lot on decals yourself. As for performance, arenāt instanced static meshes generally far less expensive compared to decals if there are like a few hundred of them in the scene?
Hi . Iāve only really tested the performance impact of the two methods for desktop, in which case both ISMs and decals had little impact even for units with extremely high movement ranges. I still suspect ISMs should be slightly better, but for desktop it doesnāt really matter. For mobile I would also expect ISMs to be slightly better. However the default ISMs use transparent materials, which is not ideal for mobile. I canāt test it now, since Iām still on vacation, so I suggest you run a simple test using decals and ISMs with and without transparent materials and see if there is a difference in fps.
Hi,
I am making multiplayer game with more than two players, where everyone have only one pawn(hero). I saw in the blueprints the way that youāve managed to set the order of the pawns but i want this only with the players and in specific order, that is set by default?
Can you give me some ideas or tips? Thanks in advance.
@Mariyan:
With the way ATBTT_GameMode and ATBTT_Player_Controller are currently setup for a Single Player experience using Initiative order and Faction switching, you would be much better off creating and using your own Game Mode and Player Controller for this type of implementation. Otherwise you will need to heavily modify what currently provides.
I would highly suggest going through his Blueprint Tutorial videos so you can get a better understanding of how each one is handled and what features are included with the asset.
Uhm this is kind of wierd and it might be a 4.8 incompatibility but the starting point of a unit seems to be constantly locked to the first tile, so the camera always jumps there and shows a pawn teleporting to the first tile, then moving across it and teleporting to whereever you clicked ._.
Ive had the toolkit for a long time and i know it used to work before, is it just 4.8 messing with the blueprints?
Kind of what described, except i changed absolutly nothing and it happens in the example map.