Originally posted by Curiosichi
View Post
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
-
Few more ideas for ya:
So I had to add a Boolean on Spawn Unit() of Grid Manager, as right now it adds unit to the initiative by default. Adding the boolean allows you to avoid adding it by default.
Also, I added a "Load All Player Units" function call to Grid Manager, and call it from Game Manager right before the "Sort Pawns In Initiative Order()". The "Load all Players()" loads characters or creates based on a save slot, and Spawn Unit()s each unit.
Init Character () is a helper class I made to make setting all variables much much easier. It also sets up the unit references at the start.
And now, my game board has no player units places in the editor; they are all loaded dynamically. The Sort Pawn In Initiative Order() call right after Load All Player Units() then adds all the editor Pawns AND the dynamically created one to the Initiative order at this time. If the character had data in the save slot to load, than all the inputs are mapped to the Init Character() instead of the defaults or manually set variables (not shown in photo).
The next goal is to kinda figure out a better way to place them. By Index could work I figured out, but I need a helper class of some sort to figure out what index a particular square is IN EDITOR.
You got any ideas for that? Setting by location kinda works, that is just super lame as I have to create an object in editor to drag around and then copy the coordinates that way. Maybe there is a way to create an editor object that displays Index is possible?
Bonus question!
How are you saving Arrays of Arrays? Array of Pawns with an Array of Skills. If you are implementing multiplayer you are using gamestate I assume and that you require the use of that right? My guess is moving to an set of Boolean values for knowing a skill or not. Any other ideas?Last edited by Curiosichi; 07-03-2017, 09:49 PM.
Comment
-
Thanks for answering my questions earlier, just bought the toolkit. I'm trying to play around with using the grid in a map that is already compiled and I'm using the Simple Office demo level for this. I'm using a grid that is larger than the intended playing area and was planning on walling off the outside of the map with the invisible wall pieces. I'm finding that the pawns can't move when inside the level even though I don't have the invisible walls setup yet.
https://media.giphy.com/media/xUOrw4...SYaQ/giphy.gif
Is there a way to get the grid to ignore the collision of anything that isn't the intended invisible wall pieces or am I just doing something completely wrong collision wise here? Also I do believe collision is active for all of the meshes in place but turning them off seems to change nothing.
How do I get the pawns to move inside the level?Last edited by GoonRaccoons; 07-04-2017, 10:38 AM.
Comment
-
[MENTION=422736]Curiosichi[/MENTION]: Thanks for your suggestions and showing me your own solution
Spawning the units early on before Sort Units in Initiative makes sense. Your functions for adding the units seems a bit cumbersome, however. If you have to specify all attributes and the location of each unit manually I don't really see the benefit compared to placing the actors directly in the viewport. At the very least I would create a sub-function that you could loop through using a custom struct array containing all relevant variables. That way it would extend to any number of units. Other than that it is hard to provide input when I'm uncertain of the goal you wish to achieve.
If I did something like XCOM, for instance, I would probably store each character in a custom struct array in the game instance, or possibly use a data table. The attributes would in this case be created by a combination of base stats, random variation and player input. If you tell me your goal I can provide better suggestions for a good way of solving it.
As for figuring out which index a particular square is, you can check Precalculate Gameplay Grids and then check Show Tile Indexes. Note that if you make any changes to the map that would affect pathfinding after this point you need to re-check Precalculate Gameplay Grids.
As for arrays of arrays, the easiest way is to make a custom struct that contains an array and then make an array of these structs.
[MENTION=802561]OperatorCrux[/MENTION]: To be honest I have no idea what is going on here... When the path is displayed pathfinding seems to work fine for the tiles inside the walls, so the grid setup is not affected. I think the only explanation is that the trace under the mouse pointer is being blocked somehow, but you say that removing collision from all the other meshes did not work, so that is odd. I would try one more time to be sure. Check through the scene outliner and make sure that collision is disabled for all meshes and volumes in the scene. You don't really need to disable all collision, just the one for PathTrace, but as a quick test just disable collision for them. Come ask me again if you're positive all collision is disabled (except for the Grid Manager, of course) and I'll think hard to find out what might be causing this.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Cumbersome in this use case, but it isn't actually ever used.
My game creates all the character data before we get into game mode / grid manager, so when loading player units, it loads from the save file. In the picture I linked above, that is the false side of a branch checking for that save data. And in early development, I just load a few characters as if they were placed on the grid.
So since I have to save each stat individually, I iterate over the arrays of the save file data and create the characters. Granted yes, the stats will likely be generated by the items the character has equipped, this is more just a proof of concept.
I create Starter Tile objects that are placed in the grid manager, and use their locations to map starting locations for the loaded character units. I select, from the top of the saved character list, one by one to place on those tiles. For example, if I have 2 starting grid locations, I pull the top two character's save data and load them onto the map on those two tiles. In the same way, If I had N starting tiles, I select first N characters to place on those tiles. A simple Is Valid() check on the retrieved character data array avoids any problems trying to fill a character start tile with an invalid character.
Do note, that Skills are still not saving since I have not remedied the array of arrays issue, but i'll look more into the structs. Or maybe i'll do a list of Boolean values for "know skill" for each skill in the game, and if they know the skill add it to their list of skills here.
My desired result:
game start
Save character data if it doesn't exist
Load desired battle map / game manager
Load character data/skills/items
place units on grid
do the battle
Battle end
Save experience gains / new items acquired for all player units
repeat
I also need to keep in mind if I make/want multiplayer (which I will probably wait for your implementation) I will have to change both the save data with game state. I haven't researched it much yet.Last edited by Curiosichi; 07-05-2017, 04:30 PM.
Comment
-
[MENTION=422736]Curiosichi[/MENTION]: Ok, that seems a lot more reasonable. I'd really recommend you to look into structs, though. Not only can you easily make nested arrays, but you can also simplify your above function substantially by using an array of structs containing all unit attributes instead of having a separate attribute for each one. The game state is kind of like an extension of the game mode for variables that need to be replicated, such as a list of players etc. Useful in multiplayer, to be sure, but I don't think it is warranted for the spawning of units at the start of the game.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Monokkel View Post[MENTION=802561]OperatorCrux[/MENTION]: To be honest I have no idea what is going on here... When the path is displayed pathfinding seems to work fine for the tiles inside the walls, so the grid setup is not affected. I think the only explanation is that the trace under the mouse pointer is being blocked somehow, but you say that removing collision from all the other meshes did not work, so that is odd. I would try one more time to be sure. Check through the scene outliner and make sure that collision is disabled for all meshes and volumes in the scene. You don't really need to disable all collision, just the one for PathTrace, but as a quick test just disable collision for them. Come ask me again if you're positive all collision is disabled (except for the Grid Manager, of course) and I'll think hard to find out what might be causing this.
Comment
-
Originally posted by OperatorCrux View PostAlright so I solved the problem! I had disabled collision for everything except the ceiling. So it turns out that the ceiling tiles were having some weird collision error because the collision box went lower than the mesh itself. Disabled the ceiling collision and it works perfectly now.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Curiosichi View PostOr maybe i'll do a list of Boolean values for "know skill" for each skill in the game, and if they know the skill add it to their list of skills here.Last edited by ClaimedInfinity; 07-08-2017, 12:47 PM.
Comment
-
Well my thinking is if not Boolean, the current setup has each pawn spawning an actor and holding a reference, so whether its a Boolean or a skill reference, one way or anther there is going to be a huge list of skills. Unless I can think of a bit flag and corresponding map on a single variable, but I haven't had to think in binary and how that might work in Unreal yet.
Don't think it gets any smaller then a bit flag, but its still the same principle, maybe just less memory though.
Comment
-
Originally posted by ClaimedInfinity View PostHey, this is the thing I'm thinking about now. Before you spawn the skill actor you need to know if your pawn has learned it or not. Obviously you can't do that based only on "learned" boolean or something like that in skill class. The most crude but the simplest way is to create a few booleans (one for each skill) in pawn class and this is fine enough if you have relatively small number of skills. But if you have (let's take Final Fantasy Tactics as an example) over a hundred of those skills? And if all booleans will be in the same function it will literally look like Tower of Babel. I'm sure there are more elegant ways but I'm still looking for them.Originally posted by Curiosichi View PostWell my thinking is if not Boolean, the current setup has each pawn spawning an actor and holding a reference, so whether its a Boolean or a skill reference, one way or anther there is going to be a huge list of skills. Unless I can think of a bit flag and corresponding map on a single variable, but I haven't had to think in binary and how that might work in Unreal yet.
Don't think it gets any smaller then a bit flag, but its still the same principle, maybe just less memory though.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Selentic View PostHow are multi tile units coming?
The next update is mostly feature-complete at this point, but there is still a long process remaining of testing, bug-fixing, structuring, commenting etc. Summer holidays is also going to slow down my progress the next few weeks, but I'm putting a lot of my free time towards getting it done in a timely fashion.
Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Monokkel View PostHaven't made any more progress on that progress specifically. As mentioned I've planned to split the next update into two so I can get it out faster. First I'll finish the update with everything but multi-tile units (networked multiplayer, major refactoring, transform-independent grids), as adding multi-tile units before this would just complicate making these changes later. I'm making great progress at that front, though, so in that sense I'm getting closerThe next update is mostly feature-complete at this point, but there is still a long process remaining of testing, bug-fixing, structuring, commenting etc. Summer holidays is also going to slow down my progress the next few weeks, but I'm putting a lot of my free time towards getting it done in a timely fashion.
Comment
-
Hey,
Currently attempting to get the units to spawn dynamically, however the pack doesn't seem to like that as I get dozens of accessed none errors if there are no units on the grid when it starts(most likely the custom unit spawns is getting called after the other begin plays already initiated), however there never is a certainty of which items will spawn as it's generated from another level(how and why is not relevant).
Are there events I need to delay until after I spawned the units myself? If so, could you point me to which ones I need to callback after spawning the units? PC/Pawn/GM/Etc? I can callback all of them but to avoid breaking anything I find it safer to just ask.
Currently just calling back the gamemode and it seems to work.Last edited by CelestialCel; 07-10-2017, 07:07 AM.Hire us here; Panda Studios, Game development company.; Official Unreal Engine Game Jam SponsorMarketplace Asset - Economy Kit; Marketplace Asset - Notification Kit; Marketplace Asset - Achievepedia; Marketplace Asset - Player Stats Kit; Marketplace Asset - Photomode; Marketplace Asset - Interaction Kit; Marketplace Asset - Turret Kit; Marketplace Asset - Character Stats Kit; Marketplace Asset - Smooth Camera Kit; Plugin - Toggl Plugin;
Comment
Comment