Machines: Wired for War

Machines => Mods => Topic started by: mb on November 07, 2011, 08:55:19 pm

Title: Extracing tools
Post by: mb 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:

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.

Title: Re: p_txt utility
Post by: ScrewTheSystem 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?
Title: Re: p_txt utility
Post by: mb 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.
Title: Re: p_txt utility
Post by: ScrewTheSystem 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:
Title: Re: p_txt utility
Post by: mb 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.
Title: Re: p_txt utility
Post by: Mahmoud 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:
Title: Re: p_txt utility
Post by: ScrewTheSystem on November 11, 2011, 07:53:49 pm
Isn't this guy FUCKING OSSOM? xD

 :squidly: :squidly:
Title: Re: p_txt utility
Post by: mb on November 19, 2011, 07:08:20 pm
New tools are attached in orginal post, with tutorial.
Title: Re: p_txt utility
Post by: ScrewTheSystem on November 19, 2011, 07:14:15 pm
New tools are attached in orginal post, with tutorial.

I saw, cool ;)

 :squidly: :squidly:
Title: Re: Extracing tools
Post by: X-Lord on November 22, 2011, 01:22:48 pm
(http://i1.kwejk.pl/site_media/obrazki/2011/08/bc3bb262314876a72fca011c23c5db89.jpeg)
Title: Re: Extracing tools
Post by: The Merciful on November 25, 2011, 03:29:15 am
As Borat would say, "Very nice, very nice."
Title: Re: Extracing tools
Post by: ScrewTheSystem on November 25, 2011, 06:07:41 am
As Borat would say, "Very nice, very nice."

"Niiizze. Veeerrry nizzze."

(http://images.pictureshunt.com/pics/b/borat-10571.jpg)

 :squidly: :squidly:
Title: Re: Extracing tools
Post by: mb 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):

(http://img197.imageshack.us/img197/1026/ariz00.th.jpg) (http://img197.imageshack.us/i/ariz00.jpg/)(http://img812.imageshack.us/img812/5243/ariz01.th.jpg) (http://img812.imageshack.us/i/ariz01.jpg/)

(http://img847.imageshack.us/img847/7198/tile01.th.jpg) (http://img847.imageshack.us/i/tile01.jpg/)(http://img221.imageshack.us/img221/989/tile84.th.jpg) (http://img221.imageshack.us/i/tile84.jpg/)

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.
Title: Re: Extracing tools
Post by: X-Lord on November 26, 2011, 04:54:34 am
Please, tell us, how the hell do you do this?
Title: Re: Extracing tools
Post by: mb 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
Title: Re: Extracing tools
Post by: X-Lord on December 18, 2011, 11:34:53 am
Great job! I love people who share their's wisdom with fools, like me :) Now I have to find some time to try it myself. It'll be hard, but I'll provide you with some feedback asap.

greetings and good luck in your future plans for Machines ;)
Title: Re: Extracing tools
Post by: Automatic on December 19, 2011, 02:34:58 am
Oh my.
Title: Re: Extracing tools
Post by: ScrewTheSystem on December 19, 2011, 05:15:07 pm
Oh my.

... sweet, succulent spaghetti-God?

 :squidly: :squidly:
Title: Re: Extracing tools
Post by: mb on January 09, 2012, 06:13:55 pm
greetings and good luck in your future plans for Machines ;)

Unfortunately it was the whole plan: to provide method for creating new maps. I'm not planning anything more for Machines modding.
Title: Re: Extracing tools
Post by: Mahmoud on January 11, 2012, 11:29:56 pm
Well as long as you're here, you might as well decompile the entire source.......Please?
Title: Re: Extracing tools
Post by: mb on January 15, 2012, 07:38:42 am
I just simply can't :squidly:. It is nearly impossible to decompile it to orginal C++ source.
Title: Re: Extracing tools
Post by: naums on January 15, 2012, 08:26:41 am
uhm, but disassembly is possible, so if someone of you speaks Assembler ;)
Title: Re: Extracing tools
Post by: ScrewTheSystem on January 15, 2012, 12:07:21 pm
uhm, but disassembly is possible, so if someone of you speaks Assembler ;)

Is disassembling possible if the program hasn't been written in an Assembly-language in the first place?

 :squidly:
Title: Re: Extracing tools
Post by: naums on January 15, 2012, 04:57:09 pm
yes it is. Every machine-code command has its Assambler counterpart. So ... every Assembler command can be directly onverted into a machine code command and the other way round.
Title: Re: Extracing tools
Post by: Automatic on January 15, 2012, 11:50:47 pm
You could always ask "TitanFind" on youtube for the sourcecode. He said he had it, but has not responded.
Title: Re: Extracing tools
Post by: naums on January 16, 2012, 01:24:00 pm
I wonder what the devs did with the code anyway, cause after Acclaim's insolvency ... where did it go?
Title: Re: Extracing tools
Post by: ScrewTheSystem on January 17, 2012, 09:10:19 am
I wonder what the devs did with the code anyway, cause after Acclaim's insolvency ... where did it go?

Not even the high and mighty Squidlord knows the answer to that... o0

 :squidly:
Title: Re: Extracing tools
Post by: naums on January 17, 2012, 03:20:55 pm
I guess noone knows it. There are so many question I'd like to ask a guy from Acclaim. They had really great games: Turok, Machines, ReVolt, Shadow Man. But then there were the insolvency. I don't know how and why they could drive the company against the wall.
Title: Re: Extracing tools
Post by: ScrewTheSystem on January 17, 2012, 05:42:57 pm
Yup, being underrated sucks...

Also, several factors included bad marketism, the inability to compete against the on their turn overrated Starcraft (which was also released back then) and... whatnot...

 :squidly:
Title: Re: Extracing tools
Post by: Automatic on January 17, 2012, 10:36:21 pm
Well keep in mind that
1. Acclaim was only a publisher
2. Acclaim had been sued multiple times
Title: Re: Extracing tools
Post by: naums on January 18, 2012, 11:12:35 am
Acclaim was sued? What for? Yeah, Acclaim was only the publisher, but they had lots of developers, which "died" with them. For example Iguana (okay, I can't come up with more, but Iguana made every game of Acclaim.)

Apparently Iguana or Acclaim Studios Austin didn't die, the original founder of Iguana left the company 1998 and founded Retro Studios. http://de.wikipedia.org/wiki/Retro_Studios (Ger)
Title: Re: Extracing tools
Post by: Automatic on January 19, 2012, 05:37:57 pm
Acclaim had been sued for releasing a pornographic sports game (sounds odd, huh?) and associated it with some sort of professional BMX guy or something, who hadn't agreed to be associated with the game.

I don't recall what else they had been sued for.
Title: Re: Extracing tools
Post by: ScrewTheSystem on January 19, 2012, 05:52:26 pm
Acclaim had been sued for releasing a pornographic sports game (sounds odd, huh?) and associated it with some sort of professional BMX guy or something, who hadn't agreed to be associated with the game.

I don't recall what else they had been sued for.

Riiiight... BMX XXX... I remember that... I mean, the title... o0... Because I... read an article about it... Not that long ago...

What? Seriously! =O

 :squidly:
Title: Re: Extracing tools
Post by: naums on January 20, 2012, 09:17:45 am
What the heck?!!! Okay, maybe I was too young... those dipshits.