Menu

editing data.zip files

phil
2019-05-20
2019-06-30
1 2 > >> (Page 1 of 2)
  • phil

    phil - 2019-05-20

    Thanks for a very entertaining game, but due to some challenging track times I tend to give up early in the events section, so looked for ways to increase the target times.
    I wish to edit some of the map files, but in the latest version all data is now in a zip file. I've tried unzipping, editing, and rezipping but this didn't work. I also noticed a checksum file for the data.zip. I replaced this with the checksum for my modifed data.zip but still no joy. Can you please advise?

     
  • Andrei

    Andrei - 2019-05-20

    Hello phil. You may safely extract the data.zip archive then delete it, such that the directory structure is similar to:

    +---bin
    +---data
    |   +---maps
    |   +---textures
    |   +---defplayers
    |   +---plugins
    |   +---icon
    |   +---sounds
    |   +---vehicles
    |   \---events
    +---doc
    \---src
        +---PEngine
        +---Trigger
        +---include
        \---PSim
    

    Remember to delete the .ZIP otherwise its contents will have priority. Otherwise rename its extension, for example data.unused: all .ZIP files inside the Trigger Rally data directory are automatically scanned and mounted. Also you may ignore the .MD5 checksum, it's only there for convenient integrity checking.

    If you wish to bypass unlocks, you can use the playercrypt utility. It will decrypt your .PLAYER file, which you can then edit because it's plain text, then you re-encrypt it for Trigger Rally to load. If you have problems using this tool I can provide a .PLAYER file with all cars and events unlocked.

    FYI the game data is put in a zero-compression .ZIP archive because it brings a small performance benefit on old, slow computers. You can give us feedback using the DataPerfTest utility. We may give up on this practice in future releases: players and packagers are confused by data.zip and it seems the small performance benefit completely vanishes on new, fast computers.

    Finally, we are interested to hear if certain maps cannot be completed under the current time limits: sometimes we tweak the cars' engine power but we don't test how this affects the race times.

     
  • phil

    phil - 2019-05-20

    Andrei, thankyou for such a detailed answer. I will do that, and feed back in due course using the DataPerf utility.

    My skills at driving, using keyboard are limited, but getting further through the events will be more satisfying, by me adding a minute or two to the target time. I'll hold off decrypting the player file, until I'm really stuck. Anyway if I think any roads are really too hard I'll drop in a note to you.

    For info, I'm using a chromebook (6 years old low spec) with crouton to use linux on an SD card, and then wine inside linux to run .exe files. I'm too lazy and possibly incompetent to compile the linux version :). Anyway I have never had a problem with loading times of maps or running the races at default settings on earlier versions of TR.
    Keep up the good work.

     
  • Andrei

    Andrei - 2019-05-21

    wine inside linux to run .exe files.

    That seems pointlessly inefficient, considering that TR is open-source. Also, by learning how to build it, you will be able to test experimental versions.

    Anyway, if you ever decide to build TR, refer to the BUILDING.txt file in the "doc" folder.

     
  • Onsemeliot

    Onsemeliot - 2019-05-21

    I can only add that I am not very technical myself and that the BUILDING.txt was very helpful and allowed me to compile and install the game without issues. The hardest part in my experience was not buildung but first installing all programs that are needed. But after that was done I had no issues at all. And ever since then I could compile newer versions without difficulty.

     
  • phil

    phil - 2019-05-21

    Thankyou both. I'm encouraged enough by you to have a go and compiling in linux. Onsemeliot, I remember trying some years ago and had problems with installing the other nececassary programs too, but that was a different computer. I'll report back on success or failure, in case anyone else is cautious about this.

     
  • phil

    phil - 2019-05-21

    Installed all necessary programs, ran make which started fine then generated this error. Am now stuck.

    g++ PEngine/app.cpp -> PEngine/app.o
    g++ PEngine/audio.cpp -> PEngine/audio.o
    g++ PEngine/fxman.cpp -> PEngine/fxman.o
    g++ PEngine/model.cpp -> PEngine/model.o
    g++ PEngine/physfs_rw.cpp -> PEngine/physfs_rw.o
    PEngine/physfs_rw.cpp: In function ‘std::__cxx11::string physfs_getDir()’:
    PEngine/physfs_rw.cpp:144:63: error: ‘PHYSFS_getPrefDir’ was not declared in this scope
    return PHYSFS_getPrefDir("trigger-rally-team","trigger-rally");
    ^
    GNUmakefile:157: recipe for target 'PEngine/physfs_rw.o' failed
    make: *** [PEngine/physfs_rw.o] Error 1

    Any advice?

     
  • Andrei

    Andrei - 2019-05-21

    @phil: it looks like your version of PhysFS is outdated: current Trigger Rally requires PhysFS version 3.0+ and you probably have 2.0.3 or earlier. This isn't your fault of course, PhysFS 3.0.2 is the latest version and "stable" distros don't have it yet.

    Please replace your physfs_rw.cpp file with the one attached here and try again.

     
  • phil

    phil - 2019-05-21

    I replaced physfs_rw.cpp as requested and ran make again. The following output resulted.

    current values of user-set variables:
    DESTDIR ?=
    prefix ?= /usr/local
    exec_prefix ?= /usr/local
    OPTIMS ?= -march=native -mtune=native -Ofast
    WARNINGS ?= -Wall -Wextra -pedantic

    resulting values of build variables:
    CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -march=native -mtune=native -Ofast
    CPPFLAGS += -DNDEBUG -DUNIX -DPACKAGE_VERSION="0.6.6.1" -I'./include'
    LDFLAGS += -lSDL2main -lGL -lGLU -lGLEW -lSDL2 -lSDL2_image -lphysfs -lopenal -lalut -lpthread -ltinyxml2

    g++ PEngine/physfs_rw.cpp -> PEngine/physfs_rw.o
    PEngine/physfs_rw.cpp: In function ‘size_t physfs_read(SDL_RWops, void, size_t, size_t)’:
    PEngine/physfs_rw.cpp:79:70: error: ‘PHYSFS_readBytes’ was not declared in this scope
    PHYSFS_sint64 const r = PHYSFS_readBytes(file, ptr, size * maxnum);
    ^
    PEngine/physfs_rw.cpp: In function ‘size_t physfs_write(SDL_RWops, const void, size_t, size_t)’:
    PEngine/physfs_rw.cpp:96:68: error: ‘PHYSFS_writeBytes’ was not declared in this scope
    PHYSFS_sint64 const r = PHYSFS_writeBytes(file, ptr, size * num);
    ^
    GNUmakefile:157: recipe for target 'PEngine/physfs_rw.o' failed
    make: *** [PEngine/physfs_rw.o] Error 1

    So do I need to install the later version of PhysFS as well?

     
  • Andrei

    Andrei - 2019-05-21

    @phion: sorry, I missed a few spots in the previous file, please try this new one (hopefully this fixes all problems).

    So do I need to install the later version of PhysFS as well?

    That would be one way to solve the problems but if the current physfs_rw.cpp works for you, then you won't need to update PhysFS. Additionally I'll commit these changes to SVN because you're basically testing TR compatibility with PhysFS 2.0.3 for us -- thank you.

     
  • phil

    phil - 2019-05-21

    Solution not yet! :)

    current values of user-set variables:
    DESTDIR ?=
    prefix ?= /usr/local
    exec_prefix ?= /usr/local
    OPTIMS ?= -march=native -mtune=native -Ofast
    WARNINGS ?= -Wall -Wextra -pedantic

    resulting values of build variables:
    CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -march=native -mtune=native -Ofast
    CPPFLAGS += -DNDEBUG -DUNIX -DPACKAGE_VERSION="0.6.6.1" -I'./include'
    LDFLAGS += -lSDL2main -lGL -lGLU -lGLEW -lSDL2 -lSDL2_image -lphysfs -lopenal -lalut -lpthread -ltinyxml2

    g++ PEngine/physfs_rw.cpp -> PEngine/physfs_rw.o
    g++ PEngine/render.cpp -> PEngine/render.o
    g++ PEngine/terrain.cpp -> PEngine/terrain.o
    g++ PEngine/texture.cpp -> PEngine/texture.o
    g++ PEngine/util.cpp -> PEngine/util.o
    PEngine/util.cpp: In static member function ‘static tinyxml2::XMLElement PUtil::loadRootElement(tinyxml2::XMLDocument&, const string&, const char)’:
    PEngine/util.cpp:235:43: error: ‘class tinyxml2::XMLDocument’ has no member named ‘ErrorStr’
    PUtil::outLog() << "TinyXML: " << doc.ErrorStr() << std::endl;
    ^
    GNUmakefile:157: recipe for target 'PEngine/util.o' failed
    make: *** [PEngine/util.o] Error 1

    Happy to keep trying. Logging off for today.

     
  • Andrei

    Andrei - 2019-05-21

    This time it's TinyXML-2: assuming you use Debian Stretch, your version of libtinyxml2-dev is 4.0.1 whereas TR currently uses 7.0.1+. Fortunately this too is fixable.

    I will be providing .PATCH files from now on: instead of manually copying and overwriting files, which is annoying and prone to error, we will use the patch utility to update the files.

    First, please restore your "src" directory to the original 0.6.6.1 condition, for cleanliness.

    Then download the attached .PATCH file, copy it inside the Trigger Rally directory next to the "src" dir, and apply it so:

    $ ls
    bin  compat_fixes1.patch  data  doc  src
    
    $ patch -p0 -i compat_fixes1.patch
    patching file src/PEngine/physfs_rw.cpp
    patching file src/PEngine/util.cpp
    patching file src/Trigger/main.cpp
    

    Try building again. If more problems appear I ask that you specify exactly which versions of dev libraries you have installed. This is so that I can mimic your current environment and save time.

     
  • phil

    phil - 2019-05-22

    Progress!
    The make process went smoothly.
    However, I tried to run using the following
    $ cd ../bin/
    $ ./trigger-rally

    the output showed initialising then loading but hung for a long time (I waited an hour) although the processor seemed to be doing something. Anyway the screen showed this:

    Loading game configuration
    Automatic video mode resolution: 1366x768
    Main game data directory datadir="../data"

    I stopped this and tried installing but it showed a begin and then an end statemnt a bit later. I don't know where it installed it to , if at all, but it didn't show up in my user folder as a .file where all my other applications are.
    I then extracted the original download archive into a different folder and applied the patch, redid the make. All went well, started the game but still it wouldn't get beyond data loading.

    For info here are the file versions for files as required for build. (As shown installed in synaptic)
    GL libgl1-mesa-dev 18.0.5-0ubuntu0~16.04.1
    GLU libglu1-mesa-dev 9.0.0-2.1
    GLEW libglew-dev 1.13.0-2
    OpenAL libopenal-dev 1:1.16.0-3
    ALUT libalut-dev 1.1.0-5
    PhysFS libphysfs-dev 2.0.3-3
    SDL2 libsdl2-dev 2.0.4+dfsg1-2ubuntu2.16.04.1
    SDL2_image libsdl2-image-dev 2.0.1+dfsg-2+deb9u1build0.16.04.1
    TinyXML-2 libtinyxml2-dev 2.2.0-1.1ubuntu1

    Hope this helps to understand a bit more.

    BTW I'm really enjoying events races in my windows version in wine (inefficiently apparently ;-)). The maps are amazing. Haven't had so much driving fun for a while. Congratulations to all map makers, especially Onsemeliot, and to the program devs, especially Andrei.

    If you can help me get the Linux version working with your help I'll be most grateful.

     
  • Andrei

    Andrei - 2019-05-22

    More details are needed: start TR by redirecting its output to a file and press Ctrl+C after 1 minute of waiting. Then attach that log file to your post.

    $ ./trigger-rally 1> tr.log 2>&1
    

    What version of g++ are you using? Early versions are missing certain features that TR needs, meaning TR might be trying to use stubs, hence the hang.

    Finally, attach your TR configuration file. Normally it should exist as:

    /home/UserName/.trigger-rally/trigger-rally-0.6.6.1.config
    
     
  • phil

    phil - 2019-05-23

    Files attached, although the config file was in /home/UserName/ and there was no .trigger-rally folder there, even though I re-ran make install.
    Log file didn't show anything more after 2 minutes. Ctrl-C did nothing, but Ctrl-Z stopped the program but didn't update the initial log file created after starting.??

    g++ 4:5.3.1-1ubuntu1
    g++-5 5.4.0-6ubuntu1~16.04.11

     
  • Andrei

    Andrei - 2019-05-23

    TR may hang while trying to set automatic video mode.

    "Automatic video mode" is the default since release 0.6.4 and it means that TR attempts to run fullscreen in native resolution. In your case it may fail to deduce the native resolution.

    Please edit your .CONFIG file trigger-rally-0.6.6.1.config to disable auto video mode:

    <?xml version="1.0" ?>
    <config>
    
        <video
            automatic="no"
    

    No rebuild is required. Run TR again and if it can run successfully in a window, try next to set up your preferred resolution and fullscreen="yes" in the config.

     
  • Andrei

    Andrei - 2019-05-23

    In likely case the above suggestion doesn't help (I've noticed that auto resolution is already detected as 1366x768 in tr.log) I have another idea for editing the .CONFIG file: disable default player copying.

    Default player copying was an idea only used in 0.6.4: we would distribute additional players recording best times for maps so that the player would have something to compete against. We since deleted the def players but left in the functionality.

    <?xml version="1.0" ?>
    <config>
        <player
    
            copydefplayers="no"
    

    Additionally please confirm the path to your trigger-rally-0.6.6.1.config file: if it's missing the ".trigger-rally/" folder, that will need to be fixed as part of the upcoming compatibility commit.

     
  • phil

    phil - 2019-05-23

    Thanks Andrei, but neither of the suggestions worked. Still hangs on the
    Main game data directory datadir="../data"

    I confirm the path to the trigger-rally-0.6.6.1.config file is /home/UserName/.
    There are other ".application/" folders here but no ".trigger-rally/" folder

    Does the location of the game files I extracted make a difference, before I run make? I use a folder nested through 3 other folders from home (i.e. the location of the bin, doc, data and src folders is home/username/folder1/folder2/trigger-rally-0.6.6.1/) and ran make from within the src folder.

     
  • Andrei

    Andrei - 2019-05-23

    Apply the attached patch. It ensures that the writeable directory is set correctly to:

    /home/UserName/.trigger-rally
    

    instead of

    /home/UserName
    

    Please provide a new tr.log as done before so I can see the TR path is set as intended.

    If everything is OK there will now exist a .trigger-rally dir and a new configuration file trigger-rally-0.6.6.1.config in it (please confirm this, also).

    The old .CONFIG, which is up one level, which you've edited in the previous step, will be ignored by TR and you should delete it to prevent confusion ("how come I changed my settings but TR doesn't see it?")

     
  • phil

    phil - 2019-05-23

    I reinstalled in a games folder below username, applied patches, and ran make.
    Deleted old config file.
    Then started TR. No difference as attached. No trigger-rally-0.6.6.1.config file and no .trigger-rally-0.6.6.1 dir

     
  • Andrei

    Andrei - 2019-05-23

    The patches must be applied in the correct order, otherwise patch2 will be cancelled out. Please try again from scratch:

    1. Unpack a new trigger-rally-0.6.6.1.tar.gz
    2. Apply compat_fixes1.patch
    3. Apply compat_fixes2.patch
    4. Run make clean; make
     
  • phil

    phil - 2019-05-24

    Success. I really thank you Andrei, for your efforts in helping me make linux work, and make me learn some aspects of working with files and patches.
    I've attached the log file, but there is still no .trigger-rally folder in home/username/, nor there is a config file in that folder.
    I've tried "make install" which seemed to go fine, logged out and back in, and still no config file or .trigger-rally folder in username.
    The game runs fine from the bin folder executable.
    Maybe some more tweaking is necessary. I am willing to help by keeping on testing as required.

     
  • Andrei

    Andrei - 2019-05-24

    I think we're close to the solution. Please apply this third patch and rebuild.

    1. Unpack a new trigger-rally-0.6.6.1.tar.gz
    2. Apply compat_fixes1.patch
    3. Apply compat_fixes2.patch
    4. Apply compat_fixes3.patch
    5. Run make

    This patch is supposed to properly create the ".trigger-rally" directory. I'm awaiting confirmation that it does so, and of course the latest tr.log output.

    I want to commit these compatibility fixes to the SVN as soon as everything works properly for you. They'll probably be in place for the next couple TR releases, then they'll be removed as dead code. Hopefully by then you will have upgraded your system.

     
  • phil

    phil - 2019-05-24

    Done, and successful. Folder and config file created in folder.
    Attached log file.
    Thankyou.

     
  • Andrei

    Andrei - 2019-05-24

    Nice. You can now play TR natively and test future experimental versions at will.

    One last thing: please confirm that changing settings in the config works, for example try to disable auto video (TR should then start in a 800x600 window). This is just to make absolutely sure the config is not being ignored. Thanks.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.