dreadylein Posted October 18, 2012 Share Posted October 18, 2012 (edited) How do you try to compress it ? Not everything is compressed in the upks, only the chunks statet in the header as far as i know Edited October 18, 2012 by dreadylein Link to comment Share on other sites More sharing options...
Dark0ne Posted October 18, 2012 Share Posted October 18, 2012 Daemonjax, I don't understand half the things you're talking about but I want to thank you a lot for (a) just looking in to it and (b) documenting it so well so we can see a timeline of what you've tried so if others come along to help later they know what you've already tested. Great stuff :) Link to comment Share on other sites More sharing options...
Anbar Posted October 18, 2012 Share Posted October 18, 2012 I can watch panic increase on a country that literally nothing has happened in game that I could see, so if it's not a missed UFO, I'm not sure what it is. Either way I was happy to find those values actually buried in the ini file as well. There's not much you can't do by only editing the ini files it seems, short of creating an entirely new ability/item/etc. ive never seen panic rise in a country or continent unless UFO activity has taken place, such as the 2 out fo the 3 (or 4) un-assaulted abduction missions....rmember their is a continetal panic status on these, as well as country: but i re-ran some saves last night to check and the only areas where panic rose is continents with UFO activity on them (unsighted, but abductions) and the continent and countries the player desires to resolve/assault. But, ultimately, yeah... theres only so much the ini does and we all really want to get into the iinner workings and really see what is going on. I mean, intheory items should take time to build - just like satellites do, the build times being listed in the .ini.... clearly something in the code in one of the UPKs is telling the game to ignore those timing, except the satellite one... its very frustrating. Link to comment Share on other sites More sharing options...
Daemonjax Posted October 18, 2012 Share Posted October 18, 2012 (edited) Daemonjax, I don't understand half the things you're talking about but I want to thank you a lot for (a) just looking in to it and (b) documenting it so well so we can see a timeline of what you've tried so if others come along to help later they know what you've already tested. Great stuff :) You're welcome! ;) How do you try to compress it ? Not everything is compressed in the upks, only the chunks statet in the header as far as i know I downloaded and used LZOP. It gets close. Real close. I looked at the compressed and uncompressed versions of the file with using a hexeditor, and the entire UPK file is indeed compressed. If that's not the case, I'd be really surprised. I would try another program to compress it at this point, unfortunately none exist. So, we'd have to write one, and there's no guarantee it'd work with this engine in the end. UPDATE: Found a java implementation of the LZO algorithm. https://github.com/Karmasphere/lzo-java I'll give it a whirl. And, btw, the source code for the C version compiles no problem using just dev c++. I'm just OK with C, so if there's anyone else here that's awesome at it then that one's for you. :D UPDATE: Bad news. That code for Karmasphere is broken, and the author's email address just bounced back to me. Edited October 18, 2012 by Daemonjax Link to comment Share on other sites More sharing options...
Beknatok Posted October 18, 2012 Share Posted October 18, 2012 Wow, fantastic R&D work Daemonjax! Link to comment Share on other sites More sharing options...
dumbo111 Posted October 18, 2012 Share Posted October 18, 2012 I've been investigating using the UDK. My current problem is that XCOM uses a version of APEX that is incompatible with the version used by the current UDK. But I don't know how to download "older" versions of the UDK, and I can't work out how to convert version numbers to find out which date matches the relevant number... My hunch is that it still wouldn't work "properly" (the xcom editor upk would likely be needed for it to work properly), and might not work at all if the copy-protection kicks in during edit mode [weirdly the UDK does seem to have a steam library, so maybe it would?]. Link to comment Share on other sites More sharing options...
dreadylein Posted October 18, 2012 Share Posted October 18, 2012 should be the september 2011 skd according to the engineversion but they had a bunch of time, guess they modded it for their needs quite a bit Link to comment Share on other sites More sharing options...
Daemonjax Posted October 18, 2012 Share Posted October 18, 2012 (edited) http://www.oberhumer.com/opensource/lzo/lzofaq.php LZO1X-999 !---------- algorithm category !--------- algorithm type !!!----- compression level (1-9, 99, 999) LZO1X-1(11) !---------- algorithm category !--------- algorithm type !------- compression level (1-9, 99, 999) !!---- memory level (memory requirements for compression) - lzo1x_decompress The 'standard' decompressor. Pretty fast - use this whenever possible. This decompressor expects valid compressed data. If the compressed data gets corrupted somehow (e.g. transmission via an erroneous channel, disk errors, ...) it will probably crash your application because absolutely no additional checks are done. Ahah! So that's why it crashes when the file isn't compressed. And I guess LZOP's compressor does something a little bit differently which also causes a crash. So, I think we should just use the code found here: http://www.oberhumer.com/opensource/lzo/ to write our own compressor. There are .NET and Ruby bindings for it. Any volunteers? If not, I'll do it in C. UPDATE: I started working on it. Making some progress. Might take me a while because I have to reverse engineer everything Gildor figured out. Right now I'm trying to work out how the upk file header is laid out. I found this thread, and it appears useful: http://www.gildor.org/smf/index.php/topic,297.msg2859.html These first 8 bytes do not change from one compressed upk to another: C1 83 2A 9E 00 00 02 00 UPDATE: This is harder than I thought it would be. I don't understand upk file structure enough to make this an easy coding assignment ;) Also, the size of the header seems to vary from file to file (except the first eight)... seen if your compare core.upk and engine.upk in a hexeditor. Maybe there's a reason no one's made a upk compressor. Edited October 18, 2012 by Daemonjax Link to comment Share on other sites More sharing options...
dreadylein Posted October 18, 2012 Share Posted October 18, 2012 didnt i wrote this ? :O damn sorry Link to comment Share on other sites More sharing options...
dumbo111 Posted October 18, 2012 Share Posted October 18, 2012 should be the september 2011 skd according to the engineversion but they had a bunch of time, guess they modded it for their needs quite a bitThanks, can't get that to work anyway - seems to have all kinds of strange path errors :(. In terms of the lzo problem - silly question but have you tried changing bFullyCompressStartupPackages=TRUE in defaultengine.ini (I doubt it's that simple...) This one has a repacker that seems to work on the uncompressed files:https://sites.google.com/site/0dd14lab2/upkpacker Link to comment Share on other sites More sharing options...
Recommended Posts