RATTLECAN - MagnumMacKivler/RLCPT2 GitHub Wiki
Rattlecan is a paint scheme editor made in Expression 2 designed for locomotives included in Magspack 2.
All commands are started with a command prefix, which can be changed in the chip configuration. By default, it is simply the period character. It does not matter if you follow the prefix with a space or not. 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
-
.rccreate section
| This is technically valid, but messy. ;create section
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 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:
create 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:
create var green 0,255,0
-
create var $acrylic models/proppertextures/acrylic
| You don't have to put a$
, it will filter it out.
Usage examples:
create section $green
-
material $acrylic
| But now, you have to put a$
prefix.
The create
command is a complex command. It used for creating objects in Rattlecan. 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
create holo [modelpath]
create text3d [text]*
create text2d [text]*
create var [varname]* [data]*
The submaterial
command is also complex. It used for editing, and adjusting submaterials of various objects in Rattlecan. The basic premise is that every object, except for text elements, can have their submaterials changed. It has four paths, dependent whether you want to delete a submaterial index or replace one.
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 delete [index]
-
submaterial clear
| This will delete ALL submaterial definitions on 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.
All information in the following command list can be found in the chip itself with the help
command.
Many commands have a shorthand, and their listed from shortest to longest in the Commands column of the table.
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 loaded or saved. |
ed,edit |
nothing |
Switches to edit mode and loads the scheme in edit mode. |
op,oper,operation |
nothing |
Switches to operation mode, and removes editor components. |
ref,refresh |
nothing or type
|
Refreshes the entire scheme if no type is specified. If a type is specified, it will refresh that section of the renderer. Types:5 | text | text2d | text3d | decals | elements 4 | sections
|
reset |
nothing |
Resets and restarts the chip. |
clear |
nothing |
Edit only. Clears and renders an empty scheme. |
undo |
nothing or stepsback:number
|
Edit only. Reverts to a previous point in history of the scheme. If number of steps back isn't specified, it will revert 1 step back. |
name |
name:string |
Edit only. Sets the formal name of the scheme within the scheme table. Shows up when you load a scheme. Otherwise the name will default based off filename. |
col,color |
r,g,b |
Edit only. Sets the currently selected object's color. You can provide just one number and it will be a greyscale brightness. |
mat,material |
mat:string |
Edit only. Sets the currently selected object's material. |
scale |
x,y or x,y,z
|
Edit only. 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
|
Edit only. 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. |
text |
text:string |
Edit only. Sets the selected object's text. You can insert " |
scan |
nothing |
Scans the base prop and sets the rendered scheme's submaterials and bodygroups. |
offset |
offset:number |
Edit only. Offsets an element's editor component (prop) up or down. Number determines amount of offset, in multiples of 12. |
del,delete |
nothing |
Edit only. Deletes the selected object. |
preview |
nothing |
Edit only. Hides all editor components for a quick preview. Is a toggle, preview to hide, preview again to show. |
rn,number,runningnumber |
number or number-number
|
Changes the running number or running number range. Can be embedded into scheme if done in edit mode. To insert a range, go into edit and put a dash between two numbers. |
model |
modelpath:string |
Edit only. Changes the model of the selected holo element. |
create |
type:string |
See above. |
sub,submaterial |
Many | See above. |
- Coded by Monkatraz.
- Many functions and lots of help provided by Magnum.