-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbio.html
More file actions
108 lines (84 loc) · 5.41 KB
/
bio.html
File metadata and controls
108 lines (84 loc) · 5.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<html>
<head>
<title>.BIO File Format</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div style="width: 1200px; margin: auto;">
<h1>BIO File Format</h1>
<p>BIO files are plain text biographies shown on the premade character selection screen. They live in the <tt>premade</tt> directory and are paired with <a href="gcd.html">GCD files</a> that use the same base name.</p>
<p>In an unmodified Fallout 2 installation the three selectable premade characters are loaded from these base paths:</p>
<table>
<tr><th>Character role</th><th>BIO file</th><th>GCD file</th><th>Face FID</th></tr>
<tr><td>Combat</td><td><tt>premade\combat.bio</tt></td><td><tt>premade\combat.gcd</tt></td><td><tt>201</tt></td></tr>
<tr><td>Stealth</td><td><tt>premade\stealth.bio</tt></td><td><tt>premade\stealth.gcd</tt></td><td><tt>202</tt></td></tr>
<tr><td>Diplomat</td><td><tt>premade\diplomat.bio</tt></td><td><tt>premade\diplomat.gcd</tt></td><td><tt>203</tt></td></tr>
</table>
<p>The BIO file contains only the displayed story text. The character's statistics and traits come from the matching GCD file, and the face art is selected by the character selector's premade-character table or by a modded configuration.</p>
<h2>Display behavior</h2>
<p>The game opens the selected <tt>.bio</tt> file in text mode and reads it line by line into a 256 byte buffer. Each line is drawn at the biography panel position using font <tt>101</tt> and color table entry <tt>992</tt>.</p>
<table>
<tr><th>Property</th><th>Value</th></tr>
<tr><td>Starting position</td><td><tt>x = 438</tt>, <tt>y = 40</tt></td></tr>
<tr><td>Drawing width</td><td><tt>202</tt> pixels (<tt>640 - 438</tt>)</td></tr>
<tr><td>Vertical limit</td><td>Lines are drawn while <tt>y < 260</tt></td></tr>
<tr><td>Line buffer</td><td><tt>256</tt> bytes per line, including terminator</td></tr>
<tr><td>Missing file</td><td>No biography text is drawn; the selector still opens normally</td></tr>
</table>
<p>There is no word wrapping and no scrolling. A long line is not reflowed onto the next line, so authors need to insert line breaks manually. The old Team-X recommendation of keeping lines to about 26 characters is a useful practical rule, but the real limit is the pixel width of the rendered text. Narrow letters can fit more characters than wide letters.</p>
<p>The number of visible lines depends on font <tt>101</tt>'s line height. The original guidance to keep the biography to roughly 22 content lines is still sensible because the renderer stops once the next line would start at or below <tt>y = 260</tt>.</p>
<h2>Formatting recommendations</h2>
<ul>
<li>Use plain text and manually wrap every line.</li>
<li>Keep the heading short and uppercase, for example <tt>NARG'S STORY:</tt>.</li>
<li>Leave a blank line after the heading, matching the vanilla BIO files.</li>
<li>Avoid curly quotes and other Unicode punctuation unless the target game build and font encoding are known to support them.</li>
<li>Test the BIO in game or in a renderer that uses the same font metrics; character count alone is only an approximation.</li>
</ul>
<h2>Localization</h2>
<p>When the active language is not English, Fallout 2 CE checks for a localized premade path before falling back to the base file. For example, when the selector asks for <tt>premade\combat.bio</tt>, the localized lookup can use <tt>premade\<language>\combat.bio</tt> if that file exists. The same lookup is used for the matching GCD file.</p>
<h2>Custom premade characters</h2>
<p>Fallout 2 CE includes sfall-compatible support for custom premade characters. Mods can provide a comma-separated list of premade base names and a matching list of face FIDs. The selector then builds <tt>premade\<name>.bio</tt> and <tt>premade\<name>.gcd</tt> from each base name.</p>
<p>In this implementation, custom base names longer than 11 characters are rejected before the <tt>premade\</tt> prefix is added. Keeping short DOS-style names is therefore the safest choice for custom premade sets.</p>
<h2>Example</h2>
<p>Taken from Narg's BIO file, <tt>combat.bio</tt>, exactly as it is shown in Fallout 2:</p>
<pre>
NARG'S STORY:
Narg's exceptional
physique has made him
one of the best hunters
in the tribe. Narg's
first, and usually only,
impulse is to crush
anything that he can't
figure out. Narg has
become quite adept at
crushing, and slicing,
and dicing. Narg would
like to prove his
worthiness to lead the
tribe and he'll let
nothing stand in his
way.
</pre>
<h2>Parser notes</h2>
<ul>
<li>BIO is not a structured binary format; any text editor can open it.</li>
<li>Blank lines are real lines and consume vertical space.</li>
<li>Text mode reading means line endings are handled by the platform file layer.</li>
<li>The file extension is added by the selector; the premade base path is stored without <tt>.bio</tt> or <tt>.gcd</tt>.</li>
</ul>
<h2>Source References</h2>
<ul>
<li><a href="https://github.com/alexbatalov/fallout2-ce/blob/main/src/character_selector.cc">Fallout 2 CE - character_selector.cc</a></li>
</ul>
<hr/>
<h2>History</h2>
<p>
2019-12-14 - Ported from <a href="https://falloutmods.fandom.com/wiki/BIO_File_Format">https://falloutmods.fandom.com/wiki/BIO_File_Format</a> by <a href="https://github.com/ghost2238">ghost</a><br/>
2007 - <a href="https://www.nma-fallout.com/threads/teamx-documents-russian-to-english-translation.179561/">Translated by Kanhef</a><br/>
? - Written by Team-X (bio_format.shtml)
</p>
</div>
</body>
</html>