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

[制作教程] [Tutorial] 姫HIME’s End Phase Trigger Script

[复制链接]
累计送礼:
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:33 | 显示全部楼层 |阅读模式
    Hello everyone,

    Some of you might have stumbled across one of my previous thread thread about how I am unable to update the kill count for a quest. Took me awhile but I finally managed to figure out that the troops event gets ignored once the last monster dies in a battle. I tried A LOT of things and all I came across were roadblocks after roadblocks. I am so close to giving up and take the easy way out by having the quest mobs appear through event instead of random encounter. It was then I decided to give Tsukihime's End Phase Trigger script a go.

    Some times RPG have their own unique battle system that is slightly/very different from the other RPG, and the developer wanted to help familiarize players to their game's unique battle system in the middle of an actual combat. We can simply program the event in the Troops page to do just that (from now on, we will refer to such event as "troops event"). There seems to be no limit to how we can customize the troops event. The only problem is that the troops event is completely ignored once the last monster is killed. This makes it impossible for developers to do things like customized item drop (without using scripts), or simply just to show a dialogue between the actors for the sake of roleplaying.

    What is Tsukihime's End Phase Trigger Script?

    Tsukihime's End Phase Trigger script checks all the troops event page when a victory/defeat condition has been met. The script allows the execution of troops event for when the last monster/the player is defeated instead of ignoring such events completely upon victory/defeat. Any event(s) that can be run during this phase will be executed before ending the battle.

    How to install Tsukihime's End Phase Trigger Script?

    All we need to do is to copy the script from Hime's website (click here), open the script editor (F11) and insert it under the "▼ Materials section" and above the "▼ Main Process section". That's all you need to do. Refer to the screenshots in the spoiler below if you are new to adding custom scripts.
     

    Spoiler















    That's all there is to it. Just a simple plug-and-play script.



     
    What can I do now that I have installed the script?

    Example 1 -- Simple Quest:
    Let's say that we want to create a quest where we ask players to slay 3 Dragons and assuming that the only way we will come across these Dragons are through the random encounter event in the map. In order to do this, we need to program the troop event page (F9 > "Troops" tab) to check if the Dragon is slain, and then increase the kill count by 1. Assuming that we already have a troop that consists of two Dragons, what we need to do next is to check if the Dragon is slain (check if each dragons' HP is at 0% or less). If the Dragon has 0% or less than 0% HP, we will increase the variable "Dragon Kill Count" by 1.





    Simple enough. So far we have only checked if Dragon #1 is dead. Now we need to do the same for Dragon #2, so we will click on the "New Event Page" button in order to create a second event page. Once we have created the second event page, we will be doing the same thing as we did in page 1--check to see if Dragon #2 is at 0% HP or less. If Dragon #2's HP is equal to or less than 0%, then increase the Dragon Kill Count variable by 1.









    Normally this does not work because the troops event are completely ignored once the last monster is dead. However with Hime's script installed, you have nothing to worry about. Just do the same for Dragon #2's event and you are done. So whenever you kill a dragon, you will definitely get that +1 Kill credit.

    Note:Truthfully, I would have added a few extra switches, such as one switch to check if the quest is active before increasing the kill count by +1 for each dragon kill, for my actual event. We don't need the variable to keep increasing while the quest is not active. I wanted a short, clean example without anything unnecessary. 

    Example #2 -- Prevents player from getting killed:
    Let's say that you don't want to get the player killed in certain battles. All we need to do is to check if the player's health is at 0% or below (you can set it as any value between 1-100% instead of 0%) and then use the Recover all method to restore player's health.

    Normally this does not work if your HP reaches 0% or lower. You will be taken straight to the game over screen and your game will end. Now that you have Hime's script installed, the troops event will continue to process before a winner is determined, and the recover all method will heal your actor back to full health and the battle continues on.

    There are endless other possibilities about what you can achieve with this script.

    If you are having issues with things not working, I suggest that you take a look at TsukiHime's website (click here). Hime has a lot of other scripts available for many other things. Please take a minute to read through the terms of use for each script before using it on your own project. The terms of use can be found on the actual script page. Hime's scripts are free for non-commercial projects. For commercial projects, please contact Hime through the website to purchase a commercial license.

    Edit: Fixed broken images


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

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

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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