[SUPPORT] Advanced Turn Based Tile Toolkit

So I opened up a fresh project, packaged it directly to Win64 and tried to host a game and my friend couldn’t find my server. Any advice? I opened up the ports 27015,1500,7777-7778 and disabled my firewall just in case.

Hey Vonstaad, there are a few different ways you can do this. I’ll need you to specify a couple of things before I can give you a suggested solution. Is the door opening purely cosmetic or do you want it to affect patfinding until a unit has moved up to it? If it does not affect pathfinding and you target a tile behind the door, are you okay with the unit moving at a constant speed and the door opening/closing as it moves through it, or do you want the unit to stop, wait for the door to open (and perhaps have the unit play an “open door” animation?), and then move through? Make the description as specific as possible so I can can help you.

Are you trying to play over Steam? If so, you have to add the Steam Online Subsystem (steps can be found here). Then, make sure the startup map is the multiplayer menu in Maps/MP. Lastly a quirk of the Steam test server is that all clients need to be on the same download region in steam settings to be able to find one another. Try these steps and come back to me. I’m in a bit of an awkward position when it comes to multiplayer for another month or so (only one laptop and a terrible Airbnb WiFi), but those steps did at least work last time I was able to check.

The goal is to have the door open (with anim) when the player unit lands on the tile in front of the door- the unit can stop or continue movement into the new room, if they choose. So far, the “front” of the door keeps referencing the world (i.e., GetNorthSquare references grid north instead of door north). It would be nice to plop the BP down and know which direction it can open from. I do not want it to open via the diagonal tiles. I don’t mind referencing both front and rear tiles (in relation to the door), as I already have a function in place to differentiate the player and enemy units, and the player may come in from the other side of the door as well.

Thank you in advance.

So this question is giving me a bit of déjà vu to a similar one that I got pretty recently. But that was resolved with the old version, I believe, so this gives me an opportunity to solve it with the new one.

I’ve fist created a child of the north wall actor. I’ve recolored it, shrunk it a bit and added a pivot for rotation:


Then I added the action interface to this actor to allow it to animate actions on its own in the action queue.

Then I added the following to its event graph:


So at the start of the game I bind the AttemptOpen event to the event dispatcher that is called every time a unit ends its move on a tile. When the AttemptOpen event is called I check that the unit that has ended movement has ended movement on the same tile as the tile occupied by the door. If it does, then I unbind, add edges to the north (through the door) and add an open door animation to the action queue.

On the event animate action I’m a bit lazy and don’t bother adding a switch to check if we are trying to launch the Open animation, since this actor only has one animation anyway. I’ve added a timeline with a float track that goes from 0 to 1 in one second and use this as input for the rotation of the door pivot. The result is the following:

https://thumbs.gfycat.com/PowerfulBasicAfricanelephant-max-1mb.gif

Hope that gives you a good starting point.

Note that this solution works pretty well for most games. However, if you have a map with hundreds of interactable objects on different tiles, all of them being checked every time a unit ends on any tile it is not very efficient. I have added a new system for object interaction in my internal build and all the needed components for it are actually already in the live build, just not very streamlined. If you are going to have lots and lots of doors and interactable objects in you game, let me know, and I will tell you how to set it up.

  1. Tremendous “Thanks” for all you do to support this forum- the toolkit is awesome.
  2. How in Hades did you add a Pivot to the door mesh? I have literally spent hours searching how to add a pivot to the mesh, in order to reference in the anim but did not find how to do it.

I don’t own a mesh editor FYI.

Again, thank you in advance.

Happy to help! The pivot is just a renamed scene component. Sorry for not being more clear and saving you a few hours… For meshes placed in the level the pivot can be moved by ALT+middle mouse, but that does not seem to work inside the blueprint editor, so I improvised. There might exists better solutions, but I was working quickly and this does the job.

Oh my word! So simple a solution. Thank you again. Keep up the great work, and I’m sure I won’t be a stranger to this forum.

Happy to hear that!

No steam. Just packaged it as it came no changes made and tried to connect via IP and no server results.

Hello,
First time user of UR4 and this toolkit. I really like your tutorials and how the kit is set up, but I have an issue with how your damage system works. I been changing values to the damage on the units, but for some odd reason, it will always do a fixed amount. Was not sure until I dove into the BP_Unit and BP_Ability_MoveAttack. The damage variable in the BP_Ability_MoveAttack is set to default 35 and noticed that it never changes. I am a total beginner using these blueprint, but I tried to follow the “Attack Path” in the blueprints, but I do not understand why that damage variable is there. If you or anyone on this forum could explain that to me, that would be great!

Hmm, that is odd. When you use the same steps on a blank project without ATBTT do you get the same issues?

That is a mistake on my end. I have set up abilities so they can be specified as either using the variables defined in the ability or the unit using the ability by default. For BP_Ability_MoveAttack this should be set to use the units’ attributes, but I have apparently set it wrong. To fix this, go to BP_Ability_MoveAttack and set the default value of bUseUnitAttributes (I think that is the name I used) to true. I’ll fix this in the next hotfix.

Hey man!

Now I’ve checked the Player Controller, the Grid Camera, the Game Mode, the Turn Manager and the Action Manager. As far as I can tell the initializing of those are done via the following:

