Skip to the content.

SheetX Document

1. Introduction

This tool simplifies database design and management for game developers and designers, allowing for easy modification of configurations and statistics.

As projects grow, the need for efficient management of data tables, constants, and IDs increases. This tool centralizes the process, enabling easy searching, modification, and updates.

It supports various data types and utilizes popular spreadsheet tools for data management.

You can download Example Here

2. Main functions

3. Settings

Navigate to the main menu and select: Window > SheetX > Settings

tab_settings

4. Excel Sheets Exporter

4.1. Export Single Excel File

Navigate to the main menu and select: Window > SheetX > Excel Spreadsheets

tab_excel_1

This function is ideal for learning how to use the tools. It’s great for small, simple Static Databases that only need one Excel file for all the data.

Key Functions:

4.2. Export multiple Excel Files

tab_excel_2 tab_excel_2_edit

This feature is essential for managing complex Static Databases divided into multiple Excel files. It helps you efficiently handle and export all your files with one click:

  1. Add all the Excel files you want to process.
  2. For each Excel file, you have the option to choose which sheets to include or exclude.
  3. Press the Export All button to complete the process.

5. Google Spreadsheets

Prefer using Google Spreadsheets? No problem.

Navigate to the main menu and select: Window > SheetX > Google Spreadsheets

5.1. Setup Google Client ID and Client Secret

View instruction here

Copy the Client ID and Client Secret, and paste them into the corresponding settings in the Sheets Exporter Settings Window

tab_settings_2

5.2. Export single Google Spreadsheet

tab_google_1

Enter the Google Sheet ID, then click the Download button. You can find the ID in the Google Sheet’s URL, formatted like this:

https://docs.google.com/spreadsheets/d/[GOOGLE_SHEET_ID]/edit?......

5.3. Export multiple Google Spreadsheets

Click on Add Google Spreadsheets, then enter the Google Sheet ID in the popup that appears. Press Download, then select the sheets you want to process.

tab_google_2 tab_google_2_edit

6. Rules in Spreadsheet

6.1. IDs

Hero     Building     Pet     Gender[enum]  
HERO_1 1 comment BUILDING_NULL 0 comment PET_NULL 0 comment GENDER_NONE 0
HERO_2 2 comment BUILDING_1 1   PET_1 1   GENDER_MALE 1
HERO_3 3 comment BUILDING_2 2   PET_2 2   GENDER_FEMALE 2
      BUILDING_3 3   PET_3 3   GENDER_HELICOPTER 3
      BUILDING_4 4   PET_4 4      
      BUILDING_5 5   PET_5 5      
      BUILDING_6 6   PET_6 6      
      BUILDING_7 7   PET_7 7      
      BUILDING_8 8            

ID Sheets, named with the suffix IDs are used to compile all IDs into Integer Constants. The design rules are:

| Group | Key | Comment |
| ----- | --- | ------- |

6.2. Constants

Name Type Value Comment
EXAMPLE_INT int 83 Integer Example
EXAMPLE_FLOAT float 1.021 Float example
EXAMPLE_STRING string 321fda String example
EXAMPLE_INT_ARRAY_1 int-array 4 Integer array example
EXAMPLE_INT_ARRAY_2 int-array 0:3:4:5 Integer array example
EXAMPLE_FLOAT_ARRAY_1 float-array 5 FLoat array example
EXAMPLE_FLOAT_ARRAY_2 float-array 5:1:1:3 FLoat array example
EXAMPLE_VECTOR2_1 vector2 1:2 Vector2 example
EXAMPLE_VECTOR2_2 vector2 1:2:3 Vector2 example
EXAMPLE_VECTOR3 vector3 3:3:4 Vector3 example
EXAMPLE_REFERENCE_1 int HERO_1 Integer example
EXAMPLE_REFERENCE_2 int-array HERO_1 : HERO_2 Integer array example
EXAMPLE_REFERENCE_3 int-array HERO_1 | HERO_3 Integer array example
EXAMPLE_REFERENCE_4 int-array HERO_1 HERO_4 Integer array example
EXAMPLE_FORMULA_1 int =1*10*36 Excel formula example
EXAMPLE_FORMULA_2 float =1+2+3+4+5+6+7+8+9 Excel formula example

