Yoma 0 Posted December 27, 2007 Don't answer with "I think", "maybe" or the likes. Don't answer with use another tool. I want to know how to open it natively from c# to have a look at what's IN it, without needing to extract it. It's for a project i have in mind. Share this post Link to post Share on other sites
sakura_chan 9 Posted December 27, 2007 There are plenty of pbo 'viewers', such as pboview, that allow you to open and view textures and config files without extracting anything. Share this post Link to post Share on other sites
Smartti 1 Posted December 27, 2007 You can find the PBO file format documentation in BIS Community Wiki. Share this post Link to post Share on other sites
mikero 79 Posted December 27, 2007 the bottom line is you will have to write c# code to extract, at the very least, the header information of a pbo. the header contains filename and file size for each data block in the pbo the way to do that, is of course up to you in C# code, but the structure of the pbo, and what you're needing to fread() is at the above link. alternatively. you can use my depbo.dll. which as the name suggests does it for you and you just use API calls into the dll to get at what you want. mikero@norfolk.nf if you need further info (the dll's header file eg) Share this post Link to post Share on other sites
Synide 0 Posted December 28, 2007 If you don't end up using Mike's .dll (you probably should though, as he's done all the work for you...) then in C# all you do is open a filestream (as oppossed to a memorystream - 'cause you wouldn't want to read an entire pbo into memory - probably, anyway...) and attach a BinaryReader to the stream. BinaryReader class is your best friend. Make use of the pbo file format information on the biki. Share this post Link to post Share on other sites
DaV!d Armstrong 0 Posted December 28, 2007 That's really great! Share this post Link to post Share on other sites
Yoma 0 Posted December 28, 2007 Thanks for the info. I'll try to use the dll (no point in reinventing the wheel now is there?) The idea would be to be able to scan mod dependencies on missions/other pbo's. Something like: build an online db where you can submit modfiles. Also build a client tool that can scan e.g. mission for mods and report what you will be needing / maybe where to get it. I now, its UTOPIA, but how would the world look like if people didn't dream... Share this post Link to post Share on other sites
Synide 0 Posted December 28, 2007 Thanks for the info. I'll try to use the dll (no point in reinventing the wheel now is there?)The idea would be to be able to scan mod dependencies on missions/other pbo's. Something like: build an online db where you can submit modfiles. Also build a client tool that can scan e.g. mission for mods and report what you will be needing / maybe where to get it. I now, its UTOPIA, but how would the world look like if people didn't dream... Indeed an admirable thought... I suggested a long while ago that anyone and everyone that created a pbo whether it be a mission or an addon/mod could insert a small text file inside the pbo. the name of the text file was suggested to be a in the format of a <guid.txt> or something, and one could have had additional agreed upon textual content in this text file that a program like yours could quite easily extract. I suggested a guid to uniquely identify a pbo as opposed to an md5 or sha 'cause then you wouldn't have to have a mechanism to verify the checksum/parse the entire pbo - at the time i thought it was a good idea and very easily implemented - hardly anyone else did however. Share this post Link to post Share on other sites
[aps]gnat 28 Posted December 28, 2007 .... and a few more like myself & other discussed similar things for OFP .... a super addon / downloader tool to make addon and mission downloading and cross-checking idiot proof. But its a hell of a "free-time" project to bring alive, especially as you hinted at one of the problems, community buy-in. In the OFP days different people made "bits" (like my PBO-Manager) that combined could come close ...... One problem with a guide.txt file idea is the addon maker can forget to update it or makes a typo error. Best result would be to read the config and .sqm files direct from the .pbo. Easy for me to say, but it should be possible because there are tools (ie PBOView) now that read the archive without un-packing. I had 2 schools of thought on the "central Database", if its local to the client hdd then any addon including WIP can be cross-checked with missions etc. Only "missing" addons would be searched for in a WWW database. A tool that only works off a online DB could be a hinderance for some, but it would centralise the info. I don't think theres any point trying to DB track and record the 100,000 missions out there ..... 99,000 of them a Hexenkessel remake/mod! Yoma, very cool to try ..... love your work. Share this post Link to post Share on other sites
Yoma 0 Posted December 28, 2007 It's not for now, maybe in some distant future. And i'll need some people with internal addon knowledge because frankly i know squat about that. (I never even tried to create one, don't think it would be for me, i hate graphic stuff etc.) If i ever give a shot at it i'll first contact some big modssite (armaholic or armedassault.info e.g.) and see if we could work something out... Don't get your hopes high, most likely it will never happen... Then again that was exactly what i said to people when i first started the addonsync thingy. Share this post Link to post Share on other sites