查看: 4994|回复: 4

[交流讨论] 地图上显示角色和NPC名字

[复制链接]
梦石
0
星屑
944
在线时间
116 小时
注册时间
2017-8-3
回帖
57
发表于 2017-8-6 14:58:26 | 显示全部楼层 |阅读模式

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

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

×
VI3LB6~QJEM3IPODYY18{@2.png
}IIM7366$%_T9Y68B)Q{PD9.png
~A`84[{F(P~`Q4CKT]6C{2Y.png

  1. /*:
  2. * @plugindesc Namepop Ver 1.03
  3. * @author Morpho(dongdongDJH)
  4. * @修改 神秘中国人

  5. * @help
  6. * 在地图事件注释栏内填入 NAMEPOP|颜色;

  7. * @param color
  8. * @desc 地图上主角的颜色
  9. * @default #FFFFFF

  10. */

  11. (function() {
  12.         var parameters = PluginManager.parameters('Namepop');
  13.    
  14.         _Sprite_Character_prototype_initialize = Sprite_Character.prototype.initialize;
  15.         Sprite_Character.prototype.initialize = function(character) {
  16.                 _Sprite_Character_prototype_initialize.call(this, character);
  17.                 this._tempCharacter = character;
  18.                 if (character instanceof Game_Event) {
  19.                         var notetext = character.event().note.split("c:");
  20.                         var $color = notetext[1] || '#ffffff';
  21.                         this.createNamepopSet(false,$color);
  22.                 }
  23.                 if (character instanceof Game_Player) {
  24.                         this.createNamepopSet(true,parameters['color'] || '#ffffff');
  25.                 }
  26.         };

  27.         Sprite_Character.prototype.createNamepopSet = function($if,$color) {
  28.                 var h = 12;
  29.                 this._namepopSprite = new Sprite();
  30.                 this._namepopSprite.bitmap = new Bitmap(h * 10, h);
  31.                 this._namepopSprite.bitmap.fontSize = h;
  32.                 this._namepopSprite.bitmap.textColor  = $color ;
  33.                 this._namepopSprite.bitmap.drawText($if?$gameParty.members()[0]._name:this._tempCharacter.event().name, 0, 0, h * 10, h, 'center');
  34.                 this._namepopSprite.anchor.x = 0.5;
  35.                 this._namepopSprite.anchor.y = 1;
  36.                 this._namepopSprite.y = this.y + 12;

  37.                 this.addChild(this._namepopSprite);
  38.         };
  39. }());
复制代码



梦石
0
星屑
70
在线时间
8 小时
注册时间
2019-1-22
回帖
6
发表于 2019-7-10 10:46:47 | 显示全部楼层
事件名字还是不要显示出来吧,毕竟有些事件是看不到的,类似于陷阱
回复

使用道具 举报

梦石
0
星屑
128
在线时间
11 小时
注册时间
2019-7-3
回帖
20
发表于 2019-7-11 13:45:15 | 显示全部楼层
懒懒的小黑喵 发表于 2019-7-10 10:46
事件名字还是不要显示出来吧,毕竟有些事件是看不到的,类似于陷阱 ...

明显是用注释机制
没注释的自然不显示
承接游戏LOGO设计 +W信:amwdhqc
回复

使用道具 举报

梦石
0
星屑
47
在线时间
8 小时
注册时间
2019-7-13
回帖
9
发表于 2019-7-13 13:22:08 | 显示全部楼层
amwdhqc 发表于 2019-7-11 13:45
明显是用注释机制
没注释的自然不显示

刚试了一下,好像全部事件都会显示
回复

使用道具 举报

梦石
0
星屑
1443
在线时间
165 小时
注册时间
2019-9-14
回帖
50
发表于 2021-3-15 22:48:15 | 显示全部楼层
楼主 可以增加显示变量值的功能吗?mv的名称显示插件好像都不支持显示变量
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部