What is Rite?

How to create a new rite?

<aside> 💡

We recommend 7-digit ID starting with 50. However, modders may use any unused 7-digit ID. As long as it doesn't conflict with existing ones.

</aside>

a8e00c0a-7bbe-46c8-b03e-662edd0a6ee2.png

Data structure for rite

{
        "id": 5000019, //unused 7-digit id starting with 50
        "name": "Sixty Rules for Life”,//Title of rite
        "text": "Reading can improve yourself, so develop a habit of reading.",  //Text in rite interface when initiated    
        "tips": "”,//Comments for designer
        "once_new":0, 
        //Set icon display behavior when rite appears on table
        //Set 0: Show 【?】 icon first to indicate newly appeared rite
        //Set 1: Shows 【?】only on first appearance, and show rite's own icon when respawn
        //Set -1: Always show rite's own icon
        "round_number": 1, 
         //Number of rounds for rite execution
        //Set 0 means immediate settlement without waiting rounds
        "waiting_round":1,
        //Number of rounds rite stays on table before execution (removed when expired)
        //Set 0 means rite stays indefinitely until executed
        "waiting_round_end_action":[ 
	        //Actions triggered when waiting time expires (optional)
	        //See Example 1
        ],
        "method_settlement": "", //Parameter must remain but unused (no need to set)
        "auto_begin": 0, 
        //Whether rite executes automatically when rounds pass
        //Set 1:auto-execute; Set 0: manual execution required
        "auto_result":0,
        //Whether to show skip button for settlement interface
        //Set 1: show; Set 0: hide
        "location": “Home:[2,12]", 
        //Generate coordinates on table
        //Select from existing coordinates
        //New coordinate editing currently unavailable
        "icon": "rite_7",  
        //Rite icon, the resource should have matching name and place into the mod directory
        "tag_tips": [
	        //"method_settlement": "", //Parameter must remain but unused (no need to set)
        ],
        "tag_tips_up":{
	        //Shows players which tags participate in result checks
        	//Optional if no checks exist
        	//See Example 1
        },
        "tips_text":[
	        //Rite tooltip text
        	//Optional if no tooltip exist
        ],
        "open_conditions": [
           //Additional execution requirements
           //See Example 1
        ],
        "random_text":{
	        //"method_settlement": "", //Parameter must remain but unused (no need to set)
        },
        "random_text_up":{
	        //Dice check ids and corresponding prompt text
        	//Optional if no dices exist
        	//See Example 1
        },
        "settlement_prior": [
	        //Set settlement of rite here
        	//Set settlement of rite that need to be checked first here
        	//Only execute the settlement that meet the condition first
	        //already execute the settlement here, and no more in settlement and settlement_extre
        	//See Example 1
        ],                
        "settlement": [
            //Set settlement of rite here
        	//Only execute the settlement that meet the condition first
	        //See standard format for settlement
            {
                "condition":
                {
	                //Execution requirements
                	//Select available condition based on design needs
		            //Can set multiple conditions and flexibly use any, all etc.
		            //If left empty, considered as conditions met
                },
                "result_title":"", //Title text for the result
                "result_text": "Learned skills in sociability”,//Main text for the result
                "result":
                {   
                    //Select available action based on design needs, and most actions are visible to players
                    //Can set multiple actions and flexibly use choose, delay etc.  
                    //Cannot execute [generate ritual] or [activate/deactivate event] here 
                    //Actions take effect after all rite results are settled
                    //Cannot check counters set in previous results immediately
                    //Executes before actions in "action” section                          
                },
                "action":
                {
	                //Select available action based on design needs, and most actions are visible
                    //Can set multiple actions and flexibly use choose, delay etc.  
                    //Cannot place current ritual card (e.g. "s1+physique":1)
                    //Executes after actions in "result" section
                }
            }

        ],                
        "settlement_extre": [
            //Set settlement of rite here
        	//Without settlement_prior, all valid results here will be processed
        	//Processing order is top to bottom
        ],
        "cards_slot": //Slot configuration for ritual interface (player interaction and check subjects)
        {
            "s1": //slot 1
                {
                    "condition": 
                    {          
	                    //Conditions for placing cards (rejects non-matching cards)
	                	//Select available condition based on design needs
			            //Can set multiple conditions and flexibly use any, all etc.
			            //Empty means any card can be placed   
                    },
                    "open_adsorb":1, 
                    //Auto-adsorb cards to slot
                    //Set 1: Automatically adsorbs matching cards when ritual spawns
                    //Set 0: Disable Auto-adsorb
                    "is_key":0, //Parameter must remain but unused (no need to set)
                    "is_empty":0,
                    //Whether slot can be empty
                    //Set 1: Must place matching card (otherwise ritual won't spawn/execute)
                    //Set 0: Can leave empty
                    "is_enemy":1,
                    //Sett whether the cards in slots are enemies which can be identified in dice check
                    //Set 1: enemy
                    //Set 0: ally
                    "text":"Currently Reading" //hint text for current slot
                },
            "s2": //slot 2
                {
                    "condition": 
                    {
                    },
                    "open_adsorb":0,
                    "is_key":0,
                    "is_empty":0,
                    "is_enemy":0,
                    "text":"Reader",
                    "pops":[ 
                    //Bubbles shown when placing cards, which can enhance interaction. Optional.
                        {
                            "condition":{
                                //Execution requirements
                            },
                            "action":{
                               "pop.5000019_s2_01.self":"His beautiful words sound so nice!"
                               //Execute bubble command
                               // see Commands (Actions)
                            }
                        }
                    ]
                }
        }
    }

