From be61670919a9940ee0040f5168e75c17c53bc3a4 Mon Sep 17 00:00:00 2001 From: Chenx221 Date: Sun, 28 Jul 2024 18:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E3=83=8F=E3=83=9F=E3=83=80?= =?UTF-8?q?=E3=82=B7=E3=82=AF=E3=83=AA=E3=82=A8=E3=82=A4=E3=83=86=E3=82=A3?= =?UTF-8?q?=E3=83=96=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArtemisFgTools/Program.cs | 24 ++++++++++++++---------- README.md | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ArtemisFgTools/Program.cs b/ArtemisFgTools/Program.cs index 35280c9..d349a2f 100644 --- a/ArtemisFgTools/Program.cs +++ b/ArtemisFgTools/Program.cs @@ -81,15 +81,16 @@ namespace ArtemisFgTools foreach (var pose in fgObject.Pose) { Parallel.ForEach(fgObject.Fuku, fuku => - //foreach (var in ) { bool special = false; + string special_text=""; string fuku_current = fuku; - //if the tail of fuku is |0099, spec to true & remove |0099 - if (fuku_current.EndsWith("|0099")) + int index = fuku_current.IndexOf('|'); + if (index != -1) { special = true; - fuku_current = fuku[0..^5]; + special_text = fuku_current[(index + 1)..]; + fuku_current = fuku_current[..index]; } // 0 // *sp:fuku: 02 | 0099→02fuku & 0099face @@ -97,8 +98,8 @@ namespace ArtemisFgTools foreach (var face in fgObject.Face[pose[0]]) { string layerImg = Path.Combine(pathWithSize, $"{face}.png"); - string layer2Img = special ? Path.Combine(pathWithSize, $"{pose[0]}0099.png") : ""; //眼镜 - string savePathWithAll = Path.Combine(savePathWithSizePart, $"{fgObject.Head}{siz}{pose[0]}{fuku_current}{pose[1]}0_{face}" + (special ? ($"_{pose[0]}0099.png") : (".png"))); + string layer2Img = special ? Path.Combine(pathWithSize, $"{pose[0]}{special_text}.png") : ""; //眼镜 + string savePathWithAll = Path.Combine(savePathWithSizePart, $"{fgObject.Head}{siz}{pose[0]}{fuku_current}{pose[1]}0_{face}" + (special ? ($"_{pose[0]}{special_text}.png") : (".png"))); ProcessAndSave(baseImg, layerImg, layer2Img, savePathWithAll, special); } @@ -116,18 +117,21 @@ namespace ArtemisFgTools Parallel.ForEach(fgObject.Fuku, fuku => { bool special = false; + string special_text = ""; string fuku_current = fuku; - if (fuku_current.EndsWith("|0099")) + int index = fuku_current.IndexOf('|'); + if (index != -1) { special = true; - fuku_current = fuku[0..^5]; + special_text = fuku_current[(index + 1)..]; + fuku_current = fuku_current[..index]; } string baseImg = Path.Combine(pathWithSize, $"{fgObject.Head}no{pose[0]}{fuku_current}{pose[1]}0.png"); foreach (var face in fgObject.Face[pose[0]]) { string layerImg = Path.Combine(pathWithSize, $"{face}.png"); - string layer2Img = special ? Path.Combine(pathWithSize, $"{pose[0]}0099.png") : ""; - string savePathWithAll = Path.Combine(savePathWithSizePart, $"{fgObject.Head}no{pose[0]}{fuku_current}{pose[1]}0_{face}" + (special ? ($"_{pose[0]}0099.png") : (".png"))); + string layer2Img = special ? Path.Combine(pathWithSize, $"{pose[0]}{special_text}.png") : ""; + string savePathWithAll = Path.Combine(savePathWithSizePart, $"{fgObject.Head}no{pose[0]}{fuku_current}{pose[1]}0_{face}" + (special ? ($"_{pose[0]}{special_text}.png") : (".png"))); ProcessAndSave(baseImg, layerImg, layer2Img, savePathWithAll, special); } }); diff --git a/README.md b/README.md index 90a87f9..5ab2aba 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ 立绘合成 -只测试了 **セレクトオブリージュ** +只测试了 **セレクトオブリージュ**、**ハミダシクリエイティブ** ----- -提取selectoblige.pfs中的fg文件夹(image\fg)、exlist.ipt文件(pc\ja\extra\exlist.ipt),准备好空文件夹以存放合并后的文件(这里以out为例) +提取selectoblige.pfs中的fg文件夹(image\fg)、exlist.ipt文件(pc\ja\extra\exlist.ipt)或(system\table\exlist.tbl),准备好空文件夹以存放合并后的文件(这里以out为例) ![](https://git.chenx221.cyou/chenx221/ArtemisFgTools/raw/branch/master/img/2024-07-28_172347.jpg)