+ All Categories
Home > Documents > KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial...

KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial...

Date post: 24-Feb-2021
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
13
KINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained in detail, if you are unsure how to use a specific function or what it does, please check the Documentation. If you have encounter problems while following this tutorial, something is unclear, or want to suggest improvements, do not hesitate to contact us: [email protected]
Transcript
Page 1: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

KINGS Card Swiping Decision Game Asset

Getting Started Tutorial

This Tutorial shows you how to start your own project, please note, that not every function is explained in

detail, if you are unsure how to use a specific function or what it does, please check the Documentation.

If you have encounter problems while following this tutorial,

something is unclear, or want to suggest improvements,

do not hesitate to contact us:

[email protected]

Page 2: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Content Create new Project and import Asset ................................................................................................................. 3

Unity Tab / Window overview ........................................................................................................................... 4

Create your own game scene ............................................................................................................................. 5

Edit the values .................................................................................................................................................... 6

Import your graphics .......................................................................................................................................... 6

Create a card template ........................................................................................................................................ 7

Edit and create Card Styles ................................................................................................................................ 8

Edit and create new Cards manually .................................................................................................................. 9

Edit and create new Cards with Kings ImEx ................................................................................................... 10

Edit the Even Script ......................................................................................................................................... 12

Add cards to the Card Stack............................................................................................................................. 13

Page 3: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Create new Project and import Asset

1. Open Unity

2. click on “New”

3. enter project name and location

4. click on “Create project”

5. In Unity, open the Asset Store Windows (Ctrl+9)

6. search for “Kings” → select Kings project → click on “Import” → confirm Pop-Up Message that it

will overwrite current project settings with “Import” → “Import Unity Package Window” will open,

again click on “Import”

7. Go to Project Tab → Kings and open either the “Game” or “Game_wide” demo scene.

8. Click on the “Play” button in the top middle of Unity Editor to run the game

9. Play a bit with it to see if everything works correctly, if done, press “Play” again to exit game

Page 4: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Unity Tab / Window overview

Project: file explorer, shows all the files of your project

Hierarchy: shows the structure/files of your open game scene

Inspector: detailed view of selected file / GameObject, most of the changes and adjustments are made there

Scene View: the view of how all your GameObject and UI elements are aligned in the scene

Game View: the view of how your game is actually displayed

Animation: in the animation window you can create or edit the animations

Console: displays information’s and error reports

Animator: in animator windows the control of the animations is managed, like transitions, triggers etc.

Asset Store: Unity Asset Store where you can download assets

Services: Unity Service Tab, where Unity Ads and Unity IAP can be managed

The windows/tabs can be moved freely, it could be that this looks a bit different in your Unity Editor.

Page 5: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Create your own game scene

1. In Project window, create a new folder named after your game, in our example we use:

“MyCardGame”

2. Duplicate (Ctrl+D) the scene you want to use (either Game or Game_wide) and move it to your new

created game folder

3. Open the new game scene

4. File → Build Settings (Ctrl + Shift + B)

5. Click on “Add Open Scenes” your game scene should now be added in the above list

6. Move it to the top and uncheck the other scenes

Page 6: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Edit the values

1. In Project window, go to Kings → scripts and open the script “valueDefinitions”

2. Remove or rename all “values” from the list and add the ones you will need

PLEASE NOTE: Removing/rearranging values afterwards is not possible,

only adding new ones or renaming existing values.

3. When done, save the changes and go back to Unity

4. In Hierarchy, click on the small arrow next to “Values” to expand and show all values

5. Match them with your values you entered in “valueDefinition”

Import your graphics 1. In Project, go to your game folder and create a new folder: “graphics”

2. Open Windows Explorer, select your graphics and drag it into the folder “graphics”

3. Select your imported graphics and change Texture Type to “Sprite (2D and UI)” and press “Apply”

Page 7: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Create a card template 1. In Project, go to your game folder and create a new folder: “cards”

2. In Project, go to Kings → cards → templates and select a card template which you want to use, for

our example we use “card_template00”

3. Duplicate this card template and move it together with “CardStyle_List” and “CardStyle_t00” to

your “cards” folder

4. Rename the card prefab and CardStyle to fit your project, for our tutorial we use “myCard_base01”

and “CardStyle_myCard01”

5. Open the myCard_base01 prefab by double-clicking it

6. Make sure that the correct Card Style is selected in the Card Style script (CardStyle_myCard01)

7. Click on the Arrow left to the prefab name to close the prefab again

8. Click on “CardStyle_myCard01” and make sure myCard_base01 is selected in “Prefab”

Page 8: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Edit and create Card Styles

1. In Project, go to your game folder → cards → click on “CardStyle_myCard01”

2. You can edit the card color and image here as well as the card icon. These changes will affect all

cards which have this Card Style selected. If you have the card prefab open you can directly see how

the changes will affect the look of the card.

