wghost81 Posted July 1, 2014 Author Share Posted July 1, 2014 Amphibious, currently you can mod XCOM under Linux with UPKUtils: http://forums.nexusmods.com/index.php?/topic/1829365-modding-xcom-under-linux/?p=15998310 Build XComLZO and PatchUPK for your system. Unpack xcomgame.upk and xcomstrategygame.upk with XComLZO, rename resulting .unpacked files back to upk and delete corresponding .uncompressed_size files. Now you're ready to make upk changes. Download sex and nationality mods from Interface and Gameplay Tweaks here on Nexus. Change all upk file names to lowercase, for example: UPK_FILE=xcomgame.upk. Now you can apply those with PatchUPK. I will update patcher soon to eliminate the lowercase-CamelCase problem, but right now you have to convert package names yourself. This little problem aside, all PatchUPK mods are compatible with Lunux XCOM, as packages are identical to Windows XCOM. Link to comment Share on other sites More sharing options...
Amphibious Posted July 1, 2014 Share Posted July 1, 2014 (edited) I have a problem I get this message when following your instructions: -- The CXX compiler identification is unknownCMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.-- Could NOT find wxWidgets (missing: wxWidgets_FOUND)wxWidgets not found!-- Configuring incomplete, errors occurred! COuld you be more specific what to install? I use linux mint latest version. edit: found the right file installed g++ and libwxgtk2.8-dev. Anyway what's next, could you please elaborate step by step how to do this: "Build XComLZO and PatchUPK for your system. Unpack xcomgame.upk and xcomstrategygame.upk with XComLZO, rename resulting .unpacked files back to upk and delete corresponding .uncompressed_size files. Now you're ready to make upk changes." and "Now you can apply those with PatchUPK." Edited July 1, 2014 by Amphibious Link to comment Share on other sites More sharing options...
wghost81 Posted July 1, 2014 Author Share Posted July 1, 2014 (edited) Search your repository for "GNU C++ Compiler". Usually it's a virtual package named gcc-c++. Real package will have version number, like gcc4.7-c++. Command like sudo apt-get install gcc-c++should install the compiler. Installing wxWidgets is optional. Edited July 1, 2014 by wghost81 Link to comment Share on other sites More sharing options...
Amphibious Posted July 1, 2014 Share Posted July 1, 2014 (edited) thx, i solved that already c++ compiler is named g++ in mintinstall. Anyway could you please go step by step since I'm unfamiliar with your tool and I have virtually no education in programming. Could you please elaborate step by step how to do this: "Build XComLZO and PatchUPK for your system. Unpack xcomgame.upk and xcomstrategygame.upk with XComLZO, rename resulting .unpacked files back to upk and delete corresponding .uncompressed_size files. Now you're ready to make upk changes." I believe xcomlzo was bulit since I followed instrctions from the link you gave. and "Now you can apply those with PatchUPK." Edited July 1, 2014 by Amphibious Link to comment Share on other sites More sharing options...
wghost81 Posted July 1, 2014 Author Share Posted July 1, 2014 If the build for main tool was successful, you'll get a number of executable binaries under UPKUtils/build directory. One of them is PatchUPK - the main tool to apply the mods. But to be able to patch XCOM packages, you need to unpack those first. Change directory to UPKUtils/XComLZO/build and run cmake. You will get XComLZO executable. When running those executables you will receive a short console help output. Use that information to set correct parameters. There is a Linux wiki entry: http://wiki.tesnexus.com/index.php/Basic_Guide_to_installing_mods#Linux_Differences It has all the locations of Linux version XCOM resources. UPKUtils readme files are packed with windows UPKUtils build: www.nexusmods.com/xcom/mods/448 I will add those to github later. Link to comment Share on other sites More sharing options...
Amphibious Posted July 1, 2014 Share Posted July 1, 2014 (edited) If the build for main tool was successful, you'll get a number of executable binaries under UPKUtils/build directory. One of them is PatchUPK - the main tool to apply the mods. But to be able to patch XCOM packages, you need to unpack those first. Change directory to UPKUtils/XComLZO/build and run cmake. You will get XComLZO executable. When running those executables you will receive a short console help output. Use that information to set correct parameters. XComLZO unpacker works fine however ther is no PatchUPK in build dir. When building patchupk after running make I get the following message, something obviously went wrong: [ 7%] Built target UPKInfo[ 15%] Built target CompareUPK[ 23%] Built target UPKUtils[ 30%] Built target UObject[ 38%] Built target UObjectFactory[ 46%] Building CXX object CMakeFiles/DeserializeAll.dir/home/.../UPKUtils/DeserializeAll.cpp.o/home/.../UPKUtils/DeserializeAll.cpp: In function ‘std::string CreatePath(std::string, std::string)’:/home/.../UPKUtils/DeserializeAll.cpp:30:29: error: cannot convert ‘std::string {aka std::basic_string<char>}’ to ‘const wxChar* {aka const wchar_t*}’ for argument ‘1’ to ‘bool wxDirExists(const wxChar*)’ if (!wxDirExists(str)) ^/home/.../UPKUtils/DeserializeAll.cpp:31:24: error: invalid initialization of reference of type ‘const wxString&’ from expression of type ‘std::string {aka std::basic_string<char>}’ wxMkdir(str); ^In file included from /home/.../UPKUtils/DeserializeAll.cpp:5:0:/usr/include/wx-2.8/wx/filefn.h:590:23: error: in passing argument 1 of ‘bool wxMkdir(const wxString&, int)’ WXDLLIMPEXP_BASE bool wxMkdir(const wxString& dir, int perm = 0777); ^/home/.../UPKUtils/DeserializeAll.cpp: In function ‘int main(int, char**)’:/home/.../UPKUtils/DeserializeAll.cpp:63:71: error: conversion from ‘char*’ to ‘const wxString’ is ambiguous wxFileName::SplitPath(argV[1], nullptr, nullptr, &dirName, nullptr); ^/home/.../UPKUtils/DeserializeAll.cpp:63:33: note: candidates are: wxFileName::SplitPath(argV[1], nullptr, nullptr, &dirName, nullptr); ^In file included from /home/.../UPKUtils/DeserializeAll.cpp:4:0:/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match> wxString(wxChar ch, size_t nRepeat = 1) ^/usr/include/wx-2.8/wx/string.h:692:3: note: no known conversion for argument 1 from ‘char*’ to ‘wxChar {aka wchar_t}’/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match> wxString(int); ^/usr/include/wx-2.8/wx/string.h:682:3: note: no known conversion for argument 1 from ‘char*’ to ‘int’In file included from /home/.../UPKUtils/DeserializeAll.cpp:6:0:/usr/include/wx-2.8/wx/filename.h:453:17: error: initializing argument 1 of ‘static void wxFileName::SplitPath(const wxString&, wxString*, wxString*, wxString*, wxString*, bool*, wxPathFormat)’ static void SplitPath(const wxString& fullpath, ^/home/.../UPKUtils/DeserializeAll.cpp:68:31: error: ‘class wxString’ has no member named ‘ToStdString’ string listPath = dirName.ToStdString() + ".txt"; ^/home/.../UPKUtils/DeserializeAll.cpp:86:71: error: ‘class wxString’ has no member named ‘ToStdString’ string filePath = CreatePath(ExportTable.FullName, dirName.ToStdString()); ^make[2]: *** [CMakeFiles/DeserializeAll.dir/home/.../UPKUtils/DeserializeAll.cpp.o] Error 1make[1]: *** [CMakeFiles/DeserializeAll.dir/all] Error 2make: *** [all] Error 2 Edited July 1, 2014 by Amphibious Link to comment Share on other sites More sharing options...
wghost81 Posted July 2, 2014 Author Share Posted July 2, 2014 Amphibious, seems, you need wxWidgets 2.9+ to compile DeserializeAll, as 2.8 works with strings differently. But as you don't need this program for upk patching, you can simply remove it from CMakeLists.txt. Or uninstall wxWidgets if you don't need it for anything else. If you don't have wxWidgets, all but DeserializeAll programms will compile. If you have wxWidgets installed, but project won't compile, you can remove wxWidgets related code from CMakeLists.txt entirely: IF(wxWidgets_USE_MONOLITHIC) SET(wxWidgets_USE_LIBS mono) ELSE(wxWidgets_USE_MONOLITHIC) SET(wxWidgets_USE_LIBS base) ENDIF(wxWidgets_USE_MONOLITHIC) FIND_PACKAGE(wxWidgets) IF(wxWidgets_FOUND) INCLUDE(${wxWidgets_USE_FILE}) ADD_EXECUTABLE(DeserializeAll ../DeserializeAll) TARGET_LINK_LIBRARIES(DeserializeAll UPKInfo UPKUtils UObject UObjectFactory ${wxWidgets_LIBRARIES}) ELSE(wxWidgets_FOUND) MESSAGE("wxWidgets not found!") ENDIF(wxWidgets_FOUND) Link to comment Share on other sites More sharing options...
Amphibious Posted July 2, 2014 Share Posted July 2, 2014 (edited) Thanks, it worked! Just one more question do I need to disable phoning home or not for this patch to work? edit: hmm... I have another problem. SO i unpacked xcomgame.upk, renamed resulting xcomgame.upk.unpacked to xcomgame.upk and deleted xcomgame.upk.uncompressed_size from game folder. After that I applied the gender and nationality patches to xcomgame.upk and returned the modified file (~12 mb) back to game folder. However when I try to launch the game nothing happens.... When I return original unaltered files xcomgame.upk (3.9mb) and xcomgame.upk.uncompressed_size back it works ok. Edited July 2, 2014 by Amphibious Link to comment Share on other sites More sharing options...
wghost81 Posted July 2, 2014 Author Share Posted July 2, 2014 Phoning home is related to DGC.ini modding, not to upk modding, so it's not necessary to disable it for patcher to work. Everything works for me. Seems, like the mods haven't been installed properly in your case. First, make sure you're modifying correct game files. Are you trying to mod EU or EW? EW upk files are here: ~/.local/share/Steam/SteamApps/common/XCom-Enemy-Unknown/xew/xcomgame/cookedpcconsole EU upk files are here: ~/.local/share/Steam/SteamApps/common/XCom-Enemy-Unknown/xcomgame/cookedpcconsole Second, make sure the game works with decompressed packages: use XComLZO on xcomgame and xcomstrategygame, rename resulting .unpacked files back to upk, copy resulting unpacked .upk files back to game folder if you have them elsewhere and remove corresponding .uncompressed_size files. After that run the game. If you have both EU and EW, do it for both for the sake of experiment. Both games should run fine with decompressed packages. If experiment is successful, try to apply mod files one by one. Some mods have different versions for EU and EW, so be careful. And read console output carefully! If there are some error messages, this means that mod wasn't installed correctly and upk file is probably broken. Backup upk files before patching to recover from bad install. Post PatchUPK console output here, if you'll have any problems with applying mods. It'll help me to find out what the problem is. Good luck! Link to comment Share on other sites More sharing options...
Amphibious Posted July 2, 2014 Share Posted July 2, 2014 (edited) Retraced all the steps and now it works. First time I tried to apply patches something went wrong and I continued using the same upk file later since I thought I wasn't altered. Obviously it was and thta was the problem. Edited July 2, 2014 by Amphibious Link to comment Share on other sites More sharing options...
Recommended Posts