Adding Portraits to eraTW (WIP)
It's pretty simple, but before you get started:
Figure out the number assigned to your 2hu, and how many variant sets she already has in-game or as of the latest commit.
If your 2hu doesn't already have a variant in-game, this guide will not be able to help you. Quite a bit of code has to be individually written into a 2hu's .ERB file in order to support image variants, and I simply do not possess that know-how. If you're open to being immiserated, try reading through the modifications made to Wakasagihime's .ERB when her first variant was recently implemented.
Getting started
All sprites and images used by TW are contained in the resources directory (or subdirectories) located in the game's root directory. Unlike eraBlueResort, sprites (as they are presented in-game) must be square (or else they will simply be distorted). This guide will use the "Big Fairy Plus" sprites as a reference due to their quality and general completeness. As you have surely seen in-game, it is not necessary for variants to include sprites for every combination of clothing and expression, and missing variants will instead refer to the closest existing sprite in the set.
I highly recommend checking out the “Big Fairy Plus” set in the resources directory yourself to use as a reference
All sprites must have an accompanying .csv file (you can just use Notepad) in the same directory that tells TW what goes where. Once you know how many variants already exist in-game for your 2hu, increment by 1 and put this number after every 別顔 or 別立ち entry, otherwise the game will get mad at you and break every 2hu's portrait (reversibly) the next time you load your save. For example, if your 2hu has three variant sets, you will want to begin every line with 別顔4 or 別立ち4.
Syntax
別顔_裸_emotion_characterNumber,filename,xOrigin,yOrigin,xWidth,yHeight
variantFace/Stand_clothingStatus_[clothingVariant]_emotion_characterNumber,filename,xOrigin,yOrigin,xWidth,yHeight
NO SPACES BETWEEN, SEMICOLONS ARE COMMENT MARKERS
[clothingVariant] indicates that it is optional, and specifies any non-default clothing type (pajamas, bikinis, etc.)
So
別顔_裸_笑顔_13,Face_13_0_0.png,270,0,270,270
can be translated as
variantFace_naked_smile_13(Daiyousei),Face_13_0_0.png, beginning at (270, 0) as a 270x270 image.
(default sprites in the resources directory are 180x180 and .webp, but Big Fairy Plus uses 270x270 and .png)
Before your new set will appear as a selectable variant in-game, you need to add one or two commands to gamedir/ERB/TRANSLATION/IMG/Add_Image.ERB depending on whether you add only/both face/stand sprites. If adding stand sprites, it is suggested that you add at least three "Img_CustomStand:XX:0 ++" entries.
After saving the entries, the next time you open the game and load a save, click on the Update menu and you should see this
Click "Image Update", and you should see your new set listed among the other variants.
Glossary
JP | ENG |
---|---|
別顔 | variantFace |
別立ち | variantStand |
裸 | nude |
妊娠裸 | nude, pregnant |
服 | clothed (everyday outfit) |
妊娠服 | clothed, pregnant |
服_パジャマ | clothed, pajamas (example of clothingVariant) |
服_下着 | clothed, full underwear (top and bottom) |
服_ブラ | clothed, bra only |
服_パンイチ | clothed, panties only |
服_バニー | clothed, bunny outfit |
服_セーラー | clothed, sailor uniform |
服_地獄Tシャツ | clothed, cool T-shirt |
服_半脱ぎ | clothed, half-naked |
服_半脱ぎノーパン | clothed, half-naked, nopan |
通常 | neutral |
笑顔 | smile |
怒り | angry |
反発 | repulsion (oft. omitted) |
赤面 | blush (oft. omitted) |
LOVE | love (oft. omitted) |
発情 | in heat (lit. oestrus) |
愛撫 | excited |
性行 | sex |
絶頂 | orgasm |
睡眠 | sleeping |
オナニー | masturbation (appears if mast. images are enabled) |