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

[制作教程] Make a Character Creation Screen With Events ( And 1 Script)

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

    连续签到: 2 天

    [LV.7]常住居民III

    4461

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 14:31 | 显示全部楼层 |阅读模式
    I haven't made a tutorial in a while, so here we go. This is for intermediate devs. Don't try to do this if you're a beginner, because you need to have basic knowledge of how events work for this.  

    I'm going to be teaching you how to make a character creation screen similar to this video:


    So, what you want to do first is make your GUI. I used a single image for the background, and another image for the cursor.
    Some things you may want to consider for categories:

    Skin colour
    Gender
    Race (human, elf, etc.)
    Name
    Class
    Hair colour/type

    Arrange them in a way that looks nice for you, and then save the background as a JPG/PNG in the Parallax folder. Make sure the image is the size of your screen.

    Then you want to make your sprites. Start with a naked base sprite, and save all of the parts you want to be able to change separately. Each sprite should be red so that they can easily be hue shifted in the game. If you only have human skin tones, save each one separately, or put them in a spritesheet of 8.










    Once all of your sprites are saved in the Characters folder, you can go into the game and start implementing it!

    The first thing you're going to do in the engine is install your script for putting all the parts together. The script I'm using is ModAlg Composite Graphics.  https://rmrk.net/index.php?topic=44872.0 There will be an edit in here which we'll talk about in a bit.

    Look through all of the instructions, and make sure you're only using the cc calls.

    So, by default, you'll notice that the script doesn't take variables for the hue. We're going to need that for our character creation so that it can be changed by the player.

    You'll need to add 2 lines here for it to accept variables:





    Right, so once that's done, you'll have every script you'll need. But there will be some script calls in here, as you'll see.





    Let's cover this line by line.

    You want this to be an autorun event so that the player can't move around as you're selecting options.

    Now you can see the script calls. They're all essentially the same thing:



    screen.pictures[x].show is the equivalent of the Show Picture event command.

    screen.pictures[index].show(file_name, position, x, y, x zoom, y zoom, opacity, blend type) This is everything you have to fill in. The file name is the name (case sensitive) in your Characters folder. Leave the  position at 0 for now. $game_variables[x] should be replaced with your hue variable. What this call does is show your cursor that scrolls over the colour bar (just a rectangle with a rainbow gradient) and move it based on what your hue is. However, the range of hues is 0-360, which would be about half the screen if you just used the variable for the x position. The first number is where your cursor starts (for me, at 64 pixels). The last number is how far you want it to go. The bigger the value you're dividing by, the less amount of space your cursor will travel to. For the y position, use your discretion to put the cursor where you you think it should go on the bar.

    Next, you have to do some basic menu eventing. The variable will keep track of where your cursor is on the screen. Each increment of the variable is a different option on the screen. So the conditional branches are checking if this variable is between 0 and the maximum amount of options, so you can't go over or under. Then of course, you have to check for input so that you can increment the variable each time the appropriate directional button is pressed.

    You then have to do a check to see which option the player is hovering over, and for each option, move the cursor to the spot where that option is.

    Then check if the action button is pressed while on that option. If it is, execute the command. The first couple of commands are straightforward, so I'll move on.




    So, you'll notice for the colour picking, it's a very similar mechanic. I believe you can use either 360 or 255 for this script. Make sure that the directional input for the colour picking is the opposite of the input for the category picking.

    Then you'll notice the comments from the script calls. You may be wondering why you need to remove the sprite before you add it. This is because if you don't remove the previous sprite, the new sprite will be drawn on top of it 360 times and it will lag the game tremendously.

    To add the sprite, set the hue to your variable value in the format that I have above (hvx where x is the variable number. Do not use leading zeros!)

    Now, as you move your colour cursor left and right, the colour of the sprite will change with it.

    If you want to pick something like the hairstyle, where you have multiple different sprites, it's easier.




    Make sure you remove all of the sprites before you do anything, then just add the appropriate sprite depending on which option is selected.

    If you want a random option like I've done, set each aspect of the character to a random number between 0 and the amount of options you have, and then delete all of your old sprites and add them back in. If you want to clear your character, set all values to 0 and do the same thing.

    In a separate event, you can make this look really nice by making your character walk in place. First, make sure you've set the starting position to somewhere on the map. Then, in a clean event, just put this in.



    And that's all you need to know. Thanks for reading!


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 16:52 , Processed in 0.116602 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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