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

[制作教程] How to make a Simple Puzzle with Variables, "The Lost Souls"

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

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-12 08:36:19 | 显示全部楼层 |阅读模式








    The demonstration located here: http://goo.gl/fST5ac (1.47 MB FIle) is a self contained puzzle you can use for your games.  

    I've left it unencoded so you can not only play it, but look at how it was created.  No external resources were used or needed.  This example is kept very simple as a demonstration of what you can do with VX/ACE and nothing more than 0s and 1s.

    The puzzle is kept with triggers and variables high enough to not interfere with most small games, so it's plug and play.  

    It can be kept as is with the minimum of map editing to fit a dungeon as it's just a single room.​


    You may edit and alter this as you see fit.  It's for learning, and giving you a broader look into entry level puzzles to
    help enrich any RPG.  The puzzle itself will not detract from the main plot or grind the game to a halt.

    As part of this tutorial I will run down the basics of it's construction.  
    Before you continue reading I ask you play the demonstration, it takes 2 minutes to finish.

    * * *​

     ​

    EDIT:  Reworded the explanation under the spoiler to make the process more understandable. 

    The Long Explanation of how it works, and how you can make your own from scratch.​


    SpoilerSetting an event is something most people can do, and we'll start there.  I choose the flames since there were two already established colors in the RTP materials.  Conversing with the flame takes minimal effort, so I made sure the "C" button was the trigger, even though the event is 'action' when it was interacted with to preform the color swap. 
    Each event is controlled by a single variable.  Even the ones that control other flames, and change their variables.

    The flame I started with had only the ability to change it's own color.  It has only one variable to change.  At the bottom of the event it needs the commands to change it's color.  If it's 0 it turns to blue, if it's 1 it changes the graphic to red with a conditional for each.  This must be at the bottom.  The variable needs to change on interaction before the conditional is read by the event.





    Here you can see the inner workings of the event.


    When I saw this wouldn't be enough of a challenge to simply go up to each flame to change them, I enabled a second flame to change not only itself but one of it's neighbors.

    This was done by simple copying and pasting the first flame's controls for color change into the second flames controls-twice.  Once after the first conditional and one after the second.  You are in essence 'nesting' conditionals.  Here is why: if the second flame is blue, then touching it turns it red.  But it also effects the first flame to change despite what color it happens to be at the moment.

    So, when the Second flame is red, talking to it turns it blue.  If the first flame happened to be red at that time, it's now blue because you touched the second flame; otherwise the first flame turns to red now. 

    Now we also need the other part of the conditional.  When the second flame is blue, talking to it turns it to red.  If the first flame happened to be red, it's now blue; otherwise the first flame was blue, and now it's red.





    You must make sure you put in the second part of the conditionals from the first flame's controls under the second part of the second flame's controls as well, or else the second flame will only change the first flame when it is red.

    How do we keep track of all this?  Comments of course.  They are the green text in the above screen shots.  Comments do not effect the event and help you keep your place and follow the process.  That is if you value your sanity, it's your choice.  In each of the events you will see a line which says "Red to Blue" or "Blue to Red".  This is the heart of the puzzle, and makes bug fixing a breeze. 

    Now we have two flames.  One which can only change it's own color, and a second which can change itself and the first regardless of it's current color.

    We can now make it more complex since we have the basics down.  Since you  know how to change one flame and another, the process of making a flame change itself and two others it just as easy.  More copying and pasting will do the job for you.  

    Or you may do things the easy way, copy the whole event you just made from the second flame and rename the copied event.  The third flame now has all the second flame's controls.  Change the variables in the third flame to one variable higher for each of the existing conditionals.  Now copy the first flames conditionals into the third flame's controls as you did with the second.

    So:

        If the third flame is red, it changes to blue.
        The second flame happens to be red, it's now blue.  Otherwise it's red.
            The first flame is red, and turns to blue.  Otherwise it's red.
        The second flame happens to be blue, it's now red.  Otherwise it's blue.
            The first flame is red, and turns to blue.  Otherwise it's red.

    See where I copy and pasted?  Writing it out ahead of time helps to plan.  You know where you can cut corners and simply reuse old events.

    Again:
        If the third flame is blue, it changes to red.
        The second flame happens to be red, it's now blue.  Otherwise it's red.
            The first flame is red, and turns to blue.  Otherwise it's red.
        The second flame happens to be blue, it's now red.  Otherwise it's blue.
            The first flame is red, and turns to blue.  Otherwise it's red.

    So you will be copying and pasting the first flame's conditionals a total of 4 times into the third flame.

    Now try a flame with 3 variables it can change aside from it's own.  The pattern continues in the same fashion much like induction, you continue to nest the conditionals like you did with the second flame.  Think of the first flame as your base case.  

    If you trigger a flame that is suppose to change and it remains the same color despite intending it's variable changed, then you know you forgot to change a variable; or insert the preceding conditionals of the previous flame\bottom controls for the intended variable.

    To help me debug I created the candelabra and used the orbs as a means for tracking when I'd triggered all the flames a single color.  Staring at the screen after a length of time drains the eyes, and having the SFX to accompany it helped me stop and realize I was done.

    This was not enough to complete the puzzle though.  The player needs a clue to realize what the goal of the puzzle is and when it would be considered complete.  A player cannot blindly feel out a goal when someone else sets that goal for them.  It needs to be told
    up front and clearly enough that they understand the challenge.

    I reinforced the object of the goal with an NPC, and a secondary NPC that appears when you complete the task telling the player they are done.  Also a little flourish  at the end never hurts.  Let the player know they did it so they can move on.



    I hope this has been informative and entertaining to you.  Remember you can edit the puzzle, insert it as is; it's yours to  play around with and alter to your needs.  Please do credit me if you use my work.

    Take care, and good luck making your games.
     


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 11:02 , Processed in 0.138468 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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