Skip to content

CrAs T MRL3 Editor User Guide

Psymon edited this page Oct 16, 2023 · 9 revisions

Table of Contents

Introduction

The CrAs-T MRL3 editor (written by AsteriskAmpersand based on the documentation for the mrl3 files authored by TheCrazyT, and after whom the editor is named) is a GUI editor for MRL3 files that is intended to replace the usage of 010 Templates for a fully open sourced application with no software requirements outside itself. The latest version can always be found here: Asterisk Ampersand's Material-Editing Repo Releases.

Sections

The editor consists of three areas: [Image 1]

1. The Compendium:

The compendium is a listing of all materials which in turn list in what files said material can be found. This is useful if you know what material your mod3 file requires but don't know where it could be coming from. Additionally it's useful for looking for promising sounding materials when trying to fit new materials into objects. Dragging materials from the compendium is one way to populate your Libraries.

The compendium is initially not populated. To populate the compendium it must be Rebased to the root of your chunk (or a folder that contains all of the mrl3 that will be scanned). After populating it through rebasing it's possible to Extend the compendium with specific folders or more chunks (in case you don't have them merged). Because the population process takes a considerable amount if performed on a full merged chunk it's recommended to Save the compendium so that on future uses of the program it can load it directly from a summary file that expedites the process.

[Image 2]

This operations are all possible from the drop down menu under compendium, or through their related hotkeys.

The compendium is designed to be unique and simply expanded when additional data is required. It's always saved and loaded from a fixed location in the same folder as the executable and has the filename "compendium.ast". While it's not recommended to edit it directly, in practice it's a json file with a custom fixed structure.

2. The Library

A library is intended to represent a list of mrl3 files from which you usually take materials to insert into other files. A good mrl3 to have there is the Master_MtList.mrl3 for example. Libraries are focused on being "per-project" resources (for example if editing a big number of bows, or pieces of the same armour set). They can be created from scratch, loaded, expanded, and saved.

A library is populated either by manually adding files through the add button or by dragging materials from the compendium. In turn it's possible to drag and drop an entire mrl3 from the library into the editor section, or just a specific material contained therein. In both cases it will add the relevant textures linked to the materials being added to the target file.

[Image 3]

It's possible to save, rename, load and create libraries through the drop down menu. Adding and removing mrl3 from the lirbary is done through the buttons in the library section.

3. The Editor

The main editor window is were Mrl3 files are edited. From the menu bar you can create an mrl3 from scratch (not recommended), open an existing mrl3, save the currently selected mrl3, save all of the currently opened mrl3, create a restore point for the currently selected mrl3 or load a restore point for the currently selected mrl3.

Restore points are per file and are present because the editor has no undo functionality. It's recommended to perform manual backups if you require versioning and rely on the restore points for quick testing. Restore points are not saved through multiple sessions, when the editor is closed they are cleared.

[Image 4]

[Image 5]

3.0 File Tabs

Shows the list of currently opened mrl3 files.

3.1 Resource List

This is the list of texture files the mrl3 can load from. All materials in the file can only load images that are in this list. The context menu lists possible operations.

[Image 6]

New

You can expand the list of resources by right clicking, selecting new and typing in the new resources' paths.

[Image 7]

Delete

Allows removing a resource. All materials resource bindings that depend on it will instead be set to the null resource.

Repoint

Allows redirecting all bindings that use this resource into another resource. This is useful when adding a material from another mrl3 which is bound to resources in its original mrl3 and you wish it to instead use resources in yours. This is a very aggressive operation that will affect all materials which use the material being repointed from. [Image 8]

Global Replace

Allows mass renaming paths, with the option of utilizing python regular expressions (if you do not know about python regular expressions, do not worry, they aren't necessary for basic usage of replacement). The find dialog also has the option of previewing what paths will be replaced (and in the case of python regexps it will also give expression compilation errors). This is a handy tool when packaging mrl3 for release by repointing textures to files on a folder that are the same as the model's, this simplifies user experience when transmogging a mod to another armour or weapon set.

[Image 9]

3.2 Material List

This is the list of materials in the mrl3 file. Each material has Resource Bindings (3.3, 3.4), a Header (3.5), and a Parameter Array (3.6).

Resource Bindings tell the material where to pull different maps, linking a resource (3.1) to a texture property (3.3). The Header controls how the mod3 and the mrl3 will link, how to render (and fundamentally WHICH MATERIAL this is) and also unknown properties yet to be mapped. The Parameter Array fine tunes how the material uses it's resources (applies filters, ignore specific maps, read some maps differently, etc).

All of the subsequent sections are relative to the selection in the Material List. Changing materials will update 3.3 to 3.6 to correspond to the highlighted/selected material in 3.2.

The context menu allows deleting materials (be careful as there's no undo buttons). To add materials you must drag them from the library, either as an entire mrl3 or as individual materials within the file.

[Image 10]

3.3 - 3.4 Resource Binding

Lists the resource types that the material can use. The resource that is actually loaded is linked to the "slot" for the material through the resource index. The resource index indicates the index of the resource in the file's resource list that will be loaded.

[Image 11]

In this case it indicates that the FurVelocityMap should load Resource 7 which corresponds to the path wp\bow\bow006\mod\bow006_FM

3.5 Material Header

This is what fundamentally defines what the material IS. The material name is what allows the mod3 file to know what material in the mrl3 to use for a given mesh.

Each mesh on the mod3 has a material. The game will look for this material's name in the mrl3 (in practice it looks for the crc-jam hash of the name, but the editor converts known hashes for you and you can simply write the material name outright. If for some reason you need to write the hash instead, the editor will take a material name starting with "0x" directly as the hash).

[Image 12]

In this example the first mesh in the mod3 will use the material by the name Ch_Wp_Mt__3 which is the first material in the mrl3.

The Shader Id is the two part identifier of what shader this material will use. The shader is basically what actually makes the material look like it does and act like it does. Unless you REALLY know what you are doing, you should NEVER touch this values. If you want to use a different shader, pull a new material, don't edit an old one, as shaderid influences the rest of the structure and this isn't updated when changed manually through the fields. Editing this two fields won't simply make the model fail to load they WILL crash your game.

[Image 13]

Surface Direction indicates if the material should be visible from both sides. 1100 means only visible from one side, -1f00 means visible from both sides.

3.6 Parameter Array

Controls the fine tuning of how the material will use each resource. This allows a wide bevy of tricks and hacks to get special effects going without having to do more complicated material setups. Parameters preceded by a b indicate boolean meaning they are either Zero or Non-Zero (any number that's not 0). f indicates float meaning a number with decimals. The remaining type, i correspond to integers. Individual, well understood parameter fields can be found on its respective article.

[Image 14]

General Tutorials

General Tutorials

Animation Tutorials

Animation Tutorials

Audio Tutorials:

Audio Tutorials

IDs:

File & In Game IDs

Model Tutorials:

Model Tutorials

Effects Tutorials:

EFX Tutorials

FSM Tutorials

FSM Editing

MRL3 Tutorials:

MRL3 Tutorials

NPC Editing:

NPC Editing

Map Editing:

Map Editing

Plugins and Memory Editing:

Plugins and Memory Editing

Quest Editing:

Quest Editing

Monster AI Editing:

Monster AI Editing

Texture Tutorials:

General Texture Tutorials
Specific Texture Tutorials

TIML Editing

TIML Editing

Asterisk's Plugin Notes:

Asterisk's Plugin Notes

Miscellaneous Tutorials:

Miscellaneous Tutorials

Outdated Tutorials:

Outdated Tutorials
Clone this wiki locally