Actually, the toolkit was created as a proof-of-concept to see how well UE4 would be to create such a game haha The Designer of that project decided to stay with another engine, but since I saw a lot of potential with unreal I wanted to spruce it up a bit and make it available to the community. Unfortunaly I don’t have much time aside from updates and other projects going on to focus on my own game, but I hope I can sometime in the near future!
Looking forward to that 4.14 support
Hello, I’m looking forward to 4.14 support too )
[FONT=Arial Black]Update 1.2 Released!
The CCG Toolkit v1.2 is now live on the UE4 Marketplace! This update features the new customizable Card Game AI, even more example abilities, and reworked framework communication. The update also includes several framework improvements, documentation updates and minor bug fixes.
Changelist info:
Features:
-
Mega-Feature! Card Game AI – Card game AI has finally made it into the CCG Toolkit!
-
Personality Profiles – Create numerous profiles, setting the difficulty, priority lists, deck lists and more
-
Point’s Allocation – How the AI decides the value of different actions and plays
-
Spectator mode – Watch two AI players go head-to-head
-
Highlight playable cards in hand
-
Card Game State now holds information about the board – On top of cards, developers can now get reference to player specific placements (And how many positions they all hold) and player graveyards
-
GameStateSnapshots - Get and save the state of the game while playing
-
Battle History (Card interactions) is now recorded during play. (Backend – no UI)
-
Several New and Updated libraries with more helpful functions (Cards, Cards in Hand, Controller, Placements, Deck)
-
Ingame notifications are now supported during play and can be used to notify players of invalid actions with short descriptions
-
Added “Waiting on Player” UI to the screen when in multiplayer mode. UI also gives an option to spawn an AI opponent instead of waiting for a second player to enter the game
-
6 new Card Examples
-
4 New Abilities with several possible variants
-
Card Abilities now support “Affecting Player” setting which can be used to specify which player the ability can effect. New abilities can already use this feature
-
Card now have a new System Data section which includes the options for setting:
-
Card Purpose
-
Card Value
-
Card Play and Interaction Conditions – You can now create and set special per card conditions for both player and AI
-
Cards can now be easily sent directly to the graveyard from the players hand
-
Card states are now saved to the Card Struct within the 3D card actor
-
Graveyard holds the card struct information when they are sent to the graveyard. This state can also be used to bring a card back from the graveyard in the state it left the board (Health is reset)
Updates and Changes:
-
Example Card values have been tweaked and are now more balanced
-
All cards have been updated with the new system related information (Purpose, value
-
Moved most of the gameplay and setup related events and functions to Interface calls
-
“Card Game Player Controller” references have been removed and replaced with “Player ID” or “Controller” specific references. Additional functions have been created to easily get reference to controllers of controller IDs throughout the toolkit.
-
Cards now move to their owning players graveyard instead of the placements graveyard which is referenced
-
Minor Performance improvements throughout the toolkit
-
Updated all example arenas with various changes to the framework
-
Additional Improvements throughout the toolkit
Bug Fixes:
-
Fixed: “Divide by Zero” warnings that occurred from the Mana graph widget
-
Reworked: Some elements of the Opponent UI so it did not run several checks on each tick
-
Fixed: The Card Manager events in the player controller could sometimes go below zero after a number of cards were requested
-
UE4.14 Fix: Opponent UI would return a UI Parent Error. This is not required and has been removed.
-
UE4.14 Fix: Corrupt collapsed node when moving from 4.13 – 4.14
-
UE4.14 Fix: Drag-and-Drop no longer triggers the touch node within the player controller to drop the card. A simple event has been created as a workaround for this issue while it’s been looked at.
Documentation Updates:
-
Added: Card Game AI Overview
-
Updated: ‘Adding Card sets to the game’ tutorial
-
Updated: ‘Ability Creation and Setup’ tutorial
Note: This update is compatible with UE4.13 and UE4.14
The latest documentation can be found at: Documentation – ccgtoolkit
If you find any issues or have any questions, please email !
Those are some nice features, hopefully I’ll have some spare time tomorrow to play around with it!
New user here! I just downloaded the CCG Toolkit, but I’ve never used any Unreal Engine before. Is there a tutorial for the toolkit or do I need prior experience w/ UE4 and wing it from there?
@: Quick question … what would be the best way to implement the following feature. Cards can’t attack a player as long as the player has cards in front of him in play?
I was thinking of doing a boolean value on the player and have that set when a card is played or unset when there are no more cards on the field. What do you think?
You can find a number of tutorials within the documentation! https://ccgtoolkit.wordpress.com/documentation/ . This will run you through the basics, but unreal experience will definitely help you along the way. Feel free to reach out to the support email address if you are unsure of anything and I can get back to you with some details and direction for any questions you may have.
I had thought about something similar in design, and this was one of the reasons for some changes in the latest toolkit update. Player controllers are only replicated between the owning client and the server so other players would not have access to the bool. The answer for this was to hold references to each players cards in the game state which is replicated. Thankfully this is really simple now and you can call “GetBoardState” from the game state, pass in the opponents player index, then get the length of the array from the opposing player when calling the card interaction. You can alternatively have the game state use your bool example instead of the player controller and this should work all the same!
Would this also cover the AI player or would I need to fiddle with that a little too so it knows when it can attack the player? If so, could you perhaps add a tutorial on the subject because this is something I plan on adding in later myself?
Also I encountered a small issue when playing. Using an [5health 2attack card with the ability of retaliation damage] I attacked the opponents card of the Same stats and ability, causing the editor to crash and close with the message;
‘Error Infinite Loop detected in 3DCard , asserted during RunActiveAbility with the following Call Stack’
What should I add to the ability to allow it force itself to stop if already ‘dead’ but still enable it use the ability when it ‘dies’ the first time?
This would cover AI at a higher level if the check was done within the Card interaction function, as it would fail the interaction and it would then go to the next available play. At a deeper level, you could stop the AI from generating any play data towards the player altogether if they have any cards on the board in the same way.
Thanks for letting me know about this. The solution to this will depend on how you game works overall. One solution could be to check the damage dealing card ref (in the 3DCard) against the incoming damage dealing card and do nothing if its the same. Keep in mind this would only be a solution if cards can only attack once per turn. If retaliation damage is something that all cards have, then I would suggest moving this from an ability and set this up during the interaction instead where you have more control over the interaction.
Here is a pic of the solution I mentioned:
Luckily in my game retaliation damage is only an ability for a few cards, nowhere near all cards. It was just a situation in which both sides had played the same card at different times, but eventually they interacted with each other confusing the blueprints. I’ve tried to apply your fix but now, no cards deal any damage at all it seems? Perhaps I’ve missed a minor detail but my blueprints now reflect yours shown in the images so I’m unsure what I missed from your explanation?
EDIT: My bad, I didn’t compile and save one of the changes, the cards work fine now. The only Issue is, when my 5h/2d retaliation card attacks their 5h/2d retaliation card, both cards are sent to the graveyard showing ‘3h/2d’ which would confuse the player as to how the card is dead/ has 3h. (Where D and H mean Damage and Health respectively). But its definitely a step in the right direction as the game doesnt crash now.
I just checked this again and I don’t seem to be hitting this issue on my end. To be sent to the graveyard the card will need to be on 0 (<=)and in that case the visuals should update when that change is made. See if the OnRep_Health (3DCard - Function) is still being called when the damage is applied, this may be the issue if some changes have been made to the card/card layout.
I have changed the appearance of the cards and their stats but not the Cards blueprints besides the changes I’ve run by you. Adding a print string to the onrep_Health, It seems to call the onrep_Health for each card once (so it appeared twice) when I or They attack that specific card, but assuming it’s continuing the retaliation until both cards enter the graveyard should it appear more then once for each?
Also a minor glitch you may be aware of I’ve found somewhere else, is that sometimes, a random card (and all copies of that card for both sides) will occasionally become unkillable, reaching 0 health but not leaving the board and still being usable each turn. I figured it was just a issue with a specific card but further testing has shown that when it does happen (which isn’t often) it’s a different specific card and the card it was before is working fine. This was found via testing a build, so it’s not an editor exclusive issue.
Besides those minor problems, I’m having a great time prototyping a game, it really has saved me soo much time, and being that I’m not developer it’s been extremely helpful. I would highly recommend this to people interested in the CCG scene. It’s so streamlined that within a day you could have a custom made deck of custom made cards with custom abilities and stats, and an ai to test against! And all in blueprint too, so I can actually understand the basics even though I know no coding! It’s great!!!
@: Is it a bad thing that I am constantly playing the game against the AI? Am I allowed to call it Game Testing even though I am currently in the asset swap state … I think I will call it Game Testing. 8-}
I think your latest release is “epic” and it the AI is good … consistent enough to be challenging and with the flexibility that we can add extra layers of strategy for the AI. Good job. 8-}
Retaliation should only be called once from the original receiving card given the fix I had mentioned previously. So once on each sounds right.
Hmm, I have not seen this myself. Does this happen even for the card examples included within the toolkit? or have you only seen this with custom cards and abilities? When you get deep into customising cards there may be some combination of things that push it into a state… There are 10’s of hours of testing done at the end of the dev cycle for the update, plus everything throughout so it would be interesting to know what’s going on
Thanks, really great to hear!
Merci, merci!
The problems occur on custom made cards, but using abilities and the parameters already set. I’m sure I’ll figure it out myself eventually. Does your fix for the retaliation bug affect the other ability you created for some cards to have multiple turn points? I.e a card attacking the same card multiple times?
When making an ability, how would I go about ‘targeting’ a selected card? Example, Card A’s ability = select a creature (card b) of your choice on the board, increase that creatures attack by 5, and only that creature?? And how can the AI use this?
Targeting Abilities
Yep, that will affect multiply cards with turn points, but only if the last card was the retaliation card. Its only a temporary solution if you have cards that can use multiple turn point per turn. This is where your own card rules will come in determining how you would like the interaction to work. I assume most card games would have retaliation as a different damage type, which is also handled differently on the receiving end (Card). This is another possible direction you could take.
As for targeting cards with abilities, most of the functionality is already there, such as selecting cards and holding a reference to them, plus calling abilities with custom triggers etc. The tricky part here would be to determine how you want to go about activating the ability which is something that would take you down another long road of possible UI, special controls, drag-select, or drop select, etc which is why it was not included by default. Once the controls are down and the triggers are done then this will be fairly simple to have an ability target cards.
So 3 things you will need to determine:
- How you would like to select or hold the reference of the card in the player controller (Custom Controls)
- Activating the ability (Could create a custom server side function in the 3D card which calls the ability on your custom trigger)
- Getting the reference from the player controller and running the ability on that card.
If you want to go down the road of selecting multiple cards, then you can create a target array but you will also need to find a way to add, remove or clear cards from this list, which is where more design complications can arise.
Let me know if this helps!
Holiday Sale - 40% OFF!
The marketplace is at it again! The Holiday Sale is now live and the CCG Toolkitcan be found for **40% off! **
Instantly jump in and start creating your own CCG experience with tones of example cards and abilities, NEW Card Game AI, Deck creator, multiplayer support, basic gameplay, easy arena creation, and much much more readily setup out-of-the-box.
This sale is available between December 22nd - January 3rd so there is plenty of time to reach out to see if the toolkit is right for you and your project.
Happy Dev-ing!
That sounds like it might be a bit beyond my current skill unfortunately. I was hoping it would be something simple, so I could create a support card that you play like a regular card, it goes onto the board and instantly activates an ability on drop like ‘increase selected cards health by X amount’, then you select the card you want that ability to effect, checks the card is a creature or whatever, ability does its thing then gets dismissed to the graveyard. Using the rules already programmed in I could make sure the card is only played when creatures are on the board. I know all the functionality needed is spread around in the kit, but I don’t know how to transfer that information into a blueprint ability that would work as I intend.
I don’t suppose anyone has made an advanced/intermediate tutorial series for this kit have they? I’ve got all the basics down and can work with whats included, and I can create simpler abilities like ‘increase attack/damage all ‘type’ cards by ‘X’ amount’.
First off this is a fantastic toolkit and makes things fun and easy.
However, I feel that the documentation needs to be a bit more comprehensive for newbies like me.
An issues I have is that I’m unable to find out how to create custom triggers for card abilities. I’ve searched around and went through the toolkit for hours but unfortunately I can’t wrap my head around every aspect of this toolkit just yet. So my questions are:
- How can I create custom triggers?
- How can I make it so when a player attacks with a card, the other player can respond before damage is dealt? (Like ‘Instant’ type cards in MTG that can interrupt player actions)
Again, thanks for this toolkit! I had wanted something like this for a looooong time.