扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 176|回复: 0

[转载发布] 【插件】敌人战斗位置自动排列

[复制链接]
累计送礼:
0 个
累计收礼:
0 个
  • TA的每日心情
    开心
    2025-2-4 02:05
  • 签到天数: 110 天

    连续签到: 2 天

    [LV.6]常住居民II

    2327

    主题

    395

    回帖

    1万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    6
    卡币
    10465
    OK点
    16
    推广点
    0
    同能卷
    0
    积分
    13215

    灌水之王

    发表于 2024-3-6 11:20:36 | 显示全部楼层 |阅读模式
    群里有好友提出的需求,如果每个战斗队伍都去调整队列太麻烦,这个插件可以自动批量调整排列所有敌人的位置。
    效果如下:
    数据库中的样子:

    实际战斗中的位置:

    如有问题欢迎留言,enjoy it~~~
    截图由我的好友Ryusa提供,我已经懒得截了,灰常灰常感谢~~

    JAVASCRIPT 代码下载
    1. //=============================================================================
    2. // MrLiu_Enemylocation.js
    3. //=============================================================================
    4. /*:
    5. * @plugindesc 在RMMV游戏的横版战斗中让敌人自动排序
    6. * @author MrLiu-过眼云烟
    7. * @param Front Position X
    8. * @desc 第一个敌人的X坐标.
    9. * 默认值: 200
    10. * @default 200
    11. *
    12. * @param Front Position Y
    13. * @desc 第一个敌人的y坐标.
    14. * 默认值: 280
    15. * @default 280
    16. *
    17. * @param Front Instance X
    18. * @desc This formula determines the actor's home Y position.
    19. * 默认值: 32
    20. * @default 32
    21. *
    22. * @param Front Instance Y
    23. * @desc This formula determines the actor's home Y position.
    24. * 默认值: 48
    25. * @default 48
    26. * @help This plugin does not provide plugin commands.
    27. */
    28. //-----------------------------------------------------------------------------
    29. // Window_MapName
    30. //
    31. // The window for displaying the map name on the map screen.
    32. var Imported = Imported || {};
    33. Imported.MrLiu_Enemylocation = true;
    34. var Lmd = Lmd || {};
    35. Lmd.Parameters = PluginManager.parameters('MrLiu_Enemylocation');
    36. Lmd.Param = Lmd.Param || {};
    37.         Lmd.Param.x1 = Number(Lmd.Parameters['Front Position X']);
    38.     Lmd.Param.y1 = Number(Lmd.Parameters['Front Position Y']);
    39.         Lmd.Param.x2 = Number(Lmd.Parameters['Front Instance X']);
    40.         Lmd.Param.y2 = Number(Lmd.Parameters['Front Instance Y']);
    41. (function(){
    42.         Game_Enemy.prototype.screenX = function(){
    43.                 return Lmd.Param.x1 - this.index() * Lmd.Param.x2;//this._screenX;
    44.         };
    45.         Game_Enemy.prototype.screenY = function(){
    46.                 return Lmd.Param.y1 + this.index() * Lmd.Param.y2;//this._screenY;
    47.         };
    48. //var _Scene_Map_start = Scene_Map.prototype.start;
    49. //Scene_Map.prototype.start = function() {
    50. //   this._Scene_Map_start();
    51. //   this._mapStatusWindow.open();
    52. //};
    53. })();
    复制代码

                 本帖来自P1论坛作者过眼云烟,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=386034  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

    关闭

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2025-3-10 18:56 , Processed in 0.130551 second(s), 50 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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