Skip to content

Converting legacy objects to JSON

Michael Steenbeek edited this page May 29, 2020 · 2 revisions

For this, you will need to have compiled the objexport.exe tool (which is an F# program that can also run on macOS and Linux, if the correct libraries are installed. Also note that you need to have the codepages installed. On Ubuntu, you can install the libmono-i18n4.0-all package to do so.)

To extract the images, you will also need to make sure that the object is present in OpenRCT2's user object folder, and that OpenRCT2 has been able to finish its cache.

mono /path/to/objexport.exe <folder with old DATs> <output folder> --language <folder that contains the language files, e.g. nl-NL.txt>

This will dump the objects to the output folder, but without the images. For this, we will need to use OpenRCT2:

/path/to/openrct2 sprite exportalldat <DAT identifier> <output folder>

This will dump the images to the specified output folder, and also output the relevant JSON code to use in the new object (including x and y offsets).

A script to do all this for you is located here: https://github.com/Gymnasiast/RCT-PHP/blob/master/convertobjects (as of 29 May 2020, you will have to modify the DatToJSONconverter class to update the paths.)

Clone this wiki locally