I have both, and same deal. Occasionally my child blueprints will lose data themselves, but it’s rare. Level actors lose their non default values multiple times a day.
Ok, I see. You could try to build around it and use unique classes for your different units (like the toolkit having separate child blueprints for enemy and friendly units with the only difference being the faction and allied factions). Though depending on what you are doing this might of course be too impractical.
My units have their own specific inventories that need to be set on a level actor basis, so that’s off the table. Fortunately I’m far enough in that I can just switch over to working on art until this stops being a problem, but I really hope they fix this soon.
Ok, I see. I’ve sent a bug report about this to Epic before, but you could also consider doing the same if you have not already. I’m impressed by your previous artwork on your site, so I’m looking forward to seeing your TBS game in motion.
There’s already a bunch of answerhub threads on both variations, and a handful of posts in each engine announcement thread.
There’s that too, which I guess they’re aiming to fix for 4.16. We’ll see. vOv
I’ll be sure to post here when I’ve got something presentable.
Crossing my fingers for 4.16 as well, then. I’ve voten on the issue, at least. Seems like one guy in the thread managed to avoid the problem by setting all values in the parent blueprint to none (I’m guessing 0 could work for numeric variables?). You could check if this workaround works.
In other news I’m continuing to work on the update. As usual I keep creating more work for myself. After getting the new AI working I couldn’t help myself but tweak it for ages to make it more performant, but I think it is at the point where the skills are good enough for release. I still have a few more thins to add in the VR department and a lot of commenting before I’ll send it to Epic, though.
To give an impression of the amount of work put into the new update, here is a screenshot of the event graph of the Laser skill. One of six skills included in the coming update. Each skill contains a section for use by the player and one for use by the AI. The AI checks through every skill it has at its disposition to select the one that best suits its current situation, chooses the target it considers the best and moves to the best tile to use the skill from (based on cover, distance etc.). I’m looking forward to finally getting this stuff to you guys:
This is great work you are putting into this toolkit. I have small question: is it possible and if not, is it hard to change toolkit to be able to place few units on the same tile? I have map where one tile represent bigger part of terrain and I need to be able to place more units on one tile. Is toolkint flexible enough or it will require massive changes?
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.
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?
I’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.
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.
Thank you! That’s pretty much exactly what I’m trying to do. I’ll make some changes and try it out.
Yeah, that’s what I’ve been using. I’ve just had a few problems when trying to use it while starting with an empty grid. I guess the grid manager is looking for units on BeginPlay before they’re even being spawned and it’s causing some errors.
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!
@AdventPalace: 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.
@cbdeakin: 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.
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.
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.
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?
That worked, Now I just need to make sure my units are slightly higher than the ground, as they are clipping into it now.
I’m having a new problem with the fog of war. I added the fog of war to my map and there seems to be two problems, the first is that it doesn’t seem to be covering my entire map, and I have suspicions that it must have something to do with it being a hex map.
The second problem is that I added the reveal visible tiles event to the unit’s begin play, however it doesn’t seem to be working. I copied it down from a separate project (though I may have made a mistake.)
Here’s a picture of the fog on the grid:
Here’s my reveal visible tiles nodes:
Sounds great! looking forward to it!
EDIT: Well, I found the second glitch where the visible tiles were not clearing. I didn’t split a struct pin and had all the cords attached to the array element instead of the array element index. I still however don’t know why the fog doesn’t cover the entire grid.
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.
Sounds great! looking forward to it!
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.