设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 73|回复: 0

[转载发布] CharacterFromGeneratorParts.js

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29925
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38778

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式




    CharacterFromGeneratorParts.js

    This is script I wrote on request for a completely random disposable character that you would never see again.
    This thread: https://forums.rpgmakerweb.com/index.php?threads/randomly-generate-characters-ideas-help.74399

    It's over 1,000 lines and it took me over a week, but as a script it does so little and the built-in MV character generator can already do it better, so it makes me feel insignificant about writing all this. There is a lot of description though. I'll just copy paste most of what I posted to @temmie in that thread.

    To generate a character, you must set its character image file to one of these. It can just be named these; it doesn't have to be these exact files, but these visually signify the generated characters from the regular ones.
    Spoiler: $Is_Generator_Char.png

    • /img/sv_actors/$Is_Generator_Battler.png for SV Battlers
    • /img/characters/$Is_Generator_Char.png for Characters
    • /img/faces/$Is_Generator_Face.png for Faces








    You'll need to copy the folder called Generator with the part images from your RMMV folder to your game /img/ folder too.

    The first and foremost parameter to use is <gender:value> value can be male, female, or kid, or also 0 for male, 1 for female, and 2 for kid. Gender is basically also the body. You can add hue, sat and lum to that tag to change the skin color.

    <part:random hue:random sat:random lum:random> random for a value will set any parameter to random based on its attribute. It will be random every time. It may be better to use var() and set a Game Variable to random that way instead.

    For example Game Variables #5 - #8 to use its value <part:var(5) hue:var(6) sat:var(7) lum:var(8)>

    To add a part to one of these $generator image characters, just list any of these tags in the event comment (flow control Page1) or the Actor Note in the database. It goes <part:number  hue:number sat:number lum:number gender:value> Hue, sat, and lum are Hue Saturation and Lightness (Luminance). Gender the attribute of a parameter will uses a trans part from another folder, example a female character with <beard:5 gender:male> can have a beard from the male parts. Those are optional. To use a parameter, all you really need is part name and number. The number is the little p01 - p02 on the generator image.
    Spoiler: List of all generator part parameters and the range of their p numbers
    This is a list of all the default generator parts images unless you've been adding images to it.
                    PHP:       
    1. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    2. |------------------- Folder /TV -------------------|
    3. | Charset Male  "Front Hair"      <fronthair:1-17> |
    4. | Charset Male  "Rear Hair"        <rearhair:1-18> |
    5. | Charset Male  "Beard"               <beard:1-11> |
    6. | Charset Male  "Facial Mark"    <facialmark:1-8>  |
    7. | Charset Male  "Beast Ears"      <beastears:1-6>  |
    8. | Charset Male  "Tail"                 <tail:1-6>  |
    9. | Charset Male  "Wing"                 <wing:1-5>  |
    10. | Charset Male  "Clothing"         <clothing:1-23> |
    11. | Charset Male  "Cloak"               <cloak:1-4>  |
    12. | Charset Male  "Accessory 1"    <accessory1:1-8>  |
    13. | Charset Male  "Accessory 2"    <accessory2:1-8>  |
    14. | Charset Male  "Glasses"           <glasses:1-5>  |
    15. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    16. | Charset Female  "Front Hair"    <fronthair:1-15> |
    17. | Charset Female  "Rear Hair"      <rearhair:1-20> |
    18. | Charset Female  "Facial Mark"  <facialmark:1-7>  |
    19. | Charset Female  "Beast Ears"    <beastears:1-6>  |
    20. | Charset Female  "Tail"               <tail:1-6>  |
    21. | Charset Female  "Wing"               <wing:1-5>  |
    22. | Charset Female  "Clothing"       <clothing:1-26> |
    23. | Charset Female  "Cloak"             <cloak:1-4>  |
    24. | Charset Female  "Accessory 1"  <accessory1:1-7>  |
    25. | Charset Female  "Accessory 2"  <accessory2:1-10> |
    26. | Charset Female  "Glasses"         <glasses:1-6>  |
    27. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    28. | Charset Kid  "Front Hair"       <fronthair:0-22> |
    29. | Charset Kid  "Rear Hair"         <rearhair:0-22> |
    30. | Charset Kid  "Ears"                  <ears:2-2>  |
    31. | Charset Kid  "Facial Mark"     <facialmark:3-4>  |
    32. | Charset Kid  "Clothing"          <clothing:0-22> |
    33. | Charset Kid  "Accessory 1"     <accessory1:1-6>  |
    34. | Charset Kid  "Accessory 2"     <accessory2:1-4>  |
    35. | Charset Kid  "Glasses"            <glasses:1-1>  |
    36. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    37. |------------------ Folder /TVD -------------------|
    38. | Fallen Male  "Front Hair"       <fronthair:1-17> |
    39. | Fallen Male  "Rear Hair"         <rearhair:1-18> |
    40. | Fallen Male  "Beard"                <beard:1-11> |
    41. | Fallen Male  "Facial Mark"     <facialmark:1-8>  |
    42. | Fallen Male  "Beast Ears"       <beastears:1-6>  |
    43. | Fallen Male  "Tail"                  <tail:1-6>  |
    44. | Fallen Male  "Wing"                  <wing:1-5>  |
    45. | Fallen Male  "Clothing"          <clothing:1-23> |
    46. | Fallen Male  "Cloak"                <cloak:1-1>  |
    47. | Fallen Male  "Accessory 1"     <accessory1:1-8>  |
    48. | Fallen Male  "Accessory 2"     <accessory2:1-8>  |
    49. | Fallen Male  "Glasses"            <glasses:1-5>  |
    50. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    51. | Fallen Female  "Front Hair"     <fronthair:1-15> |
    52. | Fallen Female  "Rear Hair"       <rearhair:1-20> |
    53. | Fallen Female  "Facial Mark"   <facialmark:1-7>  |
    54. | Fallen Female  "Beast Ears"     <beastears:1-6>  |
    55. | Fallen Female  "Tail"                <tail:1-6>  |
    56. | Fallen Female  "Wing"                <wing:1-5>  |
    57. | Fallen Female  "Clothing"        <clothing:1-26> |
    58. | Fallen Female  "Cloak"              <cloak:1-4>  |
    59. | Fallen Female  "Accessory 1"   <accessory1:1-7>  |
    60. | Fallen Female  "Accessory 2"   <accessory2:1-10> |
    61. | Fallen Female  "Glasses"          <glasses:1-6>  |
    62. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    63. | Fallen Kid  "Front Hair"        <fronthair:0-22> |
    64. | Fallen Kid  "Rear Hair"          <rearhair:0-22> |
    65. | Fallen Kid  "Facial Mark"      <facialmark:3-4>  |
    66. | Fallen Kid  "Clothing"           <clothing:0-22> |
    67. | Fallen Kid  "Accessory 1"      <accessory1:1-6>  |
    68. | Fallen Kid  "Accessory 2"      <accessory2:1-4>  |
    69. | Fallen Kid  "Glasses"             <glasses:1-1>  |
    70. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    71. |------------------ Folder /Face ------------------|
    72. | Face Male  "Face"                    <face:1-12> |
    73. | Face Male  "Front Hair"         <fronthair:1-17> |
    74. | Face Male  "Rear Hair"           <rearhair:1-18> |
    75. | Face Male  "Beard"                  <beard:1-11> |
    76. | Face Male  "Ears"                    <ears:1-2>  |
    77. | Face Male  "Eyes"                    <eyes:1-27> |
    78. | Face Male  "Eyebrows"            <eyebrows:1-19> |
    79. | Face Male  "Nose"                    <nose:1-13> |
    80. | Face Male  "Mouth"                  <mouth:1-15> |
    81. | Face Male  "Facial Mark"       <facialmark:1-8>  |
    82. | Face Male  "Beast Ears"         <beastears:1-6>  |
    83. | Face Male  "Clothing"            <clothing:5-23> |
    84. | Face Male  "Cloak"                  <cloak:1-4>  |
    85. | Face Male  "Accessory 1"       <accessory1:1-8>  |
    86. | Face Male  "Accessory 2"       <accessory2:1-8>  |
    87. | Face Male  "Glasses"              <glasses:1-5>  |
    88. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    89. | Face Female  "Face"                  <face:1-7>  |
    90. | Face Female  "Front Hair"       <fronthair:1-15> |
    91. | Face Female  "Rear Hair"         <rearhair:1-20> |
    92. | Face Female  "Ears"                  <ears:1-2>  |
    93. | Face Female  "Eyes"                  <eyes:1-20> |
    94. | Face Female  "Eyebrows"          <eyebrows:1-10> |
    95. | Face Female  "Nose"                  <nose:1-13> |
    96. | Face Female  "Mouth"                <mouth:1-13> |
    97. | Face Female  "Facial Mark"     <facialmark:1-7>  |
    98. | Face Female  "Beast Ears"       <beastears:1-6>  |
    99. | Face Female  "Clothing"          <clothing:5-26> |
    100. | Face Female  "Cloak"                <cloak:1-4>  |
    101. | Face Female  "Accessory 1"     <accessory1:1-7>  |
    102. | Face Female  "Accessory 2"     <accessory2:1-10> |
    103. | Face Female  "Glasses"            <glasses:1-6>  |
    104. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    105. | Face Kid  "Face"                     <face:1-1>  |
    106. | Face Kid  "Front Hair"          <fronthair:0-22> |
    107. | Face Kid  "Rear Hair"            <rearhair:0-22> |
    108. | Face Kid  "Ears"                     <ears:0-2>  |
    109. | Face Kid  "Eyes"                     <eyes:0-15> |
    110. | Face Kid  "Eyebrows"             <eyebrows:0-14> |
    111. | Face Kid  "Nose"                     <nose:0-3>  |
    112. | Face Kid  "Mouth"                   <mouth:0-16> |
    113. | Face Kid  "Facial Mark"        <facialmark:1-4>  |
    114. | Face Kid  "Clothing"             <clothing:5-22> |
    115. | Face Kid  "Accessory 1"        <accessory1:1-6>  |
    116. | Face Kid  "Accessory 2"        <accessory2:1-4>  |
    117. | Face Kid  "Glasses"               <glasses:1-1>  |
    118. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    119. |------------------- Folder /SV -------------------|
    120. | Battler Male  "Front Hair"      <fronthair:1-17> |
    121. | Battler Male  "Rear Hair"        <rearhair:1-18> |
    122. | Battler Male  "Beard"               <beard:1-11> |
    123. | Battler Male  "Facial Mark"    <facialmark:1-8>  |
    124. | Battler Male  "Beast Ears"      <beastears:1-6>  |
    125. | Battler Male  "Tail"                 <tail:1-6>  |
    126. | Battler Male  "Wing"                 <wing:1-5>  |
    127. | Battler Male  "Clothing"         <clothing:1-23> |
    128. | Battler Male  "Cloak"               <cloak:1-4>  |
    129. | Battler Male  "Accessory 1"    <accessory1:1-8>  |
    130. | Battler Male  "Accessory 2"    <accessory2:1-8>  |
    131. | Battler Male  "Glasses"           <glasses:1-5>  |
    132. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    133. | Battler Female  "Front Hair"    <fronthair:1-15> |
    134. | Battler Female  "Rear Hair"      <rearhair:1-20> |
    135. | Battler Female  "Facial Mark"  <facialmark:1-7>  |
    136. | Battler Female  "Beast Ears"    <beastears:1-6>  |
    137. | Battler Female  "Tail"               <tail:1-6>  |
    138. | Battler Female  "Wing"               <wing:1-5>  |
    139. | Battler Female  "Clothing"       <clothing:1-26> |
    140. | Battler Female  "Cloak"             <cloak:1-4>  |
    141. | Battler Female  "Accessory 1"  <accessory1:1-7>  |
    142. | Battler Female  "Accessory 2"  <accessory2:1-10> |
    143. | Battler Female  "Glasses"         <glasses:1-6>  |
    144. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    145. | Battler Kid  "Front Hair"       <fronthair:3-22> |
    146. | Battler Kid  "Rear Hair"         <rearhair:0-22> |
    147. | Battler Kid  "Ears"                  <ears:2-2>  |
    148. | Battler Kid  "Facial Mark"     <facialmark:3-4>  |
    149. | Battler Kid  "Clothing"          <clothing:0-22> |
    150. | Battler Kid  "Accessory 1"     <accessory1:1-6>  |
    151. | Battler Kid  "Accessory 2"     <accessory2:1-4>  |
    152. | Battler Kid  "Glasses"            <glasses:1-1>  |
    153. | - - - - - - - - - - - - - - - - - - - - - - - - -|
    复制代码


    Those folders are the part number ranges, but these parameters in comments/notes will control all 3 character, battler, and face.

    Message faces take some extra parameters to change the face parts live. If you are using the $generator face image, to generate a face, end the message with \[face] and that mark will activate the generated face. It generates from the event notes, but you can also add the part parameters in the message after \[face] like <eyes:5><mouth:10> to change their expression. <event:id>or<actor:id> where id is the EV001 number or the Actor 1-4, if that particular person is also a generator char. It doesn't work on regular characters, but use the built in way for those faces.

    Straight up <part:number> is a little bit like a vestigial appendix, because a solid PNG already has a solid piece attached. The only good way to get generate a character is with <part:var(number)> like game variable 3, var(3)... so forth...

    script download (my wordpress) : http://jakeis.com/rpg_maker_scripts/CharacterFromGeneratorParts.js
    script download (as attachment) : https://forums.rpgmakerweb.com/inde...0/&temp_hash=2eb75416ab313a6cd4a5551695cce4fb

    demo game: https://drive.google.com/open?id=0B5Wl5t3fnFXGd2JOUHBtdnFBZDA (.zip)
    Spoiler: movie of the demo game; doesn't get into as much detail[quote][/quote]
    This demo video is a bit wonky because 90% of the characters are generated and I was running screen recording. I don't recommend that many generated characters for your game. I also recommend playing/editing the demo rather than watching this movie. When I watch it it seems to get a little convoluted, like too much information all at once.

    There is one more parameter <down> and it will make a TVD fallen character instead of a TV regular character.
    There is more in the demo game.

    This does not replace the actual character generator for efficiency, but if you come across a random character that you like, you can save all the generated bitmaps to a folder by running this function in the F8 Dev-Tools console.                                 Code:       
    1. generatorSpecs.savePreviewed();
    复制代码


    It will only save the ones that are ready. If you've seen a character or face, it will save those, because they are cached.


    本贴来自国际rpgmaker官方论坛作者:mogwai处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/characterfromgeneratorparts-js.75904/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 05:46 , Processed in 0.103081 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表