Machines > Mods

Extracing tools

(1/7) > >>

Update: Full map making tutorial

I wrote programs for extracting:

* descriptions of missions/campaign systems/planets etc. basically all *.bin files from pdata directory.
* complete planet tiles from *.psb files in pdata directory (usage is explained in map making tutorial).
Programs are command-line like metaex. You must be famillar with commad line to use them. With this tools we can add new scenarios without replacing old ones and create new map from scratch.

Below a small tutorial for editing descriptions:
At first. Understanding the file names is an important for dealing with them. Machines stores in pdata/ folder variety of bin files:

sceninfo.bin file keeps information about campaigns, skirmishes and multiplayer scenarios. In unmodified machines it's binary version of sceninfo.dat from data/ folder (stored in metadata file mach1.met). If you want to modify this file you can use orginal sceninfo.dat or extract new one from sceninfo.bin using sceninfoex (you will find it in attached files). Then put into data/ folder, delete playinfo.bin from savegame/ and sceninfo.bin from pdata/. Edit sceninfo.dat, it has easy to understand format so i skip describing it. After next run machines will generate new sceninfo.bin from data/sceninfo.dat.

m_*.bin files stores descriptions of skirmishes. Rest of bin files are related to campaigns: *_s.bin are describing systems and *_p.bin are descriptions of planets. All other bin files are descriptions of scenarios. All of this bin files can be extracted with txtex. After extraction it has following format:

--- Code: ---CAMPAIGN
<w>Make Contact
Make Contact with the newly-arrived Pod and build a defensive army.

VOICEMAIL Sounds/menus/1o3ob1.wav
<w>Make Contact
A new seeding Pod has landed on Adelphi9. It has brought with it a Commandant that will assist us with the creation of further bases on Adelphi9.
You must take a squad to make contact with this new base and see that a defensive army is built to protect it from enemy attack.
The Commandant has reported that it is on its way to meet the squad.
We have detected small levels of enemy activity in the surrounding area.


Reapers with plasma rifles are excellent long range defensive units. Attacking machines will often be damaged or destroyed before they can get near enough to use their own weapons.
Positioning reapers in a line or arc will allow heavy damage to be inflicted on advancing troops.

You have built 5 reapers and established an adequately-defended base.
The Commandant will now proceed to a new landing site, to help with the creation of a new base.

The Commandant is dead.
You have failed to complete a simple task. Your neurocircuits must be defective.

> Make Contact With the Commandant

> Escort the Commandant to the base

> Build a Military Factory

> Build a defensive army of at least 5 Reapers

> The Commandant must not be destroyed

--- End code ---

This is extracted 1o3.bin (first campaign mission in corinthian system). I think that this format is also clear and simple. Tokens like CAMPAIGN, OBJECTIVE, TASK and HINTS are always writen in upper case. Campaign is description of scenario displayed in scenario choice screen "<w>" is string for bolding and setting white color for line of text. Objective are numbered and used to display mission objectives. Win and Lose are obvious. Tasks are also always numbered. After editing extracted file delete old bin from pdata, and copy extracted *.txt to data/. Machines will generate new binary.

The m_*.bin, *_p.bin and *_s.bin contains only CAMPAIGN, other fields are dumb (systems and planets are displayed only in scenario choice screen, where all other information is discarded).

In attachment you will find example mod with added 6th tutorial mission. Just simply extract folder to machines directory replacing old files. Mod contains source text files in data/ folder.

Praised be you, my lord. *bows*

 :squidly: :squidly:

Just a question, but why would we use this? =P I mean, what's its goal, exactly?

Now it's not useful; if you like you can change description from "adelphi9 bla bla" to "squidly9 bla bla" or "bunny attack" (look at screenshot). I will write utility for editing sceninfo.bin then it would open possibility for adding modded and retextured maps instead of replacing old ones. p_txt will be then useful for making descriptions. Just another one mod tool.


So how'd you make these programs? I mean, what language did you use? Seeing as Machines is an... old program and they lost the source code =P

 :squidly: :squidly:

C++. Files from pdata are, as said Nurse jeballi, persistent format of classes. I recreate that format from Machines Demo files and by  comparing bin files each other. Source code for this utility will be provided soon.


[0] Message Index

[#] Next page

Go to full version