DaMiT's .hfb Hacking Guide
This page hasn't been updated since HFv20
Comments, recommendations, errata, speling missteaks,
something I left out, certain passage too confusing, my HTML sucks?
EMAIL ME! cecrops@sandwich.net
All information in this file is unofficial. If you want up-to-date, accurate Hell Fighter information go to the official website. In fact, there is such good data there that I link to it throughout this document. ;)
This file will help you understand the technical details of creating
a Hell Fighter battle file.
What a sample Hell Fighter Battle(.hfb) file looks like:
# foo.hfb
# Generated by Hell Fighter v20.0
*ves
+type wyvern
+var 0
+name Bobs_Ship
+des 65793
+AI 7
+pos -2790 4910
+dir 0
+side 1
+eta 0
-end
*mis
+type destroy
+units 33 34 0
+Mside 1 +Bside 2
+Mpts 5000 +Bpts 2500
-end
#s are Comments
All lines in a .hfb beginning with a hash mark (#) are comments. Comments don't affect the gameplay at all; They are only there as information for a person reading the file. The in-game HFB generator will insert lines similar to the two above when saving a file. The first comment is the name of the file, and the second is a note saying what version of the game made the file.
Besides comments, there are two kinds of lines in an .hfb: *ves(vessels) and *mis(missions), both of which
begin with an asterisk and end with the string -end.
Vessels
The line for each craft in an hfb begins with *ves. This tells
the program that you are inputting information for a vessel. For the
purpose of the game, fighters, capships, bases, and jumpgates all count
as vessels.
+type
The +type attribute specifies what type of ship the vessel is.
After +type, you input the name of the craft such as: +type
shrike. Ship types must be in all lowercase. The following are valid
ships, the links leading to the Dracova page which has more detailed
information:
Craft Name | Race | Craft Type | Common? | |
archer | Terran | Heavy Interceptor | Common | |
flea | Terran | Interceptor | (Un?)Common | |
hornet | Terran | Fast Interceptor | Common? | |
mosquito | Terran | Interceptor | Common? | |
executor | Terran | Heavy (Obsolete?)Fighter | Common? | |
hellfighter | Terran | Superiority Fighter | Uncommon | |
hunter | Terran | Auto-Aiming Superiority Fighter | Very Common | |
shrike | Terran | Superiority Fighter | Very Common | |
starfighter | Terran | Obsolete Superiority Fighter | Common? | |
wyvern | Terran | Superiority Fighter | Common | |
phoenix | Terran | Damage-Absorbing Fighter | (Very?) Rare | |
porcupine | Terran | Minelayer | Uncommon? | |
repulsor | Terran | Light Fighter? | Rare? | |
sniper | Terran | Long-Range Sniper | Uncommon? | |
spectre | Dracovarian? | Token Cloaking Ship | Very Rare | |
superhellfighter | Stepping Stone | Munchy Superiority Fighter | Very Rare | |
devastator | Terran | Heavy Bomber | Common | |
dragon | Terran | Bomber | Common? | |
fireblossum | Terran | Light Bomber | Common? | |
hydra | Bendasari? | Heavy Fighter w/Drones | Common? | |
typhoon | Terran | Bomber | Common? | |
skiff | Terran | Small unarmed craft | Common? | |
shuttlecraft | Terran | Small unarmed craft | Common? | |
transport | Terran | Medium unarmed craft | Common? | |
smallfreighter | Terran | Large unarmed craft | Very Common | |
largefreighter | Terran | Large armed transport craft | Common? | |
liner | Terran | Passenger Liner | Common? | |
frigate | Terran | Anti-Fighter Warship | Common | |
destroyer | Terran | Medium-Range Warship | Uncommon | |
cruiser | Terran | Long-Range Warship | Rare | |
dreadnaught | Terran | Flagship/Warship | Very Rare | |
racker | Terran | Quick-launching Mini-Carrier | Common | |
escortcarrier | Terran | Squadron Carrier | Uncommon | |
lightcarrier | Terran | Light Carrier | Uncommon | |
carrier | Terran | Large Carrier w/repair facilities | Very Rare | |
strikecarrier | Terran | Solo attack warship | Very Rare | |
auxcarrier | Terran | Auxilliary Carrier | Very Rare | |
spacestation | Terran | Star depot | Rare? | |
battlestation | Terran | Big defense post | Very Rare | |
starbase | Terran | Major base of operations | Very Rare | |
jumpgate | Deity | Natural Phenomenon | Common |
Stick to using ships that actually exist, or else Bad Things might happen. When writing your .hfbs you should take into account how common a ship is(unless you have a specific idea). It was once said that there are maybe twelve Spectres in the entire HFiverse, and a ragtag group of rebels is unlikely to get their hands on a Cruiser much less a Dreadnought.
For information regarding common fleet formation and organization, look at
Terran Alliance
Space Navy Organization on the Dracova site and this
email from PS, and look at existing .hfbs.
+var
The +var attribute defines variations in a craft's configuration.
As an example: starfighters are normally equipped with mass drivers
(+var 0), but if you use the setting +var 1, the
starfighter will be equipped with bolt cannons. In the current version
of Hell Fighter, your craft's ammunition display will not display anything
for any other than the standard configuration, but the variations do work.
HFv19's mission editor would tell you what the variations were. The
standard config is always +var 0.
Yes, that Fireblossom var 3 really does have a Skunk Bomb rack with no Skunk Bombs.
+var appears to be one of those attributes you could get away with not using, but you really shouldn't. Using a bad var value(negative or over highest var) will give you an unarmed ship.
Hellfighter's HUD will not display any weapons info for vars other than
0. This is a bug, and will be fixed.
+name
+name is for giving the ship a name. This attribute you
can leave off with no problems. Fighters are not normally named although
there's nothing stopping you(I am quite fond of naming the player
"Our_Hero"), but if a capship isn't given a +name then the game
will automatically pull one out of the names.dat file. If you
want a space in your ship's name, you have to use an underscore.
+des
The Designation(+des) attribute is a decimal(that's base-10) representation of a 4-byte number. Counting from the least significant byte, the first byte is the ship number, the second byte is the squadron's letter designation, the third byte is the squadron's colour, and the fourth byte is unused.
Unused Colour Letter Number 00000000 00000000 00000000 00000000 <- Least significant | | | | 2^24 - 65536 - 256 - 1 -The basic formula for a des is (2^16 * Colour)+(2^8 * Letter) + Number.
The Unused byte is unused, and it is recommended you don't mess with it, as the effects of having anything in it are undefined.
The Colours byte decides your squadron's colour. Valid colours are from 1 to 11, where (1..11)==(R,O,Y,G,B,I,V,gold,white,grey,black). The effects of Colours below 1 or over 11 is undefined.
The Letter byte contains a number between 1 and 26, determining your squad's letter. If you can read this, you know enough english to figure out the letters. As with colours, the effects of letters below 1 or over 26 is undefined.
The Number byte you would expect to be the number your ship gets in the game. However, it doesn't work out that way. What the game does is merely look at the squad colour and letter, and as it reads from the hfb it will incrementally reassign numbers to the ships from 1-255. This means that even if you wrote the +des so a ship would be RU-18, if it's the third ship in RU, it will be assigned the designation RU-3. The numbers are assigned independantly for each side; If there are 3 GoodGuys and 4 BadGuys, the Goods will be RU-[1..3] and the Bads will be RU-[1..4].
Some sample designations:
#Red Alpha 1 +des 65793 1 00000001 00000001 #Red Beta 1 +des 66049 (That's Red Alpha 1 plus 256) 1 00000010 00000001 #Red Zeta 1 +des 72193 1 00011010 00000001 The middle number is 26, that's the number of letters in the English alphabet. (Z is the last letter) #Orange Alpha 1 +des 131329 (Red Alpha 1 plus 65536) 10 00000001 00000001 | | |-- 1 == Ship #1. | | | |-- 1 == Alpha |-- 2 == Orange
Giving several ships the same des doesn't seem to cause any problems(yet), due to the game reordering the numbers. HFBs without the des attribute will still work -- In fact, some of the hfbs that come with HF are from older versions where the des attribute apparently did not exist. It works because the game doesn't yet care about the number.
The des does not seem to affect gameplay, although in future versions it is expected to affect computer AI regarding squadrons.
It is highly recommended that you keep to using valid designations. The
parser will detect some invalid colour settings and set the ships to what
appears to be the default squadron Orange Alpha. However, it is not able
to always "fix" invalid letters or anything in the unused byte. Anything
screwy or neat that you get by fooling around with this is unlikely to
remain in later versions of the game.
HF +des generator <- pointy-clicky calculator.
+AI
The +AI (in uppercase) attribute sets the skill of the
artificial intelligence for computer-controlled craft. It doesn't
matter a whit for human controlled craft. Acceptable values are from
1 to 7 with 4 being average, although many players prefer to use
5 as an average value.
+pos
+pos sets the ship's position on the map. While most other attributes have one argument, +pos uses two. The first is the ship's X or horizontal position on the map. The number may be negative or not, negative numbers placing the ship farther to the left, positive placing the ship farther to the right.
The second number is the vertical position. A negative number is towards the top of the map, positive is towards the bottom.
^ -y | | | -x <---------+---------> +x | | | v +y
Each number is one pixel on the map when fully zoomed in.(?)
The position of ships jumping in(see eta) seems to be effected by the ship's speed (and mass?),
The map is Really Really Big. It would take a flea three months to cross
from one end of the map to the other.
+dir
Hell Fighter uses a circle that is 384 degrees around, due to the ease of dividing it by multiples of two. +dir is the direction the ship is facing, expressed as a number of degrees in the circle, counting clockwise.
Relative Angles: (Thanks to Greg/Phantom)
288 240 288 366 256 | 320 \ | / 224 | 352 192--Centre--0 192 ---Centre--- 0 / | \ 160 | 32 144 96 48 128 | 64 96
+side denotes what side the ship is on. Side 1 is the Terran Alliance, which has green/red ships. Side 2 is the Stepping Stone Alliance, which has grey/blue ships. There is no side 0, and there are no other sides implemented yet.
The side that a jumpgate "belongs to" can have certain effects
upon gameplay. Computer controlled ships seem to like to fire upon "enemy"
jumpgates(AI bug, will be fixed), and a jumpgate's side might effect the AI
of unarmed craft in future versions. Currently, unarmed ships will just
head towards the first jumpgate in the HFB file.
+eta
ETA is the Estimated Time of Arrival for ships jumping in. +eta 0 is used for ships that are already present at the time the battle begins. Each unit is one 12.8th of a second, so +eta 128 would be ten seconds into the battle.
Fighters will "latch" onto nearby carriers with
the same ETA, bombers won't. ETA seems to be slightly effected by a ship's
speed; Given bombers and a capship with the same ETA, the bombers tend
to arrive a few seconds earlier. Also, player controlled ships land behind
their position, as they don't jump at as fast a speed as computer controlled
ships.
Missions
Missions are special objectives for you(or the enemy) to complete in
a battle, adding a bit of flavour to the game. You can have several
missions in a single battle. Though version 20 does not display battle
reports in-game, you can still see the results of the battle in victory.rep
and the other .rep files scattered in the Hellfighter directory, that are
created at the conclusion of each battle.
+type
+type denotes the type of mission that you are adding to
the battle. The mission type can be either destroy or
disengage. The meaning of "destroy" is obvious, "disengage"
means the ships effected by the mission(see +units) must
reach a jump point and jump out for the mission to be successful.
+units
+units is a list of units that are effected by the mission.
The list is a space delimited list of numbers that correspond to the
ships in the hfb, the first ship in the hfb being number 1. In addition,
this list must end with a 0, or the mission scoring will
not be handled properly.
+Mside and +Bside
The +Mside and +Bside tags are used to determine
which side is supposed to complete the mission, and
which side is supposed to stop the first side from succeeding. I like to
say that the Mside side has to Make the mission, and the Bside side has
to Block the mission.
+Mpts and +Bpts
Mpts and Bpts are the number of victory points that Mside and Bside get for completing a missions. Missions can be partially completed, in which case each side gets the percentage of their victory points equal to the percentage of targets for which the mission was a success.
For instance, in the above scenario,
*mis +type destroy +units 33 34 0 +Mside 1 +Bside 2 +Mpts 5000 +Bpts 2500 -end
Side 1 will
get 2500(5000/2) points for just destroying ship 33 or 34, or 5000 points
for destroying them both. Side 2, however, will only get 1250 points for
saving each ship, or 2500 points for saving them both.
Closing Notes
There must be a space before the plus(+) for each element in
the list, otherwise the attribute names may not be recognized and the
values will not be read. For instance, if you say "+des
67890+pos 123 456", without a space between 67890
and +pos, the parser will not see +pos and the
ship's position will be undefined.
On Jumpgates and Jumping: When a ship jumps, it is considered to have left
the battle, travelling at faster than light speed to destinations unknown.
You can't "get back" ships that have jumped out.