Jump to content

Photo

Installing extra UI fonts using JIP LN NVSE


  • Please log in to reply
10 replies to this topic

#1
jazzisparis

jazzisparis

    The baby-eating Bishop of Bath and Wells

  • Premium Member
  • 2,488 posts

A new feature was added in update 50.80, expanding the total number of font-types that can be used in the game's UI, adding 80 extra font-type slots to the existing 8 (as defined in Fallout.ini).

Essentially, this enables installing custom fonts easily, safely, without overwriting the default fonts and without tampering with any INI files.

Note that this should be considered an advanced feature and is mostly intended to be used by modders developing user interface mods.

Extra fonts may be installed in one of two methods:

Method 1 (recommended):
Adding a plain text file (MyModName.txt) to \data\NVSE\plugins\xfonts
The fonts are to be listed in the file and formatted as follows:
<Font Number>=<Path to FNT file>

Example:

13=textures\fonts\MyFont_Small_Bold.fnt
21=textures\fonts\MyFont_Medium_Alt.fnt
  • The font number may range from 10 to 89.
  • The file path should be relative to the data folder.
  • Multiple fonts may be listed in a single file.
  • When building the XML file, these font numbers can be used in the <font></font> property.

This file (along with the font's art files) should be included in the mod's installation package when released. The file's folder structure should be preserved (NVSE\plugins\xfonts\MyModName.txt).

Method 2:
Calling SetFontFile via a script, during runtime. Using this method is generally less recommended. In the case where a new font is installed for an already rendered text element, there will be no visual changes until the element is re-rendered (closed and re-opened).


Edited by jazzisparis, 16 December 2017 - 01:04 AM.


#2
Xilandro

Xilandro

    _Dreamer

  • Supporter
  • PipPipPipPipPip
  • 2,628 posts
Bloody amazing!
Also would be cool if we could keep track of used font slots, by making wiki page for it, where authors would be able to leave info like "SomeModName(link) using slots 13, 14." to avoid any possible conflicts.

#3
axonis

axonis

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 2,378 posts
Trying it out...

1. I downloaded a Van Buren preview which contained some nice True Type font files, including the one used for the original Fallout logo (Bitstream's Gothic 821) and one for the original Fallout interface.

2. To convert the latter to a usable format for Oblivion/Fallout 3/New Vegas, I've used the latest Oblivion Font Generator (http://www.theassimi...font-generator/) and created my Original_Fallout_Font fnt & tex files.

3. Temporarily renamed the fnt file to Glow_Monofonto_Medium.fnt and tested the font in game, it works. Renamed the file back to Original_Fallout_Font.

4. I've created a file Axonis.txt at Data\NVSE\Plugins\xfonts and the file contains the line 9=textures\fonts\Original_Fallout_Font.fnt

5. Modified inventory_menu.xml to use font 9. Tested in game but it doesn't display anything. Tried Axonis.esp.txt, still nothing.

Am I missing something ? Here are the files: https://expirebox.co...d618877a7f.html

#4
Xilandro

Xilandro

    _Dreamer

  • Supporter
  • PipPipPipPipPip
  • 2,628 posts
In response to post #52868223.


Spoiler

sFontFile_9 is vanilla font, and it doesn't work. That's why, I quote:
"The font number may range from 10 to 31."

#5
axonis

axonis

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 2,378 posts
In response to post #52868223. #52868358 is also a reply to the same post.


Spoiler

@Xilandro, thanks :) It works great!

#6
Xilandro

Xilandro

    _Dreamer

  • Supporter
  • PipPipPipPipPip
  • 2,628 posts
In response to post #52868223. #52868358, #52868513 are all replies on the same post.


Spoiler

Thank Jazz ;)

#7
axonis

axonis

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 2,378 posts
In response to post #52868223. #52868358, #52868513, #52868578 are all replies on the same post.


Spoiler

Yes, thanks jazz :-)

#8
Bottletopman

Bottletopman

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,173 posts
Wow...going to be damn useful for combining UI mods.

Also just wondering, why did it stop at 30 fonts? Technical reasons or did it just feel right?

#9
DoctaSax

DoctaSax

    Enthusiast

  • Members
  • PipPip
  • 154 posts
Would it be possible to come up with a way of detecting via script if extra fonts are installed, and if so, which slots they take?
I have several functionalities where people can select a font for a UI element or MCM options using a scale up to 8. I'd love to expand that to include custom-added fonts, but can't read the intel from a .txt file. If it were in an .ini format, we could use a combo of GetFilesInFolder and GetINISection, although we still couldn't account for the SetFontFile method.

#10
TommInfinite

TommInfinite

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,646 posts
I can see already that so many are interested in using this new feature. (Myself included)

I propose the rules of using fonts:

1) Create a page on new GECK wiki which holds all information about font slots used in specific mods.
2) Each mod author after uploading his creation on site will register their font slot for their mod. (or before 1 day of uploading but in this case it only counts if person uploaded their mod withing 1 day after making change in wiki). EDIT:Also it's crucial that fonts should be used in uploaded package (So it won't be like "I upload now and will use font slots later").
3) If author didn't register their font slot on specific page then this font slot is considered free. Rules will be on this page so in theory no one can add fonts using this method without reading the rules.
4) No more than 3 font slots per person (not mod! )? I don't know about this point but it seems fair.
5) When all font slots are taken we will have to either wait for JiP to make another miracle to increase the number of fonts or communicate with each other.

I think this will help eliminating all possible conflicts between mods authors and prevent mod incompatibilities.Or we can go back to stone age and make everything incompatible again.

Edited by TommInfinite, 22 August 2017 - 05:32 AM.





Page loaded in: 0.667 seconds