Resources and Prefabs

Resources Folder

Under the Resources folder, you can find all the data for cards, abilities, decks and more...

NetworkData

If you click on NetworkData, you can change the URL of the game server and web api.

Also you should see the auth_type set to Test (LocalSave in newer versions). Which means it is not using the API and users are saved locally on your PC. Leave this option to Test until you finished to install the Web API on your own server.

To test with a game server or web API installed locally, you should change the URL to 127.0.0.1

GameplayData

Gameplay data let you change various game values such as starting health, mana and deck size.

At the bottom you can also set the Test decks. These are the deck used in test mode when running the Game Scene directly without going through the menu. For testing new cards, you should add a lot of that card into the test deck and you will be able to test it easily by just running the Game scene.

CardData and AbilityData

All 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 or database 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).

ConditionData and EffectData

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

Prefabs can be found in TcgEngine/Prefabs folder.

Managers

Contain game manager scripts, should be added to all your game scenes (but not the menus).

TheNetwork

Contain network managers scripts for the game client, game server, and the api client, should be added to all scenes including menu. This prefab has DontDestroyOnLoad, unlike most other managers or prefabs.

GameUI

Main UI script for the game scene. Contains almost everything that is static and stays on screen, and panels that appear/disappear. 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.

BoardCard, HandCard and CardUI

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.

Last updated