Resources and Prefabs
Last updated
Last updated
Under the Resources folder, you can find all the data for cards, abilities, decks and more...
If you click on NetworkData, you can change the URL of the game server.
To test with a game server installed locally, you should change the URL to 127.0.0.1
Gameplay data let you change various game values such as card hand max, xp per level, and more.
At the bottom you can also set the Test values. These are the data used in test mode when running the Map or Battle scene directly without going through the menu to create a new game. For testing new cards, you should add a lot of that card into the test cards and you will be able to test it easily by just running the Game scene.
All characters, cards and abilities data are held in scriptable objects. You can duplicate a card with Ctrl-D, and assign new art, stats and skills.
Note on ID: the id is what is saved in the save file to know which cards a player own or which cards are in his deck. So once you choose an ID for a card, try to not change it, also try to avoid spaces or special characters in the ID. The title can be changed freely and can contain special characters (as long as your font support it).
ScenarioData, MapData, MapEvents
Specific to the Map section of the game, will determine the possible map locations you can visit, what can happen at each location, and what type of enemies you can encounter.
A scenario is the top level data, each game will consist of 1 scenario that can be selected when creating a new game, a scenario will go through multiple maps 1 by 1 until they are all completed. Within a map, there will be various locations to explore, each location will contain a randomized MapEvent amongst the ones that are available to this map.
During battles, card abilities use conditions and effects to determine how they work. An example of effect would be dealing damage, and an example of condition could be "Is an enemy character".
You can code your own by creating a script that inherits from ConditionData or EffectData. And then create a data file inside the resources folder from those script. You can create a new data file by right clicking inside a folder: Create-TcgEngine.
Prefabs can be found in TcgEngine/Prefabs folder.
GameClient
Main Manager for the client side of the game, must be added to all game scenes including battles, maps and game setup scene, but NOT in menus or on the server scene.
TheNetwork
Contain network managers scripts for the game client, game server, and the api client, should be added to all scenes including menu, game and server. This prefab has DontDestroyOnLoad, unlike most other managers or prefabs.
MapUI
Main UI prefab for the map section of the game. While editing the UI prefab, on the CanvasGroup components, you can set the alpha value to 1 or 0 to show or hide a specific panel.
BattleUI
Main UI script for the battle scene. Just like the MapUI, you can also hide/show panels with the canvas group.
Prefabs/Characters
In this folder you will find 1 prefab for each of the champion or enemies available in game.
If you want to edit the shape or positioning of cards, these are the prefabs you will want to edit inside Prefabs/Gameplay. The same prefab is used for all cards since the art and text is replaced when a card appear in game.
Prefab that is common to all character prefabs. Contains things like the HP bar, shield, status icons, intent icon.