Every game like PyTFall has to solve this problem: How can the game know which picture it should use to illustrate a scene? Several solutions are possible. For various reasons we decided to use tags to describe our images in a way the game can understand.
What are tags?Tags are keywords, labels that describe the contents of the picture. A picture of Sakura running through the woods, trying to escape some evil monster, could have the tags "Sakura", "run", "afraid" and "forest" and a picture showing Tenten jogging on the beach could have the tags "Tenten", "run", "beach".
How are tags added to images?Image Tagger (see
release thread) allows to edit image tags in a graphical user interface. This tool will store the tags as XMP metadata inside the images.
How does the game learn which tags are on which image?The game searches the directory tree starting at "pytfall/game/content/chars" for files named "tags.json". Those files contain a list of tags for every image and are read by the game.
How does the game decide which image should illustrate a scene?The game knows which image has which tags. To find an image, the game uses a set of tags that describe the scene. For example, Aegis dancing with a nobleman in a bar could be described with the tags "Aegis", "dance", "aristocrat", "bar". Using these tags, the game looks for an image that has all of these tags and returns it.
Various more elaborate search methods are possible and could be used if necessary.
How can I add images to an existing character?The character images are located in subdirectories of "pytfall/game/content/chars".
To add images to any of these characters:
1) copy your image files into the folder where the other images of your character are
2) find the "tags.json" file where the other images of your character are described. You can open the "tags.json" files with any text editor.
3) add entries similar to those you find in that file. Use only tags that are already there, or the game will not be able to use your new
images. Tags the game currently understands (yes, some of those are wrong; expect changes, its an early alpha):
0quest0, 0quest1, 0quest2, Aegis, Chie_Satonaka, Fuuka_Yamagishi, Hinata, Mitsuru_Kirijo, Naoto_Shirogane, Rise_Kujikawa, Sakura, Tenten, Tifa, Yukari_Takeba, Yukiko_Amagi, anal, battle, battle_sprite, bdsm, blowjob, combat, date, datebeach, death, ecchi, ent, group, haruhi, les, les0, mast, nude, profile, profileangry, profilehappy, profileneural, profileneutral, profilesad, quest, quest1, quest2, questangry, questhappy, questneutral, questnormal, questsad, rest, sex, shop, strip, tenticles
How can I add a new character?1) The characters ressources are located in subfolders of "pytfall/game/content/chars". Create a new folder there and name it after your character.
2) Copy at least one profile image into the folder you just created.
3) Create a "tags.json" file and add all the images you copied into said folder. Look at the "tags.json" files of other characters to learn how they should look.
4) Create a "data.xml" file for your new character. Look at the "data.xml" files of other characters to learn how they should look.