Search Unity

KINGS - Card Swiping Decision Game Asset

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

  1. Tropobor

    Tropobor

    Joined:
    Mar 24, 2014
    Posts:
    73
    Hi,
    In a near futur do you plan to architect this asset with scriptable objects?
    Actually I landed on your Kings - Card Swiping Decision Game Asset using these steps :

    > Firstly as a I2Localization happy and enthousiastic customer… Then :

    > A post on I2Localization forum:
    https://forum.unity.com/threads/i2-...olution-for-unity.231226/page-11#post-3656005

    > Unite Austin 2017 - Game Architecture with Scriptable Objects


    SCRIPTABLE OBJECTS in Unity by Brackeys


    > ScriptableObject-Architecture (free unity asset originally released on october 2018)
    https://www.assetstore.unity3d.com/en/?stay#!/content/131520

    Thanks for your attention,
     
  2. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Currently, we have no plans for using scriptable objects, is there a specific reason why you want to use them?
     
  3. Tropobor

    Tropobor

    Joined:
    Mar 24, 2014
    Posts:
    73
    Thank you for your answer. Actually my question is really oriented by curiosity. No joking, but In my turn I could ask are there some reasons why you do not want to use them? I'm just trying here to understand (as a graphic designer) what are (could be) the disadvantages of using scriptable objects.
     
  4. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    For our case, I honestly do not see any advantages / new benefits, so switching to scriptable objects would not just mean quite a bit work, but it woulds also make it incompatible to previous versions.

    But i must confess i am not really into scriptable objects, so i could miss something...
     
  5. Tropobor

    Tropobor

    Joined:
    Mar 24, 2014
    Posts:
    73
    In my case, the (great) benefit would be to decouple (even more) the logic from the texts database, the logic dealing not directly with very specific questions or answers list of strings, but with “terms” or “keys” (i2Localization terminology) that can be more easily modify, edit, extend or translate in external spreadsheets. In other words, I would rather only have my logic in inspector and my texts and sprites in a external editor. ( Here again my question is oriented by curiosity and certainly not by criticism :)
     
  6. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    We are currently working on a feature to export/import cards from excel (csv) to make card creation and editing more comfortable, this will be mainly for editing the text, the value changes still needs to be made in unity on the cards, but i think if everyhing works as planned it will be a nice improvement!

    I will release more details about this soon!
     
    Tropobor, digifilm, BBET and 2 others like this.
  7. digifilm

    digifilm

    Joined:
    Dec 5, 2013
    Posts:
    13
    Great feature. Will help my work immensely. Eager to hear more about this. Thx
     
    Maulwurfmann likes this.
  8. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Hi,

    unfortunately i can not do this, it would be unfair to other customers and then also many others would ask for a free version.

    Thanks for your understanding!
     
  9. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    93
    Hello,

    Thank you for the customized animation and followup card for a minigame. Everything works but I'm having trouble changing stat value based on the score of the minigame. The change in stat value will need to be passed back from the minigame scene to the 'minigame_followup' care in the KING scene...

    Let's say in the minigame's CS script, it has an scoreupdate event when gameover:

    // Fire event
    ScoreUpdated(Score);

    How do I pass the score/value back to the 'minigame_followup' card so the 'minigame_followup' card can CHANGE stat value and DISPLAY the value change ("you received xxx stat") in a textbox/label?

    Thanks!!
     
  10. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I would suggest doing the follow:
    1. Copy the whole "Values" gameobject into your minigame scene
    2. remove every other script except from "value manager" and the "value script" (e.g. country name generator, value change preview etc... they will generate a red error message)
    3. now you are able to display and modify values from Kings in your minigame scene
    4. use the setvalue script (or the function of it) to change the appropriate value
    5. use the display value script on the minigame_followup card to display this value

    Hope this helps!
     
  11. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    93
    -The "value" gameobject only has 'value manager', 'country name generator', 'value change preview'. Do you mean to manually add the 'value script' and 'set value' script to the gameobject after pasting into minigame scene?
     
  12. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    All values like name, country etc are also attached to the "Values" gameobject. So simply drag the whole "Values" gameobject with all it subvalues into the new scene and remove the scripts that generates error messages (e.g. country name generator, value change preview etc).
     
  13. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Here is now a quick preview of the Card Import/Export feature.

    1. There are different template cards which you can use a base for card creation
    card_templates.png

    2. "CardStyles" let's you config different type of styles for your cards, e.g. People, Army etc.
    card_styles.png

    3. You can export your existing cards as csv file and edit text comfortabely in Excel
    excel.png
    4. With the "KingsImEx" script you can then import then import the csv file again and the cards will be generated / actualized.
    ImEx.png

    It will be included with the next update ;) But it will still take a bit longer until finished, so please have a bit more patience.

    What do you think of this feature? Or do you have any suggestions?
     
    Tropobor, gabor17 and digifilm like this.
  14. digifilm

    digifilm

    Joined:
    Dec 5, 2013
    Posts:
    13
    Now that basic SVG is supported in Unity UI, will it be possible to have a demo scene with SVG?
     
  15. furkan1aktas

    furkan1aktas

    Joined:
    May 2, 2018
    Posts:
    33

    It looks really great. I congratulate you. You're doing a great job. :):)
     
    Maulwurfmann likes this.
  16. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    I will have a look at it, but can't promise anything yet ;)
     
    digifilm likes this.
  17. digifilm

    digifilm

    Joined:
    Dec 5, 2013
    Posts:
    13
    Thank you. If you need a hand with SVG files, feel free to holler. Keep up the great work.
     
    Maulwurfmann likes this.
  18. faqqqa

    faqqqa

    Joined:
    Jun 19, 2016
    Posts:
    4
    Awesome feature! Will it work with Multichoice cards(buttons instead of swipes)?
     
  19. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Yes, you simply need to select a specific card template for it.
     
  20. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Could you please explain how to do it in the current version (to change background and maybe music as well depending on а card or card stack)? Or I should better wait for update? I'm just starting to create my game with your great asset.
     
    Last edited: Jan 17, 2019
  21. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    The update should be available next week ;)

    Instructions for changing the background:
    1. Add the attached scripts to your project. (GlobalMessageImageSender is new, the other two simply needs to be replaced -> Scripts/EventMessageSystem)
    2. Go to "GlobalMessages" Gameobject and add an entry in "Message Images" and select the target background image
    globalmessageimage1.png

    3. Add the "GlobalMessageImageSender" script to the card where you want to change the background. And call the function "GlobalMessage" function from this script, in the below example it is "OnCardSpawn".
    globalmessageimage2.png

    If anything is unclear just let me know!
     

    Attached Files:

    Lady_Lai likes this.
  22. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    A lot of thanks and glad to hear about the update!

    And I have further idea. Want to know is it possible to realize it.

    I’d like to have several chapters in my game. For example, when all money is run out game is not over, but a new chapter is starting. Former king becomes a beggаr and tries to get his throne back, and this new chapter has its own set of cards, background, music and even new fractions.

    So can I create two different scenes, and ‘the end card’ of the first one will load the next scene? Some values (like years, intelligence) should be inherited from first chapter/scene/game, all other aspects will be completely new.

    How do you think is it possible to do such thing? :) Thanks for your answer in advance!
     
  23. furkan1aktas

    furkan1aktas

    Joined:
    May 2, 2018
    Posts:
    33
    Hello, I hope you're okay.

    That's what I want to do. All the cards in the game always come out once. Even if Game over, I don't want some cards to appear again when it starts again. How can I do that ? So I can make a story flow.
     
  24. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Yes, this is possible ;) But i would not do it like you suggested in two different scenes, i would to it in the same scene:

    1. You can only display values (fractions) if you want to, e.g. like in the marriage example, the value appear only if you have married, this means also you can hide values if you dont want them to show them
    2.Background can be changed with the GlobalImageSender scritpt, and Music can be changed with the updated Musicplayer script (function "setSong"), see attached
    3. for different card sets you have the "Group Cards" function of the Card Stack, e.g. you can add a group "Bankrupt", with the condition money=0-0, then add the condition to the "General" group money = 1-100. this mean when you have 0 money only the cards from the "Bankrupt" stack can be drawn, if then the player makes it back as king, you simply set the money value to e.g. 50 and the normal cards will appear again.

    If anything is unclear just let me know!
     

    Attached Files:

    Lady_Lai likes this.
  25. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366

    Do you want to display all cards at the same time? This is not possible.

    Or do you want to display every card just once, even after game over?
    The cards have an "Max Draws" option, simply set it to 1 and the card will only be drawn, but this will reset when a new game starts, to avoid it simply do "fake" game overs, which shows the player "gameover" but it does not trigger the games gameover. Make cards display only once makes no sence, since it would kill replayability...

    Hope this helps!
     
    Lady_Lai likes this.
  26. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Thanks! I thought about this as well. The only issue is left: can I bind background and music changes not with a single card, but with a group of cards or a condition (money=0-0 in my example)? So I will not need to attach this changing script to every card in a group and also I plan to have some neutral cards used both in General and Bankrupt stacks.
     
  27. Kohlis

    Kohlis

    Joined:
    Jul 30, 2018
    Posts:
    4
    Hi, i cant move with my first card. where ill find spawnedCard variable?
     

    Attached Files:

    • afaf.png
      afaf.png
      File size:
      11.9 KB
      Views:
      751
  28. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Yes, this is possible with the ValueDependentEvent script. For an example go to Values -> WarValue, see screenshot.
    I also added to my previous post the MusicPlayer script i forgot to attach.

    valuedependentevents.png
     
    Lady_Lai likes this.
  29. furkan1aktas

    furkan1aktas

    Joined:
    May 2, 2018
    Posts:
    33
    No. I know Max draws. I'm not talking about him.

    I have a card now. I give an example, the name of the card is Random-5. Random-5 is shown once. The player was Game over. Never show the Random-5 card again. How can I do that ? So it's kind of a save system.
     
  30. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    You probably removed or replaced the MainMenuCard, the "SpawnedCard" entry is in the CardStack, but it is currently hidden because of the CardStackEditor script (scripts/editor), you can remove this editor script, assign the MainMenuCard or similar one again, and then paste it again into the project.

    You will also receive later a updated script which shows this on default.
     
  31. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Can you please explain in more detail what you want to do, so i get a better idea, you can also send me a pm if you prefer. Thanks!
     
  32. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Please find updated script attached. Simply replace it with the existing one (Kings/Scripts/Editor), and the field for "Spawned Card" will be displayed in the "CardStack" script.
     

    Attached Files:

  33. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    93
    Quick questions, is the King template/scene already set up to dynamically fit any resolution screen?
    For example, in the build settings i switched to the iOS platform but do not see latest versions of iphone aspect ratio to test...
    upload_2019-1-22_20-55-0.png
     
  34. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    By clicking on the "+" icon, you can add any aspect ratio you want, e.g. 9:19 and check out if it works. If you click on "CardCanvas" you will have an "CanvasScaler" which allows you to setup the scaling and adjust it to your needs.

    But in the current version the notches have not been considered, so they will cut off some ui elements. If you have just started with your game i would just wait a bit longer, with the update 1.40 which should be finished by tomorrow, i have changed the design to work with notches and aspect ratios are supported up until 9:19.5.
     
    digifilm likes this.
  35. Domovoi0ng

    Domovoi0ng

    Joined:
    Jan 18, 2016
    Posts:
    1
    Any voucher codes left? :(
     
  36. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Sorry...
     
  37. gabor17

    gabor17

    Joined:
    Feb 21, 2015
    Posts:
    1
    Trust me, it's really worth the full price too!
     
    Maulwurfmann likes this.
  38. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Update 1.40 is finally finished. :)
    I will now wrap everything up, update the documentation and then upload it to the asset store!

    If you want to try it out, you can play here the web-version: Play Kings 1.40

    Unfortunately "TheMayor" demo scene will not be included in this update, since i hoped i could use some of the art from Synty Studios, but it looks they are not interessted, so i have to get the art from somewhere else, but i didn't want to delay the update any further, so it will be included in the next bigger update. But i have implemented every new feature into the reworked Kings scene and i thinks it's a huge improvement.

    edit: Update is now submitted to the AssetStore.
    Please note Project has been updated to 2018.2.20, you probably won't see it if your Unity version is lower.

    Update 1.40 new features
    - Card import / export feature, to easily edit text in Excel
    - Card styles, allows quick editing the design of the card (you will love this!)
    - Game demo scene reworked with new design
    - support for Particle Effects adds
    - First Start Panel
    - Typewriter text effect
    - Reset Player Prefs – from editor and ingame
    - Restart Game Button
    - support for hypercard and shadero assets
    - new card templates and animations
    - Project updated to Unity 2018.2.20f1
    - and many other minor changes and improvements

    Game_wide demo scene was not updated and moved to _old folder, since it will be completely replaced with new game demo scene in an future update.

    !! Please always backup your project before updating, to prevent data loss !!
     
    Last edited: Jan 24, 2019
    Lady_Lai, gabor17 and digifilm like this.
  39. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Update is now available in the Asset Store!
     
    digifilm likes this.
  40. faqqqa

    faqqqa

    Joined:
    Jun 19, 2016
    Posts:
    4
    Hey guys, is there a way to either:

    1 - Make another card the _StartCard

    2 - Make it so that the _StartCard uses buttons instead of swiping (as a multichoice card)

    3 - Or something similar?

    We are trying to use a game that uses only buttons and no swiping. We had to disable te Swipe script in order for it to work, since there is what appears to be a small bug that makes multichoice cards swippeable after you enter the menu.

    So far it has worked out fine, but we are having problems with the _StartCard. We haven't find a way to replace or remove it. It is always the first card to appear, regardless of it being inside the available deck.

    (We are using the previous version of the asset)

    Thanks!
     
  41. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    1. Go to the StartCard in the EventScript there is an option "is High Priority Card" simply uncheck it, and check it for the card you want with the condition "Years 0-0", alternately you could also go to the MainMenuCard (which is placed in CardCanvas->Cards) and set the card you want as a "FollowUp Card".
    2. Just take the Multichoice card and modify it, that's the easiest way, but you could also simply add buttons and call the same functions as the buttons do from the multichoice card.

    You are right, the menu button will make the multichoice cards swipeable, because it calls the function CardStack.setCardMoveEnable when Menu opened or closed, since you do not want to use swipe you could simply remove this function from the MenuButton, but disabling the swipe script should also work.

    If anything is unclear, just let me know!
     
    faqqqa likes this.
  42. faqqqa

    faqqqa

    Joined:
    Jun 19, 2016
    Posts:
    4
    Thanks for the quick reply. I actually got confused, I was referrencing the StartCard but my real problem is with the one who says "swipe to start"(and is called "MainMenuCard" on the Hierarchy).

    I can't remove it from the hierarchy because then no other card appears, right? I tried to make it into a multichoice card by pasting the options inside it, but they didn't lead nowhere at first. Now I can't even test it on my computer because the "swipe to start" card doesn't appear again.

    Yet, if I test it on another computer(by compiling it), the card is the first to appear.

    TL;DR: I want to remove or replate the MainMenuCard that shows the "swipe to start" in its swipetext.

    Again, thanks for the help, and sorry for the confusion.

    EDIT: I also have tried putting impossible conditions on that card, but it appears anyway.
     

    Attached Files:

    • aaa.png
      aaa.png
      File size:
      10 KB
      Views:
      732
    Last edited: Jan 26, 2019
  43. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366

    Please find attached updated script. Replace this with the existing one (Kings/Scripts/Editor). -> This has already been fixed with 1.40.

    Then you have to go to Hierachy window: CardCanvas -> Cards -> MainMenuCard
    remove this card here and add the card you want.

    Then go to Scripts -> CardStack and in the "Spawned Card" field link in the new card.

    If anything is unclear just let me know!
     

    Attached Files:

    faqqqa likes this.
  44. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Just in case someone else getting error messages when using Unity 2018.3:

    If you import the Kings Asset disable "ProjectSetttings" and "Packages" in Import Screen.

    import20183.png
     
  45. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Maulwurfmann, thank you very much for the update! Yet I'm very interested in Game_wide scene as well. :) Want to know how soon you are planing to update it. Or maybe you are thinking to replace it completely with The Mayor scene?
     
  46. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    edit: game_wide scene has now also been updated.
     
    Last edited: Apr 1, 2019
  47. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Thanks! I'll try it! And one more question. Does The Mayor scene use mainly multichoice cards with buttons? If I have a game for smartphones based on swiping cards, will it be easy enough to convert it later into The Mayor style widescreen game? How do you think?
     
  48. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    Yes, it will be mainly multichoice cards with buttons, but you can of course still use normal cards with swipe function, i will also add example cards for this.

    Regarding the Mayor scene, it should be no problem to adjust it like this, since it mostly the same, it just uses another design for the cards etc.

    But since i got some other requests for this scene too, i will release a new update in the next few days which will include the mayor demo as a preview version, with only a few cards and placeholder art, which you will simply have to replace.
     
  49. Duxx

    Duxx

    Joined:
    Mar 22, 2014
    Posts:
    10
    Would it be possible to send me the scene "TheMayor"?. I own all of Synty's resources and I'm just making a game like that, so I could really use some ideas.
     
  50. Maulwurfmann

    Maulwurfmann

    Joined:
    Mar 11, 2014
    Posts:
    366
    As i wrote above, i will release an update which includes the modified Mayor scene in the next few days.