facegen 生成面部

收藏人数:166
点赞次数:765
下载次数:1355
资源大小:3.58 MB

资源介绍


详细介绍

简单简介

在3DM Mod站下载骑马与砍杀最新的facegen 生成面部 Mod,由wrwlf制作。fengyuanbo88在我们的平台上分享了这个免费且高质量的游戏模组,让玩家们可以享受到更加丰富的游戏体验。快来3DM Mod站下载并尝试吧!

详细介绍

Mod作者: wrwlf Mod版本: 0.1 Mod大小: 3.58 MB 更新时间: 2019-01-20 13:29:13 发布时间: 2019-01-20 13:29:13

详细说明

facegen 生成面部



FACEGEN ------------------------------------------------- --------------------

面向M&B Warband的Facecode生成器

概述----------------------- ----------------------------------------------

这个程序允许的用户生成与Warband兼容的面部代码,以帮助创建NPC面,在给定约束内的派系特定面,随机主面等。我主要开发此工具以保持nemchenk的“Ethnic Troops”mini-mod []在添加/更改时保持不变在mod的面部纹理。

特征 - - - - - - - - - - - - - - - - - - - - - - - - - --------------------

- 生成单个面部代码,单个随机面部代码,具有派系前缀的多个面部代码(即.swadian_face_younger_0)和多个随机面部代码
- GUI界面(很好我通常是* nix命令行人^^)
- 格式化输出到文本文件,以便于复制粘贴或解析以进一步自动化

下载---------------- -------------------------------------------------- ---

在这里下载 - > 

安装------------------------------------------ -----------------------

1)下载.zip文件,在某处解压缩(无所谓)
2) .zip内容:

/ TCL
/ TK
_bz2.pyd
_ctypes.pyd
_hashlib.pyd
_tkinter.pyd
facegen.exe - >主要可执行
python34.dll
tcl86t.dll
tk86t.dll
unicodedata.pyd

其他文件是必需的,因为这个.exe是使用cx_Freeze从python脚本构建的。大多数Warband modder可能安装了python 2.7x,而这个脚本需要python 3.4x,因此.exe可能是最简单的分发方法。python脚本源可以在github上找到(参见本文的底部)。

值/范围解释---------------------------------------------- -------

要使用facegen,您需要知道模块中有哪些资产(面/头发/胡须/等)。这些说明可以作为快速查找这些值以及如何在facegen中使用它们的指南(注意:您必须拥有该模块的模块系统!我不会回答有关如何在.txt文件中找到它的任何问题,但是应该可以这样做)

除了“自定义代码列表”之外,
所有字段都是必需的(这将在未来的版本中修复,现在没有时间)这意味着您应该始终在每个字段中放置一些内容,即使可能不使用该值,具体取决于选择的模式。

名称
副本ID

这些只是标识符,这些字段的使用方式取决于所选的模式:
单个代码:输出显示为 - > name = 0x [facecode]
单码随机:输出显示为 - > name = 0x [facecode]
多码:输出显示为 - > name + default_string + replica_id = 0x [facecode]
多码随机:输出显示为 - > code_list_string = 0x [facecode]

面部变形码

这只是一个你在游戏中获得的面部代码(在编辑模式下开始游戏,转到角色面部,按Ctrl + E,单击顶部的面部代码,然后复制并过去进入此字段)。
该面部代码仅用于面部设置数据,即。眼睛宽度,镜腿宽度等。这个发生器不会随机化这些值,太多的怪物。
这里的意图是你可以使用游戏编辑器雕刻基础面,然后使用该facemorph数据作为基础,使用不同的皮肤/头发/胡须/等生成不同的变化。这必须是十六进制值(0xnnnnnnnn ...)

发色

我在游戏中做了一些测试,看起来这个值总是在0x00到0x3f之间,所以将上限/下限设置在这个范围内的某个位置。我建议使用十六进制值。

面部代码

1)转到您的模块Module System文件夹并打开module_skins.py,找到应该类似于此的面部纹理部分:2)

[# man face textures
("cep_mface_a_00",0xffad7d63, ["cep_hair_blonde"], [0xff171313, 0xff007080c]), 
("cep_mface_a_00_scar", 0xffad7d63, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_01",0xff8e5d3c, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_01_scar", 0xff8e5d3c, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_03",0xffd68a5a, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_04",0xffde9263, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_05",0xffb96342, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_b_00",0xff834633, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_01",0xff7e5e52, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_02",0xff7b4531, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_03",0xff914e3c, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_04",0xff8c5136, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_m_00",0xff9c725a, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_00_scar", 0xff9c725a, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_01",0xffa56d52, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_02",0xffa26957, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_03",0xffad7f67, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
#...etc

这些值中的每一个都是游戏中的面孔。它们的范围从0 - > n,其中n是您定义的许多面部纹理。

胡子码

1)转到您的模块Module System文件夹并打开module_skins.py,找到应该类似于此的胡须网格部分:2)

