查看: 5093|回复: 2

[交流讨论] MV 脚本小练习

[复制链接]

…あたしは天

梦石
0
星屑
2311
在线时间
4033 小时
注册时间
2010-10-4
回帖
10548

开拓者贵宾

发表于 2015-11-7 10:19:58 | 显示全部楼层 |阅读模式

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

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

×
MV 脚本练习

有人说要从实践中学习脚本。其实自带的脚本就是很好的练习题呢~

题目要求:请根据注释,写出对应功能的脚本。
1

  1. /*:
  2. * @plugindesc Change skill id of attack for each weapon.
  3. * @author Sasuke KANNAZUKI
  4. *
  5. * @help This plugin does not provide plugin commands.
  6. *
  7. * When <skill_id:3> is written in a weapon's note field,
  8. * skill id # 3 is used for the weapon's attack.
  9. * If nothing is written, default id(=1) is used.
  10. *
  11. * Check Points:
  12. * - When multiple weapons are equipped, the skill id of the weapon
  13. *  held in the dominant hand (previously defined) is used.
  14. * - It is most favorable for "skill type" to be "none"(=0),
  15. *  otherwise you cannot attack when your skill is blocked.
  16. *
  17. * Usage examples of this plugin:
  18. * - to create all-range weapons
  19. * - to create dual-attack or triple-attack weapons
  20. * - If healing skill is set when actor attacks, you can choose a friend to heal.
  21. * - It is possible to make a weapon that functions similar to a guard command.
  22. */
复制代码


2

  1. /*:
  2. * @plugindesc Changes the position of the title command window.
  3. * @author Yoji Ojima
  4. *
  5. * @param Offset X
  6. * @desc The offset value for the x coordinate.
  7. * @default 0
  8. *
  9. * @param Offset Y
  10. * @desc The offset value for the y coordinate.
  11. * @default 0
  12. *
  13. * @param Width
  14. * @desc The width of the command window.
  15. * @default 240
  16. *
  17. * @param Background
  18. * @desc The background type. 0: Normal, 1: Dim, 2: Transparent
  19. * @default 0
  20. *
  21. * @help This plugin does not provide plugin commands.
  22. */
复制代码


3

  1. /*:
  2. * @plugindesc make the skill that consumes HP, not only MP and/or TP
  3. * @author Sasuke KANNAZUKI
  4. *
  5. * @help This plugin does not provide plugin commands.
  6. *
  7. * write following format at skill's note:
  8. *  <hp_cost:30>  # the skill consumes 30 HP.
  9. *
  10. *  The skill can use even if subject's HP is less than skill's HP Cost.
  11. *  In that case, let the subject's HP be 1.
  12. *  (i.e. subject won't die by the skill.)
  13. */
复制代码


4

  1. /*:
  2. * @plugindesc Turns ON the specified switch when loading a game.
  3. * @author Yoji Ojima
  4. *
  5. * @param Switch ID
  6. * @desc The ID of the switch to be turned ON when loading a game.
  7. * @default 0
  8. *
  9. * @help This plugin does not provide plugin commands.
  10. */
复制代码


5

  1. /*:
  2. * @plugindesc Changes a self switch for other events.
  3. * @author Yoji Ojima
  4. *
  5. * @help
  6. *
  7. * Plugin Command:
  8. *   OuterSelfSwitch on 3 A     # Turns on the switch A for the event #3
  9. *   OuterSelfSwitch on 4 B     # Turns on the switch B for the event #4
  10. *   OuterSelfSwitch off 5 C    # Turns off the switch C for the event #5
  11. *   OuterSelfSwitch off 6 D    # Turns off the switch D for the event #6
  12. *   OuterSelfSwitch off all A  # Turns off the switch A for all the events
  13. */
复制代码


参考答案:MV 自带的插件(含免费的DLC)

@鑫晴  

评分

参与人数 2星屑 +6 收起 理由
狛尨鸮の传说 + 5 0v0..
鑫晴 + 1 (ΦωΦ)

查看全部评分

梦石
0
星屑
48
在线时间
784 小时
注册时间
2013-1-4
回帖
1057
发表于 2015-11-7 10:56:57 | 显示全部楼层
MV 脚本练习
请把P2换成P3
参考RM自带的core和pixi
【说起来git上已经有一个这样的项目了囧
RM-GUI延期。。。最近被黑心老板压迫T_T
二次元少女的shitake,长着长脸,身高165,蓝色卷双马尾,FCUP,瞳色黑色,病气和御宅属性,是天才少女。
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2015-11-7 12:30:26 | 显示全部楼层
试了试第五个.....
....花了半天时间才搞出来  T _ T

点评

额,老是多写少写符号....然后发现事件里自带的独立开关操作,使用 打开 时传入值是0......T_T  发表于 2015-11-7 12:47
不难吧……遍历地图上所有事件就好了啊……  发表于 2015-11-7 12:33
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部