Hi tutkarz, that depends a lot on what you are aiming for. Is it something like in Civilization, where one unit of troops still pretty much functions like a unit in my toolkit only that it has multiple skeletal meshes, then no, that is quite easy. If you want something else, where two different units can move onto the same tile and you want to be able to selectively select one of these units while they are on the same tile, you would need to rework several core systems.
Announcement
Collapse
No announcement yet.
[SUPPORT] Advanced Turn Based Tile Toolkit
Collapse
X
-
Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
-
Originally posted by AdventPalace View PostHi everyone,
First off, I want to say thank you Monokkel for putting this toolkit on the marketplace. I'm new to UE4 and I downloaded this toolkit a few days ago and I've been messing around with a lot of the features and I think it'll be a perfect start for what I'm trying to do.
But one thing I can't seem to figure out is how would I go about starting with an empty grid and spawning units during play? Basically, I'm trying to make something like Disgaea (for reference, https://youtu.be/SbvUseGdhVY?t=1m35s), where both players each start with a spawner and can pull units from it as the game goes on.
I think my post might have been missed due to being held up in moderation. I've been playing with a few delays on the setups to let the units spawn on BeginPlay before it looks for the units on the grid and that seems to work with a few problems, but I'm not sure it'd work once I get spawners set up. With your experience, do you know if there'd be a simple way to accommodate them, or would it require a major rework on the toolkit?
Thanks
Comment
-
Originally posted by AdventPalace View PostHi again,
I think my post might have been missed due to being held up in moderation. I've been playing with a few delays on the setups to let the units spawn on BeginPlay before it looks for the units on the grid and that seems to work with a few problems, but I'm not sure it'd work once I get spawners set up. With your experience, do you know if there'd be a simple way to accommodate them, or would it require a major rework on the toolkit?
Thanks
If that's what you want to do, you could pull it off by doing what I did, and then creating an array for your spawner(s) within the grid manager, and having it add your spawner to that array at startup (like it does with pawns). Then add the functionality within the player controller to call a menu that lists your available units when you click the spawner, then when you select one add it to the pawn array at the spawner location.
Comment
-
Originally posted by AdventPalace View PostHi again,
I think my post might have been missed due to being held up in moderation. I've been playing with a few delays on the setups to let the units spawn on BeginPlay before it looks for the units on the grid and that seems to work with a few problems, but I'm not sure it'd work once I get spawners set up. With your experience, do you know if there'd be a simple way to accommodate them, or would it require a major rework on the toolkit?
Thanks
as long as you use the Spawn Unit function in BP_GridManager, spawning units during gameplay should not be a problem. What this function does is spawn a Unit actor and add it to the Pawn Array and Initiative Order array.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Selentic View PostI'm not at my work pc right now so I can't take any pics for you, but I did something similar in my project. Basically, I added a boolean variable to units that marked them as a spawner entity, and modified the grid manager function that adds pawns to the pawn array to ignore those units effectively hiding them from the game. It's been a while since I played disgaea, so I don't remember exactly how it works, but iirc you click your spawner and you get a menu of your units, and you can pick one to spawn.
If that's what you want to do, you could pull it off by doing what I did, and then creating an array for your spawner(s) within the grid manager, and having it add your spawner to that array at startup (like it does with pawns). Then add the functionality within the player controller to call a menu that lists your available units when you click the spawner, then when you select one add it to the pawn array at the spawner location.
Originally posted by Monokkel View PostHello AdventPalace,
as long as you use the Spawn Unit function in BP_GridManager, spawning units during gameplay should not be a problem. What this function does is spawn a Unit actor and add it to the Pawn Array and Initiative Order array.
Comment
-
Hi Monokkel,
This looks very sophisticated and awesome! Would it be possible to show us some high detail screenshots of the 'Activate Skill' and 'Player' parts of one the skill Blueprints you are working on? Will players be able to choose between several skills from a UI menu like in XCOM? How will each skill interact with the 'Unit' blueprints? I'm really looking forward to getting this working!
Comment
-
[MENTION=652821]AdventPalace[/MENTION]: Ok, it seems I misunderstood you then. Thankfully Selentic understood perfectly and gave a great solution. Having thought it through I really think this is a great way to make a unit spawner, so I would go with Selentic's method.
[MENTION=61633]cbdeakin[/MENTION]: I'm glad you like the toolkit! I'm modeling the skill system in this game example after XCOM, so you can indeed choose between several skills from an UI menu. The UI is pretty basic, but functional. This is how it looks:
I'm not sure if taking screenshots of parts of the skill blueprints will make much sense in a vacuum. They are all dependent on a lot of parented functions and interactions with the HUD and Grid Manager, so I would need to post a whole lot for it to make sense. If you have any specific questions about the skill blueprints I can answer them more easily.
The way the skills interact with the unit blueprints is that the units have an array of skill classes which decides what skills each unit has. At the start of the game each unit spawns a child actor of each skill class. On the start of a unit's turn the UI is updated based on the current unit's array of skills and each button in the HUD gets passed a reference to each of the skill blueprints. When a skill button is clicked, the activate skill event is called in the skill, which sets it as the current unit's active skill, enables its tick and opens gates to enable mouse hover and mouse click events.
The AI works differently and has a separate decision tree for each skill. At the start of an AI controlled unit's turn it cycles through all of its available skills and runs The AI Check Value event, where it considers all possible targets for its skill and assigns a value depending on the likely outcome. Then it chooses the skill with the best predicted outcome and executes it. Work on AI has been by far the most time consuming part of work on this update, but I feel a skill system would be half baked if the AI units could not also utilize it well.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Hi Monokkel,
I just found a bit of a glitch, or maybe I just missed a step, but when I added empty tiles to the basic toolkit and turned off collision plane walkable, the range trace meshes, and path line didn't show up. I think they are hidden below the new tiles? I can walk around, I just can't see where I can walk to.
Here's a screenshot of the gameplay.
Comment
-
Huh, odd. It seems like the Static Mesh of Tile_Hex_Empty was set to 0.5 unreal units above its CustomGridAnchor, meaning it occludes the marker meshes. Set it to 0 and it should be fine. I've now fixed it for the in-progress version for the next update. Thanks!
I've now come far enough with the update, that I'm pretty confident I will be able to release it around the same time as UE4.15 is out, by the way.Last edited by Monokkel; 01-28-2017, 06:47 AM.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Hi Monokkel,
Thanks for your helpful reply. I'm pleased to see how much progress you've made with the UI and skills. I'm sure I'll be able to learn a lot from the AI trees you are making as well. Is there anyway we can try out the additions you've made to skills and the UI in our own projects, before the next version is officially released?
Comment
-
Originally posted by Monokkel View PostHuh, odd. It seems like the Static Mesh of Tile_Hex_Empty was set to 0.5 unreal units above its CustomGridAnchor, meaning it occludes the marker meshes. Set it to 0 and it should be fine. I've now fixed it for the in-progress version for the next update. Thanks!
EDIT: I had some glitches with the fog of war, but they sorted themselves out after I found a discrepancy in my reveal visible tiles function.
Here's a sneak peak of the world map.
Originally posted by Monokkel View PostI've now come far enough with the update, that I'm pretty confident I will be able to release it around the same time as UE4.15 is out, by the way.Last edited by Mewbits; 01-30-2017, 08:11 PM.
Comment
-
Hi Knut,
So I have a working bubble shield (protects allies) that I can currently only place on the ground or on an enemy. However, I want to only be able to place it on empty tiles (already working) and Friendly units, while NOT being able to place it on enemies.
Currently, I added two new booleans: CanTargetFriendlies and CanNotTargetEnemies. With the first boolean I placed a CanTargetFriendlies branch after clicking a tile of a unit in the player's faction or allied faction. On true it goes straight to the first node in the, "Attack clicked target if within reach, or move towards it if it is not," comment box. However, right off the bat, something is wrong. It seems that the cost of the move, and the path-finding are not set, since it either uses the previous path-finding results or sends the unit to grid index 0, but the movement cost prints as 0. I have implemented the CanNotTargetEnemies bool, by placing a branch right after it checks the faction (working as intended).
This would be a very helpful feature for including friendly abilities, like shields and healing abilities.
Thank you,
Mewbits
Comment
-
After playing for some time with this great toolkit I have small problem with making roads.
I was thinking to make default tile cost 2 to be able to place tile_cost_1 as roads but now I have to place all tiles as tile_cost_2 and then tile_cost_1 as roads because they need separate mesh. Is there better way to do this? Or where can I look to change default tile cost from 1 to 2?
Second and more complicated thing would be to have separate cost to enter tile, based on vehicle type. For example truck should not be able to enter forest (without road) and boat should not be able to enter land. And plane should always have tile cost 1. I think It would require much more work, is there any chance it will be added to toolkit any time soon?
Another small tip/request would be to change Can_attack_with_0_move to "Attack cost" instead because some units should be able to attack few times in one turn or be able to move after attack. And maybe separate option for "attack ends turn" for that unit.
I would try to add all this to the toolkit somehow but I'm afraid how I will update it to new version without losing any changes.
Thanx and keep up great work!
Comment
-
Lots of stuff to reply toSorry for the late reply. I worked all of yesterday preparing a lecture for work.
Originally posted by cbdeakin View PostHi Monokkel,
Thanks for your helpful reply. I'm pleased to see how much progress you've made with the UI and skills. I'm sure I'll be able to learn a lot from the AI trees you are making as well. Is there anyway we can try out the additions you've made to skills and the UI in our own projects, before the next version is officially released?
Originally posted by Mewbits View PostThat worked!
EDIT: I had some glitches with the fog of war, but they sorted themselves out after I found a discrepancy in my reveal visible tiles function.
Here's a sneak peak of the world map.
[ATTACH=CONFIG]127358[/ATTACH]
Originally posted by Mewbits View PostHi Knut,
So I have a working bubble shield (protects allies) that I can currently only place on the ground or on an enemy. However, I want to only be able to place it on empty tiles (already working) and Friendly units, while NOT being able to place it on enemies.
Currently, I added two new booleans: CanTargetFriendlies and CanNotTargetEnemies. With the first boolean I placed a CanTargetFriendlies branch after clicking a tile of a unit in the player's faction or allied faction. On true it goes straight to the first node in the, "Attack clicked target if within reach, or move towards it if it is not," comment box. However, right off the bat, something is wrong. It seems that the cost of the move, and the path-finding are not set, since it either uses the previous path-finding results or sends the unit to grid index 0, but the movement cost prints as 0. I have implemented the CanNotTargetEnemies bool, by placing a branch right after it checks the faction (working as intended).
This would be a very helpful feature for including friendly abilities, like shields and healing abilities.
Thank you,
Mewbits
Originally posted by tutkarz View PostAfter playing for some time with this great toolkit I have small problem with making roads.
I was thinking to make default tile cost 2 to be able to place tile_cost_1 as roads but now I have to place all tiles as tile_cost_2 and then tile_cost_1 as roads because they need separate mesh. Is there better way to do this? Or where can I look to change default tile cost from 1 to 2?
Second and more complicated thing would be to have separate cost to enter tile, based on vehicle type. For example truck should not be able to enter forest (without road) and boat should not be able to enter land. And plane should always have tile cost 1. I think It would require much more work, is there any chance it will be added to toolkit any time soon?
Another small tip/request would be to change Can_attack_with_0_move to "Attack cost" instead because some units should be able to attack few times in one turn or be able to move after attack. And maybe separate option for "attack ends turn" for that unit.
I would try to add all this to the toolkit somehow but I'm afraid how I will update it to new version without losing any changes.
Thanx and keep up great work!
Separate pathfinding for different sorts of units can be done in a few different ways, and the best implementation depends on the desired results. For units ignoring movement cost (such as your plane), there is such a pathfinding type implemented by default which you can select in the pathfinding type public variable of unit_parent. For the differing pathfinding of trucks and boats the easiest way to do this would be to add another such custom pathfinding (expanding the pathfinding type enum as necessary). This can be done by modifying the use custom pathfinding macro inside the pathfinding function in BP_GridManager. During the search step of a unit with pathfinding set to, say, truck, after checking if a tile has not already been added to the CanMoveTo array you would check if that tile was a forest, and if it did you would not add this tile index to the Open List or CanMoveTo array. You would create a similar branch to the custom search step for boat units to check if the considered tile was an ocean tile. To do this efficiently you would want to create an array where you can easily look up what terrain is contained in each tile. I would use an array of enums the size of the grid (GridSizeX*GridSizeY), with the enums designating terrain type. For terrain tiles I would create a new actor based on Tile_Parent with an enum variable designating its terrain type. On Event Begin Play, after resizing your new terrain enum array in BP_GridManager to the size of your grid I would loop through all actors of your new custom tile type and set the array elements of your enum array to the value contained in your custom tile blueprints at the grid indexes corresponding to the tile actors' index variable values. Hope that makes sense.
As for the attack cost stuff, this is something I am slowly implementing, and the example game in the coming update will have something much closer to an action point system (though it is not fully realized yet).Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Monokkel View PostHmm, I need more info to understand what is wrong here. How are you detecting what tile has been clicked and if it is a friendly unit? Are you using the default On Click nodes in ATBTT_Player_Controller or are you doing something else? Pathfinding should always run at the beginning of a unit's activation, before input is enabled. Have you made any changes to the Activate Unit part of the player controller that could affect this?
On true it goes into the nodes for when you click an enemy.
When clicking an allied unit with this ability, it successfully places a shield around the allied unit, but the unit that places it, either follows the wrong path-finding or will teleport to index 0. Sometimes it seems to work correctly. I should also mention this seems to only happen when show all possible visible tiles is set to True. I also noticed it will use the path from the last time it displayed a path while hovering.
I will send you a video.Last edited by Mewbits; 01-31-2017, 04:48 PM.
Comment
Comment