[# beard meshes
"cep_beard_a",
"cep_beard_b",
"cep_beard_c",
"cep_beard_d",
"cep_beard_e",
"cep_beard_f",
"cep_beard_g",
"cep_beard_h",
"cep_beard_i",
"cep_beard_j",
"cep_beard_k",
"cep_beard_l",
"cep_beard_m",
"cep_beard_n",
"cep_beard_o",
"cep_beard_p",
"cep_beard_q",
"cep_beard_r",
"cep_beard_s",
"cep_beard_t",
"cep_beard_u",
"cep_beard_v",
"cep_beard_w"
],

这些值中的每一个都是游戏中的胡须。它们的范围从0 - > n,其中n是您定义的许多胡子网格。

发码

1)转到您的模块Module System文件夹并打开module_skins.py,找到看起来应该类似于此的头发网格部分:2)这些值中的每一个都是“头发类型”。在我的例子中使用头发,bald = 0(总是0!),cep_man_hair_q = 1,cep_man_hair_b = 2,...,cep_man_hair_w = 23.这意味着在我的模块中,我有一系列从0开始的头发类型 - > 23.此时,如果你想要限制特定派系的头发,重新排列头发可能是有意义的,这样你就可以在module_skins.py文件中获得相似范围的相似头发。
man_face_keys,
[# man hair meshes
"cep_man_hair_q",
"cep_man_hair_b",
"cep_man_hair_c",
"cep_man_hair_r",
"cep_man_hair_s",
"cep_man_hair_u",
"cep_man_hair_a",
"cep_man_hair_v",
"cep_man_hair_j",
"cep_man_hair_e",
"cep_man_hair_g",
"cep_man_hair_i",
"cep_man_hair_f",
"cep_man_hair_p",
"cep_man_hair_h", 
"cep_man_hair_m",
"cep_man_hair_d", 
"cep_man_hair_t", 
"cep_man_hair_l", 
"cep_man_hair_k",
"cep_man_hair_n", 
"cep_man_hair_o", 
"cep_man_hair_w" 
],



年龄代码

我在游戏中做了一些测试,看起来这个值总是在0x00到0xfc之间,所以将上限/下限设置在这个范围内的某个位置。我建议使用十六进制值。

自定义代码列表

这纯粹影响输出,这允许您设置在使用多代码随机选项时将作为“名称”输出的内容。自定义代码列表应采用以下格式:customcode1,customcode2,customcode3,...,customcoden

模式解释------------------------------------------------ --------------

单个代码

这将获取每个下限值并计算单个面部代码(主要用于调试目的,但我认为可能有用)

单个代码随机

生成一个面部代码上限/下限之间的随机值。

多码

这会使用上限/下限生成“默认”游戏面部代码(_younger,_young,_middle,_old,_older)。此模式的算法与其他随机化的不同之处在于,它将始终为每个连续的面部代码选择更大的值,因此,面部代码将始终具有以下关系:_younger> = _young> = _middle> = _old> = _older,关于头发颜色,胡须,头发和年龄。面部代码不是随机的。

multi code random

这将生成使用“自定义代码列表”字段命名的面部代码。该算法将每个值(包括面部代码)随机化为上/下限内的值。

用法------------------------------------------------- -----------------------

1)点击facegen.exe,应该出现两个窗口(你可以忽略命令行窗口,如果有任何错误就打印)


2)通过填写左侧的字段来定义新的面部代码,选择底部的模式并按“添加”按钮。


3)现在,右侧的生成列表中显示了面部代码,您可以单击面部代码(突出显示为蓝色),然后按“查看”按钮查看它包含的值。(注意:'查看'有点时髦,显示十六进制值的十进制值,不要惊慌^^)


4)使用生成列表中选择的面部代码,您也可以按“删除”按钮将其删除。
5)您可以在生成列表中添加许多您想要的面部代码,只需记住填写左侧的表单并按“添加”将其移动到生成列表。
6)当您准备生成一些面部代码时,按“生成”按钮,这将处理生成列表中的每个面部代码生成定义,并将facegen_out.txt文件输出到同一目录中。此文件包含您的面部代码,可以在module_troops.py中使用。

下面是一个示例,其中包含每种模式的一个facecode定义和结果输出(请注意多代码示例中的副本ID如何应用于输出):


Source ---------------- -------------------------------------------------- ------

来源可在BSD下获得许可。

如有任何问题/意见/批评,请在此主题告诉我!
为了我自己的目的,我最初将其编码为一种快速而简单的方法,但我认为我可以使用它来熟悉python GUI和tk。有很多东西我想改变/修复,但我想我现在会释放facegen。它是功能性的,我想回到modding:D





