Search Unity

KINGS - Card Swiping Decision Game Asset

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

  1. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi interpretasyo,

    there would be different possibilities to include a share functionality.
    We didn't implement this kind of share possiblity natively, because it's never stable. Interfaces of social sites change so does the Interface of Unity to this kind of functionality and therefore is Unity version dependant...

    We did this some years ago for Road Rush Racer (2016) and also used plugins from the store. I'm not up to date which plugins are actual at the moment, but we used one which allows for one Button or Eventroutine call and then lets select the user for more than just facebook (e.g. Twitter, Facebook, Instagram, Mail ...) and has a unified Interface for doing this.

    They usually come with a Button example which makes a screenshot.
    Then it would be possible to integrate the share button e.g. in the Gamover scene or in one of your menues. Or call it over the event messages we implemented.
    The one we used could enable additional canvas before taking the screnshot to show the score. This way we didn't need extra scripting for generating texts.
    It then opened an integrated UI to let the user select to which social interface he wants to publish.

    IMHO, because of the vast amount of possible social interactions I would not implement it myself. There should be finished solutions for this on the store.
     
    interpretasyo likes this.
  2. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Hello! I've started to alter existing Game scene and made some changes in UI, but a weird thing happens. In a Play mode I don't see any of my changes until I quit and load again. Now the game starts from a save point and I see all my UI changes and continue playing. Yet after I use Restart or Clear data functions and start a brand new game I don't see any changes again. Untill I quit and reload again. What am I missing? Thank you.
     
  3. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hello Lady_Lai,
    this, indeed, is strange.
    I have several questions regarding this behaviour:
    • Which Unity Version do you use?
    • What did you change? E.g. replacing images or moving Canvas? Did you keep the original UI at the same time in the Inspector? Which portion of the UI was changed?
    • Did your changes in the UI also include deleting items?
    • If you load a backup of your project, is this behaviour also there?
    • How does your game behave after you play through (to game over) and let it automatically restart?
      Or is this your definition of restart?
    At the moment I can only think of two possibilities which could cause this behavior:
    • If the Issue only occures after Resetting the game (not after game over), it could activate a canvas (Inspector->Scripts->First Start Game Object Setter) FirstStartGameObjecttSetter.PNG . If you copied portions of your UI this could possibly reactivate the original one and overlay it to your existing UI.
    • Secondly, if it occures each start (also after game over), the start of the game could be altered from the GameStateManger (Inspector->Scripts->GameStateManager). I attached the original configuration:
      GameStateManager.PNG
      If it sends a Message or activates something (depending on your configuration) by the Event "OnNewGame()" this could explain your description regarding it only happens on the start of a game. This could also imply, like the first option, that there are portions of your old UI which are getting activated.
    Because of the possible complexity of this issue I would suggest to conatact me over mail (support@km-games.com) so we can try to solve your issue there.
     
    Lady_Lai likes this.
  4. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Thanks for your detailed answer! Looks like I've figured out the problem. I've copied the Game scene file in an another folder and started to alter it there. So something mixed up, I experienced bags with values numbers as well. After I've deleted the original Game scene file, everything works fine with my altered one.

    For now I have one more question. There are two different PersonalStatsPanels (for landscape and portraits views), both contain the same sliders. I can't understand how to make both of them work. Should I somehow link two sliders to the Value script, which has only one field for UI slider, Text value, etc? Hope, you understand what I mean.
     
  5. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi, glad you found the previous error.

    Regarding the display of values in sliders, this is done with extra scripts.
    The Script "ValueScript", which manges the save/load and altering of an value, can only be there once per value. [Edit: Removed wrong Info.]

    Alternatively the script "ValueDisplay" can be there multible times per value.
    "ValueDisplay" only uses the information from a value and can not alter it. But it has more options, like showing the maximum of a value as text:
    ValueDisplay.PNG

    I hope this helps.
     
    Last edited: Feb 18, 2020
    Lady_Lai likes this.
  6. Lady_Lai

    Lady_Lai

    Joined:
    Jul 24, 2017
    Posts:
    16
    Hi! Looks like the same situation with achievements? PopUpPanel Title and Description fields are linked to the Achievement script and work correctly. But what about those from AchievementsPanel? I've linked an object from it as in documentation, but it still doesn't show my Title and Description. How should I link them?

    And I'm a bit confused about the quest system. I'd like to get an ordinary PRG system: a player gets a quest through storyline, fulfills it and then the quest goes to the completed section. All quests are not repeatable. What do I need to do to achieve this? Set the Max Nr of Active Quests to really max available in the game? And in this case, when any quest meets requirements (means a player took it), will it be set active automatically?
    Btw, what do open quests mean? All available in the game, but are still not active?

    Thank you in advance!
     
    Last edited: Feb 24, 2020
  7. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi Lady_Lai,
    regarding the achievements I admit that it could be somewhat clearer and better automated.
    The ones from the AchievementsPanel are not automated, sorry.
    At the moment there exists one subelement like "Achievement2RuleYears5" for each stage of the achievements:
    achievementSubelement_RuleYears5.PNG
    The texts of this are not altered by the script, the ones configurated in the Inspector are used.
    By linking this elements to the stage of an achievement in the AchievementsScript like:
    linkedAchievementGameobjectInAchievmentsScript.PNG
    it simply getst activated/deactivated according to the stage of the achievement.
    To add more elements here, duplicate and configurate the elements (from the first image) and link them in the achievments scripts.
    Please excuse the inconvenience at this point, this part could be better automated by us.
     
  8. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Re
    I tried to solve your second issue. The behaviour you described was not achievable, because it was not possible to add quests from cards directly.
    I extended the scripts and wrote a step by step tutorial for starting quests with cards. I put the description and the tutorial in a pdf, because this was a little bit larger.

    The tutorial and the changed scripts are attached. Don't forget to make a backup of your project before, incase of an incompatibility that was not foreseen.
     

    Attached Files:

  9. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hello everybody,

    I've been informed that the links for documentation and demos on the asset page are currently not working.
    I am very sorry for this inconvenience and will try to solve this problem quickly.
    I hope to reach my hoster before monday.

    Greetings
    KMDeclius
     
  10. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    I'm having the same problem.

    I tried changing the images of Card Front and Card Back in CardStyle_t00 - CardStylet04 and that did not work. Please let me know if there's something I'm not understanding. The source image just stays as "card" and cannot be changed.

    Cheers
     

    Attached Files:

  11. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi Chekmate,

    in the demo scene are more styles used. To determine what style your card is using (depends which card you copied from) : if you click on your prefab for this card, there should be a script called "CardStyle". There should be the style for your card.
    determineCardstyle.PNG
    If you double click your style, you can change the elements. E.g. here I did it for the Icon:
    changedIcon.PNG
    By changing Card Front you can change the Front of the card, this also affects the masking. As an example the card front changed to some circle image:
    changeCardFront.PNG
    This of course works with other images, but can result in stretched images and make a big space around the center of the card (like it seems in your screenshot). Following example is not as extreme, but you can see the edges are not very well defined:
    changeCardFront.PNG
    To fix this, Unity uses 9-Sliced Images. After changing the the image itself the result is more defined:
    9SlicedCardFront.PNG
    How to apply 9-Slice to an image:
    https://docs.unity3d.com/Manual/9SliceSprites.html

    I was describing this steps, because in your screenshot there is a similar change.
    The strange thing for your card is, that two cards are displayed in you screenshot.
    Did you make the screenshot in play mode?
    For testing you should remove your modified card prefab from the Hierarchy.

    I hope this helps.
     
  12. david_101

    david_101

    Joined:
    Feb 26, 2020
    Posts:
    3
    Hi guys,

    I just purchased this asset. I'd like to release this on ios/Android.I have quite a number of questions as I'm new to this. I'm trying to make my layout and setup very similar to "Reign". Here are some of the things I'd like to edit it do so I can replicate the look:

    1) Have a title screen splash similar to Reign. Not much animation but simple enough.

    - Start Game Button below with spinning icon.

    2) Have card pile always fall down animation with shuffle sound effects on new game (similar to Reign).

    3) On the 1st playthrough always have an "welcome intro card" and follow up cards (check Reign's Spirit King intro).

    4) Instead of next card animation coming up from bottom screen, have it flip over as a card pile. (Similar to Reign)

    5) Instead of the "scenario text" being inside the card, I'll have the text displayed above/outside the card, and the name of the avatar displayed at the bottom. (Like Reign)

    I just really dig their format/layout but don't have an idea on how to make it.

    Here's an idea on the layout I'm talking about. Just the first 50 seconds will give you an idea on what I'm talking about.



    If anybody has done this or has already made some similar mods please let me know. I have a great concept, and I'd like to be able to be able to hit the ground running.

    Thanks.
     
  13. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    It did help, thank you very much!
     
  14. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    This Getting Started video has not been very helpful at all... are there any plans to make a new one? I'm spending days just trying to figure how to actually get started because the video has so many out of date instructions.

    Perhaps I'm doing something wrong but the way you make new cards seems very unorganized to me. The way the video lays it out it looks like all the sprites and text can all be edited in the card's Event Script, but for my version that text does nothing. I have to go into the baseCard's sub-parts "TitleText", "QuestionText", "AnswerLeft", and "AnswerRight" to change the text for the card. Then if I go to change the icon, I can't actually change it without going into the card's CardStyle to find which "cs_Xxxx" it is referencing and then changing the Icon in there.

    Is there something I'm missing here? Why can't I just edit everything in one area like in the Getting Started video?:


    Cheers
     

    Attached Files:

  15. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Sorry for the delay, I was busy getting the links for the asset page working again.
    I'll try to look at your requests soon.
     
  16. david_101

    david_101

    Joined:
    Feb 26, 2020
    Posts:
    3
    Hi KMDeclius,

    Just wanted to know if you can answer some of my questions above. I'm trying to be productive but game development isn't my wheelhouse.

    To you or anybody who can lend some guidance I'll appreciate it. I'm willing to pay for personal guidance as well if anybody is available?
     
  17. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi david_101,

    You could add another "Scene" before loading the kings scene itself.

    For Animations and Sound-effekts: One (fast but propably not the best) thing could be adding an Animation wich starts with the load of the scene and putting the GameObject for it after the card (image, position b):
    drawCardStack.PNG
    After the animation was played you could activate a GameObject representing the card stack wich is at position a, then it would be drawn below the card.
    The drawing order of elements is still Unity, so it could be affected by things like the order in the Hierarchy, additional Z-Offsets and depending on the configuration on different layers.

    The way this could be possible is following: Create a "value" for this (It doesn't have to be exposed to the player). Like "FirstGamePlay" and starting it with 0. Configurate this value to persistent, so it will not be resetted after a game over.
    Create a Substack for these cards in the card stack and let the conditions for the first playthrough draw this stack. For the other stacks disable them by using the conditions (like draw the other stacks only if "FirstGamePlay" is 1 or bigger).
    As a result of the first card which is drawn set the value "FirstGamePlay" to 1. This way the card sub stack for these cards will not be used again.

    Follow up cards are defined from each card (see image, Prefab->EventScript) and can be triggered by swipe directions or generally after a card by filling both with the same card. The prefabs for the cards still have to be part of the card stack for saving/loading.

    followUpCards.PNG
    I myself am not very familiar with the animations of Unity, but they should be changeable for each card. Extending the CardsSpawn Animation could be possible:
    cardSpawnAnimation.PNG
    but I don't know how good Unity can handle the "flip" for the Rect Transform, modifications in the Animator for Rotation.Y could do the trick (!?).

    Regarding the text, this can be modified in the Card-Prefab. See the example Card "NoMovingTextPrefab". Theres the Hierarchy altered in a way that the animation of the Card only affects the card and not the texts:
    Non moving texts NoMovingTextHierarchy.PNG vs. moving text: FullAnimatedCard.PNG .
    The behaviour of GameObjects in the Hierarchy is defined by Unity. To describe all behaviours of unity here would go beyond the scope of this article. There are a lot of tutorials from Unity itself.

    Regarding the name: you could add a text field in your Canvas and add the script "CountryNameDisplay". Link the elements you want to display into the script.

    I'm not 100% shure these solutions will work for all your cases. Even without coding, getting familiar with Unitys structure is still neccessary. Extended functionality, which is not covered by the Kings asset, will still require additional scripts and coding.

    I hope this helps.
     
  18. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi Checkmate,
    yes, this is a little ambigious. In fact some of your describe behaviour was well requested by forum users and some addresses issues regarding the behaviour of Unity.

    Regarding the CardStyles:
    The CardStyle is not mandatory, you can remove the script from the card prefab (see a, then apply for the prefab at position b):
    removeCardStyle.PNG
    Then you should be able to alter the images directly.
    BUT(!): This component allows you to have many cards with the same base style. If you want to alter some images later you can simply alter the (shared) style and don't have to alter each card. This sounds like a benefit to me.
    Second thing is that by this style new cards can be imported and created using the ImEx window. Some links between imported strings and the style have to be set correctly, then it can directly create new cards using the style.

    Regarding the prefab behaviour (or: Why is it not exactly like in the video?):
    Unity changed some of the behaviour of prefabs. The video was made in 2018.2. Newer Unity versions only allowed modifications in an extra Window where the Hierarchy was not visible. For 2019.2.17f1 *1) (the one I'm using at the moment) it looks like both options are working. Please excuse me, but creating a video for each Unity version is a bit too complex. I hope that Unity will be more consistent again and that I can make the necessary adjustments.

    Sidenote *1): We try to give support over multible Unity versions. Using newer Unity versions is possible, but the import of the asset directly into the newer versions can cause strange behaviour. Possible solutions can be installing Unity 2018 and then upgrade to 2019. Another possibility could be deactivating some of the depracated packages upon import.
    As a general rule: (Please) don't start your project with one Unity version and upgrade later if not neccessary.
    As a second rule: Make Backups. Especially before changing critical things.

    Regarding the texts
    If you are using the Event Script and the example prefabs to change texts, they will be not updated in realtime.
    They will be updated when the card spawns in play mode. I believe this behaviour is also visible in the tutorial video.
    The reason for this is, the texts are not simply replaced. Before they are set they are going through the translation and can be altered by e.g. text replacements for numbers, values or dictionary keys.
    It would be possible to get this live in the editor running, but it is not worth the effort.

    If the text is not replaced by the one in the event script, this would be another issue but I'm not aware of such a case.

    Sorry for the long response, I will give a TL;DR:
    • CardStyles are not mandatory but can help altering many cards at once.
    • Texts of the cards are altered when the card is spawning.
    • The viedeo is not fitting for each Unity version. Yes, the CardStyle Part is missing. Sorry.
    I hope I covered all of the topics and hope this helps :)
     
  19. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    Thank you, yes it was very helpful. I don't need the CardStyle for my needs so I've removed it for now, thank you very much for the insightful reply!
     
    KMDeclius likes this.
  20. david_101

    david_101

    Joined:
    Feb 26, 2020
    Posts:
    3
    Thanks. I'm going to try and absorb some of this info. It really is beyond me at this point.

    I'll send you a pm shortly.
     
  21. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    Hey again!

    I'm having problems with Random Conditions in my Event Script and can't seem to get it working.

    As an example, I've set my starting player Strength to be 10. I then set my Abra's Random Conditions to be 1. If you succeed the Battle, you get +5 Intelligence, but if you lose, you get -5 Intelligence. And if you'll see in the GIF, I lose the battle even though my starting Strength is 10 and the Abra's Strength is 1. My expectation would be that because my 10 Strength is greater than his 1 Strength, I should win and gain 5 Intelligence, not lose 5 Intelligence.

    Is there something I'm not understanding here?

    Cheers
     

    Attached Files:

  22. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi Checkmate,
    you got me on this point. I didn't catch the case, where the range is limited like in your example.
    You are correct, the evaluation of this condition is not as expected in your example.

    As the documentation states, a range like 1-100 would generate random limits, e.g. 57. What's not so clear is the fact that the evaluation of the result takes the second number as maximum. In my example 33 would result in false-branch because it is lower than 57. 66 would be true because its bigger than the random number. And sadly 101 would be false again, because it is over the maximum of 100.

    In the case you showed here, 10 is bigger than the maximum of one and therefore the condition is evaluated as false. Because this old behaviour could be still used I have to find a clean solution which doesn't interfere with existing implementations.

    As a quick (and dirty) solution you could easyly modify it the following way to work as expected in your case:

    Open the file "EventScript". Around Line 728 there following statement:
    Code (csharp):
    1.  
    2.                     {
    3.                         //set the minimum border for the conditon between min and max,
    4.                         //if the real value is over min, the path 'true' is executed
    5.                         c.valueMin = v.limits.min + rndCResult * (v.limits.max - v.limits.min);
    6.                         c.valueMax = v.limits.max;
    7.                     }
    8.  
    and change the line for the max value to e.g. 999f :

    Code (csharp):
    1.  
    2.                     {
    3.                         //set the minimum border for the conditon between min and max,
    4.                         //if the real value is over min, the path 'true' is executed
    5.                         c.valueMin = v.limits.min + rndCResult * (v.limits.max - v.limits.min);
    6.                         c.valueMax = 999f;
    7.                     }
    8.  

    Sorry for the "dirty" solution here. Could you please test it to see if it's suitable for your case?
    Feedback is welcome, I hope it helps.
     
  23. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    Hello, thank you for your design and development. I have bought it today.However, I found a issue that needs your help, because I can't find the 【cardback】 material in the asset folder, but in your teaching video, the 【cardback】 is in the asset folder is available. But I can't find it. plz let me know how to find it.
     

    Attached Files:

  24. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    PS: I cant find the 【Game_Wide】 , only 【Game】
     
  25. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    I see, this makes sense. Unfortunately, this solution is not working for me :(
     
  26. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi Chekmate,
    I'm very sorry to hear that.
    I believe I catched a bad day programming this two lines of code, there were several bugs o_O.
    This time the tested (!) version:

    Open the file "EventScript". Around Line 728 there following statement (the original):
    Code (csharp):
    1.  
    2. if (v != null)
    3. {
    4.     //set the minimum border for the conditon between min and max,
    5.     //if the real value is over min, the path 'true' is executed
    6.     c.valueMin = v.limits.min + rndCResult * (v.limits.max - v.limits.min);
    7.     c.valueMax = v.limits.max;
    8.  }
    9.  
    to
    Code (csharp):
    1.  
    2.  if (v != null)
    3. {
    4.     //set the minimum border for the conditon between min and max,
    5.     //if the real value is over min, the path 'true' is executed
    6.     c.valueMin = c.valueMin + rndCResult * (c.valueMax - c.valueMin); // <-This is now really input depending.
    7.     c.valueMax = 999f;
    8. }
    9.  
    I hope this helps (now).
     
  27. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    It works!!! Thank you!!! I am also getting this error too now...

    Code (CSharp):
    1. Card was not found in stack. Card index couln't be saved.battleCommonAbra
    2. UnityEngine.Debug:LogError(Object)
    3. CardStack:addDrawCnt(GameObject) (at Assets/Kings/scripts/CardStack.cs:261)
    4. CardStack:spawnCard(GameObject) (at Assets/Kings/scripts/CardStack.cs:676)
    5. CardStack:newCard() (at Assets/Kings/scripts/CardStack.cs:736)
    6. <moveCardOut>d__53:MoveNext() (at Assets/Kings/scripts/CardStack.cs:633)
    7. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    8.  
     
  28. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi BOOMCAT1981,

    welcome to the forum.

    Regarding this folder:
    This is an example in the video for importing your game art. At this point we encourage you to prepare some of the your own art you want to use in the asset and wanted to show how to import it. You can use your own created images or ones you get from somewhere else. Please be aware to use images compatible with Unity. E. g. for Icons use png files with transparency and import them like shown. Or for card backgrounds use full images or smaller ones with 9-slice like described some posts before.

    Regarding the 【Game_Wide】 and【Game】scenes.
    These are integrated into one scene, it automatically realigns the elements:
    AutoSceneChange.gif

    To achieve this, there are multible UIs which are switched, like for the Inventory:
    UI_landscape_normal.PNG

    The activation and deactivation is done from the orientation handler:
    OrientationHandler.PNG
    If you want to start your game only in one configuration (e.g. landscape only), this have to be configurated in Unity itself. Heres a post for this, I didn't test it myself:
    https://answers.unity.com/questions/774186/landscape-mode-only.html

    I hope this helps.
     
  29. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Like the Error messages said: the card "battleCommonAbra" seems not a part of the stack. I saw in a previous post you defined the card as "Follow Up Card" therefore it is loaded. But to be able to load it again (after the player left the game and returns) it has to be added to the stack. Then it could save the index of the card from the stack itself.

    Could you please add the prefaba (the one you defined as follow up card) into the stack and try it again?

    I hope this helps. And I think I need a new punchline :p at the end.
     
  30. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    Yes, the fix works! I did not know that all the cards had to be added to the stack, my mistake.
     
  31. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    Goodday!, thank you for your reply.
    I've got it.
    Because I misunderstood the teaching video before. :p

    PS:I personally suggest that the guidance content of the video should be updated to the latest version and match the game version

    or more progress details in game docs or 【playmaker】 version for no coding newbie (like me lol)

    and more thanks for you
     
  32. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    The reason behind this is, that background save system uses the index in the card stack for saving the card. One issue which arises is the card is now drawable from the stack. This is simply solved by unchecking the parameter "Is Drawable" on the card:
    NotDrawable.PNG

    The card can now only occure in play if a previous card defines it as follow up card. But it can't be drawn randomly from the stack anymore.

    Gn8
     
  33. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    yes is me again ~~ how to fix this error when I 【Analyze Import】flowing the Tutorial document (Edit and create new Cards with Kings ImEx)

    Cheers !
     

    Attached Files:

  34. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi BOOMCAT1981,
    this is a litte bit strange.

    What Unity Version do you use?
    The screenshot seems like one of the newer Unity versions.

    The error says, it can not find the styles for importing the cards.

    I will describe the detailed process for importing cards:
    1. You exported the existing cards to a csv file (or created a new one).
    2. Theres a column in the csv file for card styles, this has to be a text (in your case e.g. cs_War).
    3. While importing this text is used to link the new generated card to a card style.
      More about card styles is in the documentation.
    4. You added the style definition "CardStyle_List".
      This list contains the styles to apply to your cards. You can have multible of this lists to switch between different style sets. The styles in the list should match per name to the card style names from your csv file.
    At this point your import fails because e.g. cs_War is not present in the List. You can double click the file "CardStyle_List" to get following view in the Inspector:
    CardStyleList.png
    All the styles defined upon importing should be present. This is a default list and should match your import. The errors you get sound like the list was altered.

    Therefore there are some questions to solve this issue:
    Perhaps you could provide a screenshot of your list?
    If it is the same, could you please tell me your Unity version so I can try to reproduce it?
    Another question is, did you open the csv with a software for editing? I see this strange commas at the end for the answer down were imported. Some time ago I tried to reproduce it with excel to get this strange csv-malformat but didn't succeed. Which software do you use for this?
     
  35. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    Hey there again!

    I've got my core gameplay prototype up and running thanks to your help so far, so thank you very much for the helpful replies, I left you a 5-Star review! I have another question that I haven't been able to find in the answer to, however. I'm trying to create new items, but I don't see where any of the item functionality is located or assigned. For example, how does the Crystal Ball do its behavior?

    Here's what I'm trying to do, and perhaps you can let me know if it is something I can do with the current asset... my coding skills are almost non-existent unfortunately...

    I want to make it so that players can get items that have "Passive" benefits. I'm not sure if you've played Slay the Spire, but the Relics from that game would be a good example. For example, I would like an item to gain an extra amount of Gold or Charisma when you "win a war" or "defeat a monster" etc. Is there perhaps a list of item functionalities, plans for new ones, or have other people created some that I could use?

    Does that all make sense?

    Cheers
     
    KMDeclius likes this.
  36. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    Thanks your help:

    1) my UNITY version is 9.3.3.f1
    2) CSV open by excel (Microsoft Office\Office16)
    3)when the same issue show again then I will screenshot and post the issue progress

    Now, I will revise the import list and following fix from your reply :)

    and more thank you from your reply in details progress
     
  37. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hmm... should be possible.
    Depends, when do you want to give the boni?

    There are two things you can do with items.
    First: consume them. But not for your case.
    Second:
    Items are embedded in the overall condition system.
    The conditions are used in different places like card results,
    or even in the stack for groups or on cards itself.
    As an example, it should be possible for a card to only spawn if the user have an item.
    By the way, conditions also work with dictionaries.
    Meaning "something" can be done depending on items.

    Simple Way but not very flexible:
    One way would be using the results of an card (when the user swipes).
    By using the condition system you could give different boni depending on an item, like the true/false conditions you already used:
    ResultConditionItem.PNG
    In this example the user gets Charisma +10 if he swipes left and has a MoneyChest.

    A litte bit more complex but more flexible:
    If you want to give multible conditional things depending of items and dont want to alter the usual results, theres is another way to add additional things to your card by using the script "MakeChanges" (I know, sometimes I'm not very creative giving script names :p).
    Add the "MakeChanges" scripts to your card and call them by the events of the EventScript on your card:
    MakeChangesOnCard.PNG

    Don't use the event when the card is spawning. If the player leaves the game and the card is spawned again, this will also be called again and therefore can be used for cheating.
    The other events should be save.
    If you added and configurated the "MakeChanges" scripts you could drag and drop them one by one to the event (press the "+" on the event before).

    I didn't test this, but I hope it works this way. Feedback is welcome. Gn8.
     
  38. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    One thing I forgot to mention: Unfortunately, "MakeChanges" scripts are not considered for calculating preview values.
     
  39. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    Hey KM a new issue from this version

    I can't change and edit some card image and color like this(screenshot)it to locked?from script ?
    how to unlock and edit ?

    In Folders progress:Assets-》Kings-》Cards -》General -》Admob (doubleClick)
     

    Attached Files:

  40. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    I thought must click this and change 【None】then unlocked the Image change
     

    Attached Files:

  41. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hi BOOMCAT1981,
    Colors and Images are defined over the card style. The reason for card-styles and how to modify them is discussed some post higher (on this page), theres also a description how to access it.
    You can remove the card style script itself, but then the Import/Export will not work anymore.
    I hope this helps.
     
  42. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    thank you very much
     
  43. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    Hi KM

    when I build to APK(android) it pops up cant build , said the need to password for the build. I didn't find any about the key in the document,please let me know what kind the key it means.

    Cheers
     

    Attached Files:

  44. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    This is a part of Unity.
    If you want to generate a build for android you have to generate a Keystore where you enter passwords.
    This is a protection method for your game. How to:
    or
     
    BOOMCAT1981 likes this.
  45. interpretasyo

    interpretasyo

    Joined:
    Jun 18, 2019
    Posts:
    33
    Hi,

    How are we going to refer the QuestionText found in the current card in code?
    Because the card is always changing every swipe. But there will be QuestionText in every card.
    Also for the current CharacterDescription, how are we going to refer the value of it in a code?
     
  46. BOOMCAT1981

    BOOMCAT1981

    Joined:
    Jul 28, 2018
    Posts:
    37
    cool! love you !! thanks
     
    KMDeclius likes this.
  47. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    Hello,
    I'm not quite sure what you're trying to achieve.
    The cards themselves are prefabs, they have attached the script "EventScript", in which the question text per card is exposed to the inspector. This is the basic text for the card, when the card spawns, it can be modified (e.g. translated or by value replacement) and is then written to the card.

    The questions here are:
    Do you want code access to the question text on the value script or do you want to get the calculated question text that appears on the card?
    Do you want to change the text from outside, e.g. do you have your own script that changes these texts?
    From where do you want to get access to the code? If you have a script in the scene and want to access the spawned card, it needs some kind of reference (which is actually inside the card stack), that's different from having another script on the card itself. The spawned card is accessible via the public GameObject "spawnedCard":
    Code (csharp):
    1.  
    2.    [Tooltip("The actual spawned card.")]
    3.    public GameObject spawnedCard;
    4.  
    If this reference is not null, it can be used to access the EventScript script.

    Unity itself has some additional techniques for accessing elements through code access, such as tags and search functions that can be called from within the code.

    If you give me more information, maybe I can give you a code example. But I need to know from where you want to access exactly what.

    Similarly with the "CaracterDescription", could you give me a small screenshot with a description of what you want to access and please also describe from where you want to access it?

    [Edit: fixed some translation errors :) ]
     
  48. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    I made a quest that activates when you have an item, and tried to call it to MakeChanges when you swipe left on a card, but I don't see the anility to call it in the drop down... where did I go wrong?
     
  49. Chekmate

    Chekmate

    Joined:
    Sep 24, 2017
    Posts:
    77
    I forgot to attach the image. Here it is.
     

    Attached Files:

  50. KMDeclius

    KMDeclius

    Joined:
    Aug 12, 2019
    Posts:
    213
    @Chekmate:
    Thanks for the Image.
    You tried to do something with the Quest Definition itself. The definition itself is seen as a pure data object and can not directly be activated.
    It shoult be possible to activate a quest from the "Make Changes" Script, like you did.
    To call the script, which will execute your desired behaviour, you have to call this. I expanded your screen shot:
    MakeChangesOnCard_DragNDrop.PNG
    1. Remove the Object you wanted to acces
    2. Drag and drop the script, which shall be called to this position
    3. New options will appear. Select something like "MakeChanges->ExecuteEffect" :
    MakeChangesOnCard_SelectFunction.PNG

    I didn't test it myself, but the configuration of the additional script to activate the quest perhaps could look something like this:
    makeChanges_conditionalItem_activateQuest.PNG

    I hope this helpsl