[SUPPORT] Advanced Turn Based Tile Toolkit

Easiest thing im sure, but I cant quite figure it out and it’s driving me crazy:

I copied the Sci_Fi project out into the root of my project and spent the hours renaming and reorganizing the references that were broken. I wanted skills ect in my game so I am using sci fi as a basis to start my project, but for now nothing was added. That was a long and tedious process (I wish there was easier way to migrate files unreal…), but is all done now without errors… persay.

With the Sci_Fi project, there is new ai controller, gamemode, player controller ect, and even though I think I copied everything correctly and reset the references correctly, my game still runs just like the base level toolkit. Where do I change everything to load the correct versions of the controller bps?

at runtime:

My desire is running the renamed grid manager should load all the sci_fi (renamed) bp.

Thanks for the guidance!

Seems like you are still using the old game mode. The game mode selects what player controller etc. to use. You can set the game mode in the world settings of your map.

I knew it had to be something simple. Learned something today. Thanks!

This is the last error I’ve run into trying to port everything from the toolkit to the root of my project.

I can’t seem to figure out what is causing it. The error pops up after clicking a tile for action, like using any skills or even just moving. The error makes it seem like the Hover Market Decal might not be set, but I am using the same decal the SciFi is, which is set to Decal_Blank. I’ve also tried Decal_HoverMarker and that did not fix the issue either.

Do you happen to have any ideas of why this error may be occuring?

The reason this error appears is that in the Add Mesh Components graph in BP_GridManager, decal components are only added if UseDecals is set to true. Since it is false in your case, there are no decal components at runtime and when you attempt to set the visibility of the decal during gameplay no decal is found, returning the error. This error will not cause any problems, but it is of course not ideal to have errors cluttering up the log. To prevent this I added the custom SetMarkerVisibility function in BP_GridManager, which includes a branch that prevents the nonexistent decal/mesh from being accessed. Try using that instead of the regular Set Visibility node. Or, if you are certain that you are not going to use decals for this purpose in your game, just set the visibility for the mesh and don’t bother doing it for the decal.

Even if I enable Decals, the error still occurs, only it now complains that the HoverMarker (static mesh) is the missing piece.

The error is triggered in the base ATBTT_PlayerController, so it is not something I changed. What/where would I be looking to change to prevent this error (log errors)? I would assume this is something in one of the children blueprints, not the base, right?

Hmm, seems like it is my mistake then. Odd as I have not seen the error myself. Try replacing the SetVisibility node shown in your screenshot with the SetMarkerVisibility function from BP_GridManager (get a reference to the grid manager in the player controller to do this).

So I changed the code as follows and the error is resolved.

I didn’t want to change the base code and only make my changes to children BP as base class changes I plan to leave to you in future updates, but making this change did resolve the logger errors. I’d consider this a bug report but I can’t create a repeatable test easily. All I did was migrate the Sci_Fi project over to root and renamed everything and then this popped up. Sorry I can’t be more help with recreating the error; it did take a long time migrating the files and resetting up references so it may be hard for you to recreate.

Ok, I found another task I want to implement.

I want to move movement to be like an ability. Movement is tied more into Grid manager then it is to the unit/skill however, yet with the introduction of sprint and abilities, I feel like it would be better suited to use movement as an ability and I am finding its a bit more in depth then just adding a new ability.

I think I have an idea how to accomplish this: with Spawn Movement Tiles in Grid Manager Sci_Fi, as I see there is an array (Index Can Move to Array) and select statement that decides whether to spawn yellow or blue tiles, but what I want is to make sprinting and movement two separate skills.

Do you have any pointers for me to accomplish this? Is automatic movement tied too deeply for me to just change in the _Sci_Fi child BP?

Goals:

Make movement not automatic - it’s a skill to use
Disable sprinting after movement - don’t automatically show yellow tiles, leave this to logic of clicking sprint as a second ability instead of choosing to attack or use another spell

Its been a few months since I purchased this toolkit but I am finally digging into making changes, so I appreciate the guidance as I learn both unreal and the nuances of the toolkit.

Hey Curiosichi, sorry for the late reply. I was very busy yesterday.

Not to worry, I’ve identified the problem and it is already fixed in the WIP update. It is caused by me using the regular Set Visibility node instead of my custom one in one instance in the player controller. It is in a part of the graph which is very rarely triggered in the unmodified toolkit, so I did not notice the error message during testing. Since the error is rare and has no effect on the game, I won’t send an update to Epic just to correct this one thing, but it will be fixed in the next update.

You can do a couple of small changes that will hopefully give you your desired result. Firstly in the Skill_move blueprint in the Activate Skill comment box set the Move Range and Max Move inputs to Pathfinding to be equal to Current Move instead of [Current Move * Current Action Points]. This will prevent the yellow “sprint” tiles from showing and just find the tiles within regular move range.

