Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Closed Thread
 
Thread Tools
Old 22-08-16, 13:45   #1
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default TRNG – Your own NGLE buttons

Made using TRNG 1.2.2.7.+




What is that panel with buttons over NGLE? Are there new buttons for NGLE?
Yes, there are. But those buttons are made by YOU.
Those buttons are NGLE parts (mostly buttons, dropdown menu commands and keys) which are also available in that panel.

And why is it useful, first of all?
  • Because you can gather in one button table the most important buttons you usually use, looking in the way you like it.
  • And because you can add buttons to menu commands and keys that don’t have buttons.

The button panel will pop up automatically when NGLE starts.

As you see in the image above, you can separate the buttons from each other, grouping them into different sections.
For examples, you have a section for the buttons of editing textures, and another one for the buttons of the procedures with objects.

Notes:
  • Probably some keys are missing from your keyboard. In that case using the button table is pretty useful to substitute those keys.
  • If the key presents a continuous movement while being pressed (like PAGE UP or DOWN), then the same button here presents only a tiny movement, when you click on it. This is also pretty useful, if you can’t adjust the proper speed for those keys.
  • If you closed the button panel, or if it is down on the Tray then hit CTRL+(not keypad) 0 to open it again.
  • Don’t be surprised: you can’t bring all the NGLE functions on the button table, some of them won’t work here.


The look and contents of the button table

You need a TXT file with the name of ButtonsWindow in the main folder of the Level Editor.
This TXT contains the contents and look of your actual button panel.

Note:
If you have a button duplicated unnecessarily in the bottom of the table then the reason probably is you have an unnecessary empty row in the bottom of the TXT.

For the main parameters, type these commands:

@COLUMNS:X
The button amount in each row is X.
(For example, if you have 6 buttons in a section, but you can have 4 buttons in each row, then the section will have 2 rows: 4 buttons in the first one and 2 buttons in the second one. The 3rd and 4th button position of the second row is empty, filled by only the row black background color).

@TITLE:X
The name of the table printed in its main title bar is X.

@BUTTON_WIDTH:X
The width of each button is X pixels.
(The table width is generated by the button width multiplied by the button amount per row.)

@BUTTON_HEIGHT:X
The height of each row is X pixels.
(The table height is generated by the button height multiplied by the row amount of the table.)

@BACK_COLOR:$BBGGRR
BB-blue, GG-green, RR-red, they are hexadecimal color codes.
(For example, using 123 for the red color in the 0-255 color scale, the hexadecimal version of 123 is 7B. – Use eg. your Windows calculator to turn a decimal number into hexadecimal.)
This BGR (not RGB!) background color will be used for each sub title bar or info box where the background color isn’t defined for that bar or info box. (See more below.).
The empty row background color is always black. (See @Columns command to understand when you can encounter an empty row.)
The button background color is always light grey.

@FORE_COLOR:$ BBGGRR
BB-blue, GG-green, RR-red, they are hexadecimal color codes.
This BGR (not RGB!) font color will be used for each sub title bar or info box where the font color isn’t defined for that bar or info box. (See more below.)
The button font color is always black.

@FONT:W:X:Y:Z
W can be:
  • BUTTONS: if you want to define the font type for the buttons
  • ROWS: if you want to define the font type for the sub title bars
  • FRAMES: if you want to define the font type for the info box
X: the name of the font in your Windows
Y: font height (font width has always a constant ratio to that, approximately 60 %.)
Z: font thickness (recommended between 100 and 900)

Note:
You can’t have more than 512 characters typed in any TXT command.

Sections and their titles:

You can insets rows with some special information between the buttons, to separate buttons into different sections. These rows are the sub title bars, because they should be used first of all as the title bar of the section below it.
Type a #R command for each bar:

#R:W:Y:Z
W: the text you want to see in this bar (i.e. the section title)
Y: the background color of this bar (optional)
Z: the font color of this bar (optional)

Buttons:

Type a #B command for each button:

#B:W=X
W: the original button name
X: the button name you want to see in this button table, maximum 79 characters (optional, if you want to change the original name on the button)

Note:
Buttons with on/off status (like Lighting) won’t look as buttons in the button table. They will look as options you can check or uncheck.

If you want a button without a real name, then type a #P command for each button:

#P:W=X
W: the button code
X: the button name you want to see in this button table, maximum 79 characters (optional, if you want to change the button code on the button)

