设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
返回列表
+ 发新帖
查看: 227|回复: 0

[转载发布] CanLose - Control Defeat Behavior

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    昨天 03:27
  • 签到天数: 222 天

    连续签到: 1 天

    [LV.7]常住居民III

    9102

    主题

    893

    回帖

    7万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

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

    Can Lose 1.0
    ​



    By Tairo
    ​



             


    Introduction


            Changes the default lose behavior from game over to just continuing. (i.e. Makes all battles act like an event battle with the "Can Lose" box checked).


             


    Features


            - All losses continue game by default (Plug and Play)


            - You can choose a common event to run after each loss, and easily change it on-the-fly using commands.


            - A switch can be used to determine the default loss behavior (either continue the game, or normal RPG Maker behavior).


             


    How to Use


            Add it to your plugins folder (file name: CanLose.js).


             


            (Optional) Enter the ID of the common event you want to run by default and the ID of the switch you want to use as parameters, or enter in 0 if you don't want to use one (or either) of them.


             


    Plugin Commands


    SpoilerMakes losing the current battle result in a game-over.

                            CanLose false          # Makes it so a loss causes the game over event               
    Click to expand...




                                            Makes losing the current battle just continue the game (to undo the previous command, if desired).

                            CanLose true           # Makes it so a loss does not cause a game over               
    Click to expand...




                                            Changes the ID of the common event to run after a loss.

                            CanLose eventID 2      # Sets the event ID to 2, and prints in the console               
    Click to expand...




                                            Returns the ID of the switch used as a parameter, and prints it's value into the console (if one is selected).

                            CanLose checkSwitch    # Returns ID of the switch & prints it in the console               
    Click to expand...









             


    Demo


    Download from Dropbox


             


    Plugin Code


    Download from pastebin


    Spoiler                Code:       






             


    FAQ


            Q: Do I have to use the plugin commands?


            A: No, they are not needed for the basic function of making all battles act as though you checked the "Can Lose" box on an event battle. In that sense, it's sort-of 'plug-and-play'. However, the commands do allow more customization/control, like easily making certain fights (like bosses) or even skills change the behavior (like maybe an assassin's 'kill' ability, or something).


             


            Q: Why not flip a switch after a loss, instead of limiting it only to a common event?


            A: There is already another plugin which does that (along with any other result of a battle), which is Battle Result Switches by Shaz (click for his forum post), but his plugin doesn't allow lost battles to random encounters. The reason for me just using common events is to differentiate my plugin from his, and because you'd probably only use a common event for most scenarios where you'd want the player to not game-over after a lost battle anyway.


             

    Credit and Thanks


            - Tairo


             



    Terms of Use


                    Free for commercial and non-commercial use, with credit.


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

    帖子地址: 

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-10-22 04:55 , Processed in 0.091502 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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