查看: 97|回复: 0

[转载发布] 多货币脚本小补丁

[复制链接]
  • TA的每日心情
    开心
    3 小时前
  • 签到天数: 37 天

    连续签到: 3 天

    [LV.5]常住居民I

    2028

    主题

    32

    回帖

    7260

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    0
    卡币
    5184
    OK点
    16
    积分
    7260
    发表于 同元一千年八月五日(秋) | 显示全部楼层 |阅读模式
    @876加几 发布了一个多货币脚本,但是细心的小小周发现,这里并没有提供Window_Gold的
    修改,导致在对话框中使用\g功能跳出的界面无法显示另一个货币,于是就有了这个小补丁~如果有人发布过就请无视掉吧~
    1. #==============================================================================# ■ Window_Gold#------------------------------------------------------------------------------#  显示金钱的窗口。#==============================================================================class Window_Gold < Window_Base  #--------------------------------------------------------------------------  # ● 初始化窗口  #--------------------------------------------------------------------------  def initialize    super(0, 0, 160, 64+32)    self.contents = Bitmap.new(width - 32, height - 32)    @gold_sp = $game_variables[8]    @gold_sp_name = "灵魄"    refresh  end  #--------------------------------------------------------------------------  # ● 刷新  #--------------------------------------------------------------------------  def refresh    self.contents.clear    cx = contents.text_size($data_system.words.gold).width    cx_sp = contents.text_size(@gold_sp_name).width    self.contents.font.color = normal_color    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)    self.contents.font.color = system_color    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)    self.contents.font.color = normal_color    self.contents.draw_text(4, 0, 120-cx_sp-2, 64+32, @gold_sp.to_s, 2)    self.contents.font.color = system_color    self.contents.draw_text(124-cx_sp, 0, cx_sp, 64+32, @gold_sp_name.to_s, 2)  endend复制代码
    复制代码
    相信大家都看得懂吧...在@gold_sp = $game_variables[]中的数字“8”代表着第二货币的对应变量,而下面一行的@gold_sp_name = “”则代表着第二货币的名字...

                 本帖来自P1论坛作者天地有正气,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=340834  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
    天天去同能,天天有童年!
    回复 论坛版权

    使用道具 举报

    ahome_bigavatar:guest
    ahome_bigavatar:welcomelogin
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

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

    GMT+8, 2024-5-10 13:27 , Processed in 0.045900 second(s), 43 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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