Closed BenjaminHau closed 3 years ago
There is a genieutils update required to work with dat files from the latest patch. I just pushed the necessary changes.
If you run git pull --recurse-submodules
in your checkout, it should pull the change and update the genieutils submodule, and compilation and application should work again.
Thanks a lot!
I haven't managed to build yet. First I had to install liblz4 using sudo apt-get install liblz4-dev
, but I still get the error:
auto-mods/genieutils/src/resource/SlpFile.cpp:91:22: error: ‘LZ4_decompress_safe’ was not declared in this scope unpack_count = LZ4_decompress_safe(reinterpret_cast<const char *>(input.data()),
I double checked and my lz4 version (0.0~r131-2ubuntu3.1) seems to be the newest, so I don't understand this error. Does it build for you?
I just followed the instructions from the README in a new checkout and it built for me.
If you are reusing your old build
folder, that one probably contains a configuration for which LZ4 has not been included when it was created, so the required headers cannot be found during build time.
This issue would be solved by deleting the build
folder and executing the commands for compiling again from the start.
The liblz4-dev
is indeed still missing from the build instructions, I will add it. Thanks!
I have finally managed to build and execute successfully!
I fixed the problem with the file at auto-mods/genieutils/src/resource/SlpFile.cpp:91 by adding the line #include "lz4.h"
after #include "lz4hc.h"
.
LZ4_decompress_safe is declared in lz4.h, which is also included in lz4hc.h so I have no idea why I got that error, but I'd bet that the extern "C"
has something to do with it.
I really don't understand why it worked for you but not for me also. Anyway, I'm on the right track now, thank you so much!
Hello, I've been trying to run this script in order to create my own automated mod.
I followed the instructions on how to run this on Ubuntu, they worked great for installing the dependencies and compiling. However when I run it, I either encounter an error, or the code executes fine but then the output data file can't be opened with Advanced Genie Editor, whereas the original 'empires2_x2_p1.dat' can without problem.
Examples of what I tried:
./create-data-mod x3 ../../empires2_x2_p1.dat ../../test.dat
Result:
./create-data-mod random-costs ../../empires2_x2_p1.dat ../../test.dat
Result:
./create-data-mod + ../../empires2_x2_p1.dat ../../test.dat
(I was trying to make it not apply any mod, just load and save)Result:
The execution seemed successful, but then I noticed that the saved 'test.dat' is different from the original 'empires2_x2_p1.dat'. The first one being at 3731Ko and the second one at 4065Ko, so clearly they're different. On top of that, when I try to open test.dat with the Advanced Genie Editor, this is what I get:
I'm wondering if you also encounter the same issue in your environment with the latest AOE2DE patch. I've tried running your code on both Windows and Ubuntu and some behaviors were different but the simple loading/saving gave the same result as shown above on both OS.
Do you have any idea of what I can try to make it work?
I appreciate your help.