Skip to content

Building crafti

Bluebotlabz edited this page Jul 7, 2022 · 10 revisions

Requirements

Crafti requires an Ndless-SDK installation as well as a few other utilities

Note: these instructions are intended to be run on a Debian-based Linux system, so they may not work on other OSes

Ndless-SDK

You can follow the instruction here to install Ndless-SDK

QT and imagemagick

[OPTIONAL, ONLY REQUIRED IF YOU WANT TO CHANGE GUI TEXTURES AND EMBEDDED TEXTURES]
imagemagick is required to build textures

Requirements: qt5-qmake qtbase5-dev imagemagick

cd ~ # Must be your home directory
https://github.com/Vogtinator/ConvertImg.git
cd ConvertImg/ConvertImg/
qmake ConvertImg.pro
make

Optional: Add ConvertIMG to path (useful for debugging, but not necessary as textures MakeFile already points to your home directory (which is where you cloned the repo earlier))
Then add the following to your path environment variable, make sure to replace [USER HOME DIRECTORY] with your home directory:

[USER HOME DIRECTORY]/ConvertImg/ConvertImg:${PATH}

For example, on a Linux device, you can add

export PATH="[USER HOME DIRECTORY]/ConvertImg/ConvertImg:${PATH}"

to the ~/.bashrc file

The Crafti Repository Itself

git clone --recursive https://github.com/Bluebotlaboratories/crafti.git

Modifying Crafti Terrain.png

Crafti uses a modified terrain.png atlas to manage its textures, the layout is similar but not the same as the one used in TU69 and can be generated from a standard resource pack using the convert-textures.sh script in the textures folder.
To use the script:

  1. Copy the script to the root of the resource pack
  2. Run the script
  3. If all goes well, the root of the resource pack should now contain a usable terrain.png which can then be copied to Crafti's textures folder

NOTE: Resource packs that use custom models may not work as their textures may be different, for example, to use the PureBDCraft textures, the convert-bdcraft-textures.sh script must be used, and the script must be modified on a case-by-case basis for texture packs and whatnot. Additionally, the texture pack must have ALL textures, as Minecraft normally falls back to vanilla textures if they are missing, however, the script doesn't and the missing textures must be added manually Also, the script uses amethyst as a placeholder for blocks that are missing.

Building Crafti Textures [OPTIONAL]

If you want to have custom textures baked-into Crafti, you can do so by replacing the coresponsing textures in the textures folder and then running the following command in the textures folder:

make # Make sure you run it in the textures folder

Note: Crafti allows loading custom textures from documents/ndless/crafti.ppm.tns however, this is only for the terrain.png textures, other textures need to be edited and rebuilt (building textures with custom terrain.png is also possible as Crafti loads the built-in texture by default)
Also note: inventory.png and inv_selection.png are actually cropped from gui.png and part_fire.png is cropped from particles.png so editing these images directly may not work, instead edit gui.png and particles.png respectively

Building Crafti

To build Crafti so you can run it on a calculator or emulator, run

make all

or if you want debugging features

make all DEBUG=true

Once it builds, you should see a file called Crafti.tns in the release folder (or debug folder if you compiled with DEBUG=true) which will be created by make
This is the file which contains Crafti and is what should be run on a calculator/emulator

Clone this wiki locally