RATTLECAN 2 - MagnumMacKivler/RLCPT2 GitHub Wiki

"RATTLECAN 2" is a paint scheme editor designed for locomotives included in MP2. While it may have a learning curve, it massively speeds up making paint schemes. It also has several optimization benefits, as it can replace many of the E2s on your locomotive with one mildly complex chip.

Table of Contents:

The Basics

Configuration Variables

START_SCHEME - File that will be loaded when chip first starts.
PREFIX - Command prefix, like .create or .save. You could use say, ".rc" for ".rc create", ".rc save"
SOUNDS - Enables or disables sounds.
AUTOSAVE_INTERVAL - How often the chip autosaves, in seconds.
DISABLE_MULTIPLE_RATTLECAN_HANDLING - if 1, RC2 won't care about other Rattlecan chips being out
BASE_CONSTANTLY_SCAN - Scan constantly for new bodygroups and submaterials? You have to refresh the scheme otherwise.

Quick Tips Read This Please

  • You need to use the .operation and .edit commands to switch modes.
  • You can use .save/.save filename and .load filename for schemes.
  • You NEED to use .save.
  • Try not to adv. duplicate the contraption in EDIT mode, because if you do you'll have a bunch of useless props floating around.
  • There is a learning curve!
  • If you get a section you can't select or see anymore, use the .sectionselect command. It's described below.
  • If the chip crashes, or you lose progress for whatever reason, you should know the chip autosaves. You can find these autosaves in expression2/e2shared/rattlecan2/autosave/

Making a simple two-tone scheme

To start with, we need to enter EDIT. Type .edit and that will switch modes.

Let's add a section. Sections can be thought of as bits of holostripe, or as colored sections of the base prop. Type .create section:

Seems like nothing happened! That's because we created a purely white section. The section was automatically selected for us, so let's try changing its color. Type .color 255,0,0 which should set it to a pure red.

That's better. However, we must make this two-tone! Let's add a clip. Clips effectively isolate/cut off a part of a section. You'll see how it works. Type .create clip

You'll notice a prop spawned on the top of the locomotive. This is your clip. You can delete objects by physically deleting their prop. Let's move this clip to the side of the locomotive, take out our crowbar, and then press E while looking at one side of the clip.

And you'll notice that you just clipped off a bunch of the section! You can move the clip prop around still. You can also press E on the clip again to undo what you just did. You may have noticed that the clip looks a bit different - the green plane inside of it represents the fact that currently selected object is being clipped by that particular clip, and the blue line represents the direction its clipping towards.

We're still not done making this two tone, we have to add our other tone. Let's type .create section again, and then type .color 0,0,255 to make it pure blue. You'll notice that its zfighting with the other section and looks like a mess.

With your crowbar out, press E while looking at the other side of the clip this time.

Viola, two-tone! You can keep adding more clips and more sections to make this more complicated. It should start to click if you've ever made a holo-scheme before.

Something to realize now: If you look at the sections with your crowbar out, you realize they're flashing whenever you look at one! You can press E on a section to select it, no chat command required.

Make sure you type .save after this, so you don't lose your scheme when you reset the chip!

Adding some objects

Prop To Holo

this is temporary so bear with me

use is as follows:

  • .pth to start the prop-to-holo tool
  • use your crowbar, and hit E on props you wish to holoficate
  • when you are satisfied with a selection (you can pick multiple entities in one go) type .pth save and the E2 will convert the selection to holos.
  • To exit prop-to-holo mode, type .pth again.

Commands

Prefix

All commands are started with a command prefix, which can be changed in the chip configuration. By default, it is simply the period character. Multi-letter prefixes require a space between it and the command. Whenever this page states "use x command" it is expecting this prefix before it.

Examples of a full command with a prefix:

  • .create section
  • .rc create section
  • ;create section

Automatic Lowercasing

Whenever you type something in for a command, it is automatically lowercased. You can avoid this by putting whatever you want in quotes.

Example: text "This text won't be lowercased!"

Variables

Variables are a method of storing information to be used later. A frequent example would be a specific color that you don't want to repeatedly type or don't want to push to memory. They are used with $ as a prefix, like $green. To create a variable, you do the following:

var [varname] [data]

These created variables are saved into the scheme, so you don't have to remake them again. You can also overwrite variables just by defining them again. Note: Variables are a one-time operation when used in a command, and won't automatically change anything they were used in.

Examples:

  • var $green 0,255,0
  • var $acrylic models/proppertextures/acrylic

Usage examples:

  • create section $green
  • material $acrylic

The create Command

