扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 155|回复: 0

[转载发布] 鸡肋脚本:个性化装备用语 & 战斗指令

[复制链接]
累计送礼:
0 个
累计收礼:
0 个
  • TA的每日心情
    开心
    5 小时前
  • 签到天数: 114 天

    连续签到: 4 天

    [LV.6]常住居民II

    2338

    主题

    403

    回帖

    1万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    6
    卡币
    10607
    OK点
    16
    推广点
    0
    同能卷
    0
    积分
    13376

    灌水之王

    发表于 2024-4-19 16:16:43 | 显示全部楼层 |阅读模式
    我的设定里,除了剑士和骑士,都是不用盾的。那么其他职业浪费一个装备槽简直不可容忍。
    如果改成其他设定比如“右手”“鞋子”之类的。盾又没地方摆了。
    可以用装备扩展脚本。但懒惰的我觉得默认的四个槽已经很多了。
    所以写了这个。装备界面切换人物的时候,可以看到效果。
    唔……实际上我是直接改的Window_EquipRight ,而且只改了$data_system.words.armor1
    巴巴的发出来只因为——到现在我还没有发过新帖呢!
    冲突:有个不算冲突的。如果使用如简单物品分类一类根据装备类型分类的脚本。效果会比较囧
    我自己是把分类脚本改掉了。在数据库排好序后按id分类。
    另,状态界面没有改。所以现在的进度算是一半吧。手头没有rm,只能明天补了。
    实在太简单。估计随便哪位高手顺手就帮我改了。{:4_83:}


    更新状态界面,增加战斗指令。
    多谢后知后觉的提示,总算是实现自己的想法了。我当初主要卡在怎么样才能按职业ID分类上
    整个看下来。无端的就是一股觉得很多余的感觉
    自己测试没什么问题。不知会不会拖慢了运行效率。
    就这样吧,也不会有什么0.7了。
    1. #============================================================================# 个性化装备用语 & 战斗指令 0.6(?)        by well# 用法:修改awords1~4中的项目,对应职业ID。战斗指令同理,修改bwords1~4。# 如果要使用系统用语。该项留空。# 范例仅修改第一种防具和“攻击”指令。毕竟通用项目还是很多的。# “防御”和“物品”的个性化……就是一个笑话。只是希望留下足够的自由度。# 所以……果然……还是……非常鸡肋啊。#============================================================================class Window_EquipRight < Window_Selectable  def refresh    self.contents.clear    @data = []    @data.push($data_weapons[@actor.weapon_id])    @data.push($data_armors[@actor.armor1_id])    @data.push($data_armors[@actor.armor2_id])    @data.push($data_armors[@actor.armor3_id])    @data.push($data_armors[@actor.armor4_id])    @item_max = @data.size    awords1 = ["护符","饰物","","腰带","","","","",]    awords2 = ["","","","","","","","",]    awords3 = ["","","","","","","","",]    awords4 = ["","","","","","","","",]    self.contents.font.color = system_color    self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)    if awords1[@actor.class_id-1] != ""      self.contents.draw_text(4, 32 * 1, 92, 32, awords1[@actor.class_id-1])    else       self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)    end    if awords2[@actor.class_id-1] != ""      self.contents.draw_text(4, 32 * 2, 92, 32, awords2[@actor.class_id-1])    else       self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)    end     if awords3[@actor.class_id-1] != ""      self.contents.draw_text(4, 32 * 3, 92, 32, awords3[@actor.class_id-1])    else       self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)    end     if awords4[@actor.class_id-1] != ""      self.contents.draw_text(5, 32 * 4, 92, 32, awords4[@actor.class_id-1])    else       self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)    end        draw_item_name(@data[0], 92, 32 * 0)    draw_item_name(@data[1], 92, 32 * 1)    draw_item_name(@data[2], 92, 32 * 2)    draw_item_name(@data[3], 92, 32 * 3)    draw_item_name(@data[4], 92, 32 * 4)  endend#============================================================================# 基于默认状态窗口改的。和其他修改状态窗口的脚本冲突# 把91~114行复制到相应位置。改坐标,把相同的draw_text删掉就好#============================================================================class Window_Status < Window_Base  def refresh    self.contents.clear    draw_actor_graphic(@actor, 40, 112)    draw_actor_name(@actor, 4, 0)    draw_actor_class(@actor, 4 + 144, 0)    draw_actor_level(@actor, 96, 32)    draw_actor_state(@actor, 96, 64)    draw_actor_hp(@actor, 96, 112, 172)    draw_actor_sp(@actor, 96, 144, 172)    draw_actor_parameter(@actor, 96, 192, 0)    draw_actor_parameter(@actor, 96, 224, 1)    draw_actor_parameter(@actor, 96, 256, 2)    draw_actor_parameter(@actor, 96, 304, 3)    draw_actor_parameter(@actor, 96, 336, 4)    draw_actor_parameter(@actor, 96, 368, 5)    draw_actor_parameter(@actor, 96, 400, 6)    self.contents.font.color = system_color    self.contents.draw_text(320, 48, 80, 32, "EXP")    self.contents.draw_text(320, 80, 80, 32, "NEXT")    self.contents.font.color = normal_color    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)    self.contents.font.color = system_color    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)    awords1 = ["护符","饰物","","腰带","","","","",]    awords2 = ["","","","","","","","",]    awords3 = ["","","","","","","","",]    awords4 = ["","","","","","","","",]    if awords1[@actor.class_id - 1] != ""      self.contents.draw_text(320, 176, 96, 32, awords1[@actor.class_id - 1])    else       self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)    end    if awords2[@actor.class_id - 1] != ""      self.contents.draw_text(320, 240, 96, 32, awords2[@actor.class_id - 1])    else       self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)    end    if awords3[@actor.class_id - 1] != ""      self.contents.draw_text(320, 304, 96, 32, awords3[@actor.class_id - 1])    else       self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)    end    if awords4[@actor.class_id - 1] != ""      self.contents.draw_text(320, 368, 96, 32, awords4[@actor.class_id - 1])    else       self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)    end    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)   endend#============================================================================# 战斗指令窗#============================================================================class Scene_Battle  def phase3_setup_command_window    # 同伴指令窗口无效化    @party_command_window.active = false      @party_command_window.visible = false    # 原角色指令窗口无效化    if @actor_command_window != nil      @actor_command_window.active = false      @actor_command_window.visible = false    end    # 生成角色指令窗口    bwords1 = ["出拳","棍击","","杖击","","","",""]    bwords2 = ["","","","","","","",""]    bwords3 = ["","","","","","","",""]    bwords4 = ["","","","","","","",""]    if bwords1[@active_battler.class_id - 1] != ""      s1 = bwords1[@active_battler.class_id- 1]     else      s1 = $data_system.words.attack    end    if bwords2[@active_battler.class_id - 1] != ""      s2 = bwords2[@active_battler.class_id- 1]     else      s2 = $data_system.words.skill    end    if bwords3[@active_battler.class_id - 1] != ""      s3 = bwords3[@active_battler.class_id- 1]     else      s3 = $data_system.words.guard    end    if bwords3[@active_battler.class_id - 1] != ""      s4 = bwords4[@active_battler.class_id- 1]     else      s4 = $data_system.words.item    end        if @active_battler.index != @old_actor      @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])    end        # 角色指令窗口有效化    @actor_command_window.active = true    @actor_command_window.visible = true    @old_actor = @active_battler.index    # 设置角色指令窗口的位置    @actor_command_window.x = @active_battler.index * 160    @actor_command_window.y = 160    # 设置索引为 0    @actor_command_window.index = 0  endend复制代码
    复制代码
                本帖来自P1论坛作者well,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=129370  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。

    本帖子中包含更多资源

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

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2025-3-14 23:18 , Processed in 0.131909 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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