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

[制作教程] Variables - Tips and tricks

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

    连续签到: 1 天

    [LV.7]常住居民III

    3122

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 昨天 22:33 | 显示全部楼层 |阅读模式
    Variables 

    Tips and Tricks

     ​

     ​

    1.Rewards for tenaciousness

    SpoilerEver had a useless lever or button just laying around ? Ever wanted to reward your players for pressing those buttons or levers? Well you visited the right place.

     a.Requirements

       A variable (how many times you pulled)

       A switch

       A lever (+1 every time you pull)

       An event (shows your "progress"")

       Basic knowledge about variables and events (making them and modify them)

     b.Setup

       Make a variable and name it.

       Same for the levers.

       To make the lever simply make an action button triggered event, choose your sprite, then add 1 to the variable, turn the switch on,      then create a new event page, make it a auto run,make it's run condition the switch you just turned, choose the appropriate sprite,

       also on the second event page make it so the switch you just turned on gets turned off, then you can add a SE and some waiting 

       time if you feel the need :

       Page 1 of the event

       



       Page 2 of the event

       





      Now, I did say there was going to be a reward didn't I ? Well this can be done in multiple ways, 

      Way N.1 is to make a parallel process (common) event that checks if your Variable is over a certain number, and then give a reward

      when the number is achieved:

    Spoiler





       This also works with Npc's, just make it an action button at that point, also if you wish to track your progress, you can type in \v[x]         while editing a chatbox, and it will show you what that current variable is ( x being the ID of your variable ) :

    Spoiler

    (ignore the first line)





    2.Battle damage formulas using variables ?

    SpoilerUsually in Ace battle formulas you are only allowed to use the basic 4 mathematical operations (+,*,/,-) and that can usually limit a game maker slightly, but Variables can include different operations and can add variety to your formulas (through scripting visit this thread for more details about that : http://forums.rpgmakerweb.com/index.php?/topic/16541-intermediateadvanced-game-variables/?hl=variables)   A. Requirements

        A variable

        A skill

        You have to have a minimum knowledge math

        B. Setup

    Make a variable that you want to allow damage modifications, examples would be a permanent boost (passive skills maybe ?) 

    Now to implement that variable in the damage formula just add v[x] (X being the number of your variable) 

    ex : 

    a.atk * 4 + v[x] - b.def * 2  I'm not going to go into details or this thread would be veeeeeeeery long and boring to read , but you can do many things that would add diversity in your game.   

    EX : http://www.rpgmakervxace.net/topic/17451-damage-formula-operations/

        

       

      



    3.Counts how many times you stepped on grass (using region ID's)

    SpoilerThis process is pretty complicated so I'll only explain it through images:



    Add regions to your map by pressing F7.





    Thanks to Zeriab for fixing my original post.

    2 of my variables define the characters X and Y location, 1 of my variables define what region I'm currently on, and 1 variable counts how many times I stepped on the grass, the conditional branches are obligatory or your Variable designating how many times you stepped on the grass will go up by 1 every ten frames even if you don't move.  :



    The script event command isn't necessary as I only used it to see if the event worked.



    4.(Evil) Maze of Variables

    SpoilerHave you ever been annoyed by very puzzling mazes that use teleports, similar looking rooms, and more ? Well Today I will present you with a way to make the experience even "more positive".A. Requirements

    Any number of variables (min 1)

    Any number of rooms (min 3)

    Any number of events that teleport you from room to room (min 2 for each room)

    Optionally some other events affected by our variable 

    Some time on your hands.

    B. Setup

    So let's build our maze shall we ? I chose to make my maze size 4 rooms, (Optionally you can tint the screen dark so it gives a more realistic feel to it) I made 2 pairs of identical rooms the identical room to the starting room will be the exit, also all rooms have 2 events that teleport the player elsewhere., also my example maze will depend of a loops and slightly on making your player give up before he finds the exit.

    So the starting room will have an event to transport you outside, or to the next room, the following room (room a) will be setup so if you go back you will end up on the upper level of it's identical copy (room  
      , and going up makes you appear on the bottom level of the copy, the top level of the copy will bring you back to the start and the bottom level will bring you back to the "room a".

    Each event that transfers you to the next area will add a +1 on your chosen variable.

    Now choose a random number for your variable and change one of the transfer events to a conditional branch that will bring you to the identical room of the entrance ( exit ) , the bottom level of the exit will set you free, the top level will set the variable to 0 and teleport you to the bottom of the entrance:

    So Entrance -) Room a

         Room a -) Room b top or Room b bottom

         Room b -) Room a top or entrance top

         Exit -) entrance bottom or Freedom




    Things you should know:

    There are hundreds of things you can do with variables, especially if you mix it up with some scripting.

    The variables on the battle formula can depend on allot of things, for example a skill that does more damage the more money you have, or the more steps you have done.

    The variables maze can be made allot harder, I'm just putting out the idea and the basic concept.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-8 00:53 , Processed in 0.146944 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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