Grab some propcorn and prepare for a little present from Korny...
HUD Message Text Tutorial, by Kornman00.
I figured this stuff out a while back, but never cared enough to write a tutorial, but I thought, as a gift for you guys for the holidays I would :^)
NOTE: Anywhere you see quotes, its to say that this is EXACTLY how this value must be or w/e it is.
Also, this is COMPLETELY different from a string list or unicode string list, and thus can't be created or imported with Steelix's app thing. These are those blue messages that appear in the hud like "you picked up 24 rounds of pistol ammo"
Step 1: Preparing your files
To start off, you will need to create 2 files.
1st file is the "hud messages.hmt" file. This file MUST be in Unicode format and goes in your "data\" folder where your editing tools were installed to. For this case, we are going to be putting it in the path "data\levels\test\hud messages.hmt". The name of the file is important. Tool will be looking for the file titled "hud messages.hmt". So....don't be a rebel!
NOTE: If you don't know how to save a text file in Unicode, when you go to save with Notepad or something better than it (anything out there...), there should be a dropdown box at the bottom of the save dialog entitled "Encoding" or "Converter". Find "Unicode" in this list and select it and save.
2nd file is your scenario tag. To keep things consistant the name of the scenario file is "test.scenario" in this case. The path for the scenario tag is "tags\levels\test\test.scenario". Again, the folder "tags\" is where your editing tools were installed to. You don't HAVE to use those parths and scenario tag name, these are just for this test case. If your map was called "zombie" then your set up could be like so:
HMT file: "data\levels\zombie\hud messages.hmt"
Scenario tag: "data\levels\zombie\zombie.scenario"
Step 2: Creating your HUD Messages
Heres the meat of the tutorial, where we actually do something fun!
brb
.
.
.
.
back
OK, the format in which each "message" is, goes like this:
"<name>=<text>"
For example:
"pickup=Hold %action to pick up %custom-1"
all buttons always begin with "%". To mark where your test begins, you use the "=" character.
For a list of button identifiers refer to listing 1
a-button
b-button
x-button
y-button
black-button
white-button
left-trigger
right-trigger
dpad-down
dpad-left
dpad-right
start-button
back-button
left-thumb
right-thumb
left-stick
right-stick
action
throw-grenade
primary-trigger
integrated-light
jump
use-equipment
rotate-weapons
rotate-grenades
zoom
crouch
accept
back
move
look
custom-1
custom-2
custom-3
custom-4
custom-5
custom-6
custom-7
custom-8
NOTE: "custom-#" is for internal stuff in the engine. It uses them for formatting strings at runtime with names of a weapon, or the icon of a weapn.
Step 3: Importing this **** into a tag...
To import a hud message text data file, we use this Tool command signature:
"tool hud-message <path> <scenario-name>"
For this test case, we would fill in this signature with the following data:
"tool hud-message levels\test test"
We didn't include the trailing '\' in the "<path>" argument because Tool likes to be a rebel and do its own thing by adding '\' to the end of it anyway.
We entered "test" into the "<scenario-name>" argument because tool takes the "<path>" and appends it to the begining of "<scenario-name>", along with its damn rebelious '\' character, and the ".scenario" file extenstion. The end result of the all this would be "levels\test\test.scenario". Tool looks for this in your "tags\" folder. NOT CREATE, it LOOKS for it. If it can't find it, it *****es at you with a message like this one:
"file_open('tags\levels\scnr.scenario') error 0x00000002 'The system cannot find the file specified. '
couldn't open scenario tag 'scnr.scenario'."
So again...don't be a rebel!
Recap
HMT file: "data\levels\test\hud messages.hmt"
Scenario tag: "data\levels\test\test.scenario"
tool command: "tool hud-message levels\test test"
Example
pickup=Hold %action to pick up %custom-1
swap_powerup=Press %action to swap %custom-1 for %custom-2
touch_device=Press %action to touch device %custom-1
custom_device=Press %action to %custom-1
swap_weapon=Hold %action to swap for %custom-1
remind_to_switch_weapons=Press %rotate-weapons to switch to %custom-1
enter_vehicle=Press %action to enter %custom-1 of %custom-2
exit_vehicle=Press %action to exit %custom-1
flip_vehicle=Press %action to flip %custom-1
respawn_fail_moving=Waiting to respawn...teammate moving to fast
respawn_fail_unsafe=Waiting to respawn...too many enemies nearby
respawn_fail_combat=Waiting to respawn...teammate in combat
respawn_fail_vehicle=Waiting to respawn...teammate must exit vehicle
Questions, Comments, tutorial corrections mb?
PDF mbmb
Bookmarks