Constants Sheets, named with the suffix Constants compile project constants. The design rules are:

| Name | Type | Value | Comment |
| ---- | ---- | ----- | ------- |

6.3. Localization

idstring relativeId english spanish
message_1   this is english message 1 este es el mensaje en ingles 1
message_2   this is english message 2 este es el mensaje en ingles 2
message_3   this is english message 3 este es el mensaje en ingles 3
       
content 1 this is english message 1 este es el mensaje en ingles 1
content 2 this is english message 2 este es el mensaje en ingles 2
content 3 this is english message 3 este es el mensaje en ingles 3
       
title_1   this is english title 1 este es el titulo 1 en ingles
title_2   this is english title 2 este es el titulo 2 en ingles
title_3   this is english title 3 este es el titulo 3 en ingles
       
whatever_msg   this is a sample message este es un mensaje de muestra
       
hero_name HERO_1 hero name 1 nombre del héroe 1
hero_name HERO_2 hero name 2 nombre del héroe 2
hero_name HERO_3 hero name 3 nombre del héroe 3

Localization Sheets are named with the prefix Localization and follow these rules:

| idString | relativeId | english | spanish | japan | .... |
| -------- | ---------- | ------- | ------- | ----- | ---- |

6.4. Data table - JSON Data

Basic data type: Boolean, Number, String

numberExample1 numberExample2 numberExample3 boolExample stringExample
1 10 1.2 TRUE text
2 20 3.1 TRUE text
3 BUILDING_8 5 FALSE text
6 HERO_3 10.7 FALSE text
9 PET_2 16.4 FALSE text

Extended data type: Array, JSON object

array1[] array2[] array3[] array4[] array5[] array6[] JSON{}
text1 1 1 TRUE 123
66
aaa
ccc
{}
text2 2 | 2 | 3 1 | 2 | 3 TRUE | FALSE | TRUE 123
71
aaa
ccc
{“id”:1, “name”:”John Doe 1”}
text1 | text2 1 | 2 1 | BUILDING_2 TRUE | FALSE 123
67
aaa
ccc
{“id”:2, “name”:”John Doe 2”}
text1 | text2 | text3 1 | 2 | 3 BUILDING_1 | HERO_2 TRUE | FALSE | TRUE 123
68
aaa
ccc
{“id”:HERO_2, “name”:”JohnDoe 2”}
text3 4 | 2 BUILDING_3 | HERO_1 | HERO_2 TRUE | FALSE 123
76
aaa
ccc
[{“id”:HERO_1, “name”:”John Doe 1”},{“id”:HERO_2, “name”:”Mary Sue 2”}]
text1 | text2 | text7 5 1 | 2 | 4 | PET_5 TRUE 123
78
aaa
ccc
[{“id”:HERO_1, “name”:”John Doe 1”},{“id”:HERO_2, “name”:”Mary Sue 2”}]

Special data type: Attributes list

attribute0 value0 unlock0 increase0 max0 attribute1 value1[] unlock1[] increase1[] max1[] attributeN
ATT_HP 30 2 1.2 8            
ATT_AGI 25 3 1.5 8            
ATT_INT 30 2 1 5 ATT_CRIT 3 | 2 0 | 11 0.5 | 1 10 | 20  
ATT_ATK 30 2 1 8 ATT_CRIT 10 | 1 1 | 12 1.5 | 1 10 | 20  
          ATT_CRIT 10 | 1 1 | 12 1.5 | 1 10 | 20  

Attribute is a specific data type, specially created for RPG genre games - where characters and equipment can possess various different and non-fixed attributes and stats. This data type makes character and equipment customization more flexible, without restrictions.

Attribute Example

To define an attribute object type, the following rules should be followed:

7. How to integration

Download and import the Example

