So, someone convinced me to try working on Prototype, and so far it’s been a success. I’m currently working on an editor for the Pure3D (*.p3d) files, called Edit3D.
It’s working pretty good, the big brunt of the work will be researching & writing code to serialize/deserialize the many, many different types of data in the Pure3D files. I did a test texture replacement of alex_body_dm.dds with good success:
Tags: Hacking
It’s looking good.
Glad that you are working on something like this, even if its basic, at least it is one more thing to use for the game and one more step closer to making it better.
Does anyone know how to modify sound files ? I just want to put the Heavy’s Om nom nom nom nom when you assimilate people :3
So far the editor seems to work well, after figuring out that the rcf files are what I needed to start.
Man there are a lot of individual files.
hi,
1. nice work
2. found some stuff:
U00018201 = TextContainer
U00018202 = TextData (Parent of TextContainer, for frontend text, subtitles etc.)
U00010020 = Mesh, contains:
– VertexBufferDeclaration (0x00010014)
– VertexBuffer (0x00010012)
– IndexBuffer (0x00010013)
these are used by polyskin and others (try alex.p3d, midgeo.p3d, etc.)…
i hacked in a basic ModelViewer (from GTA IV sparkiv (WPF))
http://www.sendspace.com/file/tqnzhr
That is very impressive, thank you!
…found another thing:
*.gfx files are flash movies (*.swf) with a different header: replace ‘G’,’F’,’X’ with ‘F’,’W’,’S’ at the start of the file and rename it to *.swf…
some more stuff (based on rev.25)
http://www.sendspace.com/file/6ptlmc
my code is rushed/incomplete and could be incorrect but displays some more 3d models, some with textures…
wpf isn’t capable of using ps_2+, so correct texture mapping(using the shaders) isn’t really possible with it….
It may be a good idea to just make a seperate model viewer that can load P3Ds that have model data to render them using XNA.
some more shader work to do then…
i did some more research, here is what i found (based on rev.30)
http://www.sendspace.com/file/elg823
this contains some info about animations, joints, limbs, etc…
there’s still wpf code which should be probably removed and made with xna in a different project…
i found a very interesting program:
http://pages.cpsc.ucalgary.ca/~parker/cpsc585-radical/local_only/p3dExplorer/
…and some files to test:
http://pages.cpsc.ucalgary.ca/~parker/cpsc585-radical/local_only/art/
these are very old but they are from radical and contain some info (typeids, structs, etc.) are applicable to prototype pd3s…
Very cool, I’ll take a look at that stuff. It’s very nice having someone else beside me work on this too. 🙂
rick do you know how to get the audios? ple help
With this program , i can not modfy the subtitle files fe_textbible.p3d and textbible_english.p3d. I open the files , modify but can not save, what is the problem ?
Here are some corrections/additions. Would be cool if i had some more files to test with p3dexplorer to find more animation type chunks, but i don’t have any other radical games…
http://www.sendspace.com/file/vwtdxf
I found a strange bug which breaks Gibbed.Prototype.Cement Unpack:
the offending code is
[code]
Debug.Assert(stream.Read(data, 0, 4) == 4);
[/code]
in StreamHelpers.ReadValueU32()
the funny thing is, this works:
[code]
int read = stream.Read(data, 0, 4);
Debug.Assert(read == 4);
[/code]
Huh, that is weird. What file causes that?
I tried several files (scripts.rcf, art.rcf, …), it seems to happen only if i use Release configuration. It works when debugging…
Here’s some more stuff (compressed animation data, some shader info, etc.)
http://www.sendspace.com/file/s341ix
taking a break now… perhaps i have some time tomorrow.
Ahhh, it’s probably my bad usage of Debug.Assert there, I’ll go and fix all the spots where I do it like that.
Uhhm, I love your work, but can we download it already? as a demo or something? I cant wait :P. And if we cant do you know another funny mod/trainer for Prototype?
currently it can only be downloaded as source, he hasn’t compiled it yet and put it up, that I know of, you would have to compile it yourself.
here are some fixes/additions for compressed animations (this time only FileFormats project)
http://www.sendspace.com/file/zo2ozt
DerPlaya78 – you have a small bug in Camera.cs, namely you serialize Look twice instead of Look them Up.
thanks… this won’t be the last bug 🙂
Yeah of course, I just noticed it when I started pulling in your changes.
i have to take a break now, here is the last version:
http://www.sendspace.com/file/03t5xq
…this contains some code for compressed quaternions but i’m not sure if this is right. there are 2 classes which store quaternions as short[3] / byte[3]. I think these are euler angles but my math sucks…
just to let you know: i figured out the format of the sound files:
the raw sound data is stored as intel/dvi adpcm
Files which contain audio data have this format:
…header data…
FourCC = ‘RADP’
uint Channels
uint SampleRate
uint unk
uint Length
then follow blocks of 20 bytes each:
struct block {
short[2] // [0] = index, [1] = sample
byte[16] // codes
}
for multichannel files these blocks are interleaved.
i will post something more soon…
here’s some code for audio files:
– include the files in Pure3D.7z in Gibbed.FileFormats.Pure3D
– Extract *.radp files
– use radp2wav to convert to wave
http://www.sendspace.com/file/p07ul2
I was to lazy to implement extraction in Edit3D and only decompression is included…
Hi i’m looking for extract prototype 2 audio sound you can help me please thank’s
hi.
i hope you’re still working on this… here is a compilation of my research:
http://www.sendspace.com/file/agv1kk
this contains some info about all the types, lua stuff, and some more changes…
I am, just been busy. 🙂
I don’t know much about this stuff at all, but I was wondering, if you guys are able to extract or play sound, like dialog? all I have been able to do is extract p3d files from rcf files, but dunno what next, and I read p3d are graphic files so they arent even the sound files? and bik files from the movie.rcf which play in bink and smacker rad player, but no voice, and some don’t have any sound at all.
Any help would be appreciated >.<.
Read above, DerPlaya78 has come up with a way to get sound files, it may or may not work with the format the dialogue is in but you could try.
I downloaded those things, but i’m really not sure how to use em =x.
…some more research:
http://www.sendspace.com/file/kaljkl
– contains some stuff for physics including visualization of different volumes (capsule, sphere, obb, cylinder, mesh …still using WPF because I’m too lazy 🙂 )
– alot more types in all catogories (billboards, particlesystem, etc.)
– included wave export for audiofile types
– disabled *.p3d save (because i didn’t implement serialize for most things…)
Any chance you could explain how to use em?
I’d just like to be able to get some of the sound files extraced or w/e
here are some more changes (shadertemplate, physics, animation)
http://www.sendspace.com/file/0hkpjr
…this contains a compiled exe for edit3d…
to export audio:
– open p3d containing audio data (ex. ‘audio\alex.p3d’)
– click on a ‘UFE000000_AudioData (AudioFile)’ node
– click on Export Node Data (blue icon)
use at own risk.
It seems these tools only compress rather then extract or play the audio. Looks promising though. Eagerly waiting for more results, great work guys. I’m also trying to get the dialogue from the files but only got the CG and WOI out, without the voices but music in the bg. So damn hard >=/
With those tools you can extract just about every sound, and play any that you can extract with even the default windows media player.
The p3d files that start with “nis” should be for the web of intrigue or cut scenes.
The WOI and other videos are bik files which are known to not include dialogue to save overall space in multi language games, that is why you will find what you need separately.
“With those tools you can extract just about every sound, and play any that you can extract with even the default windows media player.”
But just how can we do that? >.<
I suppose no one really wants to go all out and explain how to do that? As in exactly how to get the dialog out. I even tried to get help from 2 other people who are pretty familiar with this stuff but they don’t understand. I’m about ready to PAY someone to do it for me.
How about extracting meshes, textures, uv’s, bones, and animation, so they can be usable in max or maya?
To be able to get anything you first have to compile.
Then you use “Gibbed.Prototype.Cement.exe” in the main bin folder to decompress the .rcf files, running “Gibbed.Prototype.Cement.exe” one time in cmd will tell you what you need to do.
Then you just use the Edit3d program to open the p3d files and extract.
Thanks, its workin~
You wouldn’t happen to know how to open/save a bunch at a time? or know which files are which >.<, was lookin for the voice files of alex but it seems they are just random mixed with others named things like "160cbf87.p3d" but when opened or saving it its "23880_alex_008.wav"
How can I open the p3d Text files ? (need for subtiles Please )
cu X-Man
and save the changed p3d subtile file ?
X-Man
http://www.sendspace.com/file/0hkpjr
In the bin folder is the edited exe, use it to open p3d files, then click the little blue mic to save them.
I wish there was a way to save multiple files like Rawr said, this is gonna take a really long time lol
Thanks you MilkandHoney
Okay.
I exportet the english Subtiles as TXT-Format.
I translate the english Subtiles in German
Question:
Like must import the translated file I and as as new. P3D file store ? ( NIS_0_1_FMV.p3d )
I need help…The button with “stores new P3D” doesn’t go
I am desperately friends….
Thx X-Man
importing textbibles is not implemented yet… so you can only export the subtitles.
thx
@Rick:
if you’re still interested in this:
http://www.sendspace.com/file/ur3tfb
– contains some more info on audio files
– ignore my changes to fightfile…
…look into ‘fightstuff’ instead:
there is another way to parse fightdata without knowing all the types. the data actually contains a kind of tree similar to p3d content.
i wrote a little program to test this:
– ‘data\figsrc’ contains all the dumped fightdata nodes (format context + ‘_’ + name)
– ‘figinfo’ contains the source for my little tool. it parses all dumped info and saves the result as xml files in ‘data\figxml’
– ‘data\figdump*’ contains all the individual nodes dumped in textformat – helps to figure out the format of a node
– ‘\figinfo\figinfo\Entries’ contains some deciphered nodes (just the content, not its meaning)