As for making movement not automatic, you want to change this in the Event Graph of ATBTT_PlayerController_SciFi in the Begin Unit Turn comment box. Here, on activation, the first skill in the unit’s skill array is activated at the beginning of a unit’s turn (which is the move skill for all the units in the example scene. Remove the CastToSkill and ActivateSkill nodes from here and skills will have to be manually activated by clicking the skill bar.

Hope that gives you your desired result!

You know, I figured out the changing the skill bit, but I over looked the PlayerController’s activation. I believe I thought the skill array was being loaded for the HUD, I don’t remember seeing it cast the skill, so I had moved past that class when I was digging myself.

Your help was spot on.

Just to close out the feature I am implementing and finish wrapping my brain around how skills work, I noticed that after you move using the modified move skill, you are able to cast move again, though this time it displays the yellow tiles. This leads me to believe that current move is not updated properly after the move is finished and pathfinding is still able to search for extended movement. I believe if current move were just updated to zero then extended range would not be allowed, but then the issue of allowing sprint as a second ability becomes broken if the fix is placed in the Pathfinding function.

Where would I put this type of logic, and where would I place logic to check if a skill should even be able to be cast: would that be placed in the activate skill for each skill or should I be stopping it somewhere higher in the chain?

edit: an idea, what if in the base Skill I added a function called “Can Be Cast” - returns true by default, then each skill has to override it with checks. Or is that basically supposed to be the responsibility of the Activate Skill function? Maybe its just the name throwing me off.

ideally on the check if current move is greater then zero, you might display a HUD error or something, but I feel like all abilities would have some kind of validation of if they can be cast, so it may be cleaner as a stand alone function check as stated above. This method breaks sprint though because of the current move being set to zero. I can fix that, but the point of this post is understanding fundamentally where/how things are laid out.

long time no see

https://imgtc.com/i/bagkmS5.jpg

really wip, still a lot left for me and my art buddy to do

@Curiosichi: In the example game where I have made the skills, current move is actually never reduced. It is purely action point based. This explains why you are still able to use the move skill after moving once. Movement takes one action point and you have two total. You can prevent your units from activating their skills by using a check like the one you suggest. I would add this check before Parent:ActivateSkill is run, though, since you do not want to activate the skill at all if the check returns false. Also, for the move skill you will need to make sure CurrentMove is actually reduced when you move somewhere. A good place to do this is in the DecideActionForClickedTile comment box in Skill_Move, after action points are reduced. If you do this, then I think it should work as you want it. Let me know if it does not.

@Selentic: Looks fantastic! Great to see that you’ve made such amazing progress. Cannot wait to play some cel-shaded warfare. Let me know if you make a progress blog or something, as I’d love to follow your progress :slight_smile:

Yup, aside from changing the check from owning unit to the incoming casting unit (since owning unit is set in the parent cal of the spell), everything is working as desired.

Your help has been tremendous and really sets me off to create new skills with excitement. Thank you thank you!

@Curiosichi: Glad it worked :slight_smile: I apologize if the organization of the skill system in the example game is a bit less intuitive than the base toolkit. The features in the example maps are a bit more experimental than the rest. One of the changes I’m working on is making the skill system a part of the base toolkit and in the process I’m organizing it in a way that is more straightforward. The general logic behind the skills is mostly the same, though, so you should be able to port over any skills you make quite easily if so desired when I complete the update.

:slight_smile:

Anything significant will end up on my artstation (or here in this thread), so you can follow me there if you want.

I might do a blog in the future, as there’s not a lot to talk about right now since all the really important game mechanics were finished months ago (make multi tile units tho plz). A lot of the work right now is just defining the style and keeping it consistent, while making sure we’ve got good visual clarity going. I’ll let you know if I end up making one though!

Ok, great I’ll check it out periodically, and feel free to post any significant progress in this thread :slight_smile:

Your talent as well as that of your art buddy is apparent from your ArtStation profiles, so I’m super excited to see the finished game. Best of luck!

Hi !

It’s been a long time since my last post and I see that project is really flying high now with built-in multiplayer support and multi-tile units.
BTW, regarding UE4 Framework multiplayer system, can you give some clues on how are you doing it?

Because, as far as I know, GameMode Blueprint should exist only in the server and my old version of ATBTT does a big rely upon GameMode Blueprint almost everywhere (PlayerController, Grid Manager… almost every blueprint gets GameMode and use it or its properties).

So, since I’m really curious about it, can you tell when you will release this new version? And also: coming from an old version will it be so much terrible to get this new multiplayer function to work without starting my project from scratch with the new release of the toolkit (with the number of custom content I put in it would be quite a nightmare to start again)?

In addition, are you using a “Listen Server” solution or “Dedicated Server” one?

Thanks in advance and thanks for your precious time investment in this great project.

Hi Wisdom-, long time no see! You are right that the way the game mode is used is a bit awkward for networked multiplayer. Same goes for the player controller. It is possible to get around most of that by using RPCs to the server etc., but it is not ideal. Because of this, much of what is handled in the game mode has been moved to a custom blueprint for managing turn order (BP_TurnManager) and the game state. As for the player controller, everything that happens after input is registered is done in skill blueprints. There is a default skill (BP_Skill_Default) that is used if the user does not want to use the skill system, which functions like the player controller did before.

It is hard to know how long it will take to finish the update. A rough estimate (which might be very inaccurate) is three months (taking delays due to summer vacation into account). It will be more difficult to convert to this update from previous updates than has been the case before. I’m going through all blueprints and I’m being quite merciless when it comes to making changes anywhere I feel things can be improved, simplified or clarified. I’m not keeping anything just for the sake of having it be similar to earlier versions. That being said, the general framework is still quite similar, and I hope most games should be able to port their additions over to the new version if they put in a few days of work.

Thanks for the ETA on the feature additions! Good luck with it and the code clean up. If it is possible, do try to document how one would upgrade from your current version to the new version to make the process as easy as possible for your current customers. Thanks!