Thanks , I’ll take a look at those suggestions. In the planned features for the toolkit in the future, will they be combine-able? I noticed you said on the front page of this thread that the features would be contained in separate game examples. I understand totally why you’d want to make them discreet examples, but it would be nice to mix and match. Thanks again!
@ - I did find a feature that I think would be helpful. The setting for the game mode is embedded way down in the Gird Manager. Could you make it an option you can change in the Details panel or perhaps have it run from current game mode? I have found in trying a bunch of things I really need to be using the Game Mode for certain functions. However I do not want to mess with the base game mode so the best option is to create a child game mode and use that.
I’ve actually changed my mind on how I want to add additional features. I think the negatives of containing features in separate example maps outweighs the positives and I’ll probably be including most additional features in the base toolkit in the future. This will make it easier for users to mix and match features and will also make it easier for me to keep everything up to date as I keep updating the toolkit.
Hi Anzak. Could you tell me exactly where in the Grid Manager the game mode is referenced? I’ve tried to keep the game mode out of the grid manager as far as I’ve been able, but I’ve probably missed a spot.
, I have been having a lot of trouble passing data between objects. What I have found from doing the Endless Runner Level tutorial is that the GameMode is a key part of passing data between certain objects. To that point there are a number of things that I want to put in the game mode and potentially the Grid Manager. My thinking is rather than use them directly I create children and inherit all your work then I have a clean slate if you will to work from. This way my work and yours do not get mixed up. If I need to change something you have done I can overload it. Right now I am having a problem getting a Ref to the Child Grid Manager into the child game mode where I can grab vars to be used in a macro by other objects. Long and short is that to change the GameMode to the child I need to change it at the project level like normal however the Grid Manager also has a variable for the Game Mode but you need to open the Grid Manager and look under Misc to find it. It would be nice if that was something that could be changed in the details panel when working in the view port. Again just a suggestion I am sure you know way more than me about how everything communicates and it might not even be an option.
Ok, I’ve taken a closer look. Seems there is a good reason why I was confused as to where in the Grid Manager there are references to ATBTT_GameMode. I have already removed all such references in the update I am working on, so this should no longer be a problem come next update. In the version currently on the marketplace ATBTT_GameMode is only referenced twice in BP_GridManager. The first is in the Reachable Index Closest to Target function and the other is in the beginning of the construction script to simply set up a reference to the game mode.
@ - I think I found the problem I was having since you already have a Ref to certain things in the parent the child can not make a ref to the same object. However now I am having an issue with creating walls. I have an area tile that is 4x4 This is my standard tile that will become visible (D&D Board Game Style) Because of the limitations of the how the Grid Manager Calculates the walkable area I build a preset of basic tiles that I put down over the entire grid. So I have a simple activation call on my tile that makes it visible or not. I also put a large Block over the tile to block movement into hidden tiles. I destroy the block when I make a tile visible. However even with the Height Impassible cut off set to 10 and the block being 100 units tall I still get an effect where while the decals do not show up the Pawn will run up on top of the blocks outside the area and if I click the bottom row I moved one row past the bottom. I am guessing this is because the camera angle make the click happen on the higher invisible surface. Any thoughts on How I can limit the walk able area to only the tiles I have made visible?
Nevermind I got it working I had AutoHeight turned off. Which is odd because I was sure I had it turned on. However I did notice that the attack area can go off the area that is walkable. Not a huge deal since that will not be visible to the player but if they click just off the edge it will register as an attack. That will be something I can work on when I get to building the attack system.
@ - I know I had an issue with this before but I thought it was pretty simple to fix. However in the current version I can not get the player to do overlaps with a trigger box. This is a pretty basic feature and a nice event to be able to tell when a character is at a certain location quickly. I just want to generate an on overlap event so I can call some functions. However when ever I enable any type of overlap on the pawn it stops working. I want it to be treated as a pawn and overlap world static and world Dynamic.
Does anyone have any idea which blueprint to cast to when trying to display information on the HUD in the toolkit? I see two different locations that appear to hold HUD information, the HUD_Faction_Turn and the ATBTT_GameMode in the Toolkit. I’m looking to send information to the HUD to relay how much experience a character has gained in battle to the player, and how much is yet left until the next level.
A second, and not entirely unrelated question is when implementing my RPG-like level up system, is the best way to accomplish this through messing around with the pawn blueprints, I.E. the Player Unit Ranged and Melee classes, or is there another method recommended? Basically, I don’t want the XP of one unit of that class affecting the xp of another unit in that class and I would like to ensure that fiddling with those two blueprints doesn’t screw that up. Thanks!
OK found it after playing with the collision settings for far too long. I had to set Collision Enabled to Physics Only. It seems Query Collision break the movement.
@Anzak: Hi, sorry for taking so long to respond. I’m taking a course in Boston and so I’ve been pretty busy. It seems like you have solved a lot of your problems yourself, though I apologize for not being here to make the process less frustrating.
I’m a little confused on your method for revealing tiles, though. The way the toolkit works is that it generates walkability and heightmaps at startup, and after that it can only be modified directly through the edge array. If an area of the map is not walkable at the beginning of the game because you have added a tall collision volume blocking PathTrace at this location it should not become walkable later if you remove this collision volume, as the edge array is still the same.
I’m not sure I understand how your solution is currently working. I would recommend printing values from the edge array at various indexes you know to have tiles that are revealed, tiles that are not yet revealed and indexes of walls to see what is going on under the hood. As for tiles in range showing up in unwalkable areas of the map I would look at my solution in the 25th post of the 13th page of this thread.
There will be a new function in the next update called Spawn Tile, which will allow you to easily spawn tiles and add their edge costs to the edge array appropriately at runtime. This is another method you might consider for adding dungeon rooms at runtime.
@MicahM: All information about the HUD is stored in HUD_Faction_Turn. Look at the event graph here to see how it works. ATBTT_GameMode simply calls a custom event in this event graph to modify the current displayed text. You could certainly do something similar with XP, adding inputs to a new custom events for XP-gained and XP to next level (which you would probably want to get from your current unit) and changing the value of a displayed string to these values.
You should be able to store XP in the unit blueprints just like I currently store health. Health is modified at runtime in the individual unit without affecting other units of the same class, and XP would be much the same. If XP is something you want all units to have you can add it to Unit_Parent. If it is not then it’s better to modify one of the other unit blueprints and either duplicate this unit to make others or having this be the parent blueprint for any further units with XP you add.
@: Hopefully your course is going well. Yes I have been fumbling through things slowly. It is very much a learning process. The whole edge array thing seems odd to me. However I am running into exactly what you are saying. I can spawn the tiles correctly now however they are not walkable when they are spawned. Does this work in the reverse direction? If trigger a wall to spawn do I have to redo the edge array as well?
@Anzak: Even though the default for an empty tiles edge cost is set to 1 in all directions, it is not automatically included in the EdgeArray when added to the grid during runtime. You will more than likely need to add the new ‘spawned’ tile index and it’s edge costs to the EdgeArray. Anytime you make an update to a tile (add or remove a wall, etc) you will have to update the EdgeArray as it directly effects the Grid Managers ‘Can Move to Array’, which is created with the Pathfinding function.
Edit: As a quick pass for creating a little function that did it for you, it could look something like this;
This will accept your new or current tile that you are attempting to add to the EdgeArray and then include it’s Edge Cost and Index of that tile if it is a valid Tile_Parent (or child).
@: I am not sure this will solve my problem. I am not using child tiles. My “Tiles” are 4x4 squares that when I generate I place a blank tile down with a block to stop movement. I then remove the block and make the center one visible. This gives me a 4x4 area that is usable. I have a trigger box on each edge that removes the block box and makes the “tile” on that edge visible. So my “tiles” do not have an edge area because I was using the ray trace to figure out what is walkable or not. I guess I was expecting the grid to be dynamic as things change in the game.
@: Ok follow up question since I am still waking up my brain is not fully in gear yet. What you are saying is my 4x4 let’s call it a platform needs to be a child of the tile. So the question is if I keep my platform 4x4 will it still count it as 4x4 or will it just be a large tile?
@Anzak: I thought you where creating and removing tiles during run time for the grid as the player moves through it. Guess I am a bit confused now as well lol. When you say you are making a 4x4 ‘Platform’ is it placed in game as an addition to the current grid and have 4 tiles in a block, or are you attempting to make a ‘fog of war’ type of thing that has a collision box so that the tiles are invisible (and unwalkable) until the unit crosses a certain point? Kind of hard to figure out what you are doing without an example at this point
In either case, you will need to update the EdgeArray so that when you Activate movement on the Unit/Pawn it can know which Tile Index’s are available to walk on. But some screenies or a quick drawing of what you intention is would help a lot
Ok, I think I’m a bit clearer on what you are trying to do now. In your case I think I would actually refrain from running the Add Viewport Terrain to Arrays function at startup (which is normally run on event begin play in BP_Grid_Manager). This function adds tile edges to the edge array and uses traces to automatically generate edge costs if this is checked. Instead I would run the part of this function that generates edge costs using traces whenever you spawnnew rooms, making sure to only check tthe relevant indexes where you spawn terrain. I’d send you blueprint examples, but I don’t have my computer until I’m back from Harvard next week. I’ll assist from here whenever I find the time if you’re having problems with implementation. I would recommend you watch my fifth tutorial video if you have not done so already. Especially thepart where I go through the Add View Terrain to Arrays function.
Thank you guys. When I get out of meetings I will fully process what is said here and see if I can apply it. I will keep you posted.
@: I am working on building something like the D&D Board Game sets where you have a 4x4 area and as you explore an open edge it opens the next 4x4 area. So yes fog of war. I started with a simple function that would have a single area and them spawn them when you hit a trigger box. This did not work because of the walk plane not being generated. So I created all the areas and then block off all of them other than the center so the walk plane is generated and you see the results.
@: One more thing for you. I was having some issues around the lack of a 2D array. What I did is I created a Macro that lets me use a 1D array as a 2D array. The Blueprint is a bit messy but I am more than happy to share what I did if it is something you are interested in.
Many of the arrays in the toolkit are essentially faked 2d-arrays, but I assume you’re aware of this. Are you suggesting a macro for converting two 2d-indexes into a 1d index? Something like taking (X Index MOD GridSizeX + Y Index / GridSizeX)? I will actually be including a function for this in the next update. Or are you thinking of something else?