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

[制作教程] In Game Character Generator (Yanfly Common Event)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 207 天

    连续签到: 1 天

    [LV.7]常住居民III

    3646

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 14:14 | 显示全部楼层 |阅读模式
    Ahlan All,


            I've been lurking on these boards for a while (1000+ XP hours), but now that I'm delving into MV I thought I'd try to contribute. Thus a brief tutorial for  a character generator using MV and Yanfly's Common Events Menu Plugin (You'll also need/want the Yanfly Core Engine, and Message Core; update: it seems you may also need the Battle Engine Core).


            There are other character generator tutorials available (Driftwood Gaminghas a good one), but none take advantage of Yanfly's recent plugin, which allows more visual options. What follows is the basic setup (video version), which could be expanded on with more images.


            Create a game (of course); Create an event set to autorun.  This event can have a message text. But needs to call for the player name using the editor command, input processing.


            With this complete you can use a simple choice command to ask for gender (or anything) at this point Yanfly's engine comes into play. I have Gender choice associated with a variable so that I can call recall the player's decision at a latter point. In any case have the choice call a common event with the following details:


    Plugin Command: SetCommonEventMenuSettings Default Setup
    Plugin Command: ClearCommonEventMenu
    Plugin Command: DisableCommonEventMenuCancel
    Plugin Command: AddCommonEventMenu 8 through 15 ##these correspond to the various picture events in the common event database
    Plugin Command: OpenCommonEventMenu



            This calls a common event via the Yanfly plugin, and blocks cancellation of that event. 8 through 15 in this case correspond to the additional options  outline below. Change those numbers as necessary.



            Common Events 8 through 15 (or whatever) each have a set of addtional [comment] scripts associated with them via Yanfly's plugin.


    Comment: <Picture: male1> ##The file name of the picture associated with this option
    Comment: <Help Description>
            Select a portrait: ##this can be any text you like
            </Help Description>
    Comment: <Subtext>
            Portrait 1 ##this can be any text you like
            </Subtext>
    Play SE:Load(90, 100, 0) ## this plays a sound -- it is a generic engine sound call
    Change Actor Images: Player, PlayerSelectFaces1(0), PlayerSelectMaleChar(0), PlayerSelectMaleBattler1 ##This sets the actor image to the file of your choice; same with character and battler.



            With those details set for each common event 8-15 (or however many), you now have a functional character generator. If you want pictures, you'll need each of the files associated with the picture to be unique (in this case I have 8 different male portrait options, and 8 female options, where I've gray scaled the "non-selected" portraits, thus 16 total .png images).


            You can additionally ask for class (and in this case use the same sort of commands as above to change images). Finally, using labels you can give a player the option of returning to earlier choices using a choice call, "jump to label: [name]".


            If you want to allow the player to see the face image they choose automatically you'll need to use the command \af[#] (\ac[#] for class), using Yanfly's message core. Otherwise this gets the basic idea across.


            Here is a video showing the setup: Character Generation Tutorial ; And here is a simplified demo version.



            Let me know if you have questions/comments/critiques.


    本贴来自国际rpgmaker官方论坛作者:Rubescen处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/in-game-character-generator-yanfly-common-event.62180/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-10 03:03 , Processed in 0.088388 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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