FACEGEN ---------------------------------------------------------------------

A Facecode Generator for M&B Warband

Overview ---------------------------------------------------------------------

This program allows the user to generate Warband-compatible facecodes to aid in creating NPC faces, faction-specific faces within given constraints, random Lord faces, etc. I primarily developed this tool to keep nemchenk's "Ethnic Troops" mini-mod [] intact when adding/changing face textures in a mod. 

Features ---------------------------------------------------------------------

- generate single facecodes, single random facecode, multiple facecodes with faction prefixing(ie. swadian_face_younger_0), and multiple random facecodes 
- GUI interface (be nice I'm usually a *nix commandline guy ^^)
- formatted output to textfile for easy copy-pasting or parsing for further automation

Download ---------------------------------------------------------------------

Download here -> 

Installation -----------------------------------------------------------------

1) Download the .zip file, unzip somewhere (doesn't matter where)
2) .zip contents:

/tcl
/tk
_bz2.pyd
_ctypes.pyd
_hashlib.pyd
_tkinter.pyd
facegen.exe -> main executeable
python34.dll
tcl86t.dll
tk86t.dll
unicodedata.pyd

The other files are necessary because this .exe is built from a python script using cx_Freeze. Most Warband modders probably have python 2.7x installed, whereas this script requires python 3.4x, therefore a .exe is probably the easiest distribution method. The python script source is available on github (see bottom of this post). 

Values/Ranges Explained -----------------------------------------------------

To use facegen, you need to know what assets (faces/hairs/beards/etc) are available in your module. These instructions serve as a guide of where to quickly find these values and how to use them in facegen (Note: You must have the module system for the module! I will not answer any questions about how to find this in the .txt files but it should be possible to do as well)

ALL FIELDS ARE ALWAYS REQUIRED EXCEPT FOR 'CUSTOM CODE LIST' (this will be fixed in future versions, just no time right now)
This means that you should always put something into each field, even if the value may not be used depending on the selected mode.

Name
Replica ID

These are simply identifiers, these fields are used differently depending on the mode selected:
single code: the output appears as -> name = 0x[facecode]
single code random: the output appears as -> name = 0x[facecode]
multi code: the output appears as -> name+default_string+replica_id = 0x[facecode]
multi code random: the output appears as -> code_list_string = 0x[facecode]

Face Morphcode

This is simply a facecode which you get from within the game (start game in Edit Mode, go to change character face, Ctrl+E, click the facecode at the top and copy and past into this field).
This facecode is used ONLY for the face setting data, ie. eye width, temple width etc. This generator does not randomize those values, too many monsters. 
The intent here is that you can sculpt the base face using the ingame editor, and then use that facemorph data as a base to generate different variations using different skins/hairs/beards/etc with this generator. This must be a hex value (0xnnnnnnnn...)

Hair Color

I've done some testing in my game, and it seems this value will always range from 0x00 to 0x3f, so set the Upper/Lower limits to somewhere within this range. I recommend using the hex values.

Face Code

1)Go to your modules Module System folder and open module_skins.py, find the face textures section which should look similar to this:

[# man face textures
("cep_mface_a_00",0xffad7d63, ["cep_hair_blonde"], [0xff171313, 0xff007080c]), 
("cep_mface_a_00_scar", 0xffad7d63, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_01",0xff8e5d3c, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_01_scar", 0xff8e5d3c, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_03",0xffd68a5a, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_04",0xffde9263, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_a_05",0xffb96342, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_b_00",0xff834633, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_01",0xff7e5e52, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_02",0xff7b4531, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_03",0xff914e3c, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_b_04",0xff8c5136, ["cep_hair_blonde"], [0xff120808, 0xff007080c]),
("cep_mface_m_00",0xff9c725a, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_00_scar", 0xff9c725a, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_01",0xffa56d52, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_02",0xffa26957, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
("cep_mface_m_03",0xffad7f67, ["cep_hair_blonde"], [0xff171313, 0xff007080c]),
#...etc

2)Each of these values is a face in-game. They range from 0 -> n, where n is however many face textures you have defined.

Beard Code

1)Go to your modules Module System folder and open module_skins.py, find the beard mesh section which should look similar to this:

[# beard meshes
"cep_beard_a",
"cep_beard_b",
"cep_beard_c",
"cep_beard_d",
"cep_beard_e",
"cep_beard_f",
"cep_beard_g",
"cep_beard_h",
"cep_beard_i",
"cep_beard_j",
"cep_beard_k",
"cep_beard_l",
"cep_beard_m",
"cep_beard_n",
"cep_beard_o",
"cep_beard_p",
"cep_beard_q",
"cep_beard_r",
"cep_beard_s",
"cep_beard_t",
"cep_beard_u",
"cep_beard_v",
"cep_beard_w"
],

