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

[转载发布] Static Sideview Actor Image

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

    连续签到: 2 天

    [LV.7]常住居民III

    7523

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 小时前 | 显示全部楼层 |阅读模式
    Static Sideview Actor Image ver 1.0

    by MechPen



    Here is a small plugin that replaces sideview actor motions in favor of enemy-style blinks and flashes. The collapse effect traits even work!

    Feature

    -  Load a single image into [SV] Battler:


    Screenshots




    How to Use

    In the img\sv_actors folder, place your actor's battle image. it should be a single frame image much like sv_enemies. Select this image in the [SV] Battler: section. it will appear as a weird cut out rectangle in engine, but will look correct in game.


    You can find the code On my github, but it has also been provided below just in case of bit rot. The license is MIT so do what you may.


    Script
    Spoiler: MechPen_StaticActor.js
                    JavaScript:       
    1. //=============================================================================
    2. // MechPen_StaticActor.js
    3. //=============================================================================
    4. /*:
    5. * @target MV
    6. * @plugindesc v1.0 Static Actor Plugin
    7. * @author MechPen
    8. *
    9. * @help MechPen_StaticActor.js
    10. *
    11. * This plugin removes the sideview actors' motions and replaces the sv_actor
    12. * image frames with a single static image. You can even use the different
    13. * collapse effects!
    14. *
    15. *-----------------------------------------------------------------------------
    16. * How to use this plugin
    17. *-----------------------------------------------------------------------------
    18. * Install to your plugins folder and turn it on in the Plugin Manager.
    19. * In the img\sv_actors folder, place your actor's battle image. it should be
    20. * a single frame image much like sv_enemies.
    21. * Select this image in the [SV] Battler: section. it will appear as a weird
    22. * cut out rectangle in engine, but will look correct in game.
    23. *
    24. * Experiement with adding Collapse Effect Traits (under the Other tab). its fun!
    25. *
    26. *-----------------------------------------------------------------------------
    27. * About the license of this plugin (License)
    28. *-----------------------------------------------------------------------------
    29. * This plugin is released under the MIT License.
    30. *
    31. *-----------------------------------------------------------------------------
    32. * The released versions of this plugin (Change log)
    33. *-----------------------------------------------------------------------------
    34. * version 1.0
    35. * - Basic functionality completed.
    36. */
    37. (() => {
    38. function Sprite_StaticActor() {
    39.     this.initialize.apply(this, arguments);
    40. }
    41. Sprite_StaticActor.prototype = Object.create(Sprite_Enemy.prototype);
    42. Sprite_StaticActor.prototype.constructor = Sprite_StaticActor;
    43. Sprite_StaticActor.prototype.initialize = function(battler) {
    44.     Sprite_Enemy.prototype.initialize.call(this, battler);
    45. };
    46. Sprite_StaticActor.prototype.initMembers = function() {
    47.     Sprite_Enemy.prototype.initMembers.call(this);
    48.     this.createStateSprite();
    49. };
    50. Sprite_StaticActor.prototype.createStateSprite = Sprite_Actor.prototype.createStateSprite;
    51. Sprite_StaticActor.prototype.updateStateSprite = function() {}; // nothing.
    52. Sprite_StaticActor.prototype.setActorHome = Sprite_Actor.prototype.setActorHome;
    53. Sprite_StaticActor.prototype.setBattler = function(battler) {
    54.     Sprite_Battler.prototype.setBattler.call(this, battler);
    55.     var changed = (battler !== this._enemy);
    56.     if (changed) {
    57.         this._enemy = battler;
    58.         if (battler) {
    59.             this.setActorHome(battler.index());
    60.         }
    61.         this._stateSprite.setup(battler);
    62.     }
    63. };
    64. Sprite_StaticActor.prototype.updateBitmap = function() {
    65.     Sprite_Battler.prototype.updateBitmap.call(this);
    66.     var name = this._enemy.battlerName();
    67.     var hue = 0;
    68.     if (this._battlerName !== name || this._battlerHue !== hue) {
    69.         this._battlerName = name;
    70.         this._battlerHue = hue;
    71.         this.loadBitmap(name, hue);
    72.         this.initVisibility();
    73.     }
    74. };
    75. Sprite_StaticActor.prototype.initVisibility = function() {
    76.     if (!$gameSystem.isSideView()) {
    77.         this.opacity = 0;
    78.     }
    79. };
    80. Sprite_StaticActor.prototype.loadBitmap = function(name, hue) {
    81.     this.bitmap = ImageManager.loadSvActor(name, hue);
    82. };
    83. Spriteset_Battle.prototype.createActors = function() {
    84.     this._actorSprites = [];
    85.     for (var i = 0; i < $gameParty.maxBattleMembers(); i++) {
    86.         this._actorSprites[i] = new Sprite_StaticActor();
    87.         // if you want to flip your actor image, uncomment following line.
    88.         //this._actorSprites[i].scale.x = -1;
    89.         this._battleField.addChild(this._actorSprites[i]);
    90.     }
    91. };
    92. var MechPen_Actor_performDamage = Game_Actor.prototype.performDamage;
    93. Game_Actor.prototype.performDamage = function() {
    94.     MechPen_Actor_performDamage.call(this);
    95.     this.requestEffect('blink');
    96. };
    97. var MechPen_Actor_performActionStart = Game_Actor.prototype.performActionStart;
    98. Game_Actor.prototype.performActionStart = function(action) {
    99.     MechPen_Actor_performActionStart.call(this, action);
    100.     this.requestEffect('whiten');
    101. };
    102. var MechPen_Actor_performCollapse = Game_Actor.prototype.performCollapse;
    103. Game_Actor.prototype.performCollapse = function() {
    104.     MechPen_Actor_performCollapse.call(this);
    105.     if ($gameParty.inBattle()) {
    106.         switch (this.collapseType()) {
    107.         case 0:
    108.             this.requestEffect('collapse');
    109.             SoundManager.playEnemyCollapse();
    110.             break;
    111.         case 1:
    112.             this.requestEffect('bossCollapse');
    113.             SoundManager.playBossCollapse1();
    114.             break;
    115.         case 2:
    116.             this.requestEffect('instantCollapse');
    117.             break;
    118.         }
    119.     }
    120. };
    121. })();
    122. // EOF
    123. }
    复制代码




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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-30 19:34 , Processed in 0.142470 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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