Player Controller - Event Begin Play
Grid Camera - Called from Player Controller Event Begin Play
Game Mode - Event Begin Play and OnPostLogin

Just wanted to know if there is any of these I have missed somewhere or if this looks right to you? I’m coming in on a solution on the whole LobbyGM->GamemodeGM switch via Server Travel but there are a few kinks left to sort out, specially when this is done through Steam. I will update this if I find the solution so you or someone else can solve it like I have, or maybe in a better way if possible :slight_smile:

Cheers man!

Uhhhm… good question… when it comes to actual coding and multiplayer I have absolutly no idea how that works. I know how to setup a server generally but only on shipped games. :s

How would i go about adding a healer can can replenish friendly units’ health. How would i add that to the AI

Hello everyone, and @ Thank you for your email, so I’ve been asking around for help and I understand what specifically I need from you.
So I was sent this As for game mode and most state I guess the turn based one will be more relevant as it has the turn and grid/hex movement logic. the CCG toolkit - all you need out of it is interface and widgets (user interface). Making a game like in first video would take 2-4 weeks, if you have all the art assets done. To quick sum up your questions 1. use majority of turn based kit, and jsut work with widgets on the second. 2. learn "drag and drop" for user interface. it can triger events and do basically anything. 3. you need an ability system that is editable and easy to understand. that can spawn stuff, deal damage, query collisions etc. i can say that ABLE is a good choice. 4. working with ui very much resembles working with HTML. it's pretty tough to learn fast for non-web developer. Hope that helps a little at least.

So if anyone else here has used the advance turned base toolkit and intergrated it with CCGtoolkit let me know, or if anyone know’s where in the turned base tool kit I would need to go to do this please do not hesitate to answer I’ll take any help I currently can get.

#1 I need to integrate both kits first.
#2 I need to make it so when I pick a card it turns my mouse into an action event like use spell and lights up targets spell can be used on, on the board.
#3 I need to make it so when I pick a card if be monster I can summon it to the field. I want to click on the card then click on the field.
#4 I need to understand how to change the UI.

Hello again, just a quick question :slight_smile:

Do you know from where the BP_TurnManagers Initialize gets called? I’m still on my debugging quest for the ServerTravel issues and I found out this never gets called.

Cheers!

Hey all, sorry for the late reply. I have some serious deadline work at my dayjob. I’ll answer anything I can do quickly without testing stuff out in the engine. I’ll return as soon as I have the time to answer more in depth if needed.

Hmm, seems correct. There are some more that I wonder, though. Event Begin Play for the game mode should happen before any of this and should among other things initialize the grid manager and turn manager. Check if these things happen before the player controller’s event begin play.

Ah, ok. In that case it is difficult for me to know what parts of your issues might be caused by my toolkit and what parts are caused by something more basic. I would recommend you try setting up a multiplayer game for a game without ATBTT first, using one of the many tutorials out there. If you succeed at that, but still have issues with ATBTT, let me know.

There is actually already such an ability included. Check out the ability BP_Ability_Heal in Maps/Advanced/Abilities.

Seems like something you should be able to get working with the ability system. If you look in the player controller of ATBTT you can see how abilities are normally activated. When the player hovers over or clicks a tile, the player controller checks if the current active unit is owned by the player owning the player controller receiving the input. If it does control the unit, it finds the active ability of that unit and sends inputs to that ability, which takes over the rest. In your case what you need to do is to instead of getting the ability reference from the unit, you would get it from whatever card was last activated.

In other words, the cards must hold a reference to a spawned instance of the ability they represent. When you click the card you would set this ability as the active ability somewhere. Possibly in a custom card manager. That is what I would start with. If you get that working, then clicking a card would work much the same as clicking an ability icon in the JungleRaid map. Essentially the cards you are using are very much like ability buttons in other games. The difference is mostly that the abilities are drawn randomly and discarded after use.

It is called in the SetupCoreBlueprints function in BP_ATBTT_State which itself is called after EventBeginPlay in the game mode. To find out where any variable, function or event is used, right click it and select “find references”. Then click the litle binoculars icon to search for it in all blueprints. I concede that I made a stupid naming choice in this case, since for initialize you’ll also find many unrelated events.

Do you have some kind of flow chart for how the core parts should initialize, like a timeline? It would help alot in the debugging, I could try to add delays to match it and see if I get good results then go from there. Also, I’ve located that printing a string right before BP_ATBTT_State calls Initialize on BP_TurnManager prints the string, but the string right after the Initialize ON the BP_TurnManager does not. I have no idea why the call on that funcion does not work, do you have ANY idea? I mean the SetupCoreBlueprints continues and activates the GridManager, it’s just that initalizing of the TurnManager that seems to fail…

Regarding the tip, thanks alot! Super helpful, as I stated earlier I’m very new to all of this :slight_smile:

Hey man!

Thanks for replying! I finally got around to checking out if bUseUnitAttributes is set to true and it has been set to true this whole time.

fig1.PNG

Looked around the blueprint and I do not see that variable used anywhere.

I tried tweaking this damage variable to set to the unit’s damage

The health bar did not change (I set it the health to 10), but after 5 attacks (set damage to 2), the system said “Player Faction won”. So I think damage is working on the back end, but the animation and the health bar is not correct. Again not sure if I implemented it correctly. Thank you again for taking a look into this!

Try checking in BP_Ability…same bool there, thats the one you need !