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

[制作教程] Tutorial on creating a simple battle adviser/predicter

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

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 09:32 | 显示全部楼层 |阅读模式
    Hi! This will be my first tutorial ever so if you think that there is things I can improve please let me know ^-^ !

    Inspiration^-^




    Okay now on to the tutorial.

    Have you ever played a game where you are faced with a boss encounter blocking your way; and you are underleveled because no one warned you about that this boss encounter will be very difficult leaving you to be merciless slaughtered by the gods?

    If you as a game designer do not want your players to be victim of that for various reasons you could easily add a BATTLE PREDICTION or BATTLE ADVISER to warn the player that they are underleveled for example.

    I will show you how to setup a simple battle adviser!
    You will need
    * 1 event
    * 4 variables
    * 1 common event

    If you are not sure what a variable or a common event are, I recommend that you look up those first.

    1. Setting things up
    You will need 4 variables, a common event, and an event
    2. Inside the event
    Use the Control Variables command select one of your 4 variables (in my case this is var[54], which I will call SYS! Actor Level). Once you have named your selected variable to whatever you want, set it equal to your actor (in my case, actor 1 (Harry Potter))




    Once you have done that, use the Control Variables command again to set your variable to subtract your boss's level ( in my case the boss will have the level 5).
    On the next line use the Call Common Event command and select your desired common event ( in my case i choosed #038 and named it to Duelling Club)



    This is what you should have so far.

    3. Inside the common event
    Inside the common event the fun will begin.

    For this tutorial I have choosen that there will be 5 different advices the player can recieve ( You can have as many as you want)

    On the first line in the common event Use the Conditional Branch command, use your variable from earlier and set it to check for equal to 0, like this.



    Make sure that you do not create it with the "set handling when conditions do not apply" option on.

    Good!

    Inside this conditional branch use the command Script
    and type in the following (or copy)

                    Code:        
    1. $game_variables[117]="AVERAGE";$game_variables[118]=17;
    2. $game_variables[119]="It's too close to call!"
    复制代码


    lots of scary stuff right?
    No
    , this does the same as Control Variables command except it will better suite our needs to script it manually this time.

    explanation:
    $game_variables[n]
    is the same as
    Control Variables command for variable n.

    So what I just did was setting 3 variables (#117,118 and 119) to different values.
    remember that you can use whichever variables you want instead of 117,118 and 119, just name them so you know what they are used for. ^-^

    You have now created a scenario for when your actor and the boss have the same level.
    your common event should look like this at this point.




    Great! Lets turn this into something useful.
    On the next line OUTSIDE of the Conditional Branch use the Show Text command
    and write this.



    You can write whatever you want except making changes to the "\C[\V[118]]\V[117]\C[0]"new line "\V[119]" part.
    Now we want to see the result and then let's look at how it happened.



    Magic!
    (just a quick note, your text may have different colour than mine, this you can control by setting the variable 118 to the colour you want
    )

    Awesome! Now the player will be warned while talking/interacting with this boss encounter but only if their level are equal, hmmm that is not likely to happen often at all right? We need to add more conditional branches inside the common event to make this apply for all situations ^-^

    4. Adding variation
    Open up your common event again
    BELOW your conditional branch and ABOVE your Show text command, insert a new conditonal branch exactly as the one you did earlier, this time make it apply for when the level difference between the boss and the player is smaller than or equal to -1
    quick example:
    boss level: 5
    player level: 4

    4-5 = -1
    like this:



    Good!

    Now inside this conditional branch use the Script command
    type in the same as earlier or copy.

    but let's edit the text and colour because getting the same advice when there will be a tougher battle isn't realistic at all!

                    Code:        
    1. $game_variables[117]="NO PICNIC IN THE PARK";$game_variables[118]=2;
    2. $game_variables[119]="Your chances are quite low!";
    复制代码


    There, nice!  Let's take it slow and understand what is happening.

    The first line:
    $game_variables[117]= "your advice here";
    remember to surround your text with " "
    ";" this sign tells ruby that your line is done.

    the second line:
    $game_variables[118]=2;
    set this variable equal to the number that represents the colour you want your advice text to have.

    the third line:
    $game_variables[119]="your text here ";

    Finally let's look at the Show text message we use at the bottom of our common event.



    \C[n] = colours the text (n is a number)
    \V[n] = reads the value of the n:th variable and write it

    Look at line 2
    Difficulty:....
    Variable 118 gives a colour
    Variable 117 gets coloured by that colour and writes its value down
    \C[0] resets the colour back to white
    then there is a new line
    \V[119] writes its value down

    Simple, but powerful ^-^
    Once you have created enough conditionals and advices to your liking the end result should look something like this.




    And that's it ^-^ please comment below if something seems unclear or scary ¨-¨


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:21 , Processed in 0.096091 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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