XCOM 2
Not enough ratings
Photobooth Font Mod Template
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
99.571 KB
11 Oct, 2021 @ 3:34am
1 Change Note ( view )

Subscribe to download
Photobooth Font Mod Template

In 1 collection by Eric Kotato
Font mods by Eric Kotato
7 items
Description
This mod is not intended to be used in game as-is. Instead, it provides a base for other photobooth font mods.

How to use
1. Open your Steam folder or Steam library folder, then navigate to steamapps\workshop\content\268500\2625345994 and copy this folder somewhere. Note that XCOM 2 and workshop content are installed to same library folder.
2. Open Content\gfxfontlib.gfx in JPEXS Free Flash Decompiler[github.com].
3. Switch to "Resources" view if not already.
4. Right-click "others" folder, then select "fonts" > "DefinedFont3Tag".
5. Expand "fonts" folder and select your new font (should be marked bold and called "New font").
6. Click "Embed..." button in far right column.
7. Select your font, either installed or from TTF file. You can also use OTF, if you'll set "Files of type" to "All Files" in "Open" window.
8. Enable either "All characters" or character groups you want. You can also specify individual characters instead or as an additon. It's better to embed at least Basic Latin, but the more characters you embed the more languages will be supported. But of course, more characters means more memory usage.
9. Enable "Set ascent, descent and leading" option and press "OK".
10. Right-click your font in "fonts" folder, and select "Raw edit".
11. Press "Edit" button under properties list.
12. Set the font name in fontName : String parameter. Please note that it must be unique if you don't want conflicts with other photobooth fonts.
13. You can also set enable fontFlagsBold : boolean for bold fonts and fontFlagsItalic : boolean for italic fonts, but it's not necessary, and mainly used to differentiate fonts with same name and different styles. Other flags were not tested, but doesn't seem necessary. fontFlagsShiftJIS : boolean may be needed for Japanese language, but I'm not sure about it.
14. Press the "Save" button under properties list.
15. Save the file.
16. Open XCOM 2 WOTC Editor (you need to have XCOM 2 WOTC Development Tools installed, but full_content beta is not required).
17. Open Content Browser and import your .gfx file. Choose any package name (e.g. MyPackageName) and fontlib name (e.g. myGfxName) you like (basic latin alphanumeric characters, no spaces). You can also set group name but that's not necessary. Other options should be left as is.
18. Press "OK" to import and save the package (right click package name or your imported SwfMovie > Save) to "Content" folder.
19. Change font library name in Localization\GFxUI.int (or/and GFxUI file for your language if necessary):

[FontLib] +FontLib=MyPackageName.myGfxName

If you're also set the group name (for example, MyGroupName), it should be written like this:

[FontLib] +FontLib=MyPackageName.MyGroupName.myGfxName

Note that "+" character before FontLib is crucial, since otherwise all other fonts may stop working.

20. Save GFxUI files.
21. Open Config\XComContent.ini file and change all parameters in m_arrFontOptions parameter to ones your need. Note that "+" before m_arrFontOptions is crucial too, otherwise all photobooth fonts could be disabled.

Short reference:
- FontDisplayName: font name as it shown in-game. It's a localized parameter, but it can be set here, and it's actually better to be set here, since it allows to disable fonts just by adding ";" in front of the line (or lines if it spans multiple lines) without the need to do this in localization files. Also the need to localize font name is rare, so it's usually doesn't needed. But when only one font is used, you can safely use localization file XComGame like this:

[X2Photobooth] +m_arrFontOptions=(FontDisplayName="My Font")

In this case you can omit this parameter in XComContent.ini file.

- FontName: font name and style from your .gfx file, separated by colon. Font name must be same as set in step 12 (fontName : String parameter in your .gfx file). Font style must be "Normal" unless you've set fontFlagsBold : boolean or fontFlagsItalic : boolean parameters, otherwise it should be either Bold or Italic or Bold Italic (if you've enabled both).
- AllowedInAsianLanguages: required to set to true if you using this font for following languages: Chinese (both Simplified and Traditional), Japanese, Korean.
- AllowedInCyrillic: required to set to true if you using this font for Russian and Polish languages.
- AllowedForCaptured: set to true if you want to use this font for "Captured" posters.

22. Save your .ini file (and your localization files if necessary).
23. Change mod package name in .XComMod file name and in Config\XComEditor.ini to avoid conflicts with other mods.
24. Edit your .XComMod file in text editor with the name and description you like, and set publishedFileId to 0.
25. Replace ReadMe.txt with any info you want.
26. Replace ModPreview.jpg with any preview you want.

And that's it, your mod is done! Now you can test it, use it and publish it where you like.