Search Unity

KINGS - Card Swiping Decision Game Asset

Discussion in 'Assets and Asset Store' started by Maulwurfmann, Nov 26, 2017.

  1. CCM

    CCM

    Joined:
    Dec 18, 2012
    Posts:
    28
    Hi Maulwurfmann,
    Is it possible to use variables in the questiontext? Also to make answers with variables/aligned with the questions variable? As easy example: use a random generated number in the questiontext and have answers left that is +1 the random number and right -1 smaller than the random number from the question?
    Is this currently supported?
     
  2. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Unfortunately, this is currently not supported, but we will look into this.

    Currently we are working on a Inventory system, since this has now been requested a few times ;)
     
    hippobob, gabor17, digifilm and 3 others like this.
  3. digifilm

    digifilm

    Joined:
    Dec 5, 2013
    Posts:
    13
    If you are adding the inventory, why not add a quest system too. Just an idea. Thx
     
    hippobob likes this.
  4. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I will add this to the list ;)
     
    hippobob, digifilm and gabor17 like this.
  5. Unitiona

    Unitiona

    Joined:
    Mar 4, 2019
    Posts:
    4
    Hi,
    I'm totally new to Unity, so apologies for the beginner / stupid quesition.

    I'd like to make a version of the Kings game which is exactly the same as the original in terms of dynamics, scoring for each card, balance of cards etc, but with my own text and graphics.
    Is there a way to do this?

    My main issue is that I can't seem to find the original 'cards' (Grey rectangles with white squares?) within Unity - only the templates (blue boxes) for them.

    I've tried using ImEx to edit the text, and I appear to do this successfully within excel, but when I import it without first setting all of my own card styles etc, it just brings in lots of blue boxes - no grey 'cards'.
    (There is a suggestion in the instructions that if you import into your 'existing card file' you can just overwrite the text - but my issue is finding a copy of this existing card file for the original game)

    I can see how to create everything from scratch (which is wonderful), but not how to do just a simple modification to the existing game.

    Is what I'm asking for possible?
    To use ImEx to modify the text on the existing cards only?
     
    Last edited: Mar 14, 2019
  6. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366

    Of course you can do this ;)


    Blue Boxes are prefabs, grey boxes are gameobjects. Gameobjects are objects that exist only in the "Hierarchy". You can turn every gameobject into a prefab by dragging it from the Hierarchy to the "Project" folder. All cards are prefabs, since they need to be spawned into the scene/hierarchy.

    You can find out more about prefabs here: https://unity.com/prefabs

    The cards are located in: Kings/Cards and then separated in each card stack group, e.g. Ads, General, Marriage, War. You will simply have to double click these prefabs to open and edit them.

    If you edit the cards with Excel and import it with ImEx you only have to make sure that you select the same import folder (Kings/Cards) this will update only the new text.

    Hope this helps! If anything is still unclear, just let me know!
     
  7. kasijo

    kasijo

    Joined:
    Mar 4, 2019
    Posts:
    1
    Just wanted to say thank you @Maulwurfmann
    I haven't really started using the Kings assets yet, but I love the way you connect to your customers.
    Keep up the good work :)
     
    Maulwurfmann likes this.
  8. CCM

    CCM

    Joined:
    Dec 18, 2012
    Posts:
    28
    Hi Maulwurfmann,
    Please can you describe how to change the shader on the cards. I have seen there is a special card for Shadero Asset, but I wanted to test another 2D shader.
    Additionally, can I change this only on card level or also for all cards (e.g. with template)?
    Would be great, when you shortly explain the relevant steps. Thanks!
     
  9. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    You should not need to do anything, simply drag the graphic with the special shader onto the card, remove the old graphics and it should be fine. Everything else (camera+ui settings) is already setup in the scene.

    See screenshot of below, i just dragged the whole shadero samplecard (TCG_Card) on a kings card.

    shader.png
     
    CCM and gabor17 like this.
  10. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I added a FAQ to our Website.
     
    jamopolis likes this.
  11. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Here is a first look at the new Inventory system which will be included in the next update:

    Items are created as scriptable objects:
    inv3.png

    You can display all items in one list/panel or separate them with categories:
    inv1.png

    You can have detailed view of the item to show all informations:

    inv2.png

    Iventory system is fully integrated in Event Script to allow use for Conditions, Results etc.
    inv4.png

    Hope you like it! ;)
     
  12. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    50
    How to use IAP and reward video to get inventory items?
     
  13. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    This will be done with the ChangeValue script, like adding a value or setting it to a specifc number, you will be able to do the same with items.
     
  14. CCM

    CCM

    Joined:
    Dec 18, 2012
    Posts:
    28
    Hi Maulwurfmann,
    great thanks! Seams that I had a general (KINGS independent) problem with the UI Shader. With the Shadero Asset everything works fine and also the text is visible on the cards. Also templates with different shaders work fine.
    Perfect :)
     
    Maulwurfmann likes this.
  15. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Hello! Bought this asset a few months ago and it works just great!

    Could someone tell me what method should I use to make cards swiping using keyboard buttons?
    For example: if A button is pressed the card is acting like it was left swipe.

    Thank you!
     
  16. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    This is currently not supported. If you want to add this for yourself, you would have to modify the "Swipe" script. If you are not able to do this on your own, we could have a look at it, but you would have to be a bit patience, since we are currently working on some other features, we want to finish first.
     
  17. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Could you please show me the direction? I will try to modify it by myself.
     
  18. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Made it using this simple method:

    if (player.GetButtonDown("Card Right"))
    {
    usualSwipes.swipeRightPreview.Invoke();
    usualSwipes.swipeRight.Invoke();
    }

    But now I have a question. Is there any way to make the card does not hide immediately? For example, if I press a button one time the card will move to the right(for example) and stayed in this position showing the info about this action? And on second press it will hide.
     
  19. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    We will check this and get back to you soon.
     
  20. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I have sent you a pm with the requested script.

    This function will also be included in the next update.
     
    Last edited: Mar 27, 2019
  21. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Wow! Thanks!
    It just works perfect
     
    Maulwurfmann likes this.
  22. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I want to preview another feature which we implement in the next updated:

    Variables

    variables.png

    It will be possible to display actual value numbers in several textfields:
    EventScript (Cards), Achievements, Gamelogger and Value Dependent Texts.

    It is possible to display the actual value, the value change and the result.

    The variables can be formatted and support also items, here are a few examples:

    {value=army} -> is replaced by the actual value of army (if defined in value definitions), e.g. 75
    {value=army,format=0.0} -> is replace like before but with formatting, e.g. 75.0
    {value=army,preview=up} -> is replaced by the preview for army when swiping up
    {item=sword} -> is replaced by the number of swords in the inventory

    Hope you like it! ;)
     
    Last edited: Mar 30, 2019
  23. CCM

    CCM

    Joined:
    Dec 18, 2012
    Posts:
    28
    Hi,
    That sounds great and very valuable! Gives a lot of additional possibilities!

    Some ideas, would this work with the planned functionality, or are those a further steps:

    1.) Will it also be possible to compare results between question text and answers and you get only points for choosing the correct answer (under the assumption that is it a question, where is a right and wrong answer)? E.g. in a math example.

    2.) Will it also be possible to include "string" variables in the text? So that you can define certain variables based on previous answers (or values) and use text-variables in question text or answers? (not using the number value, but a text fragment and adapt the question/answer text in certain areas)?

    Specially 2.) I find interesting and could help to customize the cards text very specific to an individual game play. But do not take it as very important requirement, more as idea for further possibilities.

    Thanks for your excellent work :)
    When do you plan the update for asset store?
     
    Last edited: Mar 31, 2019
  24. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366

    Thanks!

    1) no, you will have to "set" the correct answer yourself
    2) we will have a look at it ;)
     
    CCM likes this.
  25. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    We plan to release it end of Aprill, since we want to add some more features ;)
     
    CCM likes this.
  26. Octo-Games

    Octo-Games

    Joined:
    Jan 6, 2013
    Posts:
    44
    Is there a way to easily switch from standard game view to the mayor game view without having to redo the cards etc... ?
     
  27. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Do you mean Landscape and Portrait view? If yes, sure this is possible! Just check the Game_wide demo scene, it uses the same cards as the normal scene (with some exceptions).

    Or did you mean something else?
     
  28. Octo-Games

    Octo-Games

    Joined:
    Jan 6, 2013
    Posts:
    44
    Well i was wondering if the mayor setup was done differently from the Game_wide or Game scene.

    Especially since i saw that the Game_wide will not be updated and moved to old directory.

    Was wondering if Mayor game view was using the same info, card system as the game wide or game does.
     
  29. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Sorry for the confusion, i have updated the Game_wide demo in one of the last updates, it will also be further supported in the future, i will edit the old post to prevent further confusion.

    The Mayor demo scene uses the same system, just the look of the design is different, and some functions are not used, e.g. countrynamegenerator, but can of course be added if you want to.

    If you want to make a widescreen game i would suggest you use the game_wide demo, since this includes all features.
     
  30. Octo-Games

    Octo-Games

    Joined:
    Jan 6, 2013
    Posts:
    44
    Oh allright i thought it was a new system , since it's buttons and not card.
    If it's just visual then allright i'm gonna work with the Game_wide again.

    Updated only recently to the last versions so i'm a bit lost ^^

    Thanks for the answers
     
  31. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    No problem! If anything is unclear, just let me know.
     
  32. Unitiona

    Unitiona

    Joined:
    Mar 4, 2019
    Posts:
    4
    @Maulwurfmann Can you advise on how to remove adverts from the game?
    I tried just removing the cards from the cardstack, but an error appears that tells me 'game object' is missing.
    When I try to play the game, it gets to a point where I can only swipe in one direction - presumably, when I go in the other direction it is looking for the absent 'advert' card, and because it is not there, it prevents me from picking that option.

    The instructions suggest that the script will just skip over if the advert card is not there, but that doesn't seem to be happening.

    Thanks in advance

    Iona
     
  33. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    There should not be a error message when you remove the ad cards from the cardstack, except the ad card was currently drawn, simply delete player prefs and there should be no error message.


    To disable Ads do the following:

    Unity Ads: To disable Unity Ads go to the Services Tab (Ctrl+0) and turn Ads OFF.
    Admob Ads: To disable them, open the PLayAdMob script and disable the first line by adding //, see below:
    admob.png

    You can also remove the "UnityAds" and "AdmobAds" gameobject in Hierarchy window if you are sure you never want to use ads.

    If anything is unclear, just let me know! If you still get an error, please send me a screenshot.
     
  34. Unitiona

    Unitiona

    Joined:
    Mar 4, 2019
    Posts:
    4
    @Maulwurfmann Thank you so much for being patient with me.
    I am nearly there on completing my game. I just need a little help with the game logger that produces the text at the end, describing the reign of the king. I've manged to edit the value dependent text, but the main Game Logger script itself is locked.
    Can you tell me how to temporarily unlock and edit it?

    Thank you
    Gamelogger query.png
     
  35. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    These gamelogs are added by the cards, for example see "_StartCard".
    gamelogs.png
     
  36. Octo-Games

    Octo-Games

    Joined:
    Jan 6, 2013
    Posts:
    44
    @Maulwurfmann , i'm trying to find where is the Icon animated , because i don't want to have the icon move after i placed it but it still goes down to let some spot for the choice section i guess. Can't find where is the animation defined.
     
  37. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    The icon is animated together with the card animation, simply open a card prefab, go to "Animation" and remove "Icon" from the animation (card_standard).

    icon_animation.png
     
    Last edited: Apr 3, 2019
  38. Octo-Games

    Octo-Games

    Joined:
    Jan 6, 2013
    Posts:
    44
    Allright thanks
     
  39. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I want to preview now another feature of the upcoming update:

    Dictionary

    This features is an alternate to the Value system and allows you to save any kinds of text and will be fully integrated in the Event Script, to support features like "Conditions" and "Variables".

    All entries in the Dictionary will be automatically saved and opposite to the "Values" you dont have to create a list/add a object in Hierarchy.

    For an example see below screenshot:
    With the first card you can choose the name of your son, and in all upcoming cards the chosen name of your son will be displayed with the use of the key {dict=child1}.

    Hope you like it! ;)



    dict1.png


    dict2.png
     
    CCM, hippobob, jamopolis and 2 others like this.
  40. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    13
    Great feature. As well as inventory! Looking forward for it. When are you planing to release the update?
     
    Maulwurfmann likes this.
  41. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366

    Thanks!
    We have planned for end of April, but it could also take a bit longer, depending on how well everything goes, i will update you all as soon as i can give a more precise date.
     
    Lady_Lai likes this.
  42. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Could you please tell how to translate text for GameLogger(for "GameOver__Log" card"). I am using l2 localization asset and it helps me to localize all cards. But I am stuck on GameOver__Log.
     
  43. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    The text from the GameLogger can not be automatically added to the I2 terms list, you have to add these entries manually, and then they will also be translated.
     
  44. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    So I must move text from game object "GameLogger" to the script "ValueDependentGameLogs"?
     
  45. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    No.
    You have to add the text you added as GameLogs as "terms" to I2.

    If you go to "Resources" folder you should have a "I2Languages" file, if you click on it will open the "Lanuage Source", in "Terms" you should see many entries (from your card) since you said they are translated. Now you only have to add the entries from the GameLogs manually by clicking on "+". As example see below entry "You became Kings", from the _StartCard.

    Hope this helps!

    gamelog1.png

    gamelog2.png
     
  46. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Yes, I did it. But how can I connect these terms to ValueDependentGameLogs script? Because these text fields(in GameLogger game object are still in english even when I change language for the whole game).
    https://prnt.sc/n9mr5n
     
  47. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Exactly the same, e.g. add "You were loved by the People." as a term to I2.
     
    Last edited: Apr 9, 2019
  48. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Hmm...
    Sorry, but I can't understand how can I connect term with text field in game object.
    I did this:
    http://prntscr.com/n9n4zr

    I easily translated the title of the card by adding I2 localize script file to card prefab(TitleText2 child) but I can't undertand to what prefab(or game object) should I add l2 localize script file?
     
  49. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    You don't have to add anything to the textbox. The GameLogger will automatically display the translated text if the terms are added to the I2 Language source. Just make sure you have copied the exact text, e.g. "You were loved by the People."

    The same goes for the cards, there is absolutely NO need to add something on the card and you really should not do this, the EventScript will display the translated text automatically.

    Also see here for instructions how to setup I2 correctly: KINGS - Card Swiping Decision Game Asset

    Hope this helps!
     
    Last edited: Apr 9, 2019
  50. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    54
    Thank you, now it works!

    Could you please tell where can I find these texts: "You became King." and "Everyone was excited to see how you will rule the kingdom.". They are not on GameLogger gameobject.