Kings – Card Swiping Decision Game Asset

Ever wanted to create your own King/Dictator/Leadership or any other decision based simulation game? Here is the complete kit for this!

Web-Demo | The Mayor Web-Demo | Android-Demo | Documentation | Forum | FAQ

Features:
• easy to reskin and modify
• different decision / result types
• unlimited number of stats/factions
• complex value system
• persistent values
• card import / export feature, to easily edit text in Excel
• card styles, allows quick editing of the card design
• Achievements & Highscore System
• Life summarization (Game Logger)
• Character Name Generation
• Decision Results Preview
• Supports: I2 Localization, Hyper Card, ShaderO, Unity Ads, Google Play Games and iOS Gamecenter*
• Documentation and commented C# code
• Full working game example, release-ready without any coding experience
• Optimized for mobile, but works for all others platforms with mouse/touch input
• and much more!

* iOS Gamecenter support requires a separate Plugin

Contact: support@km-games.com
Asset Store Link: http://u3d.as/11kM

FAQ:

How should I get started?

The best way to start is to read the Getting Started Tutorial and the Documentation. If there is still something unclear, or you encounter a problem, to not hesitate to contact us by E-Mail or in the Forum.

How to trigger/modify conditions for Game Over?

The demo scene is set up to trigger Game Over when a value (Money, Religion, People, Army) reaches 0. This is simply done with a card, e.g. GameOver_Money, which has the condition Money=0 and is also a “High Priority Card” this means, whenever the Money value reaches 0, the card GameOver_Money will be spawned. You can of course modify these conditions to e.g. Money=100, this will trigger the Game Over card when the Money value reaches 100.

How to edit/replace the first card?

The first card is directly placed in Hierarchy à GameCanvas à Cards à MainMenuCard. You can edit this card here or replace it with a completely new one. If you replace it, please make sure you set this new card in Scripts à Card Stack à Spawned Card.

How to set the start value of a Faction/Value?

In Hierarchy, go to Values and select the Faction/Value you want to edit. The Value Script has the entry “Limits”. There you can set the Min/Max range (total range of the value, e.g. 0-100) as well as the Random Min/Max range (start range of the value, e.g. 80-80 =80, or 50-100 = random value between 50 and 100).

How to keep a value from one game to another?

In Hierarchy, go to Values and select the Faction/Value you want to edit. The Value Script has the option to “Keep Value” simply make sure it is checked.

I want to publish my game which I built with Kings template, what do I have to consider?

You can publish as many games as you want created with the Kings template, there are no restrictions, you can use the images, fonts and sounds which are included in the package for your game release. The only thing you are not allowed to is the redistribution the Kings asset itself.

Is it possible to disable the “Select Ruler” card?

You will have to remove the “SelectKing” card from the Card Stack (in Hierarchy à Scripts) and as “FollowUp” card from the MainMenuCard (in Hierarchy à GameCanvas à Cards).

I can’t change the image/icon of the cards?

Since update 1.40 the design of the cards is managed by the Card Styles. You will have to make this change directly on the Card Styles, this has the advantage that you can modify multiple cards at once. The Card Styles are located in Kings à cards à _templates. To find out more about Card Styles, please have a look in the Documentation.

How to access/change values with code?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


// This example shows how to access values without a static link.
// Values are collected by the 'valueManager' and are identified by the valuDefinitions enumeration.

public class valueProgrammingExample : MonoBehaviour
{
    public valueDefinitions.values targetValue;     //Definition of value to use. Adjustable in the inspector;
    private ValueScript vs;                      //Reference to the according value. 

    void Start()
    {
        StartCoroutine(waitOneFrame());          
    }

    IEnumerator waitOneFrame()
    {
        yield return null;
        myValueFunction();      //Access to the values should be delayed until after Start() to ensure they are correctly loaded and linked.
    }

    /// <summary>
    /// Example of a function accessing the value.
    /// E. g. the Value "Years" which holds the number of played rounds.
    /// </summary>
    public void myValueFunction()
    {

        //targetValue = valueDefinitions.values.years;  //example: define which value to use in code:

        //get the reference to the value script from the manager
        ValueScript vs = valueManager.instance.getFirstFittingValue(targetValue);

        if (vs != null)
        {
            Debug.Log("The value of '" + targetValue.ToString() + "' is " + vs.value.ToString() + ".");

            //examples
            //vs.addValue(3f);            //add 3, limit and save
            //vs.addValue(-3f);           //subtract 3, limit and save
            //vs.setValue(1f);            //set value to 1
            
            
        }
        else
        {
            Debug.LogError("The value '" + targetValue.ToString() + "' couldn't be found in the collection of the manager.");
        }
    }
}