The NGLE Manual
Customizing
Text and Items in the Inventory
By AkyV
1. Texts in the inventory
If we’re talking about how to define the inventory names of
the inventory items, then we have two methods:
A, You won’t define the inventory names in Script, in the
case of some inventory items. – An inventory item like that
will have one and only one name during the game, always the
same. (It doesn’t matter how many objects you will use in
the object slot of the inventory item, during the game.)
These items are:
- weapons (PISTOLS_ITEM, UZI_ITEM, SHOTGUN_ITEM,
CROSSBOW_ITEM, GRENADE_GUN_ITEM, SIXSHOOTER_ITEM)
- ammunition (PISTOLS_AMMO_ITEM, UZI_AMMO_ITEM,
SHOTGUN_AMMO1/2_ITEM, CROSSBOW_AMMO1/2/3_ITEM,
GRENADE_GUN_AMMO1/2/3_ITEM, SIXSHOOTER_AMMO_ITEM)
- medipacks (BIGMEDI_ITEM, SMALLMEDI_ITEM)
- other tools of Lara (LASERSIGHT_ITEM, FLARE_INV_ITEM,
BINOCULARS_ITEM, COMPASS_ITEM, CROWBAR_ITEM)
- waterskins (WATERSKIN_1_EMPTY, 1, 2, 3, WATERSKIN2_EMPTY,
1, 2, 3, 4, 5)
- mechanical scarab (CLOCKWORK_BEETLE, COMBO1, COMBO2)
- quest items (QUEST_ITEM1, 2, 3, 4, 5, 6)
- saving/loading point (MEMCARD_SAVE_INV_ITEM,
MEMCARD_LOAD_INV_ITEM)
B, You will define the inventory names in Script, in the
case of some inventory items. – An inventory item like that
can have more names during the game (maximum one name per
each level). (It doesn’t matter how many objects you will
use in the object slot of the inventory item, during the
game.)
These items are:
EXAMINE
KEY_ITEM, COMBO
PICKUP_ITEM, COMBO
PUZZLE_ITEM, COMBO
To define any of those names in Script, use an Inventory
Item Script Command (IISC). Every object type has its own
IISC:
object type____________IISC
EXAMINE_____________Examine
KEY_ITEM____________Key
KEY_ITEM_COMBO____KeyCombo
PICKUP_ITEM_________Pickup
PICKUP_ITEM_COMBO_PickupCombo
PUZZLE_ITEM_________Puzzle
PUZZLE_ITEM_COMBO_PuzzleCombo
If you use X amount object slots of an object type in a
given level, then you need to use X amount of the IISC of
that object type, in the [Level] block of that level.
(So, for example, if you use exactly two KEY_ITEM object
slots – for example, KEY_ITEM1 and KEY_ITEM2 - in a level,
then you need exactly two Key IISC’s in the [Level] block of
that level – one for KEY_ITEM1 and another one for
KEY_ITEM2.
But, for example, if you don’t use a PICKUP_ITEM slot in a
level, then you don’t need a Pickup IISC in the [Level]
block of that level.)
You must type the requested name of the object slot into
that IISC. - Let’s see three examples:
Key= 1, Token, $0013, $0200, $4000, $0000, $0000, $0002
Key= 10, Gate Key, $0008, $0300, $8000, $e000, $0000, $0002
PuzzleCombo= 3, 2, Cartouche Piece 2, $0000, $0400, $0000,
$0000, $0000, $0002
It’s easy to understand that:
KEY_ITEM1 object slot has the inventory name “Token” in the
actual level.
KEY_ITEM10 object slot has the inventory name “Gate Key” in
the actual level.
PUZZLE_ITEM3_COMBO2 object slot has the inventory name
“Cartouche Piece 2” in the actual level.
But how can I change the name of an inventory item, if I
don’t type its inventory name in Script?
Well, whether you will define the inventory names in Script
or not, you need to define those names in [Strings] section
of English.txt:
- If you won’t define the inventory name in Script, then
always type the name into a given [Strings] entry. (You will
find those entries from String#53 to #99.)
For example, the inventory name of SMALLMEDI_ITEM object
slot is always typed in String#74. This is “Small Medipack”
now. But if you want to see another name of SMALLMEDI_ITEM
during your game, then type the requested name here,
replacing “Small Medipack”.
- If you will define the inventory name in Script, then feel
free to use any (!) – unused - [Strings] entry to type the
name there. – So now the name will be typed both in Script
and [Strings].
(If the text in a [Strings] entry is never typed on the
screen during the game, then that string will be unused. –
For example, you will find a lot of Examine, Key, Puzzle,
Pickup item names in [Strings], from String#100 to #170,
that were used for the original TRLR levels. Supposedly, you
won’t use those names in your game, so feel free to change
any of them.)
Notes:
1. As I said, you can use any string of [Strings] to type
the name there (if you type the name into Script as well).
So, for example, you can find level names in [Strings] from
String#3 to #38, but, if you want, you can type, e.g., a
PUZZLE_ITEM name in a string of that 3-38 block, replacing
an unused level name there.
Despite of that, it’s recommended to type a name in the
proper block. So, for example, if you want to name a
PUZZLE_ITEM, then type the name into the block of Examine,
Key, Puzzle, Pickup items (from String#100 to #170).
2. In fact, if you use TRNG, then you will be able to change
the inventory name of any inventory item, any time during
the game. – See more about it below.
3. This object is a pickable one, but it will never get into
Lara’s backpack (i.e. into the inventory) that’s why you
can’t name that:
BURNING_TORCH_ITEM
4. Never use these object slots – though they seem to be
inventory items:
MAP, SECRET_MAP, DIARY_ITEM, PC_LOAD_INV_ITEM,
PC_SAVE_INV_ITEM
5. If you want to change the names of inventory commands
(EQUIP, USE etc.) then use the method of “the inventory item
doesn’t have a name in Script but it does in [Strings]”.
I mean, for example, the name of “Equip” inventory command
is always typed in a given [Strings] entry, String#44 – but
you don’t need to type it nowhere else.
2. Item coordinates in the inventory
Okay, but what are those numbers with $ signs in IISC’s?
Well, those numbers are hexadecimal numbers. ($ means the
number is hexadecimal.) Their purpose is to define the
coordinates of the objects in the inventory.
Feel free to use “usual” (i.e. decimal, devoid of $ signs)
numbers instead of hexadecimal numbers now, if you want.
However, if you want to use hexadecimal numbers but you
don’t know what the hexadecimal value of a decimal number
is, then type the decimal number into your Windows
calculator and transform that number into a hexadecimal
number.
1st number:
it defines the vertical coordinate of the item.
If the value is 0 here then the Blue Line End Point (BLEP)
is (approximately?) halfway between the upper edge of the
screen and the name of the item.
The definition of BLEP:
open the item in Animation Editor of WADMerger. See the item
there in “Animation0” state. The BLEP of this item is where
that long, blue line ends at the item.
- If you type a negative number here then the object will
move so many pixels upwards, compared to Level 0.
- If you type a positive number here then the object will
move so many pixels downwards, compared to Level 0.
2nd number:
it defines the distance of the item from the camera.
The definition of the camera:
it has nothing to do with any cameras in the game this time.
I mean this camera is your eye (its visual axis is
perpendicular to the screen now) looking at the just
selected item in the inventory.
Type Number A here. If the camera saw the item placed in the
game, and not in the inventory, and it saw it, for example,
2 centimeters height in A distance, then it also sees it 2
centimeters height now in the inventory.
(Paolone says if A=512 then it means 1 square distance now.
I did some tests and I’d rather say a bigger number equals 1
square now. Maybe the well-known 1024.)
3rd number:
it defines how the object will be rotated, around Axis X,
compared to the default state.
The definition of Axis
X (in
the default state): it’s the vertical axis of the object.
It’s going through the BLEP of the object.
The definition of the
default state:
see the item in Animation Editor, in “Animation0” state. The
item is at one end of the long, blue line. Imagine the
camera at the other end of the blue line. The longitudinal
axis of the camera is the blue line. - Now the camera sees
the item in the default state of the item.
Some accentuated values of the clockwise rotations (seeing
the item from above in the default state):
90 degrees from the default state = $4000 (16384)
180 degrees from the default state = $8000 (32768)
270 degrees from the default state = $C000 (49152)
360 degrees from the default state = $FFFF (65535)
4th number:
it defines how the object will be rotated, around Axis Y,
compared to the default state.
The definition of Axis
Y (in
the default state): it’s one of the horizontal axes of the
object: perpendicular to the longitudinal axis of the
camera. It’s going through the BLEP of the object.
Some accentuated values of the clockwise rotations (seeing
the item from the left hand side of the camera in the
default state):
90 degrees from the default state = $4000 (16384)
180 degrees from the default state = $8000 (32768)
270 degrees from the default state = $C000 (49152)
360 degrees from the default state = $FFFF (65535)
5th number:
it defines how the object will be rotated, around Axis Z,
compared to the default state.
The definition of Axis
Z (in
the default state): it’s one of the horizontal axes of the
object: the extended longitudinal axis of the camera.
Some accentuated values of the clockwise rotations (seeing
the item from the camera in the default state):
90 degrees from the default state = $4000 (16384)
180 degrees from the default state = $8000 (32768)
270 degrees from the default state = $C000 (49152)
360 degrees from the default state = $FFFF (65535)
6th number:
in fact, this number has nothing to do with the coordinates
of the object.
I mean, if an object is not selected in the inventory, then
you can see it exactly the way as you defined it in 1st-5th
numbers.
But if the object is selected, then it can act in some other
ways. – The ways I’ve identified:
$0002 value – the selected object is rotating around the
vertical median axis of the screen (that is just going
through the BLEP of the item)
$0000 value – the selected object is still (as if it were
non-selected)
Notes:
1. Be careful: the 1st-6th values of the given pickable
inventory item may affect the position of the item in the
bottom right corner of the screen, when it has just been
picked up.
2. See more about inventory item coordinates here:
PuzzleCombo old command in NG Center\Reference.
3. TRNG features
3.1. Fonts
Excepting the fonts of the diary and the new type savegame
panel, all the fonts in the game (including the font of the
inventory) are defined by Font.pc file (see in graphics/wads
subfolder of Level Editor main folder) or FONT_GRAPHICS
object.
(If a level has a FONT_GRAPHICS then that level will use the
font defined in FONT_GRAPHICS.
If a level doesn’t have a FONT_GRAPHICS then that level will
use the font defined in Font.pc.)
If you want color customization for the font in the
inventory, then use this Script command (in the [Title]
block to use it for the whole game or only in a [Level]
block to use it only for that level):
Customize= CUST_SET_TEXT_COLOR, A, B
In which:
A= the text type you want to customize, defined by a TT
constant
B= the new color for the text type, defined by a CL constant
(know the CL constants in NG Center\Reference)
Useable TT constants for the inventory are:
TT_ACTION_INVENTORY_MENU_OFF: the just non-selected
inventory commands (EQUIP, USE etc.). Default color: light
grey (CL_METAL).
TT_ACTION_INVENTORY_MENU_ON: the just selected inventory
commands. Default color: pulsing rhythmically between white
and dark grey (CL_BLINKING_WHITE).
TT_AMMO: the ammo amount below the weapon items. Default
color: yellow (CL_YELLOW).
TT_ITEM_NAME: the name of the selected item (including the
amount of the item if it is read). Default color: yellow
(CL_YELLOW).
If you want size customization for the font of the
inventory, then use this Script command:
TextFormat= A, B, C, D
This is a bit complex command. I mean, if you want the
command to customize inventory texts, then:
- always type it into [Title] block, and
- use only Field D, i.e. always type IGNORE into Field A, B
and C.
Use SC constants in Field D (know the SC constants in NG
Center\Reference) to customize the width/height of the font
in the inventory.
Be careful! If you use TextFormat command this way that will
modify the size of all the “TRLE type” texts of the game
(menus etc. – except Legend Script command text), and not
only the texts in the inventory of a level.
3.2. New names
Sometimes it’s good to rename the inventory items in the
game.
Just think about it: for example, your game has two levels.
In the first level, Lara has a crossbow. But, at the end of
the level, you will remove the crossbow from the inventory,
because Lara will pick up the harpoon gun in the second
level – and the harpoon gun must be put into CROSSBOW_ITEM
slot.
The inventory name of the slot won’t be typed into Script,
so ID58 [Strings] entry will give only one name for
CROSSBOW_ITEM slot during the whole game – in spite of we
definitely want to rename the original “Crossbow” name of
the slot into “Harpoon Gun” in the second level.
The problem could be solved by variables:
Type “Harpoon Gun” into a (any) unused entry of [Strings].
For example, it’s ID105 now. Activate three FLIPEFFECTs at
the same time in the game (at the moment when you want to
change the name):
A, A “Variables. Numeric. Set” FLIPEFFECT that gives a
variable that 105 value.
B, A “Variables. Memory. Set the <&>Inventory item as
Selected Inventory Memory” FLIPEFFECT that makes
CROSSBOW_ITEM to be the actual subject of the Inventory
Memory Zone.
C, A “Variables. Memory. Copy from <&>Numeric Variable to
(E)Inventory Memory” FLIPEFFECT that gives Value 105 (the
actual value of that variable) to the “String index of Name
(Short)” field of the Inventory Memory Zone.
(For the proper working, Trigger C must be the lowest
trigger in these overlapped triggers. So always place
Trigger C first, and then place either Trigger A or Trigger
B. – Or don’t use overlapped triggers here, but activate a
TriggerGroup, in which you place these triggers, and put
Trigger C in the last place in the TriggerGroup.)
3.3. New coordinates
You don’t have IISC’s in the Script for weapons, ammunition,
medipacks, other tools of Lara, waterskins, mechanical
scarab (parts), quest items or the objects of saving/loading
points to define the coordinates of these items – because
they have hardcoded coordinates in the inventory.
But it doesn’t mean you can’t change the coordinates of
those items – all you need is use variables:
If you want to change a coordinate then use the same method
as that has been told just above:
- Use a “Variables. Numeric. Set” FLIPEFFECT to define the
requested value of the coordinate. (This time only as a
decimal value, of course.)
- Use a “Variables. Memory. Set the <&>Inventory item as
Selected Inventory Memory” FLIPEFFECT to define the item
whose coordinate you want to modify.
- Use a “Variables. Memory. Copy from <&>Numeric Variable to
(E)Inventory Memory” FLIPEFFECT to give the coordinate value
(the actual value of that variable) to one of these fields
of the Inventory Memory Zone:
a, “Distance of Cam. {Little values bigger items and
vice-versa) (Short)” field: if you want to define the
distance of the item from the camera.
b, “Top Border in 2d plane. (Negative numbers move up the
item) (Short)” field: if you want to define the vertical
position of the item.
c, “View Flags. (2 = turn endless, $4000 = usable?) (Short)”
field: if you want to define how the selected item will be
acting (turning, still).
d, “X Facing about the cam view on X Axis (Short)” field: if
you want to define how the item will be rotated, around Axis
X, compared to the default state.
e, “Y Facing about the cam view on Y Axis (Short)” field: if
you want to define how the item will be rotated, around Axis
Y, compared to the default state.
f, “Z Facing about the cam view on Z Axis (Short)” field: if
you want to define how the item will be rotated, around Axis
Z, compared to the default state.
Note:
If you redefined a coordinate value that will affect the
whole inventory.
So, for example, if you define a new coordinate value for
GRENADE_GUN_AMMO1_ITEM then it will affect the position of
that ammo either if that is standalone on the top of the
screen or if that is seen below the grenade gun.
Made using TRNG 1.2.2.6
Back to Top