设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2812|回复: 2
打印 上一主题 下一主题

[有事请教] MV行走图帧数怎么更改

[复制链接]

Lv2.观梦者

梦石
0
星屑
445
在线时间
102 小时
注册时间
2020-3-22
帖子
21
跳转到指定楼层
1
发表于 2020-4-25 10:50:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 凡小满 于 2020-4-25 10:52 编辑

MV有调整行走图帧数的方法或插件吗?系统是三帧,想修改为四帧

Lv4.逐梦者

梦石
0
星屑
11199
在线时间
607 小时
注册时间
2016-8-25
帖子
1393

R考场第七期纪念奖

2
发表于 2020-4-25 10:56:00 | 只看该作者
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
15512
在线时间
3951 小时
注册时间
2015-9-14
帖子
1333

开拓者

3
发表于 2020-4-27 16:29:39 | 只看该作者
比較簡單允許超過3幀(踏步圖)
(RM官方論壇) 作者: Shaz

  1. //=============================================================================
  2. // More Character Frames
  3. // by Shaz
  4. // Last Updated: 2015.09.21
  5. //=============================================================================

  6. /*:
  7. * @plugindesc 允許超過3幀(踏步圖)
  8.    Allows more than 3 Frames
  9. * @author Shaz
  10. *
  11. * @help This plugin does not provide plugin commands.
  12. * //此插件不提供插件命令。
  13. *
  14. * Add [D L R U] to your character sheet name (with $ prefix) to specify haw
  15. * many frames in each direction (Down, Left, Right, Up).
  16. * Spritesheets with this added to the file name will use a looping frame
  17. * animation rather than the back-and-forth default animation.
  18. *
  19. * //將[D L R U]添加到您的角色表名稱(帶有$前綴)
  20. *   每個方向上的多個幀(向下,向左,向右,向上)。
  21. *   添加到文件名的字符表將從左到右重複循環,
  22. *   而不是使用來回的默認模式。
  23. *
  24. * The first frame should be the idle/still pose.
  25. * //第一幀應該是空閒/靜止姿勢。
  26. *
  27. * eg. $Ralph [8 8 8 8].png
  28. *     is a character sheet consisting of 4 rows with 8 frames per row.
  29. *     Animation will go from frame 1 to 8 then start at 1 again.
  30. * //例如。 $Ralph [8 8 8 8] .png
  31. *           是一個由 $(任意名稱) 4行組成的字符表,每行8幀。
  32. *            動畫將從第1幀到第8幀再從1開始。
  33. *   又例如: $Ralph [6 6 6 6] .png
  34. *          是一個由 $(任意名稱) 4行組成的字符表,每行6幀。
  35. *           動畫將從第1幀到第6幀再從1開始。
  36. */

  37. (function() {

  38.   ImageManager.isMultiFrameCharacter = function(filename) {
  39.     var frames = filename.match(/\[(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\]/);
  40.     return frames && frames.length === 5;
  41.   };

  42.   ImageManager.getCharacterFrameCount = function(filename) {
  43.     var frames = filename.match(/\[(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\]/);
  44.     if (!frames) {
  45.       return [3, 3, 3, 3];
  46.     } else {
  47.       return frames.splice(1, 4);
  48.     }
  49.   };

  50.   var _Game_CharacterBase_initMembers = Game_CharacterBase.prototype.initMembers;
  51.   Game_CharacterBase.initMembers = function() {
  52.     _Game_CharacterBase_initMembers.call(this);
  53.     this._isMultiFrame = false;
  54.     this._frames = [3, 3, 3, 3];
  55.   };

  56.   var _Game_CharacterBase_maxPattern = Game_CharacterBase.prototype.maxPattern;
  57.   Game_CharacterBase.prototype.maxPattern = function() {
  58.     if (!this._isMultiFrame) {
  59.       return _Game_CharacterBase_maxPattern.call(this);
  60.     } else {
  61.       return this._frames[(this._direction / 2) - 1];
  62.     }
  63.   };

  64.   var _Game_CharacterBase_pattern = Game_CharacterBase.prototype.pattern;
  65.   Game_CharacterBase.prototype.pattern = function() {
  66.     if (!this._isMultiFrame) {
  67.       return _Game_CharacterBase_pattern.call(this);
  68.     } else {
  69.       return this._pattern < this._frames[this._direction / 2 - 1] ? this._pattern : 0;
  70.     }
  71.   };

  72.   var _Game_CharacterBase_isOriginalPattern = Game_CharacterBase.prototype.isOriginalPattern;
  73.   Game_CharacterBase.prototype.isOriginalPattern = function() {
  74.     if (!this._isMultiFrame) {
  75.       return _Game_CharacterBase_isOriginalPattern.call(this);
  76.     } else {
  77.       return this.pattern() === 0;
  78.     }
  79.   };

  80.   var _Game_CharacterBase_resetPattern = Game_CharacterBase.prototype.resetPattern;
  81.   Game_CharacterBase.prototype.resetPattern = function() {
  82.     if (!this._isMultiFrame) {
  83.       _Game_CharacterBase_resetPattern.call(this);
  84.     } else {
  85.       this.setPattern(0);
  86.     }
  87.   };

  88.   var _Game_CharacterBase_setImage = Game_CharacterBase.prototype.setImage;
  89.   Game_CharacterBase.prototype.setImage = function(characterName, characterIndex) {
  90.     _Game_CharacterBase_setImage.call(this, characterName, characterIndex);
  91.     this._isMultiFrame = ImageManager.isMultiFrameCharacter(characterName);
  92.     this._frames = ImageManager.getCharacterFrameCount(characterName);
  93.   };

  94.   var _Game_CharacterBase_setTileImage = Game_CharacterBase.prototype.setTileImage;
  95.   Game_CharacterBase.prototype.setTileImage = function(tileId) {
  96.     _Game_CharacterBase_setTileImage.call(this, tileId);
  97.     this._isMultiFrame = false;
  98.     this._frames = [3, 3, 3, 3];
  99.   };

  100.   Game_CharacterBase.prototype.isMultiFrame = function() {
  101.     return this._isMultiFrame;
  102.   };

  103.   Game_CharacterBase.prototype.getDirectionFrames = function() {
  104.     return this._frames[this._direction / 2 - 1];
  105.   };

  106.   var _Game_Event_initMembers = Game_Event.prototype.initMembers;
  107.   Game_Event.prototype.initMembers = function() {
  108.     _Game_Event_initMembers.call(this);
  109.     if (this._isMultiFrame) {
  110.       this._originalPattern = 0;
  111.     }
  112.   };

  113.   var _Sprite_Character_patternWidth = Sprite_Character.prototype.patternWidth;
  114.   Sprite_Character.prototype.patternWidth = function() {
  115.     if (!this._character.isMultiFrame()) {
  116.       return _Sprite_Character_patternWidth.call(this);
  117.     } else {
  118.       return this.bitmap.width / this._character.getDirectionFrames();
  119.     }
  120.   };

  121. })();
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-26 15:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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