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

Project1

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

[已经过期] 怎么修改地图坐标

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2385
在线时间
912 小时
注册时间
2014-10-14
帖子
1331

开拓者

跳转到指定楼层
1
发表于 2018-8-18 22:45:03 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 j296196585 于 2018-8-18 22:46 编辑

如图所示 我找不到修改的地方郁闷

RUBY 代码复制
  1. #_______________________________________________________________________________
  2. # MOG_Location_Name V1.4            
  3. #_______________________________________________________________________________
  4. # By Moghunter      
  5. # [url]http://www.atelier-rgss.com[/url]
  6. #_______________________________________________________________________________
  7. module MOG
  8. #Font Name.
  9. MPFONT = ["宋体"]#"Georgia"
  10. #Fade ON/OFF(True - False).
  11. MPNMFD = true
  12. #Fade Time(in seconds).
  13. MPNMTM = 10
  14. #Window Position.
  15. # 0 = Upper Left.
  16. # 1 = Lower Left.
  17. # 2 = Upper Right.
  18. # 3 = Lower Right.
  19. MPNMPS = 1   #难度选择
  20. # Disable Window Switch(ID).
  21. WM_SWITCH_VIS_DISABLE = 20
  22. end
  23. #_________________________________________________
  24. $mogscript = {} if $mogscript == nil
  25. $mogscript["Location_Name"] = true
  26. ###############
  27. # Game_System #
  28. ###############
  29. class Game_System
  30. attr_accessor :fdtm
  31. attr_accessor :mpnm_x
  32. attr_accessor :mpnm_y
  33. alias mog24_initialize initialize
  34. def initialize
  35. mog24_initialize
  36. @fdtm = 255 + 40 * MOG::MPNMTM
  37. if MOG::MPNMPS == 0
  38. @mpnm_x = 00
  39. @mpnm_y = -16
  40. elsif MOG::MPNMPS == 1
  41. @mpnm_x = 0
  42. @mpnm_y = -16
  43. elsif MOG::MPNMPS == 2
  44. @mpnm_x = 0
  45. @mpnm_y = -16
  46. else
  47. @mpnm_x = 0
  48. @mpnm_y = -16
  49. end  
  50. end
  51. def mpnm_x
  52. return @mpnm_x
  53. end
  54. def mpnm_y
  55. return @mpnm_y
  56. end
  57. def fdtm
  58. if @fdtm <= 0
  59. @fdtm = 0
  60. end
  61. return @fdtm
  62. end
  63. end
  64. ############
  65. # Game_Map #
  66. ############
  67. class Game_Map
  68. attr_reader   :map_id  
  69. def mpname
  70. $mpname = load_data("Data/MapInfos.rxdata")
  71. $mpname[@map_id].name
  72. end
  73. end
  74. ###############
  75. # Window Base #
  76. ###############
  77. class Window_Base < Window
  78. def nd_mapic
  79. mapic = RPG::Cache.picture("")     
  80. end  
  81. def draw_mpname(x,y)
  82. mapic = RPG::Cache.picture("Mpname2") rescue nd_mapic   
  83. cw = mapic.width
  84. ch = mapic.height
  85. src_rect = Rect.new(0, 0, 1024, 575)
  86. x1 = 40
  87. x2 = 0
  88. self.contents.blt(0, 0, RPG::Cache.picture("Mpname2"), Rect.new(0, 0, 1024, 575))
  89. self.contents.font.name = MOG::MPFONT
  90. self.contents.font.size = 15
  91. self.contents.font.color = Color.new(0,0,0,255)
  92. if $game_variables[1] == 0
  93. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s,1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  94. end
  95. if $game_variables[1] == 1
  96. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 冒险级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  97. end
  98. if $game_variables[1] == 2
  99. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 勇士级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  100. end
  101. if $game_variables[1] == 3
  102. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 王者级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  103. end
  104. if $game_variables[1] == 4
  105. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 英雄级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  106. end
  107. if $game_variables[1] == 5
  108. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 地狱级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  109. end
  110. if $game_variables[1] == 6
  111. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 噩梦级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  112. end
  113. if $game_variables[1] == 7
  114. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 灾难级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  115. end
  116. if $game_variables[1] == 8
  117. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 毁灭级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  118. end
  119. if $game_variables[1] == 9
  120. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 世界末日级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  121. end
  122. if $game_variables[1] == 10
  123. self.contents.draw_text(466, -3, 165, 32, $game_map.mpname.to_s + " - 修罗降世",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  124. end
  125. self.contents.font.color = Color.new(231,206,156,255)
  126. if $game_variables[1] == 0
  127. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s,1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  128. end
  129. if $game_variables[1] == 1
  130. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 冒险级",1)#(525, -4, 110, 32, $game_map.mpname.to_s,1)
  131. end
  132. if $game_variables[1] == 2
  133. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 勇士级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  134. end
  135. if $game_variables[1] == 3
  136. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 王者级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  137. end
  138. if $game_variables[1] == 4
  139. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 英雄级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  140. end
  141. if $game_variables[1] == 5
  142. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 地狱级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  143. end
  144. if $game_variables[1] == 6
  145. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 噩梦级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  146. end
  147. if $game_variables[1] == 7
  148. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 灾难级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  149. end
  150. if $game_variables[1] == 8
  151. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 毁灭级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  152. end
  153. if $game_variables[1] == 9
  154. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 世界末日级",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  155. end
  156. if $game_variables[1] == 10
  157. self.contents.draw_text(465, -4, 165, 32, $game_map.mpname.to_s + " - 修罗降世",1)#(526, -3, 110, 32, $game_map.mpname.to_s,1)
  158. end
  159. end
  160. end
  161. ##########
  162. # Mpname #
  163. ##########
  164. class Mpname < Window_Base
  165. def initialize
  166. super($game_system.mpnm_x, -16, 656, 5480)#$game_system.mpnm_y, 656, 480)
  167. self.contents = Bitmap.new(width, height)
  168. self.opacity = 0
  169. refresh
  170. end
  171. def refresh
  172. self.contents.clear
  173. draw_mpname(10,0)   
  174. end
  175. end
  176. #############
  177. # Scene_Map #
  178. #############
  179. class Scene_Map
  180. alias mog24_main main
  181. def main
  182. @mpnm = Mpname.new
  183. @mpnm.contents_opacity = $game_system.fdtm
  184. if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
  185. @mpnm.visible = true
  186. else
  187. @mpnm.visible = true
  188. end  
  189. mog24_main
  190. @mpnm.dispose
  191. end
  192. alias mog24_update update
  193. def update
  194. mog24_update  
  195. $game_system.mpnm_x = @mpnm.x
  196. $game_system.mpnm_y = @mpnm.y
  197. if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == true or $game_system.fdtm <= 0
  198. @mpnm.visible = true  
  199. else
  200. @mpnm.visible = true
  201. end
  202. if MOG::MPNMPS == 0 or MOG::MPNMPS == 1
  203. if @mpnm.x < 0
  204.    @mpnm.x += 8
  205. elsif @mpnm.x >= 0
  206.    @mpnm.x = 0
  207. end   
  208. else
  209. if @mpnm.x > 400
  210.    @mpnm.x -= 8
  211. elsif @mpnm.x <= 400
  212.    @mpnm.x = 400
  213. end     
  214. end
  215. @mpnm.contents_opacity = $game_system.fdtm
  216. if MOG::MPNMFD == true
  217. $game_system.fdtm -= 0
  218. end
  219. end
  220. alias mog24_transfer_player transfer_player
  221. def transfer_player
  222. mog24_transfer_player
  223. if MOG::MPNMPS == 0
  224. $game_system.mpnm_x = 0
  225. $game_system.mpnm_y = -16
  226. elsif MOG::MPNMPS == 1
  227. $game_system.mpnm_x = 0
  228. $game_system.mpnm_y = -16
  229. elsif MOG::MPNMPS == 2
  230. $game_system.mpnm_x = 0
  231. $game_system.mpnm_y = -16
  232. else
  233. $game_system.mpnm_x = 0
  234. $game_system.mpnm_y = -16
  235. end  
  236. @mpnm.y = $game_system.mpnm_y
  237. @mpnm.x = $game_system.mpnm_x
  238. $game_system.fdtm = 255 + 40 * MOG::MPNMTM
  239. @mpnm.refresh
  240. end
  241. end

360截图20180818225748233.jpg (212.13 KB, 下载次数: 10)

360截图20180818225748233.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~

Lv5.捕梦者

梦石
0
星屑
36291
在线时间
10746 小时
注册时间
2009-3-15
帖子
4829
2
发表于 2018-8-18 23:00:14 | 只看该作者
地图?坐标?什么意思...容我水一下..
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2385
在线时间
912 小时
注册时间
2014-10-14
帖子
1331

开拓者

3
 楼主| 发表于 2018-8-19 00:01:08 | 只看该作者
soulsaga 发表于 2018-8-18 23:00
地图?坐标?什么意思...容我水一下..

如何把艾尔文防线 调到图片哪里 我找不到代码
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
74
在线时间
2 小时
注册时间
2018-8-6
帖子
16
4
发表于 2018-8-19 00:26:32 | 只看该作者
soulsaga 发表于 2018-8-18 23:00
地图?坐标?什么意思...容我水一下..

大概了解LZ的意思了,就是要把地图名称移到左上角有底图的那个位置
然而我觉得LZ发错脚本了???
@j296196585
LZ你自己看看地图名称是不是可以在编辑器里面直接输入不用改脚本
有些地图名称脚本是可以这样的
新人一枚,请多关照~
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
8224
在线时间
1489 小时
注册时间
2016-4-8
帖子
209

开拓者

5
发表于 2018-8-19 21:47:21 | 只看该作者
容我说句,毒奶粉配XP人物,这比例真的好吗?
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2385
在线时间
912 小时
注册时间
2014-10-14
帖子
1331

开拓者

6
 楼主| 发表于 2018-8-22 01:50:08 | 只看该作者
结果到现在都没有人能看懂这个。。

点评

没有人能看懂, 显然是你自己描述不清楚想要实现的效果  发表于 2018-8-22 11:25
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
14505
在线时间
2149 小时
注册时间
2016-9-20
帖子
860
7
发表于 2018-8-26 17:44:14 | 只看该作者
楼主是要这个移过去,不过楼主你的腳本好像没有这个图片或文字,如图是图片就修改图片的X,Y軸,如果是文字就修改文字的X,Y軸

点评

谢谢,图片坐标 我知道,就文字找不到  发表于 2018-8-30 08:29
我贴子内容有很多只是我自己标识的内容代指不是原来意思,偏向发贴当时的想法(后来回看贴发现有很多错误,会造成误导 ),如果想靠谱点应 找相关正确的文章   -- 2025/4/19
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
36291
在线时间
10746 小时
注册时间
2009-3-15
帖子
4829
8
发表于 2018-8-26 19:26:08 | 只看该作者
本帖最后由 soulsaga 于 2018-8-26 19:31 编辑

211行
elsif @mpnm.x <= 400
   @mpnm.x = 400 <==========

点评

你头像很漂亮 ,可是 还是没效果。。我分辨率是1024X575  发表于 2018-8-30 08:33
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-4-20 21:56

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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