The International Simutrans Forum

 

Author Topic: [TUTORIAL] Creating an addon (IV): Using makeobj  (Read 10406 times)

0 Members and 1 Guest are viewing this topic.

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
[TUTORIAL] Creating an addon (IV): Using makeobj
« on: September 09, 2009, 10:06:47 PM »
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:

Code: [Select]
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...

Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
makeobj pak... and press Enter, if the addon is for pak64.

OR

Code: [Select]
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.
« Last Edit: September 10, 2009, 06:35:43 AM by vilvoh »