Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.
Sylvain edited this page Nov 8, 2022 · 10 revisions

Return To Zero Wiki

Summary

  1. Tips
  2. How to install/compile the sources Easy
  3. How to add an action or condition Medium
  4. How to create a page Easy
  5. How to create your custom game Medium

0.Tips

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.

1.How to install/compile the sources

Let's learn how to get the sources and compile.

Download the sources

Go to the release and download one tagged with custom.

Compile the sources

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 !

Add a source file

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.

2.How to add an action or condition

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

3.How to create a page

All pages is write in a toml file.

Please go to the toml website to learn the syntax.

You need to create two table.

  1. [info]
  2. [buttons]

1.INFO

In you have two field:

  1. title store the title printed to the screen.
  2. text store the text printed to the screen.

2.BUTTONS

You can create how many you want buttons.

Each button is defined an array with 3 values:

  1. Title
  2. Actions
  3. Condition Example: ["Title", "Action", "Condition"]

To find all actions and conditions possible, go to the specific page.

4.How to create your custom game.

Let's doing it step by step:

  1. Create a project directory.
  2. Place a copy of the executable in (if you don't compile, download a game release and thief the executable).
  3. Create a folder named pages
  4. In this folder create a file names index.csv
  5. Create a page named failed.toml, this page will be loaded if a page doesn't exist.
  6. Create your first page, commonly the main menu.
  7. Write the path of your first page into the index.csv file with this id(only 3 characters) next (./menu.toml;000;).
  8. Execute the executable and try your game.