News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

[TUTORIAL] Creating an addon (IV): Using makeobj

Started by vilvoh, September 09, 2009, 10:06:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vilvoh

Author: IgorTekton
Translation: Vilvoh
Aspect: development
Level: average
Summary: Use of makeobj for creating pak files

Note: If you're going to use this content, please mention the author of the content or place a link to the original source where you get this content.




1. Introduction

MakeObj is a program that creates pak files. It merges the png image file with the dat file in a single pak file, that is compatible with the version of Simutrans and it's ready be used in the game.

2. Preparing the environment

Download the Makeobj binary and unzip it. You'll get a file called makeobj.exe. You can get the latest version at the Simutrans SourceForge site.

Copy the makeobj.exe file to paste it in the same folder where the spritesheets (the png files) and the dat files are.

Suggestions:

  • Makeobj installed at: c:\makeobj\
  • Spritesheets saved at: c:\makeobj\
  • DATs saved at: c:\makeobj\


:exclaim:Attention: The spritesheets must have the same name as you define in the dat file.

Examples:

Image[N]=meuveiculo.0.0

This means that the meuveiculo.png file is in the same folder where the dat files and makeobj.exe are. But if you see this...

Image[N]=./PNG/meuveiculo.0.0

... means that the meuveiculo.png is in PNG folder, and this folder is inside the directory where the DATs and makeobj.exe are.

3. To the prompt

Open the DOS prompt. Considering that Makeobj is installed at c:\makeobj\, type:

cd c:\makeobj

... and press Enter. That command will open the makeobj folder, to set it as the working folder from now.

4. Pak'em all

Execute Makeobj. Type:

makeobj pak
... and press Enter, if the addon is for pak64.

OR

makeobj pak128
... and press Enter, if the addon is for pak128.

If it works, makeobj will display such messages at the DOS prompt


5. The result

After executing it, you will see the pak files created at the same folder where the dat files are, in this case they should be at c:\makeobj.

6. Testing the pak file

Now, select the pak files and move them to the simutrans/pak folder, if the pak you created is for pak64 or to simutrans/pak128, if it's for pak128. Finally start Simutrans and check if it's working.

Escala Real...a blog about Simutrans in Spanish...