It is unfortunate that it isn’t a simple 3 step process. The main thing is selecting the card you wish to target that adds the complication. The ability itself would be really simple or mostly copied from other example abilities included and just telling it the card (Casting to the Controller and getting the held reference) instead of randomly selecting one.
I am not aware of any additional tutorials or content created for the toolkit, but if there is I would be really excited to hear about it!
Thanks Loose_Moose! I appreciate the feedback. I do agree, after the initial tutorials there is some assumed engine knowledge which I will keep more of an eye on moving forward.
To your questions… There are two stages for creating your own custom triggers…
Adding your trigger to the AbilityTrigger_Enum (/CCGToolkit/Blueprints/Enums/Gameplay_Enums/AbilityTrigger_Enum.AbilityTrigger_Enum’)
Calling the RunActiveAbility macro in the 3DCard actor
Once you have added the ability trigger it will appear in the macro’s list for you to call however you like. For example:
Just bought your asset and having the same problem as doctorpangloss. None of the cards are being created as it seems none of the created decks are being loaded “out of the box”
This is because you are playing one of the arenas and not the main menu. Open up the menu map and then try to play again … you will then go through the process of selecting the deck and selecting the arena to play on and everything will work.
As qdelpeche mentioned, the “None” row is simply due to the prebuilt decks not having been generated just yet. This requires the deck builder (or even just the main menu) to be loaded at least once for the decks to be created and saved so they can be read by the game. After you have opened the menu once, then everything should work without issue, including being able to start a game directly from the arena/level opened in the editor. If you create new prebuilt decks through the editors data table (not in-game), then you will need to follow the same steps and open the deck builder for them to be created or updated.
A side note, you can preset the deck used when playing the game directly from the editor in the arena within the game instance.
As for not being able to play cards… there could be a number of gameplay reasons which may cause this, such as not enough mana to play the card, a card condition may not be met (Which should now give you a popup if this is the case as to why the card wont be played), or the card may not be placed on the right side of the board (Some cards are set to also be placed on the opponents side of the board), but in any case, if you can send a support email to some more details about the issue, such as the card being played, screenshot of the game, etc, then I will be able to help you fix this or see where the issue may be occurring.
Thanks qdelpeche for jumping in on this and giving some direction!
I’m quite new so I’m not sure I did it correctly. I added a new item to the AbilityTrigger_Enum as “Player Attacked” so there is a new item there but how do I actually make this trigger? I tried searching for the preset triggers functions but I can’t find them anywhere. How do I actually program this trigger? I looked through the 3DCard actor but I don’t find anything there either.
If you have time please give me a rundown as I think once I know this I will know this entire kit better. Sorry for the noob question.
To clarify, ability triggers are called in reaction to events which occur within other areas of the toolkit, whether this is the card receiving damage or if its the start of the player turn, etc, so you will find examples of calling “RunActiveAbility” highlighted with orange comment boxes within the 3D Card actor. Once you have added your ability and custom event, you will simply call the “RunCustomAbilityTrigger” event which has been added to your 3D Card actor to trigger the ability. If you would like a card to react to an external event, like the player being attacked directly, you will need to call this event on all of the players owned cards for them to have the opportunity to react (Run the ability). Most cards will skip this if they don’t have the ability though, so there should not be a huge performance hit at all.
Theory aside, my suggestion here would be to create a function which calls the custom trigger event on each of the card on the damage receiving player, possibly within the “CardInteraction_FunctionLibrary”. In the Card Game State, there are some two functions “End Of Player Turn” and “Start Of Player Turn” which send the turn start and turn event events to each of the cards on the board. You can use these as a guide for the custom function.
You can then call this custom function at the end of a successful “Deal Damage to Player” (Function - CardInteraction_FunctionLibrary) to keep this tied to all players (Human and AI). Once the event has been called, the macro should take care of the rest of the checks and once your ability is setup it should work like a charm.
I bought this template, and I have to say this is awesome.
But could you support race of the card like beast, dragon, elf, demon… ? I tried to customize the blueprints, and it’s ok. But it will be more convenient if you add this feature to the template.
The way races were planned on being filtered were with the addition of tags to the card data table row names.
For example
You create a “Beasts” card set, and each card within that set has its own unique name
The data table row name will have an additional abbreviation added to the cards data table row name so you can “tag” which set this card is coming from, such as adding “B_” which will end up being “B_Angry_Bear”
As this card data table row name is what is used to pass around the toolkit, whenever you want to know where this card is coming from you can simply use a StartsWith string node to check and see what it begins with.
Alternatively, you also have the options to use the cards “Class” to specify the race, or add your own “Race” enum to the cards main struct so you can set this within the cards data itself.
If you would like any additional details on how to go about this, let me know here or via the support email. Hope this helps!
How can I change variables globally such as deck size or card size (as in the x/y ratio not the scaling)
Also how can I remove the attack and such on the card images? I want to have my entire card images saved individually rather than having different frames/overlays
I’m still interested to use your Framework
But before I finally buy it could you please provide me an tutorial/guide on how to save the decks of the players and the cards in general in a MySQL DB? (Or is this something more complex?) This is an important part for me.
And would it be possible to provide an tutorial on how to make an Taunt ability like in hearthstone?
I almost check this Forum daily but I can’t see any changes since 1.2. Are you still working on it? It would be really nice if you could update the Trello Board to see the current status of the project.
Hey OfficerTom, Apologies for the late response, No email seemed to have come through mentioning your comment. So Ill jump to it…
For scaling the size of the cards there will be a couple of places to keep everything working correctly.
ViewCard_Default - Changing the custom screen size values will change the size of the widget in hand.
CardWidget - This will be the same by changing the width and height of the widget (Widget Designer-> Top right of the widget window) Basically this will handle things like the mouseover events while in hand.
3DCard - Being a 3D actor, you can easily add your new card model or scale the example model to the size you need.
Cards Data Table - This might not really need to be done If you have the other areas setup correctly, but you can set the cards texture size within the data table if things don’t look perfect with the above changes.
To remove components you can go into the ViewCard_Default widget and 3D Card actor and simply remove (Or Hide) any reference to these components.
Let me know If you need any further details!
Hey Oemmi, as you will probably be aware MySQL is not integrated into the framework. The toolkit has its own custom save deck functions which could easily be edited to change from a local save game file to a MySQL database (through blueprints), but this is something that will change based on how you would integrate the database code into your project overall.
A taunt ability can be done and this can be intercepted within the Card interaction functions provided. Simply running a check on the board for any cards with taunt will allow you to return a card reference if one is found. If none are found then you can pass through as normal with the interaction. If there was a card found, this reference can then be used to change/re-direct the receiving player to a receiving card. I can provide additional details via email If needed!
As for the project status, apart from the engine version updates for the toolkit, I am currently working on a new product and due to time restraints there has been no further planning done for a 1.3 update. I would like to continue adding features, but this will likely be later down the line. I will still be able to provide direction and support via email and here in the meantime if there are any questions!
Ok, thanks for that advise. I just have to buy the Framework and have a closer look at your saving function. I’m just scared that I’m not able to “convert” your saving function to my needs/wishes but I will see
Your description of the Taunt ability helps me a lot. Now I can imagine (in theory) how I can do that. At the moment I don’t need any further details, I’m trying to implement it by myself.
That’s really sad, that there won’t be any updates in near future. I was really excited about the Booster Pack system so you get also the TCG feeling to the Framework. Maybe you find a bit time for that to implement it!?
Thanks a lot for your very good support!!
Hopefully this weekend I will find some time to buy your framework and get first things done
I can confidently say that changing the function(s) shouldn’t be an issue if you have the proper MySQL related functions available in your project. The functions simply take in a card array, which you can then set the variables stored within your database.
As for the booster packs, the more timely thing for this would simply be the UI and handling which cards are unlocked within your database. Simply getting cards within your game, and randomly selecting them should not be difficult. Adding things like selecting cards based off their rarity, card types, card sets etc would also add layers to the system, but even then it should not be difficult with filter functions already included within the toolkit. Like the Taunt, I can provide support and direction for adding something like this yourself.
Anyway, great to hear you are liking the sound of the toolkit, and let me know if anything else pops up that you would like to know!
Hey Torhque! The Deck you see in the image is simply a scaled card model placed in the level. This is only used to as a representation of a deck, and does not include or have any ties to any gameplay related functionality.
I’m considering buying this toolkit but I have a question. I’m just starting to use UE and my current project is being made with the base of the third person shooter, I want to implement a very basic CCG (with no multiplayer) as a mini game when the player interacts with some NPCs, is this relatively simple to do with this toolkit? I’ve already checked the excellent documentation and I see there is no reference on this, but if someone can point me in the right direction for me to understand it it would be a time savior
Ah okay gotcha. You think there is a way to achieve what I am aiming for? I’m trying to have one deck that contains only monster (Creature-type) cards which is separate from the regular deck the game pulls from.
I’m also trying to figure out how to grant a card in my hand the ability to deal damage to both the opponent’s card AND the opponent’s health. My guess is that I will have to define a new Attack blueprint, and then find a way to make my ability switch out the default attack behavior with my new “piercing” attack behavior.
Above are the default blueprints for dealing damage to cards and the player. Could I create a new blueprint that combines the two? I’m wondering how I am going to switch the affected card to use the new Attack blueprint. Am I going about this the right way?
Hey JMHenriques! There are a lot of files and systems which interact with one another, so the answer for this would be dependent on how you wish to implement the toolkit into your game.
If this would be a separate “Level” where you can simply load the card game (toolkit) and all of its framework pieces, then this should not be much of a hassle. If you wish to seamlessly integrate this into regular gameplay on top of your current framework, then it is likely this it will be more timely to convert the project instead of writing your own.
In saying this, you could use the toolkit as a reference/ guide for writing your own game and taking elements which will more benefit your project rather then bringing across a large amount of unnecessary functionality. Hope this helps!