Special rite: Methinks

Example 1:a complicated rite

{
        "id": 5001005,
        "name": "Duel",
        "text": “To the Death",       
        "tips": "",
        "once_new":0, //Shows 【?】icon when ritual appears to indicate new event
        "round_number": 1, //1 round for duel execution is quite enough
        "waiting_round":3, //Stays for 3 rounds to let player prepare
        "waiting_round_end_action": [ //Actions when waiting time expires
	        {
                "condition": {
                },
                "result_title": "", //Unused here and player won't see
                "result_text": "",//Unused here and player won't see
                "result": 
                {
                    "counter-7100004": 5, //Notoriety -5                   
                    "prompt": {  //Popup notification
	                    "id":"5001005_prompt_01",
                    	"text":"Your reputation plummets for avoiding the duel"
                    }
                },
                "action": {
                }
            },
        ],
        "method_settlement": "",
        "auto_begin": 0, //Won't auto-execute since waiting for player for 3 rounds
        "auto_result":0, //No skip button needed for one-time rite
        "location": "Court:[2,6]", //Random spawn at court coordinates 2-6
        "icon": "rite_4",  
        "tag_tips": [
        ],
        "tag_tips_up":{
            "tips": ["Combat","Physique"], //Checks these two tags
            "type":"fight_result" 
            "type": "fight_result" //A Contest check. The dice check involves subtraction calculation, so use fight_result here
            //if no subtraction involved, use normal_result
        },
        "tips_text":[
            "The loses of the duel will die." //Warns player to prepare properly
        ],
        "open_conditions": [ ///High difficulty duel requires Combat+Physique ≥10
	        {
                "condition": {
                    "f:Combat+Physique>=": 10      
                },
                "open_conditions": [ /// Your combined Combat + Physique cannot be below 10"
            }
        ],
        "random_text": {        
        },
        "random_text_up":{
        //Need create 5 dice check ids since 5 different checks involved
            "r1":{
                "text":"The duel begins. You dash forward and slash at the opponent's neck., // text before using dice
                "type":"normal_result", // Designer thought it should be non-contest check at first, so used normal instead
                "type_tips":"Your Combat determines your full dice count.", //text for prompt
                "low_target": 1, 
                //Minimum Successes needed. A prompt will be given on the UI based on the comparison between the actual and minimum number of Successes when player go for checks
                "low_target_tips": "You need at least 1 Success to injure the opponent." //For prompt
            },
            "r2":{
                "text":"The opponent adjusts their stance and kicks at your abdomen.",
                "type":"normal_result",
                "type_tips":"Your Physique determines your full dice count.",
                "low_target": 1,
                "low_target_tips": "You need at least 1 Success to withstand this attack."
            },
            "r3":{
                "text":"The two blades clash heavily. This is a contest of strength.",
                "type":"fight_result",
                "type_tips":"The number of dice provided by your Physique and Combat is affected by the enemy's Physique and Combat.",
                "low_target": 1,
                "low_target_tips": "You need at least 1 Successes to achieve victory."
            },
            "r4":{
                "text":"The two blades clash heavily. This is a contest of strength.",
                "type":"fight_result",
                "type_tips":"The number of dice provided by your Physique and Combat is affected by the enemy's Physique and Combat. Being Injured will reduce your dice count.",
                "low_target": 1,
                "low_target_tips": "You need at least 1 Successes to achieve victory."
            },
            "r5":{
                "text":"The two blades clash heavily. This is a contest of strength.",
                "type":"fight_result",
                "type_tips":"The number of dice provided by your Physique and Combat is affected by the enemy's Physique and Combat. The enemy being Injured provides you with advantages.",
                "low_target": 1,
                "low_target_tips": "You need at least 1 Successes to achieve victory."
            }
        },
        "settlement_prior": [
            {
                "condition": {
                    "s3.is":2000482 
                    //If player placed 2000482(Universal Scorn) into slot s3
                    //Skip the check phase and declare victory
                },
                "result_title":"",
                "result_text": "You cursed your opponent right to death with vicious language! You've won!", 
                "result": 
                {
                    "clean.s1": 1, //The duel opponent is considered dead and removed                   
                    "counter+7100002": 1, // You won with disgraceful way, Infamy+1
                    "global_counter=7200020":1  
                    //Set the counter for completing One Thousand and One Nights achievement: Impartial Judgment
                },
                "action": {
                }
            }
        ],                
        "settlement": [ 
	        //Check results from top to bottom and execute the first matching condition
	        {
                "condition": {
	                "s2.female":1,//You sent a female duelist
                },
                "result_title":"",
                "result_text": "[s1.name] mocks you for hiding behind a woman",
                "result": 
                {
                     "counter+7100004": 1, //Notoriety-1
                },
                "action": {}
            },
            {
                "condition": {
	                "!s2.female":1, //s2 is not female
                },
                "result_title":"",
                "result_text": "[s1.name]silently takes a stance, ready for battle",
                "result": 
                {
                },
                "action": {}
            },
        ],                
        "settlement_extre": [
        ///If without settlement_prior, check results from top to bottom and execute all matching conditions in order
            {
                "condition": {
                    "r1:Combat>=":[1,5] 
                    //Perform dice check r1 using the ally's Combat dice. If number of Successes ≥ 1
                },
                "result_title":"",
                "result_text": "[s1.name]With surprising speed and skill, although [s1.name] barely dodged the blow, they were still injured.",
                "result": 
                {
                    "s1+equip": 2000098 
                    //s1 equips 2000098(Injured)
                    //Since result actions don't take effect immediately, s1 won't be affected in subsequent checks
                    //This is purely for narrative purposes
                },
                "action": {}
            },
            {
                "condition": {
                    “r1:Combat<”:[1,5]//Use the ally's Combat dice, If number of Successes ≥ 1
                },
                "result_title":"",
                "result_text": "Your attack was ineffective, and the opponent dodged gracefully.",
                "result": 
                { 
                },
                "action": {}
            },
            {
                "condition": {
                    "r2:Physique>=":[1,5]
                    //Perform dice check r2 using the ally's Physique dice. If number of Successes ≥ 1
                },
                "result_title":"",
                "result_text": "You easily dodged the kick.",
                "result": 
                {
                },
                "action": {}
            },
            {
                "condition": {//Opponent's turn
                    "r2:Physique<":[1,5]
                },
                "result_title":"",
                "result_text": "The force of this kick took you by surprise, you failed to block it.",
                "result": 
                {
                    "s2+equip": 2000098 
                },
                "action": {}
            },
            {
                "condition": {//Final round
                    "r1:Combat>=":[1,5],
                    "r2:Physique>=":[1,5],
                    "r3:Combat+Physique-e(Combat+Physique)+2>=":[1,5]
                    //Requires both r1 and r2 successes to reach here
                    //Perform dice check r3, a Contest check
                    //Ally's (Combat + Physique) - Opponent's (Combat + Physique) dice
                    //Additional +2 dice as a reward from the designer for passing both checks  
                },
                "result_title":"",
                "result_text": "As the opponent was severely injured and powerless, you easily gained the upper hand in the struggle and ruthlessly chopped off the opponent's head. The Sultan was very pleased with the bloodshed, and everyone chanted your name.",
                "result": 
                {
                    "clean.s1": 1, 
                    "counter+7100003": 1, //Influence+1
                    "s2+Combat":1,
                    "global_counter=7200020":1  //Completes story objective[Impartial Judgment]
                },
                "action": {}
            },
            {
                "condition": {
                    "r1:Combat>=":[1,5],
                    "r2:Physique>=":[1,5],
                    "r3:Combat+Physique-e(Combat+Physique)+2<":[1,5]
                },
                "result_title":"",
                "result_text": "You failed in the grapple and died.",
                "result": 
                {      
                    "global_counter=7200110":1, //Achievement
                    "clean.s2": 1 //At this stage, failure means death, so the character you sent is removed
                },
                "action": {}
            },
            {
                "condition": {//Final round
                    "r1:Combat<":[1,5],
                    "r2:Physique<":[1,5],
                    “r4:Combat+Physique-e(Combat+Physique)-2>=":[1,5]
                    //Requires both r1 and r2 failures to reach here
                    //Formula changes, so perform dice check r4, a Contest check
                    //Ally's (Combat + Physique) - Opponent's (Combat + Physique) dice
                    //Additional -2 dice as a punishment from the designer for failing both checks
                },
                "result_title":"",
                "result_text": "You gain the upper hand in the struggle and ruthlessly chop off the opponent's head. The Sultan is very pleased with the bloodshed, and everyone chants your name.",
                "result": 
                {
                    "clean.s1": 1, 
                    "counter+7100003": 1, //Influence+1
                    "s2+Combat":1,
                    "global_counter=7200020":1  //Completes story objective[Impartial Judgment]
                },
                "action": {}
            },
            {
                "condition": {
                    "r1:Combat<":[1,5],
                    "r2:Physique<":[1,5],
                    “r4:Combat+Physique-e(Combat+Physique)-2<":[1,5]
                },
                "result_title":"",
                "result_text": "You failed in the grapple and died.",
                "result": 
                {
                    "global_counter=7200110":1, //Achievement
                    "clean.s2": 1
                },
                "action": {}
            },
            {
                "condition": {//Final round
                    "r1:Combat>=":[1,5],
                    "r2:Physique<":[1,5],
                    “r5:Combat+Physique-e(Combat+Physique)>=":[1,5]
                    //Below covers all combinations of passing or failing the first two checks
                    //Formula changes, so perform dice check r5, a Contest check
                    //Ally's (Combat + Physique) - Opponent's (Combat + Physique) dice
                },
                "result_title":"",
                "result_text": "But you still gain the upper hand in the struggle and ruthlessly chop off the opponent's head. The Sultan is very pleased with the bloodshed, and everyone chants your name.",
                "result": 
                {
                    "clean.s1": 1, 
                    "counter+7100003": 1, //Influence+1
                    "s2+Combat":1,
                    "global_counter=7200020":1  //Completes story objective[Impartial Judgment]
                },
                "action": {}
            },
            {
                "condition": {
                    "r1:Combat>=":[1,5],
                    "r2:Physique<":[1,5],
                    “r5:Combat+Physique-e(Combat+Physique)<":[1,5]
                },
                "result_title":"",
                "result_text": "You failed in the grapple and died.",
                "result": 
                {   
                    "global_counter=7200110":1, //Achievement
                    "clean.s2": 1
                },
                "action": {}
            },
            {
                "condition": {//Final round
                    "r1:Combat<":[1,5],
                    "r2:Physique>=":[1,5],
                    “r5:Combat+Physique-e(Combat+Physique)>=":[1,5]
                },
                "result_title":"",
                "result_text": "You gain the upper hand in the struggle and ruthlessly chop off the opponent's head. The Sultan is very pleased with the bloodshed, and everyone chants your name.",
                "result": 
                {
                    "clean.s1": 1, 
                    "counter+7100003": 1, //Influence+1
                    "s2+Combat":1,
                    "global_counter=7200020":1  //Completes story objective[Impartial Judgment]
                },
                "action": {}
            },
            {
                "condition": {
                    "r1:Combat<":[1,5],
                    "r2:Physique>=":[1,5],
                    “r5:Combat+Physique-e(Combat+Physique)<":[1,5]
                },
                "result_title":"",
                "result_text": "You failed in the grapple and died.",
                "result": 
                {
                    "global_counter=7200110":1, //Achievement
                    "clean.s2": 1
                },
                "action": {}
            }
        ],
        "cards_slot":
        {
            "s1":
            {
                "condition":
                {
                    "type":"char", //The opponent must be a char card
                    " Duel Mark ": 1     //The opponent must have the Duel Mark tag
                },
                "open_adsorb":1, //Automatically adsorbs a duel opponent
                "is_key":0,
                "is_empty":0, 
                //Cannot be empty, so if no eligible opponent is found, the rite cannot be generated
                "is_enemy":1, //Identifies an enemy
                "text":"The opponent you chose yesterday"
            },
            "s2":
            {
                "condition":
                {
                    "type":"char",//The character you sent must be a char card
                    “Noble": 1     ///The character you sent must have the Noble tag      
                },
                "open_adsorb":0, //Not auto-adsorb, so you can choose a suitable candidate
                "is_key":0,
                "is_empty":0, //You must send someone for the rite to start
                "is_enemy":0, //This is an ally
                "text":"You can fight the battle yourself, or choose a noble follower to fight on your behalf."
            },
            "s3":
            {
                "condition":
                {
                    "type":"item",
                    "cost.Consumable=": 1           
                },
                "open_adsorb":0,
                "is_key":0,
                "is_empty":1, //Auxiliary item, can be left empty without affecting rite to start
                "is_enemy":0, //This is an ally as an auxiliary item
                "text":"Certain items can be useful in combats."
            }
        }
    }