The create command is a complex command. It used for creating objects in Rattlecan 2. It has multiple branching paths, depending on what type of object you want to create, like a section or decal.

If you see * that means this information is required within the command. Otherwise, it is not required, and will often default to some value. For example, when you create a section generically (like create section), it will default to white with no submaterial isolation indexes.

Paths:

  • create section [r,g,b]
  • create clip
  • create mirror
  • create decal [material]
  • create holo [modelpath]
  • create text3d [text]
  • create text2d [text]

The submaterial command

The submaterial command is also complex. It used for editing, and adjusting submaterials of various objects in Rattlecan. holo and section can have their submaterials changed.

Paths:

  • submaterial [index] [material]
  • submaterial all [material] | This will replace all submaterials with the defined material FIRST. Additional definitions will override this, which is the whole point.
  • submaterial isolate [index] | This will replace all submaterials that aren't the specified index with an invisible texture. Additional submaterials will override any affected by isolate.
  • submaterial delete [index, all, isolate]
  • submaterial clear
  • submaterial list | This will list all submaterial definitions for the selected object.

Sections, normally, will take their submaterials from the base model. However, if they have a submaterial definition on them, it will override that specific index, but take from the base model on all the others.

The bodygroup command

The bodygroup command is just about as complex as the submaterial command. It can change the bodygroups on holo and section.

Paths:

  • bodygroup [category] [index]
  • bodygroup delete [category]
  • bodygroup clear
  • bodygroup list | This will list all bodygroup definitions for the selected object.

Sections, normally, will take their bodygroups from the base model. If they have a bodygroup definition defined, they will use that bodygroup but take from the base on everything else.

Command List

Many commands have a shorthand, and their listed from shortest to longest in the Commands column of the table.

Generic Commands

Commands Takes Description
load filename:string Loads a scheme from the specified filename.
save nothing or filename:string Saves a scheme with the specified name. If no filename is specified, it uses the last filename you saved with. If you haven't done that either, it will use the START_SCHEME filename.
ed,edit nothing Switches to EDIT mode.
op,oper,operation nothing Switches to OPERATION mode.
pth,proptoholo Many Switches to PTH mode. See above
ref,refresh nothing or type:string Refreshes the entire scheme if no type is specified. If a type is specified, it will refresh objects of that type.
reset nothing Resets and restarts the chip. Same as pressing R on the E2.
clear nothing Clears and renders an empty scheme.
stats nothing Compiles statistics and prints them in chat. Shows things like the number of objects.

Operation Commands (Only in OPERATION)

Commands Takes Description
rn,number,runningnumber number Changes the running number. Will be reset to the scheme's normal running number if refreshed.

Edit Commands (Only in EDIT)

Many of these commands have a third state where if you put in nothing, it will return the current value. If you were to put in .scale rather than .scale x,y,z, it would print what the current scale of the selected object is.

Commands Takes Description
create type:string See above.
sub,submaterial Many See above.
bg,bodygroup Many See above.
dup,dupe,duplicate nothing Duplicates the currently selected object. The duplicated objection will spawn at the standard spawn position with no clips or mirrors applied. Doesn't work on sections.
rn,number,runningnumber number or number-number Changes the running number or running number range. To insert a range, put a dash between two numbers. You can have leading zeroes and it will preserve them.
name name:string Sets the formal name of the scheme.
offset offset:number or offset:vector Offsets an object's editor component (prop). Prop will be offset in units. If you supply a number instead of a vector, it will default to offsetting it up/down.
del,delete nothing Deletes the selected object. Works only on section.
ss,sectionselect list or index Selects a section using the specified index. You can see what the indexes are, and in general your current sections, using list. Good for selecting sections with no clips.
sectionremovenoclips nothing Removes all sections with no clips. Can be dangerous!
col,color r,g,b Sets the currently selected object's color. You can provide just one number and it will be a greyscale brightness.
alpha alpha:number Sets the currently selected object's alpha (transparency).
model modelpath:string Changes the model of the selected holo.
mat,material mat:string Sets the currently selected object's material.
scale x,y or x,y,z Sets the selected object's scale. Providing only one number scales the object based off the current aspect ratio.
font font:number or font:string Sets the selected element's font. With Text3D elements, this is 0-3. Text2D elements have many fonts in string form, and more can be manually added.
fonts nothing Lists the available Text2D fonts.
kerning kerning:number Changes the kerning mul. (space between characters) of the selected text object.
text text:string Sets the selected object's text. You can insert "|runningnumber|" in the text field to automatically replace text with the scheme's running number.

Credits:

  • Coded by Monkatraz.
  • Testing help provided by Geordie.