3. To create a new Card Style, you can either duplicate a existing one (ctrl+d) and modify it, or create a

completely new one, by right clicking in Project → Create → Kings Card Style

4. If you want, you can now create a few Card Styles, but you can also simply just go with one.

5. In Project, go to your game folder → cards → click on “CardStyle_List” and add your Card Styles

Page 9: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Edit and create new Cards manually

1. To create new cards, you can either do it manually or by using the Kings ImEx script.

2. To create cards manually, you first need to create a “prefab variant” of the “myCard_base01” card,

you can create one dragging the “myCard_base01” to the Hiarachy → GameCanvas → Cards

3. From here drag it back again to the Project window, Unity will ask you if you want to create a

“Original Prefab” or a “Prefab Variant”, click on “Prefab Variant”. This allows to apply design

changes made on the “myCard_base01” card to all cards based on this prefab.

4. You will see that the prefab Variant creation worked when there are arrows on the blue icon

5. You can now edit the EventScript, set Title Text, Question Text etc. and set conditions and results.

BUT YOU DO NOT MAKE DESIGN CHANGES ON THE CARD ITSELF, like changing the

font of the text, reposition the text etc. these changes are only made on the base card, if you make

changes on the prefab variant, then changes on the base card will no longer by applied on this card.

6. You can now simply duplicate (ctrl+d) this card and use it as often as you want to create your cards.

Page 10: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Edit and create new Cards with Kings ImEx

1. To create new cards, you can either do it manually or by using the Kings ImEx script.

2. To create new cards with Kings ImEx, go to Window → Kings ImEx

3. Set the Directory to your “cards” folder, and for Card Stack click on the dot on the right side of the

field and then select the scripts GameObject.

4. Click on “Export Cards” if everything went well you will see a notification, like on the above

screenshot.

5. In Project, go to your game folder → cards → right click on “cardlist” → Show in Explorer

6. Windows Explorer opens now and the cardlist is highlighted, open it in Excel or similar Software

7. You will now see a list this all entries of the Kings example, you can delete them and add your own.

8. When you are finished, save and close the file.

9. Open Kings ImEX (Window → Kings ImEx) and go to the Import window

Page 11: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

10. In Data File, select your “Cardlist”, in Style Definitions your “CardStyle_List” and in “Select Output

Folder” the place where your card should be created.

11. Click on “Analyze Import”, you should now see the list of your new cards

12. If everything is correct, the “Execute Import” button will appear, if not, there will be an Error

Message telling you what`s wrong.

13. Press “Execute Import” to create your cards.

14. You can now edit the EventScript, set Title Text, Question Text etc. and set conditions and results of

the imported cards.

PLEASE NOTE: Kings ImEx can also be used to just update the text of the cards. Export your

cardlist, edit the text in Excel, on Import make sure that the Output Folder is where your current

cards are saved, this way it will only update the text of the existing cards, the other changes of the

EventScript from the old cards, like “Results” and “Conditions” etc. will be kept.

Page 12: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Edit the Even Script

1. In Project, select a card you want to edit and double click it

2. “Text Fields” section contains all the text that is displayed on the card

3. “Results” section contains the changes made on values depending on player decision. In this

example, Health and Work value will be decreased by -20 on left swipe. On right swipe, result type is

“Conditional”, this means the result depends on one or more conditions, in the example it is

Happiness 80-100, this means if the Happiness value of the Player is between 80-100 the condition is

TRUE if it is not in this value range (e.g. Happiness 50) the condition is FALSE. The true condition

adds a random value between 5-30 to work, the false condition will set the work value to a random

number between 1-20.

4. To get an overview of all functions of the Event Script, please have a look at the Documentation

5. When you are done editing the Event Script, you can close the prefab

PLEASE NOTE: the blue lines on the left side of the image indicates that changes have been made to

the prefab variant and will not be overwritten by changes on the base card, e.g. if you change the title

text of the base prefab it will NOT be applied to the prefab variants (which is what we want), but

some values can still be edited from the base card, e.g. “Max Draws” and “Redraw Block Cnt” since

they have not been change on this prefab variant.

Page 13: KINGS - kloppe mediaKINGS Card Swiping Decision Game Asset Getting Started Tutorial This Tutorial shows you how to start your own project, please note, that not every function is explained

Add cards to the Card Stack

1. In Hierarchy, select Scripts, and scroll down to “Card Stack” in Inspector

2. Set Size of “All Cards” to 0, to remove old Kings example cards

3. Set Size to 1 and enter a group name, e.g. “General”, if you want to add additional Sub Stacks,

simply increase this number, e.g. General, Work, Marriage, etc. …

4. In Group Cards, you can now either manually set the size number and add the cards, or click on

the “Lock” icon at the top right of the Inspector, select all your cards and drag them all at once in

the Group Cards, when done press on the Lock icon again, to unlock the view.

5. When you have added your cards, you can press “Play” in Unity Editor and check if everything

works correctly.


Recommended