---
sidebar_position: 2
---

# Add Submodules

Let's add more packages and templates to the project.

A slot game project is composed of multiple Git repositories used as [submodules](https://www.atlassian.com/git/tutorials/git-submodule).

It is important to understand the responsibilities of each submodule.

We recommend reviewing the [Slot Core Submodule documentation](../category/submodules/) before proceeding.

## Main submodules

These are submodules presented in every Slot Game project.

To add main submodules, run the following commands:

```bash
git submodule add -f ../base-slot-template.git assets/core-assets/slotty-core
git submodule add -f ../game-core-template.git assets/core-assets/game-core
git submodule add -f ../hyper-slot-template.git assets/core-assets/hyper-core
```

To add packages submodule, first **delete packages folder**.

Then run the follwing command:

```bash
git submodule add -f ../hyper-editor-package.git packages
```

## International Theme vs Chinese Theme

Depend on the theme of your game, add these commands:

For `International Theme`:

```bash
git submodule add -f ../hyper-wintune-international.git assets/core-assets/hyper-wintune-international
git submodule add -f ../hyper-coin-shower-international.git assets/core-assets/hyper-coin-shower-international
git submodule add -f ../hyper-dialog-international.git assets/core-assets/hyper-dialog-international
```

For `Chinese Theme`:

```bash
git submodule add -f ../hyper-wintune-chinese.git assets/core-assets/hyper-wintune-chinese
git submodule add -f ../hyper-coin-shower-chinese.git assets/core-assets/hyper-coin-shower-chinese
git submodule add -f ../hyper-dialog-chinese.git assets/core-assets/hyper-dialog-chinese
```

## Optional Submodule

These are submodules for specific feature including: `landing sound`, effect `win border/tension` and `hyper jackpot`.

Add one or more of those submodules depends on the game design.

```bash
git submodule add -f ../hyper-jackpot-package.git assets/core-assets/hyper-jackpot
git submodule add -f ../hyper-win-border-and-tension.git assets/core-assets/hyper-win-border-and-tension
git submodule add -f ../hyper-scatter-landing-sound.git assets/core-assets/hyper-scatter-landing-sound
```

## Update submodules to latest commit

All submodules should be on master branch and update to the latest commit. 

To fetch the latest update, run the following command:

```bash
git submodule update --init --recursive
```

:::tip
You can drop the `--init` after the first time.
:::

## Commit to git

Now that we add all nesscessary submodule to the project, let's commit all of these change to open a Pull Request:

Run these following command:

```bash
git checkout -b feature/add-submodules
git add --a
git commit -m "Add submodules"
git push --set-upstream origin feature/add-submodules
```