-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Tips
- How to install/compile the sources Easy
- How to add an action or condition Medium
- How to create a page Easy
- How to create your custom game Medium
Download the game to see how it look. Use a good logic to choose the index id's. Respect a strict rules to name your files.
Let's learn how to get the sources and compile.
Go to the release and download one tagged with custom.
To compile the code, go to the folder named cmp for compiling.
Install Chocolatey and llvm.
When it's done, just execute build.ps1, and a messagebox will ask you to direct start your build or last build.
Awesome you succeed to build the source code !
To add a source file, open the file names list.txt located in the folder code.
Write the source "*.c" path from where is located the build.ps1 and thats all.
You can write comment line using a "#".
And you are ready.
In the source cmd.c you'll find two function (the two first).
In void execute_cmd(char* cmd, Page* page); you can add an action.
In bool test_cond(char* cond, Player player); you can add a condition.
You don't need to be a programmer to edit the source code. Here the few knowledge needed:
- Condition
- Incremental
- Array reading
- Using variables through a struct pointer
struct->variable
All pages is write in a toml file.
Please go to the toml website to learn the syntax.
You need to create two table.
- [info]
- [buttons]
In you have two field:
-
titlestore the title printed to the screen. -
textstore the text printed to the screen.
You can create how many you want buttons.
Each button is defined an array with 3 values:
- Title
- Actions
- Condition
Example:
["Title", "Action", "Condition"]
To find all actions and conditions possible, go to the specific page.
Let's doing it step by step:
- Create a project directory.
- Place a copy of the executable in (if you don't compile, download a game release and thief the executable).
- Create a folder named
pages - In this folder create a file names
index.csv - Create a page named
failed.toml, this page will be loaded if a page doesn't exist. - Create your first page, commonly the main menu.
- Write the path of your first page into the
index.csvfile with this id(only 3 characters) next (./menu.toml;000;). - Execute the executable and try your game.
RETURN TO ZERO - WIKI