Difference between revisions of "Book Formatting"

1,897 bytes added ,  13:07, 13 January 2010
imported>JOG
(→‎<nowiki><IMG></nowiki>: More Info on Bookart)
imported>Aellis
 
(12 intermediate revisions by 6 users not shown)
Line 5: Line 5:


For the text to be recognized as HTML, it must START with a tag of some sort. The FONT tag is a good first choice, but anything in angle brackets (greater-than, less-than) will work, even “<HTML>”. If the book text starts with words, then any tags in the body of it will be displayed. This way, a plaintext document with < and > used individually won’t be confused with actual HTML.
For the text to be recognized as HTML, it must START with a tag of some sort. The FONT tag is a good first choice, but anything in angle brackets (greater-than, less-than) will work, even “<HTML>”. If the book text starts with words, then any tags in the body of it will be displayed. This way, a plaintext document with < and > used individually won’t be confused with actual HTML.
'''Warning:''' Do not use “ speech marks when coding or in writing, only " or ”, the main reason being that “ speech marks tend to disrupt coding. The book will still work, but parts of the coding will be obvious in game (such as having < marks everywhere), and the coding may not have taken effect.
Get into the practice of omitting the quotation marks from the tags you use.  <nowiki><FONT face="1"></nowiki> compiles the same as <nowiki><FONT face=1></nowiki>.  This way, if you do want to use quotation marks, you can do so without borking your book.
Example: <nowiki><FONT face=3></nowiki>Buy the book at "First Edition".<nowiki></FONT></nowiki>
Will appear in game as: Buy the book at "First Edition".


== Supported Tags ==
== Supported Tags ==
Line 17: Line 23:
This tag behaves just like a <nowiki>
This tag behaves just like a <nowiki>
<BR>
<BR>
</nowiki> tag, but skips two lines instead of one.
</nowiki> tag, but skips ahead one line and starts a new line.


===<nowiki><HR></nowiki>===
===<nowiki><HR></nowiki>===
Line 35: Line 41:
</nowiki>
</nowiki>


Differences: As with the font tag (see <nowiki><FONT></nowiki> below), the div tags do not nest as they would in HTML.  
Differences: As with the font tag (see <nowiki><FONT></nowiki> below), the div tags do not nest as they would in HTML.
 
If you do nest tags, the <nowiki><DIV></nowiki> tag is destroyed when followed by a <nowiki></FONT></nowiki> tag.
Example: <nowiki><DIV align=right></nowiki>Mytext<nowiki><FONT face=3></nowiki>is a handwritten<nowiki></FONT></nowiki>note.<nowiki></DIV></nowiki>
With normal HTML tags, the result would be:
                                                    Mytext is a handwritten note.
But in game the book will be formatted:
                                                          Mytext is a handwritten
note.


===<nowiki><FONT></nowiki>===
===<nowiki><FONT></nowiki>===
Line 49: Line 65:
</nowiki>
</nowiki>
Both attributes can be used in a single <nowiki><FONT></nowiki> tag. The “face” attribute can be either the exact font name as defined in the gamesettings, or a numeric index from 1 to 5. Colors are in the standard HTML format of a 2-byte hex triplet. (Each two characters are a hex number from 00 to FF(256). They are red, green, and blue respectively.) The default font is 1, and the default color is black (or “000000”). The end-tag <nowiki></FONT></nowiki> will revert text to the defaults. Old font names are auto-mapped to new names, but should be changed anyway.
Both attributes can be used in a single <nowiki><FONT></nowiki> tag. The “face” attribute can be either the exact font name as defined in the gamesettings, or a numeric index from 1 to 5. Colors are in the standard HTML format of a 2-byte hex triplet. (Each two characters are a hex number from 00 to FF(256). They are red, green, and blue respectively.) The default font is 1, and the default color is black (or “000000”). The end-tag <nowiki></FONT></nowiki> will revert text to the defaults. Old font names are auto-mapped to new names, but should be changed anyway.
 
[[Image:font_examples.jpg|thumb|right|Oblivion Font Examples.]]
List of Fonts supported in game:<BR>
List of Fonts supported in game:<BR>
SFontFile_1=Data\Fonts\Kingthings_Regular.fnt
SFontFile_1=Data\Fonts\Kingthings_Regular.fnt
Line 71: Line 87:
'''Differences:'''  
'''Differences:'''  


In HTML, the entire image file is always displayed, squishing or stretching it to fit the provided width and height, or using the file’s actual sizes if no width or height is stated. In Oblivion, all DDS files must have file sizes that are powers of two (32, 64, 128, 256, etc). Since you may have images of non-powers-of-2 sizes that you wish to display, the width and height are handled differently in books. You cannot stretch or squish an image in a book, you can only crop. This means that with a width and height of 64 (as in the example above) only the top-left 64x64 section of the image file will be used. The rest of the image file will be ignored. (Naming the files with the correct width and height to display them is probably good practice. Use the full resolution sizes for all resolutions of the image.
In HTML, the entire image file is always displayed, squishing or stretching it to fit the provided width and height, or using the file’s actual sizes if no width or height is stated. In Oblivion, all DDS files must have file sizes that are powers of two (32, 64, 128, 256, etc). Since you may have images of non-powers-of-2 sizes that you wish to display, the width and height are handled differently in books.  


You cannot stretch or squish an image in a book, you can only crop. This means that with a width and height of 64 (as in the example above) only the top-left 64x64 section of the image file will be used. The rest of the image file will be ignored. (Naming the files with the correct width and height to display them is probably good practice. Use the full resolution sizes for all resolutions of the image.
NB: The largest Image size possible is 444x650 pixels. Go over this and the book will crash when opened in game. However, this may be variable from person to person, some are getting it as high as 490x680 (and even 490x720 after the first page).


'''Notes:'''
'''Notes:'''
Line 81: Line 100:


*When you use a sub-folder of ''Data\Textures\Menus'' (e.g. "Data\Textures\Menus\Mymod"), you can use only one image, but when you run Oblivion in low resolution this image will be resized ingame and might not look as good as it would when you use three separate images in the Menus, "Menus50" and "Menus80" folders.
*When you use a sub-folder of ''Data\Textures\Menus'' (e.g. "Data\Textures\Menus\Mymod"), you can use only one image, but when you run Oblivion in low resolution this image will be resized ingame and might not look as good as it would when you use three separate images in the Menus, "Menus50" and "Menus80" folders.
*<IMG> tags can sometimes disrupt additional coding in a book, even other <IMG> tags. It seems some form of text, or a space after additional coding placed after an <IMG> tag helps stop the disruption.


== Other Tags ==
== Other Tags ==
Line 93: Line 114:


The same name should be use for all three files, even though the active portion of the smaller files is different. A quick way to get the size of the active portion of the image is to control-click the alpha channel in the channel list window and read off the height and width from the info window.
The same name should be use for all three files, even though the active portion of the smaller files is different. A quick way to get the size of the active portion of the image is to control-click the alpha channel in the channel list window and read off the height and width from the info window.
== See Also ==
[[Book]]
[[Scroll_Tutorial|Scroll Tutorial]]
[[How to make a book with pictures only]]
[[Fancy Fonts]]




[[Category:Items]]
[[Category:Items]]
Anonymous user