2)Each of these values is a beard in-game. They range from 0 -> n, where n is however many beard meshes you have defined.

Hair Code

1)Go to your modules Module System folder and open module_skins.py, find the hair mesh section which should look similar to this:
man_face_keys,
[# man hair meshes
"cep_man_hair_q",
"cep_man_hair_b",
"cep_man_hair_c",
"cep_man_hair_r",
"cep_man_hair_s",
"cep_man_hair_u",
"cep_man_hair_a",
"cep_man_hair_v",
"cep_man_hair_j",
"cep_man_hair_e",
"cep_man_hair_g",
"cep_man_hair_i",
"cep_man_hair_f",
"cep_man_hair_p",
"cep_man_hair_h", 
"cep_man_hair_m",
"cep_man_hair_d", 
"cep_man_hair_t", 
"cep_man_hair_l", 
"cep_man_hair_k",
"cep_man_hair_n", 
"cep_man_hair_o", 
"cep_man_hair_w" 
],

2) Each of these values is a "hair type". Using the hairs in my example, bald = 0 (always 0!), cep_man_hair_q = 1, cep_man_hair_b = 2, ..., cep_man_hair_w = 23. This means that in my module, I have a range of hair types from 0 -> 23. At this point, if you want to restrain hairs to specific factions, it may make sense to rearrange the hairs so that you get adjacent ranges of similar hairs in your module_skins.py file.

Age Code

I've done some testing in my game, and it seems this value will always range from 0x00 to 0xfc, so set the Upper/Lower limits to somewhere within this range. I recommend using the hex values.

Custom Code List

This purely affects the output, this allows you to set what will be outputted as "names" when using the multi code random option. Custom Code List should be in the following format: customcode1,customcode2,customcode3,...,customcoden

Modes Explained --------------------------------------------------------------

single code

This takes each of the Lower Limit values and computes a single facecode (mostly used for debug purposes, but could be useful I suppose)

single code random

This generates a facecode with randomized values between the Upper/Lower Limits.

multi code

This generates the 'default' game facecodes (_younger, _young, _middle, _old, _older) using the Upper/Lower Limits. The algorithm for this mode is different from the other randomizations in that it will always pick larger values for each successive facecode, therefore, the facecodes will always have this relationship: _younger >= _young >= _middle >= _old >= _older, in regards to Hair Color, Beard, Hair, and Age. The Face Code is not randomized.

multi code random

This generates facecodes which are named using the Custom Code List field. This algorithm randomizes every value, including the Face Code, to values within the Upper/Lower Limits.

Usage ------------------------------------------------------------------------

1)Click facegen.exe, two windows should come up (you can ignore the commandline window, just prints if there are any errors)


2)Define a new facecode by filling out the field on the left, select a mode at the bottom and press the 'Add' button.


3)The facecode now shows up in the Generation List on the right, you can click the facecode (highlighted blue) and press the 'View' button to see what values it holds. (Note: 'View' is a bit funky, displays decimal values for the hex values, don't be alarmed ^^)


4)With the facecode selected in the Generation List, you can also press the 'Remove' button to remove it.
5)You can add however many facecodes you want to the Generation List, just remember to fill out the form on the left and press 'Add' to move it to the Generation List.
6)When you are ready to generate some facecodes, press the 'Generate' button, this will process each of the facecodes generation definitions in the Generation List and output a facegen_out.txt file into the same directory. This file contains your facecodes, ready to be used in module_troops.py. 

Here is an example with one facecode definition of each mode and the resulting output (notice how the Replica IDs in the multi code examples are applied to the output):


Source ------------------------------------------------------------------------

Source is available at licensed under BSD.

Please let me know here in this thread of any issues/comments/critique!
I coded this up originally as a quick&firty way for my own purposes, but figured I could use this to become a bit more familiar with python GUIs and tk. There are a ton of things which I want to change/fix, but I figured I would release facegen as-is for now. It is functional and I want to get back to modding :D

文件说明

Mod截图

相关作品

上古卷轴5 奥特之母衣服MOD | 上古卷轴5:天际 吸血鬼奴隶洞穴v2.0 汉化版 | 三国志13 Angelababy头像MOD | 魔兽争霸3 1.24E圣斗士圣域冥王篇 v1.6 | 上古卷轴5 龙背上的骑兵3吉萝独立随从mod | 6STR Imponte Ruiner 450 Custom |

fengyuanbo88的其他作品

  • 上古卷轴5 奥特之母衣服MOD
  • 上古卷轴5:天际 吸血鬼奴隶洞穴v2.0 汉化版
  • 三国志13 Angelababy头像MOD
  • 魔兽争霸3 1.24E圣斗士圣域冥王篇 v1.6
  • 上古卷轴5 龙背上的骑兵3吉萝独立随从mod
  • 6STR Imponte Ruiner 450 Custom