Ask the Experts / Installing and using X7123M3-256's ride generator
- 30-August 19
-
spacek531 Offline
Installation
To use this tool, you're going to need a bit of technical skill or googling skill. I recommend reading the entire step before committing to it.
The tool is written using GTK+ 3, which doesn't work natively on windows. I've looked into making a windows distributable and I didn't really get anywhere, so for the time being you'll need to build the program yourself. It's not too complicated and this tutorial will walk you through it.
Step 1: installing MSYS2
If you're on macintosh or linux, you don't need to install MSYS2. You also probably know enough to install this program without a guide.
You're going to need MSYS2 to run the tool. You can find it at https://www.msys2.org/. If you use a 64-bit computer, download the x86-64 version (should be the middle button at the top of the page).
Once it's installed, run MSYS2 and install the dependencies by running the following commands. Use "Shift+Insert" to paste them into the window.pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-pkg-config mingw-w64-x86_64-jansson mingw-w64-x86_64-gtk3 mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc
If you use the 32-bit you will have to replace the w64-x86_64 with the appropriate version. You can search for packages using the -Ss flag and search for the package (the name after the x86_64).
Once those are all run, go to C:/msys64 or wherever you installed it and make a shortcut to mingw64 exe. This is the exe you're going to use from now on.
Step 2: downloading and building the program
Download the repository from the most recent branch, found here: https://github.com/X...T2RideGenerator
If you're a git wizard, you can do whatever you like. If you aren't, download it as a zip file and extract it wherever you want it.
Once cloned or extracted, create a file inside called "build" next to "src"
Open up mingw64. Change the current working directory to the build directory (using the cd command) and run these commands:cmake .. -G "Ninja" cmake --build . ./rct2ridegen.exe
There will be a lot of console spam but once it's done, the window should pop up:
ridegen base screen.png (80.59KB)
downloads: 86
For subsequent uses of the tool, I recommend creating a shortcut with a command to run the executable. Surrounding a command in quotes after the executable will automatically run the command:
ridegen shortcut.png (32.41KB)
downloads: 79
I have my copy of the ride generator installed in my documents folder. You will have to modify the above path to wherever yours is installed.d: //documents/github/rct2ridegenerator/build/rct2ridegen.exe
Now you can click on the shortcut and it will automatically load the program!
-
spacek531 Offline
Using the ride generator
Once you've got everything working, it's time to use the tool. You will need:
- mesh editor of your choice that exports to .obj (I use kHED)
- plaintext editor of your choice (I use Notepad++)
- This peep:
BASE PEEP.zip (19.47KB)
downloads: 25mirror
Please note that once you have loaded a project, you cannot load another project without problems occurring! To load a different project you must close the program then open it again, then load the next project.
Mesh making
The first thing to note is the peep object is at 4x scale. I use this scale because it works best for kHED but you can do whatever you like. The peep faces the front of the car.
When making your meshes, it's important to note a few things about the rendering engine of the tool. First, there is no anti-aliasing. Exaggerated features are a necessity lest they be missed by the rendering engine and create tiny pixels that can only be seen from a few angles.
Second is there is no diffuse map support. Triangles are given flat colors that correspond with paint swatches in the game. There is supposedly a way to create these flat materials in blender and export them, but I never use that - the tool has the ability to paint triangles after importing.
Mesh configuring
Once you've made your meshes, export them as .obj files and import them into the tool using the Model dropdown menu. Once you do, a window will open where you can change the properties and colors of the mesh. To paint the model, select a color, then click on the triangles you want to paint. If your model is a rider, click the Rider check box. If your model is a descendant of a rider object, do not click the Rider box because it will mis-count the number of riders. If the model is intended for animation, place its rotation center at the origin.
Riders' shirts use the dark green color in the peep colors section. This color is automatically changed to dark pink when rendering the riders.
Ride configuring
The left column of the tool is pretty self-explanatory. Thumbnail, name, description, track type, ride categories. The bottom of the left column is where you can set ride flags that control the ride's behavior.
The middle column is a few more ride options (the bonuses to the stats, and Max Height Increase which I never use) and the train options.
Train configuring
RCT2 objects have a max of 4 unique cars and 5 car slots. The slots are fairly self-explanatory. Just make sure you don't set the Default car to Default, as unexpected results will occur. Also, any unique car that is not present in the train will not save, even if it is configured, so be careful.
Car configuring
Once all your models are imported, you need to add them to a car's Animation. The displacement and rotation properties of the models are parametric, so you can type math equations in. Do note that the interpreter is not fully-functional and some errors with order of operations may occur. There is a simple hierarchy system where descendants inherit their parent's coordinate frames, so you can move multiple object together by their ancestor. There are a few parameters you can use to control the animation:
- yaw
- pitch
- roll
- animation
- restraint
- flip
- swing
- sin(x)
- cos(x)
- ln(x)- exp(x)
- clamp(x)- abs(x)
- unit(x)
- floor(x)- ceil(x)
- sqrt(x)
- square(x)
Not all of them are used at all times. For an un-animated car, you can leave the rotation and position parameters as constants. Click on a model in the Animation viewport to select it.
To rotate the model to get another look at it, you will have to change the rotation of the base object. Make sure you un-change it before you export the object, or it will be generated at an odd angle.
Next are the car's stats. I recommend looking at OpenRCT2's object repository for hints as to what flags and parameters to use. Do note that the names of some flags are not identical between OpenRCT2 and this program, as some of OpenRCT2's flag names are not adequately descriptive.
Default colors
You can and should include default colors with your ride. Unfortunately the functionality to edit those is not present in the tool, so a text editor is required. Save the project file as .JSON and edit the file in the text editor. Search for "Color" and add the default colors you want in the brackets. Default colors are an array of 3 numbers between 0 and 31, representing the colors you want. The numbers represent the color in the game's color selector, with black as 0, gray as 1, white as 2, etc. Add these arrays with brackets and commas, like so:"default_color_schemes": [[7, 7, 18], [28, 18, 18], [2, 28, 0], [11, 2, 2]]
Thumbnail
Thumbnails are 112x112. Make sure screenshots use the default palette. Screenshots of water require careful editing, as there are slight changes in the colors that import incorrectly due to their flashing.
Exporting
Once you are happy with your train, you can export the train into a .DAT file. This is performed the same way as scenery objects. Go in game and select your object and you can play around with it! -
X7123M3-256 Offline
Thanks for writing this up. I do wish I'd actually finished this tool, but at this point there's so much that needs to change I'd be better of starting from scratch now. Did you say you actually use the painting feature? I never did and I was thinking that if I ever get around to doing a version 2, I would drop it entirely in favour of loading material properties from the model.
My original thinking was that I would figure out the correct lighting and material properties, and that would save the user having to do so. But I was unable to get it right, so now everything I make looks like garbage. I am now thinking it would have been better to load material properties from the model so that other people would be able to adjust them and hopefully do a better job than I did.
-
X7123M3-256 Offline
Also does anyone know how to delete a comment? My previous comment appears to have been submitted twice I can't figure out how to remove the duplicate.
-
Liampie Offline
Also does anyone know how to delete a comment? My previous comment appears to have been submitted twice I can't figure out how to remove the duplicate.
I don't think you can, but we can. Don't worry about it, we remove double posts when we come across one.
-
spacek531 Offline
I have just made an update to the tool to fix a bug with the Clamp operation and to add more math operations. If you want to get the latest, follow the link in the first post to download the source code, and check out all the new operators in the second post.
-
spacek531 Offline
For those who like a video showing what it looks like to use the tool, I have a 10x speed timelapse of making a roller coaster from scratch:
https://www.youtube....h?v=mLWP00KtavE