TRView has an integration with the Randomizer that allows you to import and export waypoints from and to Randomizer location files.
To enable the integration check the 'Enable Randomizer Tools' box in the TRView settings menu.
Before you can use the integration properly you will need to configure it. You will need to create a file called randomizer.json
in the %LOCALAPPDATA%/trview
folder, next to the TRView settings.txt
file. The contents of this file should be obtained from the Randomizer project, but this is an example for demonstrative purposes:
{
"fields": {
"Difficulty": {
"default": "Easy",
"display": "Difficulty",
"options": [ "Easy", "Medium", "Hard" ],
"type": "string"
},
"RequiresGlitch": {
"default": false,
"display": "Requires Glitch",
"type": "boolean"
},
"VehicleRequired": {
"default": false,
"display": "Vehicle Required",
"type": "boolean"
},
"Validated": {
"default": true,
"display": "Validated",
"type": "boolean"
},
"InvalidatesRoom": {
"default": false,
"display": "Invalidates Room",
"type": "boolean"
},
"RequiresDamage": {
"default": false,
"display": "Requires Damage",
"type": "boolean"
},
"KeyItemGroupID": {
"default": 0,
"display": "Key Item Group ID",
"type": "number"
},
"LevelState": {
"default": "Any",
"display": "Level State",
"options": [ "Any", "Mirrored", "NotMirrored" ],
"type": "string"
},
"EntityIndex": {
"default": -1,
"display": "Entity Index",
"type": "number"
},
"Angle": {
"default": 16384,
"display": "Angle",
"type": "number"
},
"TargetType": {
"default": -1,
"display": "Target Type",
"type": "number"
}
}
}
All settings are defined in the fields
field. TRView will load this on startup and generate the appropriate UI elements in the route window. These elements will be visible if the randomizer tools are enabled.
Each setting is given a unique key. This is the value as it appears in the JSON for the Randomizer.
The default value for a property. This is the value initially given to a waypoint. If a waypoint has the same value as the default it will not be saved into the JSON unless the always_output
property is true
.
The text used for the control label in the route window.
The variable type. This controls the UI that is generated by TRView. The options are: boolean, string, number
.
Only available when the type
is string
. This is a set of values that the user will be able to choose from - if a setting has an options
entry then a dropdown will be generated instead of a free text area.
If set to true
then the value for this attribute will always be saved in the JSON even if it matches the default. Otherwise if false
or absent it will check against the default
value first and skip if they match.
The settings above will generate the UI below.
Randomizer routes can have route entries in multiple levels. Selecting the level in the route window will switch the level in the viewer. When saving the route all levels will be saved in a single route.
TRView can import locations from Randomizer location files, as long as the level name exactly matches the name in the location file. Select the Randomizer location file filter on the File->Open
dialog to do this.
TRView can export into Randomizer location files as long as the level names matches the one in the json file. Select the Randomizer filter in the save menu to do this.