“Without a real name” means, for example, many button has only a Sign + as a name, so a + for the name won’t really identify the button.

That is why those buttons will get these codes (I don't think they need to be explained. Codes named “Number” are for the windows that pop up when you click on the little boxes between the buttons):

  • Object panel buttons:

TINT_RED+
TINT_RED-
TINT_RED_NUMBER
TINT_GREEN+
TINT_GREEN-
TINT_GREEN_NUMBER
TINT_BLUE+
TINT_BLUE-
TINT_BLUE_NUMBER

OBJECT+
OBJECT-
OBJECT_NAME

  • Light panel buttons:

AMBIENCE_RED+
AMBIENCE_RED-
AMBIENCE_RED_NUMBER
AMBIENCE_GREEN+
AMBIENCE_GREEN-
AMBIENCE_GREEN_NUMBER
AMBIENCE_BLUE+
AMBIENCE_BLUE-
AMBIENCE_BLUE_NUMBER

LIGHT_X+
LIGHT_X-
LIGHT_X_NUMBER
LIGHT_Y+
LIGHT_Y-
LIGHT_Y_NUMBER
LIGHT_LEN+
LIGHT_LEN-
LIGHT_LEN_NUMBER
LIGHT_CUT+
LIGHT_CUT-
LIGHT_CUT_NUMBER

LIGHT_INT+
LIGHT_INT-
LIGHT_INT_NUMBER
LIGHT_OUT+
LIGHT_OUT-
LIGHT_OUT_NUMBER
LIGHT_IN+
LIGHT_IN-
LIGHT_IN_NUMBER

COLOUR_RED+
COLOUR_RED-
COLOUR_RED_NUMBER
COLOUR_GREEN+
COLOUR_GREEN-
COLOUR_GREEN_NUMBER
COLOUR_BLUE+
COLOUR_BLUE-
COLOUR_BLUE_NUMBER

Note:
Some buttons don’t have any name on it - like the magenta button to place triggers.
In their cases the code is the X-Y coordinate (in brackets) of the upper left corner of the button. – It is (265,412) in the case of the magenta button. (This coordinate must be calculated in the way when you used ALT+ENTER to open NGLE on the whole screen.)
If you don’t know how to find the coordinates, then see the Get Screen Frames tool in NG Center/Tools.

If you want a button for a command of the dropdown menu, then type a #M command for each button:

#M:W=X
W: the original command name
X: the button name you want to see in this button table, maximum 79 characters (optional, if you want to change the command name on the button)

Note:
There are differences between the original names of the classic, TRLE menu commands and the new, TRNG menu commands.
You need to avoid the shortcut keys in the original name of the TRLE buttons, but you need to add them in the original names of the TRNG buttons.
For example, Center command is an old command, with SHIFT+C shortcut, the original name is “Center” now.
But, for example, Pyramid Floor is a new command, with CTRL+F5 shortcut, the original name is “Pyramid Floor CTRL F5” now. (Yes, without Sign + between CTRL and F5, you need only one space between them.)
New commands are:
  • all the commands of Screenshots and Shapes menus,
  • all the commands of Texture and Help menus where you can see shortcut keys typed.

Where you can’t see a shortcut typed in the menus, then you naturally never need to type a shortcut in the TXT.

If you want a button for a key command, then type a #K command for each button:

#K:W=X
W: hexadecimal code
X: the button name you want to see in this button table, maximum 79 characters (optional, if you want to change the hexadecimal code on the button)

The hexadecimal code of the key is which you can see in NG Center/References/Keyboard Scancodes List. - For example, $14 is the code of the T key.

Further codes are for key combinations:

$8: ALT
$4: CTRL
$2: (left) SHIFT
$1: right SHIFT

In the case of key combinations, type the codes after each other. For example, SHIFT ($2)+F1 ($3B)= $23B.

Notes:
  • Sometimes you can only find keypad keys in “Keyboard Scancodes List”. If you want to use the other key, but you can’t find it in the list, then add +$80 (decimal 128) to the code.
    For example, the “9/PAGE UP” keypad key is $49, according to the list. So the “other” PAGE UP is $49 (73) +$80 (128)= $C9 (201).
    Or, CTRL+left arrow moves the selected item to the left. “Left arrow” keypad code is $4B (75), so we need $4B+$80= $CB. With the CTRL together that must be $4CB.
  • In the case of multiple combinations, you need to add the values of ALT, CTRL and SHIFT to each other. For example: ALT ($8= decimal 8)+CTRL ($4=decimal 4)=$C (decimal 12).
    This is probably only theoretical sometimes. I mean, with that logic, eg. CTRL+SHIFT+I to make NGLE crash should be $6 ($4+$2)+$17 (Key I)= $617, but that doesn’t work.
    On the other hand, if there is only ALT, CTRL or SHIFT in the combination, then you need type “00” after the code, which will work. Eg. ALT+CTRL+SHIFT for the max room number panel is $8 (8)+$4 (4)+$2 (2)=$E (14), so the proper “original name” is $E00.

Info box:

Type a #F command if you want to see the infobox in the button table:

#F:W=X:Y:Z
W: type always INFO_BOX here.
X: for example, if you type 2 here, then you will see only the first 2 rows of the original info box
Y: the background color (optional)
Z: the font color (optional)

Notes:
  • If the table width is too little and/or the font is too big, then the original row will be separated two or more rows in the button table. For example, if you type 2, but the width is too little, then only the first row of the original info box will be seeable, separated into two rows here, there is no space enough for the second one.
  • If you checked “Show extra infos in Room Info Panel” in NGLE Settings, then the info about the last selected block will be still seeable in the button table info box when it is not selected any more, which is a tiny bug.

Color palette:

Type a #C command if you want to see the first 15 colors of the color palette in the button table (always filling only one row):

#C:W
W: type always COLOR_PALETTE here.


Example#1




Note:
Empty rows in the TXT are not important, only made for the better separation.

@COLUMNS:4
@TITLE:Menu and Keyboard Shortcuts
@BUTTON_WIDTH:116
@BUTTON_HEIGHT:16
@FONT:BUTTONS:Ms Sans Serif:9:100
@FONT:FRAMES:Ms Sans Serif:9:100
@FONT:ROWS:Arial:15:400

#R:SHAPES (On selected zone with arrows):$FF0000:$FFFFFF
#M:Smooth Slope Floor CTRL F1=Slope Floor
#M:Smooth Slope Ceiling CTRL F3=Slope Ceiling
#M:Stepped Slope Floor CTRL F2=Staircase Floor
#M:Stepped Slope Ceiling CTRL F4=Staircase Ceiling
#M:Random Smooth Floor Up ALT 1=Random Floor UP
#M:Random Smooth Floor Down ALT 2=Random Floor DOWN
#M:Random Smooth Ceiling Up ALT 3=Random Ceil UP
#M:Random Smooth Ceiling Down ALT 4=Random Ceil DOWN
#M:Pyramid Floor CTRL F5=Pyramid Floor
#M:Inverse Pyramid Floor CTRL F6=Inv. Pyramid Floor
#M:Pyramid Ceiling CTRL F7=Pyramid Ceiling
#M:Inverse Pyramid Ceiling CTRL F8=Inv. Pyramid Ceil
#M:Bend Floor CTRL 1=Bend Floor
#M:Inverse Bend Floor CTRL 2=Inv. Bend Floor
#M:Bend Ceiling CTRL 3=Bend Ceiling
#M:Inverse Bend Ceiling CTRL 4=Inv. Bend Ceiling
#M: Dome Floor CTRL 5=Dome Floor
#M:Inverse Dome Floor CTRL 6=Inv. Dome Floor
#M: Dome Ceiling CTRL 7=Dome Ceiling
#M:Inverse Dome Ceiling CTRL 8=Inv. Dome Ceiling

#R:GRIDS (On Selected Wall):$FF0000:$FFFFFF
#K:$0010=Floor1 UP
#K:$001E=Floor1 DOWN
#K:$0012=Floor2 UP
#K:$0020=Floor2 DOWN
#K:$0011=Ceiling1 UP
#K:$001F=Ceiling1 DOWN
#K:$0013=Ceiling2 UP
#K:$0021=Ceiling2 DOWN
#M:Grid selected wall=Grid Selected
#M:Remove editing from selection CTRL F11=Clear Selected
#M:Grid all walls=Grid this Room
#M:Remove all grids CTRL F12=Clear this Room

#R:TEXTURES (Rooms):$FF0000:$FFFFFF
#M:Clear Room=Clear This Room
#M:Remove unused tail infos=Clear unused Tails
#M:Clear Floor Selected Textures ALT F9=Clear Sel. Floor
#M:Clear Ceiling Selected Textures ALT F10=Clear Sel. Ceil.
#M:Create Floor Triangular Tex SHIFT F3=Repair Floor Triangle
#M:Create Ceiling Triangular Tex SHIFT F4=Repair Ceil. Triangle
#M:Substitute Textures=Find & Replace Tex
#M:Turn Selected Textures=Turn Sel. Textures

#R:TEXTURES (Texture Panel):$FF0000:$FFFFFF
#M:Load TGA=Load TGA
#K:$040A=Edit TGA
#K:$0814=Reload TGA
#K:$0414=Change Triangle
#K:$001A=Scroll UP
#K:$0028=Scroll DOWN
#K:$000C=Previous Tex.
#K:$004E=Next Texture

#R:OBJECTS:$FF0000:$FFFFFF
#M:Load Objects
#K:$0418=Reload Objects
#K:$023B=Info Wad file
#B:Advanced Search=Find Objects
#K:$04C8=Move NORTH
#K:$04D0=Move SOUTH
#K:$04CB=Move WEST
#K:$04CD=Move EAST
#K:$0018=OCB Code
#M: Delete Object
#M:Change Object=Replace Object
#B:Rotate Object

#R:ROOMS:$FF0000:$FFFFFF
#K:$00C8=Turn Up
#K:$00D0=Turn Down
#K:$00Cb=Turn Left
#K:$00CD=Turn Right
#K:$00C9=Zoom In
#K:$00D1=Zoom Out
#M:Place Target
#M:Preview
#K:$0022=Prev. Marked Room
#K:$0422=Next Marked Room
#K:$0032=Mark Room
#K:$0016=UnMark Room
#K:$0E2A=Increase Rooms
#K:$022E=Center Pivot
#M:Mirror=Mirror the room
#M:Rotate=Rotate the room

#R:MISCELLANOUS:$FF0000:$FFFFFF
#K:$04C8=Move Cam NORTH
#K:$04D0=Move Cam SOUTH
#K:$04Cb=Move Cam WEST
#K:$04CD=Move Cam EAST


Example#2




@COLUMNS:3
@TITLE:Buttons
@BUTTON_WIDTH:120
@BUTTON_HEIGHT:20
@BACK_COLOR:$FF0000
@FORE_COLOR:$FFFFFF
@FONT:BUTTONS:Arial:12:100
@FONT:FRAMES:Ms Sans Serif:9:100
@FONT:ROWS:Arial:15:400

#R:Find Buttons
#B:Trigger -> Object
#B:Object -> Trigger
#B:Go back old room
#B:Advanced Search
#P: (265,412)=Add Trigger
#K:$23B=TGA Info

#R:Management Files:$FF0000:$FFFFFF
#B:Load Project
#B:Save Project
#B:Last Projects
#B:Backup Project
#B:Load TGA
#M:Load Objects

#R:Editing:$FF0000:$FFFFFF
#B:Big Texture
#B:Rotate Object

#R:Open Windows:$FF0000:$FFFFFF
#B:Animation Ranges
#B:Texture Sounds
#P:OBJECT_NAME=Objects
#B:Settings

#R:Lighting Buttons:$FF0000:$FFFFFF
#B:Lighting
#B:ON
#P:AMBIENCE_RED_NUMBER=Ambience Red
#P:COLOUR_RED_NUMBER=Colour Red
#P:AMBIENCE_GREEN_NUMBER=Ambience Green
#P:COLOUR_GREEN_NUMBER=Colour Green
#P:AMBIENCE_BLUE_NUMBER=Ambience Blue
#P:COLOUR_BLUE_NUMBER=Colour Blue
#P:LIGHT_X_NUMBER=Light X
#P:LIGHT_Y_NUMBER=Light Y
#P:LIGHT_LEN_NUMBER=Light Lenght
#P:LIGHT_CUT_NUMBER=Light Cut
#P:LIGHT_IN_NUMBER=In Radius
#P:LIGHT_OUT_NUMBER=Out Radius
#P:LIGHT_INT_NUMBER=Intensity
#B:Light=Add Light
#B:Shadow=Add Shadow
#B:Sun=Add Sun
#B:Spot=Add Spot
#B:Effect=Add Effect
#B:Copy
#B:Paste

#R:Colours of Palette:$FF0000:$FFFFFF
#C:COLOR_PALETTE

#R:Info Panel:$FF0000:$FFFFFF
#F:INFO_BOX=1:$80FFFF:$000000

Last edited by AkyV; 22-08-16 at 14:18.
AkyV is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 13:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.