Author Topic: Extracing tools  (Read 3163 times)

0 Members and 1 Guest are viewing this topic.

Offline mb

  • Wraith Reaper
  • *
  • Posts: 30
  • Karma: 13
    • View Profile
Extracing tools
« on: November 07, 2011, 08:55:19 pm »
Update: Full map making tutorial http://wiredforwar.wikia.com/wiki/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 sceninfo.data 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: [Select]
CAMPAIGN
<w>Make Contact
 
Make Contact with the newly-arrived Pod and build a defensive army.
END

OBJECTIVE 1
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.
 
END

OBJECTIVE 2
END

HINT
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.
END

WIN
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.
END

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

TASK 1
> Make Contact With the Commandant
END

TASK 2
> Escort the Commandant to the base
END

TASK 3
> Build a Military Factory
END

TASK 4
> Build a defensive army of at least 5 Reapers
END

TASK 5
> The Commandant must not be destroyed
END


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.

« Last Edit: September 14, 2012, 09:06:18 pm by mb »

Offline ScrewTheSystem

  • WFW Employee
  • Eradicator
  • *
  • Posts: 828
  • Karma: 22
  • Gender: Male
  • Let us instigate the revolt, down with the system
    • View Profile
    • Warez-bb.org
Re: p_txt utility
« Reply #1 on: November 07, 2011, 09:04:25 pm »
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?
Remember when being a Wrath Reaper was badass? Those were the days. . .

Offline mb

  • Wraith Reaper
  • *
  • Posts: 30
  • Karma: 13
    • View Profile
Re: p_txt utility
« Reply #2 on: November 07, 2011, 09:12:25 pm »
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.
« Last Edit: November 22, 2011, 11:31:56 pm by mb »

Offline ScrewTheSystem

  • WFW Employee
  • Eradicator
  • *
  • Posts: 828
  • Karma: 22
  • Gender: Male
  • Let us instigate the revolt, down with the system
    • View Profile
    • Warez-bb.org
Re: p_txt utility
« Reply #3 on: November 09, 2011, 12:25:29 pm »
Ossom.

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:
Remember when being a Wrath Reaper was badass? Those were the days. . .

Offline mb

  • Wraith Reaper
  • *
  • Posts: 30
  • Karma: 13
    • View Profile
Re: p_txt utility
« Reply #4 on: November 09, 2011, 03:02:53 pm »
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.

Offline Mahmoud

  • Openmachines dev
  • Eradicator
  • *
  • Posts: 571
  • Karma: 0
  • Gender: Male
  • Sometimes change is needed, in any direction
    • View Profile
    • Just a game...
Re: p_txt utility
« Reply #5 on: November 11, 2011, 07:36:59 pm »
Dood, liek, woah, n stuff. Never thought we'd actually get someone to reverse engineer machines  :holy:
IRC join #wiredforwar
Development

Offline ScrewTheSystem

  • WFW Employee
  • Eradicator
  • *
  • Posts: 828
  • Karma: 22
  • Gender: Male
  • Let us instigate the revolt, down with the system
    • View Profile
    • Warez-bb.org
Re: p_txt utility
« Reply #6 on: November 11, 2011, 07:53:49 pm »
Isn't this guy FUCKING OSSOM? xD

 :squidly: :squidly:
Remember when being a Wrath Reaper was badass? Those were the days. . .

Offline mb

  • Wraith Reaper
  • *
  • Posts: 30
  • Karma: 13
    • View Profile
Re: p_txt utility
« Reply #7 on: November 19, 2011, 07:08:20 pm »
New tools are attached in orginal post, with tutorial.

Offline ScrewTheSystem

  • WFW Employee
  • Eradicator
  • *
  • Posts: 828
  • Karma: 22
  • Gender: Male
  • Let us instigate the revolt, down with the system
    • View Profile
    • Warez-bb.org
Re: p_txt utility
« Reply #8 on: November 19, 2011, 07:14:15 pm »
New tools are attached in orginal post, with tutorial.

I saw, cool ;)

 :squidly: :squidly:
Remember when being a Wrath Reaper was badass? Those were the days. . .

Offline X-Lord

  • Eradicator
  • *
  • Posts: 852
  • Karma: 40
  • Gender: Male
  • Modder
    • View Profile
Re: Extracing tools
« Reply #9 on: November 22, 2011, 01:22:48 pm »

Offline The Merciful

  • The Bunny King
  • Eradicator
  • *
  • Posts: 851
  • Karma: -1
  • Gender: Male
    • View Profile
Re: Extracing tools
« Reply #10 on: November 25, 2011, 03:29:15 am »
As Borat would say, "Very nice, very nice."
:bunny: :bunny:

I wouldn't pet the bunnies if I...

Offline ScrewTheSystem

  • WFW Employee
  • Eradicator
  • *
  • Posts: 828
  • Karma: 22
  • Gender: Male
  • Let us instigate the revolt, down with the system
    • View Profile
    • Warez-bb.org
Re: Extracing tools
« Reply #11 on: November 25, 2011, 06:07:41 am »
As Borat would say, "Very nice, very nice."

"Niiizze. Veeerrry nizzze."



 :squidly: :squidly:
Remember when being a Wrath Reaper was badass? Those were the days. . .

Offline mb

  • Wraith Reaper
  • *
  • Posts: 30
  • Karma: 13
    • View Profile
Re: Extracing tools
« Reply #12 on: November 25, 2011, 03:24:43 pm »
Currently working on *.psb extractor. First results (this is not remodeled tiles, they are extracted from orginal tutorial, desert and ice maze maps):





I have some problems with recreating orginal materials, light are not the same that in in-game display.

BTW this is possible to create new maps (tottaly new maps) but it is quite hard. If can write tutorial, if you want.

Offline X-Lord

  • Eradicator
  • *
  • Posts: 852
  • Karma: 40
  • Gender: Male
  • Modder
    • View Profile
Re: Extracing tools
« Reply #13 on: November 26, 2011, 04:54:34 am »
Please, tell us, how the hell do you do this?

Offline mb

  • Wraith Reaper
  • *
  • Posts: 30
  • Karma: 13
    • View Profile
Re: Extracing tools
« Reply #14 on: December 18, 2011, 09:26:35 am »
I have attached new files. Here you can find map making tutorial http://wiredforwar.wikia.com/wiki/Map_making_tutorial