Monokkel, thats exactly what I'm looking for. Just something that gets the AI to take a more defensive stance when guarding a city tile.
Announcement
Collapse
No announcement yet.
[SUPPORT] Advanced Turn Based Tile Toolkit
Collapse
X
-
Originally posted by Monokkel View Post@Bradform_hinkle: I cannot see anyone named Nateight who has posted in this thread. Did you post in the wrong thread?
His post is from way back on page 4.
Also, Thanks so much for putting this together Monokkel. Its a great resource so far. I've just begun learning UE and your toolkit has been a great resource, especially for how to us arrays.
Right now I would like to be able to cycle through the units in the player faction with say, arrow keys or an in-game button without ending their turn and selecting enemy units. Similar to Xcom unit selection. I have tried triggering the "ChooseNextPawn" event in gamemode with an input and it sort of works in that it changes to the next unit in initiative order, but it also ends their turn. I'm not sure how to do this without cycling through enemy units as well. So I'm wondering if a better way to do this would be to create separate initiative arrays for both player and enemy factions as the basis for 2 distinct turn cycles.
Or maybe i am over complicating this. Not sure, I'm pretty new to this.
Comment
-
Originally posted by MicahM View PostMonokkel, thats exactly what I'm looking for. Just something that gets the AI to take a more defensive stance when guarding a city tile.
Originally posted by Bradford_hinkle View PostHey Monokkel, thanks for the quick reply. Sorry, I didn't quote Nateight's post properly or notice you responded already.
His post is from way back on page 4. [ATTACH=CONFIG]75549[/ATTACH]
Also, Thanks so much for putting this together Monokkel. Its a great resource so far. I've just begun learning UE and your toolkit has been a great resource, especially for how to us arrays.
Right now I would like to be able to cycle through the units in the player faction with say, arrow keys or an in-game button without ending their turn and selecting enemy units. Similar to Xcom unit selection. I have tried triggering the "ChooseNextPawn" event in gamemode with an input and it sort of works in that it changes to the next unit in initiative order, but it also ends their turn. I'm not sure how to do this without cycling through enemy units as well. So I'm wondering if a better way to do this would be to create separate initiative arrays for both player and enemy factions as the basis for 2 distinct turn cycles.
Or maybe i am over complicating this. Not sure, I'm pretty new to this.Synchronous resolution is pretty tricky and not something I have thought of very good ways to solve. I might put my mind to the task at a later point, but it is too big of an undertaking to solve with a quick brainstorm. I have solved your other question, though. I thought making it possible to cycle between your units would be very easy, but it turned out to be a much bigger challenge than I anticipated. Here is my solution which uses both ATBTT_GameMode and ATBTT_PlayerController:
In ATBTT_GameMode (a new function):
In ATBTT_PlayerController (in the event graph):
So what I am essentially doing is moving every player unit in the Initiative Order array one step to the right or left, moving the one that either gets to index -1 or to the index of the firs AI unit to the other side of the player's "half" of the array, then activating the unit on index 0. Hmm, not the best explanation, but you can hopefully figure it out from the graphs. Seems to work really well, though!Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
@ Monokkel
Woah, this is above and beyond what i expected as an answer. I tried a few different options but I got pretty stuck. thanks man
Do you think you will include this in your next update? I'm sure a lot of people would like this as an option.
As far as synchronous resolution, ya it seems really difficult. In addition to distinct movement turns and storing each units individual spline prior to animating the movement, I think I would at least need to store different conditional commands at each tile in the Units path way. Im going to tinker, and I'll keep you updated on progress.
Thanks
-Brad
Comment
-
@Bradford_hinkle: You're welcomeI might indeed include this in a future update, but I'm unsure if I will add it as a general feature or as part of a game example. Probably the latter. Looking forward to hearing your progress on the synchronous resolution.
@Bankworthy: Glad it worked! When you say it works in unison with preferred range, does that mean that your units still take their preferred range into account when searching for cover? How exactly did you end up implementing my suggestions?
In other news I've kept on adding new features. Heightmaps are basically complete at this point, but still require quite a bit of testing and bug fixing. I have also added the option for hot-seat multiplayer, multiple allied/enemy factions and the option of having a mix of AI and player controlled units on the same team. I have also implemented the option I've talked about before of having multiple variants of pathfinding to choose from. This can be used to have some units ignore difficult terrain, be able to move through friendly units, only be able to walk on water etc. In addition I'm adding some useful debug features. I have altered the construction script so that it is possible to display the tile indexes on the tiles themselves and also which tiles they are connected to (including movement cost). Here is a screenshot:
I'm actually beginning to run out of features that I feel should be included in the general toolkit and not just in game examples. After I have fully polished the features mentioned I think I have only muli-tile units and online multiplayer left, though the last one will probably take some time to implement. So not too far into the future I will probably be adding new features mostly through game examples. The first one will be an XCOM-like with weapons, cover, abilities etc.Attached FilesLast edited by Monokkel; 01-27-2016, 08:32 AM.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
I do indeed mean that the units still take the preferred range into account, after the part in Find Path to Tile in range function finds the Indexes with LoS, I check all these indexes, I get the victim direction from each index, and check to see if the index has appropriate cover and add the index to a new Indexes with Cover Array.
In the Choice Candidates part, I replaced the uses of Indexes with LOS array with the new Indexes with Cover Array
Much simpler than I thought it would be!
They currently have trouble with LoS and full cover, but I'll be implementing corner peeking with the AI soon
The displaying of the movement costs on the tile looks really good, would be useful in displaying cover values of each tile in my project!
Comment
-
Monokkel, thanks so much. You've got to be one of the best all around people on the market place. It looks like a lot of the features I'm looking for are scheduled to be implemented in future game examples or in the forth coming update with the rogue-like example. I'm also trying to wrap my head around blueprints in general, I come from a unity background that included a lot of c# and javascript so translating some of that into UE4 has been a bigger challenge than I expected at first. This toolkit has been a huge help in grasping the engine itself. I look forward to working with this toolkit as it continues to evolve and expand!
Comment
-
@Bankworthy: Ok, cool! Can't wait to toy around with cover mechanics myself. As more layers are added to the AI's decision code they seem to become exponentially smarter
As for using the method used in the screenshot above for displaying cover values it will require some adjustments. Showing six or eight text renders on every tile quickly slows the game down, so it is currently better as a debug feature. If you have a limited number of values to display you can use instanced static meshes instead, which would make this less of an issue. Another possibility is to only display the numbers on tiles that are currently un move range.
@MicahM: Don't mention it! I think it is great that people can use my toolkit to learn their way around blueprints. When I started making the toolkit I had basically no knowledge of programming or scripting at all and within eight months it was released on the marketplace. Blueprints turned out to be the perfect development tool for how my mind works, and I'm still baffled that I was able to make something that so many people use to learn UE4 and create gamesGood luck in your UE4 endeavors!
Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Hi Jopel. I have indeed thought about it, and it is actually included in the 2D game example in the update that should be up any time now. This includes healing potions, weapons and armor. It will require a bit of modification to implement in the regular toolkit, however, as the movement system for the 2D units is a bit different.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Hello Ariegos. Sorry for the late reply. I do not usually use instanced static meshes for displaying the path myself, so this seems to heave slipped past my bug testing. The fix is very quick, though. Modify the Display Path as Instanced Meshes function in BP_GridManager as follows (changes are highlighted):
Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
I am trying to set up a teleporting tile in my game.
For one of my maps, I want there to be buildings of different heights but I dont want the player to be able to walk ontop any.
So iv set grid manager height map to tracing and impassable to 0.
I have set up some children of tile parent with collision events on them.
When a unit hits one theres a small delay and the unit teleports to the appropriate tile.
However once hes on there I cant select him or move him around.
Help?
Sorry the BP screenshot is abit messy.
It basically checks if the unit is player, if the tile is the selected unit to move to, then sets units new index, teleports, sets new pawn array elem and clears markers
It quite possibly could be the height settings in the grid manager so how would I change that to work for how I want but so the units cant normally go higher without use of the teleport?Last edited by LDodds; 02-02-2016, 09:19 AM.
Comment
-
Hello Monokkel,
It's been a long time since I've looked at this project and it looks like you've made many improvements. There are a couple of things that I would really like to be able to do with this. It looks like you're already working on the different heights. Another thing I'd be interested in is the ability to dynamically generate a tile grid for a particular map. For instance, what would be required to integrate this system into something like Dungeon Architect to create real time generated tile based dungeons?
Thanks
Jake
Comment
Comment