Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
3848c7c446 | |||
fd4fd95c79 | |||
9f8d44250c | |||
d5771762c4 | |||
3139302ef9 | |||
be61670919 |
@ -1,5 +1,6 @@
|
||||
using ImageMagick;
|
||||
using NLua;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using System.Text.RegularExpressions;
|
||||
namespace ArtemisFgTools
|
||||
{
|
||||
@ -18,7 +19,7 @@ namespace ArtemisFgTools
|
||||
Console.WriteLine("请输入立绘fg文件夹的所在路径(无需\"\"):");
|
||||
string? fgImagePath = Console.ReadLine();
|
||||
|
||||
Console.WriteLine("请输入exlist.ipt的文件路径:");
|
||||
Console.WriteLine("请输入exlist的文件路径:");
|
||||
string? luaFilePath = Console.ReadLine();
|
||||
|
||||
Console.WriteLine("请输入保存位置:");
|
||||
@ -81,15 +82,21 @@ namespace ArtemisFgTools
|
||||
foreach (var pose in fgObject.Pose)
|
||||
{
|
||||
Parallel.ForEach(fgObject.Fuku, fuku =>
|
||||
//foreach (var in )
|
||||
{
|
||||
//💢 skip //For ハミダシクリエイティブ
|
||||
if (fuku == "99")
|
||||
{
|
||||
return;
|
||||
}
|
||||
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];
|
||||
}
|
||||
// <head><siz><pose[0]><fuku><pose[1]>0
|
||||
// *sp:fuku: 02 | 0099→02fuku & 0099face
|
||||
@ -97,8 +104,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);
|
||||
}
|
||||
|
||||
@ -115,19 +122,27 @@ namespace ArtemisFgTools
|
||||
{
|
||||
Parallel.ForEach(fgObject.Fuku, fuku =>
|
||||
{
|
||||
//💢 skip //For ハミダシクリエイティブ
|
||||
if (fuku == "99")
|
||||
{
|
||||
return;
|
||||
}
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
14
README.md
14
README.md
@ -2,11 +2,11 @@
|
||||
|
||||
立绘合成
|
||||
|
||||
只测试了 **セレクトオブリージュ**
|
||||
只测试了 **セレクトオブリージュ**、**ハミダシクリエイティブ**
|
||||
|
||||
-----
|
||||
|
||||
提取selectoblige.pfs中的fg文件夹(image\fg)、exlist.ipt文件(pc\ja\extra\exlist.ipt),准备好空文件夹以存放合并后的文件(这里以out为例)
|
||||
提取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)
|
||||
|
||||
@ -14,6 +14,14 @@
|
||||
|
||||
![](https://git.chenx221.cyou/chenx221/ArtemisFgTools/raw/branch/master/img/2024-07-28_172635.jpg)
|
||||
|
||||
然后就是等了...
|
||||
等待完成...
|
||||
|
||||
![](https://git.chenx221.cyou/chenx221/ArtemisFgTools/raw/branch/master/img/2024-07-28_172940.jpg)
|
||||
|
||||
-----
|
||||
|
||||
セレクトオブリージュ全部合并,大小约14.4 GB
|
||||
|
||||
ハミダシクリエイティブ全部合并,大小约27.0 GB
|
||||
|
||||
(应该可以通过修改exlist内容实现合并部分内容)
|
Loading…
Reference in New Issue
Block a user