First, open the excel file located at /Assets/SheetX/Examples/Exporting a Single Excel/Example.xlsx. This is a sample Excel file. Within this file, there are sheets containing sample data that will help you understand how to design various types of data such as IDs, Constants, and Data Tables.

Excel File

For the example using Google Sheets, you can view the file here.

Example for exporting single file Example

Example for exporting multiple files Example 1 Example 2 Example 3 Example 4

7.1. Create folders for exporting files

Create 3 directories to store the files that will be exported:

For this example I will create 3 folders:

7.2. Scripting

Create a ScriptableObject as Storage for Static Database

[Serializable]
public class ExampleData1
{
    public int numberExample1;
    public int numberExample2;
    public float numberExample3;
    public bool boolExample;
    public string stringExample;
}
[Serializable]
public class ExampleData2
{
    [Serializable]
    public class Example
    {
        public int id;
        public string name;
    }

    public string[] array1;
    public int[] array2;
    public int[] array3;
    public bool[] array4;
    public int[] array5;
    public string[] array6;
    public Example json1;
}
[Serializable]
public class ExampleData3
{
    public int id;
    public string name;
    public List<Attribute> Attributes;
}

[Serializable]
public class Attribute
{
    //=== MAIN
    public int id;
    public float value;
    public int unlock;
    public float increase;
    public float max;
    //=== Optional
    public float[] values;
    public float[] increases;
    public float[] unlocks;
    public float[] maxes;
}
[CreateAssetMenu(fileName = "ExampleDataCollection", menuName = "SheetXExample/Create ExampleDataCollection")]
public class ExampleDataCollection : ScriptableObject
{
    public List<ExampleData1> exampleData1s;
    public List<ExampleData2> exampleData2s;
    public List<ExampleData3> exampleData3s;
}
// NOTE: This function utilizes the UnityEditor library and must be placed in the Editor directory or within #if UNITY_EDITOR directives.
// If you prefer not to use Editor code, you can alternatively store the JSON data files in the Resources directory or Asset Bundles and load them accordingly.
[ContextMenu("Load")]
private void LoadData()
{
    #if UNITY_EDITOR
    
    var txt = AssetDatabase.LoadAssetAtPath<TextAsset>("Assets/Import/Json/ExampleData1.txt");
    exampleData1s = JsonConvert.DeserializeObject<List<ExampleData1>>(txt.text);

    txt = AssetDatabase.LoadAssetAtPath<TextAsset>("Assets/SheetXExample/DataConfig/ExampleData2.txt");
    exampleData2s = JsonConvert.DeserializeObject<List<ExampleData2>>(txt.text);

    txt = AssetDatabase.LoadAssetAtPath<TextAsset>("Assets/SheetXExample/DataConfig/ExampleData3.txt");
    exampleData3s = JsonConvert.DeserializeObject<List<ExampleData3>>(txt.text);

    #endif
}

Example Data Collection

Example Data Collection

7.3. Localization integration

LocalizationManager.Init();
// Set the language japanese
LocalizationsManager.CurrentLanguage = "jp";
// Register an action when language changed
LocalizationsManager.OnLanguageChanged += OnLanguageChanged;

Combine Localizations

If you want to combine all Localization Sheets, simply deselect the “Separate Localization Sheets” checkbox in the Settings. Next, delete all generated files and re-export everything.

Then, replace instances of LocalizationExample1 and LocalizationExample2 with Localization. Also, replace component LocalizationExample1Text and LocalizationExample2Text with LocalizationText.

Creating TextMeshPro Fonts for Different Languages

To create TextMeshPro fonts for Japanese, Korean, and Chinese, follow these steps using the respective character set files characters_set_jp, characters_set_ko, and characters_set_cn, which include all characters from the localization sheets:

Fonts to use in this example:

Creating TextMeshPro Fonts:

Create Japanese font

Create Korean font

Create Chinese font

Loading Localization Using the Addressable Assets System

To utilize this feature, follow these steps:

SheetX Settings

Localizations Folder

Build Settings