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

Project1

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

超级Debug v1.2

 关闭 [复制链接]

Lv2.观梦者

天仙

梦石
0
星屑
610
在线时间
184 小时
注册时间
2008-4-15
帖子
5023

贵宾

跳转到指定楼层
1
发表于 2008-10-9 20:48:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
还有什么功能要增加请提出来
目前功能:
  - 修改变量/开关值(默认功能)
  - 修改金钱数值
  - 修改物品/武器/防具持有数
  - 修改禁止/允许 存档/遇敌/菜单
  - 场所转移
  - 增加功能:修改角色数据
  - 增加功能:角色加入/离队
  - 增加功能:角色状态附加/移除
  - 增加功能:场所转移2 - 列出所有地图资讯
  - 增加功能:修改禁止/允许奔跑
  - 增加功能:修改角色移动速度

注意:
- 修改角色等级时,其馀数据会自动变成该等级的数值
- 修改经验值时,角色会自动升至相应等级
- 修改状态时,效果相反或抵销的状态无法并存
    例如:角色已附有“战斗不能”状态时,其他状态无法加入
- 使用时请自行修改“设定”部分,否则可能会因为读取不到地图资讯而出现错误
   (例如:你的工程中没有3号地图,自然读取不到了)

更新:
* 2008/10/9
   - 修改变量/开关值(默认功能)
   - 修改金钱数值
   - 修改物品/武器/防具持有数
   - 修改禁止/允许 存档/遇敌/菜单
   - 场所转移
* 2008/10/15
   - 增加功能:修改角色数据
   - 增加功能:角色加入/离队
   - 增加功能:角色状态附加/移除
   - 更新脚本:优化/删减部分多馀脚本
* 2008/10/18
   - 增加功能:场所转移2 - 列出所有地图资讯
   - 增加功能:修改禁止/允许奔跑
   - 增加功能:修改角色移动速度
   - 更新脚本:修复修改角色数值无效的BUG
* 2008/11/20
   - 更改脚本:修复场所转移2的显示错误、增加颜色
* 2009/1/7
   - 更新脚本:修复增減物品/武防的BUG
   - 更新脚本:修负数字窗口没有消失的BUG

使用方法:
  1. 贴在main前面
  2. 修改Scene_Debug第57行
     $scene = Scene_Debug.new 改成
     $scene = Scene_Debug_Base.new
  3. 修改物品数量时,按左右键切换武器/防具
  4. 考虑到转移所有地图,但要怕地图太多时麻烦,所以弄成两个功能
     “场所转移”只转移至设定好的地图和座标
     “场所转移2”能选择所有的地图,但是座标随机
     “场所转移2”中还列出了地图的宽、高、是否禁止奔跑、事件数量、自动播放的BGM或BGS

截图:

主介面:


修改金钱:


选择物品类型:


修改物品数量:


场所转移:


场所转移2:


修改队员角色:


队伍已满:


修改角色数值:


附加角色状态:


其他设定:


有BUG请回复


  1. class Scene_Map < Scene_Base
  2.   def call_debug
  3.     Sound.play_decision
  4.     $game_temp.next_scene = nil
  5.     $scene = Scene_Debug_Base.new
  6.   end
  7. end
  8. class Scene_Name < Scene_Base
  9.   def initialize(debug=false)
  10.     @debug = debug
  11.   end
  12.   def return_scene
  13.     $scene = Scene_Map.new unless @debug
  14.     $scene = Scene_Debug_Base.new
  15.   end
  16. end
  17. class Scene_Debug_Base < Scene_Base
  18.   def start
  19.     super
  20.     create_menu_background
  21.     @help_window = Window_Help.new
  22.     @selection_window = Window_Command.new(160, [
  23.      "修改变量/开关",
  24.      "修改金钱",
  25.      "修改物品/武防",
  26.      "场所转移",
  27.      "场所转移2",
  28.      "修改角色数值",
  29.      "其他",
  30.      "离开"
  31.     ])
  32.     @selection_window.y = @help_window.height
  33.     @gold_window = Window_Gold.new(0, 360)

  34.     @item_window = Window_Debug_Item.new
  35.     @item_window.active = false
  36.     @item_window.visible = false
  37.     @item_type_window = Window_Command.new(80,["物品", "武器", "防具"])
  38.     @item_type_window.x = 114
  39.     @item_type_window.y = 144
  40.     @item_type_window.visible = false
  41.     @item_type_window.active = false

  42.     create_place_window
  43.     @place_window.active = false
  44.     @place_window.visible = false
  45.     @place_window2 = Window_Debug_Place.new
  46.     @place_window2.active = false
  47.     @place_window2.visible = false
  48.    
  49.     @map_info_window = Window_Map_Info.new(@place_window2.index+1)
  50.     @map_info_window.visible = false
  51.    
  52.     @now_place_window = Window_Base.new(0, 280, 160, 80)
  53.     @now_place_window.contents.font.color = @now_place_window.text_color(3)
  54.     @now_place_window.contents.draw_text(0, 0, 128, 24, "当前地图:")
  55.     @now_place_window.contents.font.color = @now_place_window.text_color(14)
  56.     map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
  57.     @now_place_window.contents.draw_text(24, 24, 128, 24, map_name)
  58.    
  59.     create_actor_window
  60.     @actor_window.visible = false
  61.     @actor_window.active = false
  62.     @status_window = Window_Debug_Status.new
  63.     @status_window.visible = false
  64.     @status_window.active = false
  65.     @status_window.help_window = @help_window
  66.    
  67.     create_state_window("add")
  68.     @state_window.visible = false
  69.     @state_window.active = false
  70.     @aor_state_window = Window_Command.new(80, ["附加", "移除"])
  71.     @aor_state_window.x = 464
  72.     @aor_state_window.y = 336
  73.     @aor_state_window.z = @status_window.z+1
  74.     @aor_state_window.active = false
  75.     @aor_state_window.visible = false

  76.     @speed_window = Window_Command.new(80, ["1/8", "1/4", "1/2", "1", "2", "4"])
  77.     @speed_window.active = false
  78.     @speed_window.visible = false

  79.     create_system_window
  80.     @system_window.active = false
  81.     @system_window.visible = false
  82.    
  83.     @number_window = Window_NumberInput.new
  84.     @number_window.x = 160
  85.     @number_window.y = 360
  86.     @number_window.height = 56
  87.     @number_window.width = 384
  88.     @number_window.create_contents
  89.     @number_window.opacity = 255
  90.     @number_window.active = false
  91.     @number_window.visible = false
  92.   end
  93.   def terminate
  94.     super
  95.     dispose_menu_background
  96.     @help_window.dispose
  97.     @selection_window.dispose
  98.     @number_window.dispose
  99.     @gold_window.dispose
  100.     @place_window.dispose
  101.     @place_window2.dispose
  102.     @map_info_window.dispose
  103.     @now_place_window.dispose
  104.     @system_window.dispose
  105.     @item_window.dispose
  106.     @item_type_window.dispose
  107.     @actor_window.dispose
  108.     @status_window.dispose
  109.     @state_window.dispose
  110.     @aor_state_window.dispose
  111.     @speed_window.dispose
  112.   end
  113.   def update
  114.     super
  115.     update_menu_background
  116.     update_help
  117.     @help_window.update
  118.     @selection_window.update
  119.     @number_window.update
  120.     @gold_window.update
  121.     @place_window.update
  122.     @place_window2.update
  123.     @map_info_window.update
  124.     @now_place_window.update
  125.     @system_window.update
  126.     @item_window.update
  127.     @item_type_window.update
  128.     @actor_window.update
  129.     @status_window.update
  130.     @state_window.update
  131.     @aor_state_window.update
  132.     @speed_window.update
  133.    
  134.     if @selection_window.active
  135.       update_selection
  136.     elsif @number_window.active
  137.       update_window_number
  138.     elsif @item_window.active
  139.       update_window_item
  140.     elsif @item_type_window.active
  141.       update_window_item_type
  142.     elsif @place_window.active
  143.       update_window_place
  144.     elsif @place_window2.active
  145.       update_window_place2
  146.     elsif @system_window.active
  147.       update_window_system
  148.     elsif @speed_window.active
  149.       update_window_speed
  150.     elsif @actor_window.active
  151.       update_window_actor
  152.     elsif @status_window.active
  153.       update_window_status
  154.     elsif @aor_state_window.active
  155.       update_window_state_aor
  156.     elsif @state_window.active
  157.       update_window_state
  158.     end
  159.   end
  160.   #--------------------------------------------------------------------------
  161.   # ● 更新帮助窗口
  162.   #--------------------------------------------------------------------------
  163.   def update_help
  164.     if @selection_window.active
  165.       text = [
  166.       "修改变量与开关之值",
  167.       "修改队伍所携带金钱数额",
  168.       "修改队伍所携带的物品、武器或防具数量",
  169.       "转移至指定的地图",
  170.       "列出所有地图的资讯,并转移至该地图随机位置",
  171.       "修改角色数值",
  172.       "其他选项",
  173.       "回到地图画面"
  174.       ]
  175.       @help_window.set_text(text[@selection_window.index])
  176.     elsif @selection_window.index == 1
  177.       @help_window.set_text("请输入金额")
  178.     elsif @item_window.active
  179.       @help_window.set_text(@item_window.item.description)
  180.     elsif @item_type_window.active
  181.       text=[
  182.       "修改队伍所携带的物品数量",
  183.       "修改队伍所携带的武器数量",
  184.       "修改队伍所携带的防具数量"
  185.       ]
  186.       @help_window.set_text(text[@item_type_window.index])
  187.     elsif @selection_window.index == 2
  188.       @help_window.set_text("请输入数量")
  189.     elsif @actor_window.active
  190.       if @actor_window.index == $game_party.members.size
  191.         @help_window.set_text("强制加入角色")
  192.       else
  193.         @help_window.set_text("选择要修改的角色")
  194.       end
  195.     elsif @status_window.active
  196.       if @status_window.mode
  197.         text=[
  198.         "修改角色名称",
  199.         "修改角色#{Vocab.level}",
  200.         "修改角色经验值",
  201.         "修改角色#{Vocab.hp}最大值",
  202.         "修改角色#{Vocab.hp}",
  203.         "修改角色#{Vocab.mp}最大值",
  204.         "修改角色#{Vocab.mp}",
  205.         "修改角色#{Vocab.atk}",
  206.         "修改角色#{Vocab.def}",
  207.         "修改角色#{Vocab.spi}",
  208.         "修改角色#{Vocab.agi}",
  209.         "强制附加/移除角色状态",
  210.         "角色离开队伍"
  211.         ]
  212.         @help_window.set_text(text[@status_window.index])
  213.       else
  214.         "将#{@status_window.actor.name}强制加入队伍"
  215.       end
  216.     elsif @system_window.active
  217.       text=[
  218.       "禁止/允许随时存档",
  219.       "禁止/允许进入菜单",
  220.       "禁止/允许地图上遭遇敌人"
  221.       ]
  222.       @help_window.set_text(text[@system_window.index])
  223.     elsif @aor_state_window.active
  224.       text=["强制附加状态", "强制移除状态"]
  225.       @help_window.set_text(text[@aor_state_window.index])
  226.     elsif @state_window.active
  227.       @help_window.set_text("选择要#{@aor_state_window.commands[@aor_state_window.index]}的状态")
  228.     end
  229.   end
  230.   #--------------------------------------------------------------------------
  231.   # ● 更新选项窗口
  232.   #--------------------------------------------------------------------------
  233.   def update_selection
  234.     if Input.trigger?(Input::C)
  235.       Sound.play_decision
  236.       case @selection_window.index
  237.       when 0   # 修改变量/开关
  238.         $scene = Scene_Debug.new
  239.       when 1   # 修改金钱
  240.         @selection_window.active = false
  241.         @number_window.visible = true
  242.         @number_window.active = true
  243.         @number_window.number = $game_party.gold
  244.         @number_window.digits_max = 7
  245.         @number_window.y = @gold_window.y
  246.         @number_window.contents.font.color = @number_window.text_color(10)
  247.         @number_window.contents.draw_text(192, 0, 192, 24, "请输入金额")
  248.       when 2   # 修改物品/武防
  249.         @selection_window.active = false
  250.         @item_window.visible = true
  251.         @item_type_window.visible = true
  252.         @item_type_window.active = true
  253.       when 3   # 场所转移
  254.         @selection_window.active = false
  255.         @place_window.active = true
  256.         @place_window.visible = true
  257.       when 4   # 场所转移2
  258.         @selection_window.active = false
  259.         @place_window2.active = true
  260.         @place_window2.visible = true
  261.         @map_info_window.visible = true
  262.       when 5   # 角色数值修改
  263.         @selection_window.active = false
  264.         @actor_window.active = true
  265.         @actor_window.visible = true
  266.         @status_window.visible = true
  267.       when 6   # 其他
  268.         @selection_window.active = false
  269.         @system_window.active = true
  270.         @system_window.visible = true
  271.       when 7   # 离开
  272.         $scene = Scene_Map.new
  273.       end
  274.     elsif Input.trigger?(Input::B)
  275.       Sound.play_cancel
  276.       $scene = Scene_Map.new
  277.     end
  278.   end
  279.   #--------------------------------------------------------------------------
  280.   # ● 更新数值窗口
  281.   #--------------------------------------------------------------------------
  282.   def update_window_number
  283.     if Input.trigger?(Input::C)
  284.       Sound.play_decision
  285.       case @selection_window.index
  286.       when 1
  287.         @selection_window.active = true
  288.         $game_party.lose_gold($game_party.gold)
  289.         $game_party.gain_gold(@number_window.number)
  290.         @gold_window.refresh
  291.         @number_window.visible = false
  292.       when 2
  293.         @item_window.active = true
  294.         $game_party.lose_item(@item_window.item, $game_party.item_number(@item_window.item))
  295.         $game_party.gain_item(@item_window.item, @number_window.number)
  296.         @item_window.refresh
  297.         @number_window.refresh
  298.         @number_window.active = false
  299.         @number_window.visible = false
  300.       when 5
  301.         @status_window.set_params(@status_window.index, @number_window.number)
  302.         @status_window.refresh
  303.         @status_window.active = true
  304.         @number_window.active = false
  305.         @number_window.visible = false
  306.       end
  307.     elsif Input.trigger?(Input::B)
  308.       Sound.play_cancel
  309.       case @selection_window.index
  310.       when 1
  311.         @selection_window.active = true
  312.         @number_window.visible = false
  313.       when 2
  314.         @item_window.active = true
  315.         @number_window.active = false
  316.       when 5
  317.         @status_window.active = true
  318.         @number_window.active = false
  319.         @number_window.visible = false
  320.       end
  321.     end
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ● 更新物品窗口
  325.   #--------------------------------------------------------------------------
  326.   def update_window_item
  327.     if Input.trigger?(Input::B)
  328.       Sound.play_cancel
  329.       @selection_window.active = true
  330.       @item_window.visible = false
  331.       @item_window.active = false
  332.       @number_window.visible = false
  333.     end
  334.     if Input.trigger?(Input::C)
  335.       Sound.play_decision
  336.       @item_window.active = false
  337.       @number_window.active = true
  338.       @number_window.contents.font.color = @number_window.text_color(10)
  339.       @number_window.contents.draw_text(192, 0, 192, 24, "请输入数量")
  340.     end
  341.     if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
  342.       @item_window.item_type += 1 if Input.trigger?(Input::LEFT)
  343.       @item_window.item_type += 2 if Input.trigger?(Input::RIGHT)
  344.       @item_window.item_type %= 3
  345.       @item_window.refresh
  346.     end
  347.   end
  348.   #--------------------------------------------------------------------------
  349.   # ● 更新物品类型窗口
  350.   #--------------------------------------------------------------------------
  351.   def update_window_item_type
  352.     if Input.trigger?(Input::B)
  353.       Sound.play_cancel
  354.       @selection_window.active = true
  355.       @item_window.visible = false
  356.       @item_type_window.visible = false
  357.       @item_type_window.active = false
  358.     end
  359.     if Input.trigger?(Input::C)
  360.       Sound.play_decision
  361.       @item_window.item_type = @item_type_window.index
  362.       @item_window.refresh
  363.       @item_window.active = true
  364.       @item_type_window.visible = false
  365.       @item_type_window.active = false
  366.       @number_window.visible = true
  367.       @number_window.digits_max = 2
  368.     end
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ● 更新地名窗口
  372.   #--------------------------------------------------------------------------
  373.   def update_window_place
  374.     if Input.trigger?(Input::B)
  375.       Sound.play_cancel
  376.       @selection_window.active = true
  377.       @place_window.visible = false
  378.       @place_window.active = false
  379.     end
  380.     if Input.trigger?(Input::C)
  381.       Sound.play_decision
  382.       transfer_key = MAP_NAME_AS_PLACE_NAME ?
  383.                      PLACES.keys[@place_window.index] :
  384.                      @place_window.commands[@place_window.index]
  385.       transfer_data = PLACES[transfer_key]
  386.       t_map_id = transfer_data[0]
  387.       t_x = transfer_data[1]
  388.       t_y = transfer_data[2]
  389.       t_direction = [2, 4, 6, 8].include?(transfer_data[3])? transfer_data[3]: 2
  390.       $game_player.reserve_transfer(t_map_id, t_x, t_y, t_direction)
  391.       $scene = Scene_Map.new
  392.     end
  393.   end
  394.   def update_window_place2
  395.     if Input.trigger?(Input::B)
  396.       Sound.play_cancel
  397.       @selection_window.active = true
  398.       @place_window2.visible = false
  399.       @place_window2.active = false
  400.       @map_info_window.visible = false
  401.     end
  402.     if Input.trigger?(Input::C)
  403.       Sound.play_decision
  404.       t_id = @place_window2.index+1
  405.       t_map = load_data(sprintf("Data/Map%03d.rvdata", t_id))
  406.       t_x = 1+rand(t_map.width)
  407.       t_y = 1+rand(t_map.height)
  408.       $game_player.reserve_transfer(t_id, t_x, t_y, 2)
  409.       $scene = Scene_Map.new
  410.     end
  411.     if Input.trigger?(Input::DOWN) or Input.trigger?(Input::UP)
  412.       @map_info_window.dispose
  413.       @map_info_window = Window_Map_Info.new(@place_window2.index+1)
  414.     end
  415.   end
  416.   #--------------------------------------------------------------------------
  417.   # ● 更新角色窗口
  418.   #--------------------------------------------------------------------------
  419.   def update_window_actor
  420.     if Input.trigger?(Input::B)
  421.       Sound.play_cancel
  422.       @selection_window.active = true
  423.       @actor_window.visible = false
  424.       @actor_window.active = false
  425.       @status_window.visible = false
  426.     end
  427.     if Input.trigger?(Input::C)
  428.       if $game_party.members.size == Game_Party::MAX_MEMBERS and
  429.         @actor_window.index == $game_party.members.size
  430.         Sound.play_buzzer
  431.         return
  432.       end
  433.       Sound.play_decision
  434.       @status_window.dispose
  435.       if @status_window.mode
  436.         @status_window = Window_Debug_Status.new(@status_window.actor)
  437.       else
  438.         @status_window = Window_Debug_Status.new(nil)
  439.       end
  440.       @actor_window.active = false
  441.       @status_window.active = true
  442.       @status_window.index = @status_window.mode ? 1 : 0
  443.     end
  444.     if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
  445.       @status_window.actor = $game_party.members[@actor_window.index]
  446.       @status_window.dispose
  447.       @status_window = Window_Debug_Status.new($game_party.members[@actor_window.index])
  448.       @status_window.active = false
  449.     end
  450.   end
  451.   #--------------------------------------------------------------------------
  452.   # ● 更新人物状态窗口
  453.   #--------------------------------------------------------------------------
  454.   def update_window_status
  455.     if Input.trigger?(Input::B)
  456.       Sound.play_cancel
  457.       @actor_window.active = true
  458.       @status_window.active = false
  459.       @status_window.index = @status_window.mode ? 1 : 0
  460.     elsif Input.trigger?(Input::C)
  461.       Sound.play_decision
  462.       if @actor_window.index == $game_party.members.size
  463.         $game_party.add_actor(@status_window.actor.id)
  464.         create_actor_window
  465.         @status_window.dispose
  466.         @status_window = Window_Debug_Status.new(
  467.           $game_party.members[@actor_window.index])
  468.         return
  469.       else
  470.         case @status_window.index
  471.         when 0
  472.           $game_temp.name_actor_id = @status_window.actor.id
  473.           $game_temp.name_max_char = 12
  474.           $scene = Scene_Name.new(true)
  475.         when 1..10
  476.           case @status_window.index
  477.           when 1
  478.             @number_window.digits_max = 2
  479.           when 2
  480.             @number_window.digits_max = 7
  481.           when 3..6
  482.             @number_window.digits_max = 4
  483.           when 7..10
  484.             @number_window.digits_max = 3
  485.           end
  486.           @number_window.active = true
  487.           @number_window.visible = true
  488.           @status_window.active = false
  489.         when 11
  490.           @aor_state_window.active = true
  491.           @aor_state_window.visible = true
  492.           @status_window.active = false
  493.         when 12
  494.           $game_party.remove_actor(@status_window.actor.id)
  495.           create_actor_window
  496.           @status_window.dispose
  497.           @status_window = Window_Debug_Status.new($game_party.members[@actor_window.index])
  498.           @actor_window.active = true
  499.           @status_window.active = false
  500.         end
  501.       end
  502.     elsif Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
  503.       index = @actor_window.index
  504.       index += 1 if Input.trigger?(Input::RIGHT)
  505.       index += ($game_party.members.size - 1) if Input.trigger?(Input::LEFT)
  506.       index %= $game_party.members.size
  507.       @status_window.actor = $game_party.members[index]
  508.       @actor_window.index = index
  509.       @status_window.refresh
  510.     end
  511.   end
  512.   #--------------------------------------------------------------------------
  513.   # ● 更新状态列表窗口
  514.   #--------------------------------------------------------------------------
  515.   def update_window_state
  516.     if Input.trigger?(Input::B)
  517.       Sound.play_cancel
  518.       @state_window.active = false
  519.       @state_window.visible = false
  520.       @aor_state_window.visible = false
  521.       @aor_state_window.active = false
  522.       @status_window.refresh
  523.       @status_window.active = true
  524.     elsif Input.trigger?(Input::C)
  525.       Sound.play_decision
  526.       state = @state_window.states[@state_window.index]
  527.       actor = @status_window.actor
  528.       case @aor_state_window.index
  529.       when 0
  530.         actor.add_state(state.id)
  531.         @state_window.states.delete(state)
  532.       when 1
  533.         actor.remove_state(state.id)
  534.       end
  535.       @status_window.refresh
  536.       @state_window.refresh
  537.     end
  538.   end
  539.   #--------------------------------------------------------------------------
  540.   # ● 更新状态附加/移除窗口
  541.   #--------------------------------------------------------------------------
  542.   def update_window_state_aor
  543.     if Input.trigger?(Input::B)
  544.       Sound.play_cancel
  545.       @status_window.active = true
  546.       @aor_state_window.visible = false
  547.       @aor_state_window.active = false
  548.     end
  549.     if Input.trigger?(Input::C)
  550.       Sound.play_decision
  551.       case @aor_state_window.index
  552.       when 0; create_state_window("add")
  553.       when 1; create_state_window("remove")
  554.       end
  555.       @state_window.active = true
  556.       @state_window.visible = true
  557.       @state_window.index = 0
  558.       @aor_state_window.active = false
  559.     end
  560.   end
  561.   #--------------------------------------------------------------------------
  562.   # ● 更新系统窗口
  563.   #--------------------------------------------------------------------------
  564.   def update_window_system
  565.     if Input.trigger?(Input::B)
  566.       Sound.play_cancel
  567.       @selection_window.active = true
  568.       @system_window.visible = false
  569.       @system_window.active = false
  570.     end
  571.     if Input.trigger?(Input::C)
  572.       Sound.play_decision
  573.       case @system_window.index
  574.       when 0; $game_system.save_disabled = !$game_system.save_disabled
  575.       when 1; $game_system.menu_disabled = !$game_system.menu_disabled
  576.       when 2; $game_system.encounter_disabled = !$game_system.encounter_disabled
  577.       when 3; $game_map.disable_dashing = !$game_map.disable_dash?
  578.       when 4
  579.         @system_window.active = false
  580.         @speed_window.active = true
  581.         @speed_window.visible = true
  582.         @speed_window.index = $game_player.move_speed - 1
  583.       end
  584.       refresh_system_window
  585.     end
  586.   end
  587.   def update_window_speed
  588.     if Input.trigger?(Input::B)
  589.       Sound.play_cancel
  590.       @system_window.active = true
  591.       @speed_window.visible = false
  592.       @speed_window.active = false
  593.     end
  594.     if Input.trigger?(Input::C)
  595.       Sound.play_decision
  596.       $game_player.move_speed = @speed_window.index+1
  597.       @system_window.active = true
  598.       @speed_window.visible = false
  599.       @speed_window.active = false
  600.       refresh_system_window
  601.     end
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # ● 生成角色窗口
  605.   #--------------------------------------------------------------------------
  606.   def create_actor_window
  607.     @actor_window.dispose unless @actor_window.nil?
  608.     actors = Array.new($game_party.members.size){|i| $game_party.members[i].name}
  609.     actors << ""
  610.     @actor_window = Window_Command.new(190, actors)
  611.     y = 24 * $game_party.members.size
  612.     if $game_party.members.size < Game_Party::MAX_MEMBERS
  613.       @actor_window.contents.font.color = @actor_window.system_color
  614.       @actor_window.contents.draw_text(0, y, 158, 24, "*添加队员*", 1)
  615.     else
  616.       @actor_window.contents.font.color = @actor_window.knockout_color
  617.       @actor_window.contents.draw_text(0, y, 158, 24, "*队伍已满*", 1)
  618.     end
  619.     @actor_window.x = 160
  620.     @actor_window.y = 56
  621.   end
  622.   #--------------------------------------------------------------------------
  623.   # ● 生成状态列表窗口
  624.   #--------------------------------------------------------------------------
  625.   def create_state_window(add_or_remove=nil)
  626.     if add_or_remove == "add"
  627.       states = $data_states.compact
  628.       for s in @status_window.actor.states
  629.         states.delete(s)
  630.       end
  631.     elsif add_or_remove == "remove"
  632.       states = @status_window.actor.states
  633.     else return
  634.     end
  635.     y = @actor_window.y + @actor_window.height
  636.     @state_window.dispose unless @state_window.nil?
  637.     @state_window = Window_Debug_State.new(@actor_window.x, y, 190, 416-y)
  638.     @state_window.states = states
  639.     @state_window.refresh
  640.   end
  641.   #--------------------------------------------------------------------------
  642.   # ● 生成地名窗口
  643.   #--------------------------------------------------------------------------
  644.   def create_place_window
  645.     places = []
  646.     for i in 0...PLACES.size
  647.       pxy = PLACES[PLACES.keys[i]]
  648.       xy = [pxy[1], pxy[2]]
  649.       if MAP_NAME_AS_PLACE_NAME
  650.         name = load_data("Data/MapInfos.rvdata")[pxy[0]].name
  651.         places << name
  652.       else
  653.         places << PLACES.keys[i]
  654.       end
  655.     end
  656.     @place_window = Window_Command.new(384, places)
  657.     for i in 0...PLACES.size
  658.       pxy = PLACES[PLACES.keys[i]]
  659.       xy = [pxy[1], pxy[2]]
  660.       @place_window.contents.font.color = @place_window.text_color(11)
  661.       string="座标:[#{sprintf("%03d","#{xy[1]}")},#{sprintf("%03d","#{xy[0]}")}]"
  662.       @place_window.contents.draw_text(170, i * Window_Base::WLH,200, Window_Base::WLH, string)
  663.     end
  664.     @place_window.x = 160
  665.     @place_window.y = 56
  666.     @place_window.height = 304
  667.   end
  668.   #--------------------------------------------------------------------------
  669.   # ● 生成系统设定窗口
  670.   #--------------------------------------------------------------------------
  671.   def create_system_window
  672.     @system_window = Window_Command.new(384, [
  673.      "禁止存档:",
  674.      "禁止菜单:",
  675.      "禁止遇敌:",
  676.      "禁止奔跑:",
  677.      "角色移动速度:"
  678.     ])
  679.     refresh_system_window
  680.     @system_window.x = 160
  681.     @system_window.y = 56
  682.   end
  683.   def refresh_system_window
  684.     k = @system_window
  685.     k.refresh
  686.     for i in 0...k.commands.size
  687.       case i
  688.       when 0; a = $game_system.save_disabled
  689.       when 1; a = $game_system.menu_disabled
  690.       when 2; a = $game_system.encounter_disabled
  691.       when 3; a = !$game_map.disable_dash?
  692.       when 4; a = $game_player.move_speed
  693.       end
  694.       case i
  695.       when 0..3
  696.         k.contents.font.color = a ? k.text_color(10) : k.text_color(3)
  697.         k.contents.draw_text(247, i * Window_Base::WLH,120,
  698.                            Window_Base::WLH, a ? "禁止" : "允许")
  699.       when 4
  700.         k.contents.font.color = k.normal_color
  701.         t = @speed_window.commands[a-1]
  702.         k.contents.draw_text(247, i * Window_Base::WLH,120,
  703.                            Window_Base::WLH, "#{a}: #{t}倍速")
  704.       end
  705.     end
  706.   end
  707. end
复制代码


设定部分
  1. class Scene_Debug_Base < Scene_Base
  2.   # 是否使用地图名称作为地名
  3.   # 若 true 则直接读取地图名称作为地名,在下面的定义中,地名填不填都不要紧
  4.   #   false 则使用下面定义的名称作为地名
  5.   MAP_NAME_AS_PLACE_NAME = !false

  6.   PLACES = {
  7.     #"地名" => [地图ID, x, y, 面向]
  8.     # 面向不填写的话默认为 2, 也就是向下
  9.     # 面向若填写为 2 4 6 8 以外的数字,会自动修正成 2
  10.     "原点"       => [1, 9, 10],
  11.     "围墙内"     => [2, 3, 3, 4],
  12.     "山中"       => [3, 5, 6],
  13.   }
  14. end
复制代码
VA脚本开工中...
偷窃脚本1.0 - 已完成

Lv1.梦旅人

穿越一季:朔

梦石
0
星屑
50
在线时间
333 小时
注册时间
2007-4-11
帖子
5369

贵宾

2
发表于 2008-10-9 21:02:24 | 只看该作者
{/hx}
很好..试试去


不好意思,借楼更新
窗口部分

  1. class Window_Debug_Status < Window_Command
  2.   attr_reader :actor
  3.   alias refresh2 refresh
  4.   def initialize(actor=$game_party.members[0])
  5.     if actor
  6.       super(194, Array.new(13, ""))
  7.     else
  8.       @actors = $data_actors.compact
  9.       for act in $game_party.members
  10.         @actors.delete($data_actors[act.id])
  11.       end
  12.       super(194, Array.new(@actors.size){|i|@actors[i].name})
  13.     end
  14.     self.x = 350
  15.     self.y = 56
  16.     self.height = 360
  17.     @column_max = 1
  18.     self.index = 0
  19.     @actor = actor
  20.     actor.nil? ? refresh2 : refresh
  21.   end
  22.   def mode; return @actor; end
  23.   def actor
  24.     return @actor ? @actor : @actors[index]
  25.   end
  26.   def actor=(actor)
  27.     if mode
  28.       @actor = $game_party.members[0] unless actor.is_a?(Game_Actor)
  29.       @actor = actor
  30.     else
  31.       @actors[@index]
  32.     end
  33.   end
  34.   def refresh
  35.     self.contents.clear
  36.     return if @actor.nil?
  37.     x = 4
  38.     draw_actor_parameter(@actor, x, WLH * 7,  0)
  39.     draw_actor_parameter(@actor, x, WLH * 8,  1)
  40.     draw_actor_parameter(@actor, x, WLH * 9,  2)
  41.     draw_actor_parameter(@actor, x, WLH * 10, 3)
  42.     draw_actor_state(@actor, x, WLH * 11)
  43.     self.contents.font.color = system_color
  44.     self.contents.draw_text(x, WLH  , 50 , WLH, Vocab::level)
  45.     self.contents.draw_text(x, WLH*2, 180, WLH, "经验值")
  46.     self.contents.draw_text(x, WLH*3, 120, WLH, "#{Vocab::hp}最大值")
  47.     self.contents.draw_text(x, WLH*4, 120, WLH, Vocab::hp)
  48.     self.contents.draw_text(x, WLH*5, 120, WLH, "#{Vocab::mp}最大值")
  49.     self.contents.draw_text(x, WLH*6, 120, WLH, Vocab::mp)
  50.     self.contents.font.color = normal_color
  51.     self.contents.draw_text(x,   0,      108, WLH, @actor.name)
  52.     self.contents.draw_text(112, WLH  ,  48,  WLH, @actor.level, 2)
  53.     self.contents.draw_text(  0, WLH*2,  160, WLH, @actor.exp_s, 2)
  54.     self.contents.draw_text(124, WLH*3,  36,  WLH, @actor.maxhp, 2)
  55.     self.contents.draw_text(124, WLH*4,  36,  WLH, @actor.hp, 2)
  56.     self.contents.draw_text(124, WLH*5,  36,  WLH, @actor.maxmp, 2)
  57.     self.contents.draw_text(124, WLH*6,  36,  WLH, @actor.mp, 2)
  58.     self.contents.font.color = crisis_color
  59.     self.contents.draw_text(x,   WLH*12, 160, WLH, "离开队伍", 1)
  60.   end
  61.   def draw_actor_state(actor, x, y, width = 96)
  62.     for s in 0...actor.states.size
  63.       state = actor.states[s]
  64.       draw_icon(state.icon_index, x + 24 * s, y)
  65.     end
  66.     self.contents.draw_text(x, y, 160, WLH, "无状态") if actor.states.empty?   
  67.   end
  68.   def set_params(index, value)
  69.     case index
  70.     when 1;  @actor.change_level(value, false)
  71.     when 2;  @actor.change_exp(value, false)
  72.     when 3;  @actor.maxhp = value
  73.     when 4;  @actor.hp    = value
  74.     when 5;  @actor.maxmp = value
  75.     when 6;  @actor.mp    = value
  76.     when 7;  @actor.atk   = value
  77.     when 8;  @actor.def   = value
  78.     when 9;  @actor.spi   = value
  79.     when 10; @actor.agi   = value
  80.     end
  81.   end
  82. end
  83. class Window_Debug_Item < Window_Item
  84.   attr_accessor :item_type
  85.   def initialize
  86.     super(160, 56, 384, 304)
  87.     @item_type=0
  88.     @column_max = 1   
  89.     self.index = 0
  90.     self.back_opacity = 255
  91.     refresh
  92.   end
  93.   def refresh
  94.     @data = []
  95.     case @item_type
  96.     when 0; @data = $data_items.dup
  97.     when 1; @data = $data_weapons.dup
  98.     when 2; @data = $data_armors.dup
  99.     end
  100.     @data.compact!
  101.     @item_max = @data.size
  102.     create_contents
  103.     for i in 0...@item_max
  104.       draw_item(i)
  105.     end
  106.   end
  107. end
  108. class Window_Debug_State < Window_Selectable
  109.   attr_accessor :states
  110.   def refresh
  111.     self.contents.clear
  112.     @item_max = @states.size
  113.     create_contents
  114.     for i in [email protected]
  115.       s = @states[i]
  116.       draw_icon(s.icon_index, 0, i*24)
  117.       self.contents.draw_text(26, i*24, 158, 24, s.name)
  118.     end
  119.   end
  120. end
  121. class Window_Debug_Place < Window_Command
  122.   def initialize
  123.     places = load_data("Data/MapInfos.rvdata")
  124.     places_name = []
  125.     for i in 1..places.size
  126.       places_name << places[i].name
  127.     end
  128.     super(384, places_name)
  129.     self.x = 160
  130.     self.y = 56
  131.     self.height = 256
  132.     self.contents.dispose
  133.     self.contents = Bitmap.new(352, places_name.size*WLH)
  134.     refresh
  135.   end
  136.   def draw_item(index)
  137.     self.contents.font.color = normal_color
  138.     self.contents.draw_text(4, index*WLH, 345, WLH, @commands[index])
  139.     self.contents.font.color = Color.new(255, 221, 85)
  140.     self.contents.draw_text(4, index*WLH, 345, WLH, " 进入", 2)
  141.   end
  142. end
  143. class Window_Map_Info < Window_Base
  144.   def initialize(map_index)
  145.     @index = map_index
  146.     super(160, 312, 384, 104)
  147.     refresh
  148.   end
  149.   def refresh
  150.     self.contents.clear
  151.     map = load_data(sprintf("Data/Map%03d.rvdata", @index))
  152.         
  153.     self.contents.font.color = Color.new(96, 191, 144)
  154.     place_name = load_data("Data/MapInfos.rvdata")[@index].name
  155.     self.contents.draw_text(4, 0, 120, WLH, place_name)
  156.    
  157.     self.contents.font.color = Color.new(255, 192, 0)
  158.     text = sprintf("宽:%03d 高:%03d", map.width, map.height)
  159.     self.contents.draw_text(124, 0, 240, WLH, text)
  160.    
  161.     self.contents.font.color = map.disable_dashing ? knockout_color : normal_color
  162.     text = map.disable_dashing ? "禁止奔跑" : "允许奔跑"
  163.     self.contents.draw_text(4, 24, 72, WLH, text)
  164.    
  165.     self.contents.font.color = Color.new(48, 192, 255)
  166.     text = ["不循环", "纵向循环", "横向循环", "纵横循环"][map.scroll_type]
  167.     self.contents.draw_text(94, 24, 72, WLH, text)
  168.    
  169.     self.contents.font.color = Color.new(0, 128, 0)
  170.     text = sprintf("事件数量:%02d", map.events.size)
  171.     self.contents.draw_text(184, 24, 240, WLH, text)
  172.    
  173.     self.contents.font.color = normal_color
  174.     text = map.autoplay_bgm ? "自动BGM: #{map.bgm.name}" : "不切换BGM"
  175.     self.contents.draw_text(4, 48, 172, WLH, text)
  176.    
  177.     text = map.autoplay_bgs ? "自动BGS: #{map.bgs.name}" : "不切换BGS"
  178.     self.contents.draw_text(176, 48, 172, WLH, text)
  179.   end
  180. end
  181. class Game_Player < Game_Character
  182.   def move_speed; return @move_speed; end
  183.   def move_speed=(speed)
  184.     @move_speed = [[6, speed].min, 1].max
  185.   end
  186. end
  187. class Game_Map
  188.   attr_writer :disable_dashing
  189.   alias setup_debug setup
  190.   def setup(map_id)
  191.     setup_debug(map_id)
  192.     @disable_dashing = @map.disable_dashing
  193.   end
  194.   def disable_dash?
  195.     return @disable_dashing
  196.   end
  197. end
复制代码
6R复活?别扯淡了.

柳柳一旦接手66RPG,我果断呵呵啊。
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-7-8
帖子
466
3
发表于 2008-10-10 00:35:58 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv2.观梦者

神隐的主犯

梦石
0
星屑
258
在线时间
271 小时
注册时间
2008-2-22
帖子
7691

贵宾

4
发表于 2008-10-10 00:58:10 | 只看该作者
流星姐抢了我的工作,555555

《天空之城 —— 破碎的命运》
回复 支持 反对

使用道具 举报

Lv2.观梦者

天仙

梦石
0
星屑
610
在线时间
184 小时
注册时间
2008-4-15
帖子
5023

贵宾

5
 楼主| 发表于 2008-10-10 05:31:15 | 只看该作者
以下引用kissye于2008-10-9 16:35:58的发言:
这个是什么字体?
看着很舒服的说

標楷體

以下引用八云蓝于2008-10-9 16:58:10的发言:
流星姐抢了我的工作,555555

八云继续写阿....看看有啥不同{/cy}
VA脚本开工中...
偷窃脚本1.0 - 已完成
回复 支持 反对

使用道具 举报

Lv2.观梦者

神隐的主犯

梦石
0
星屑
258
在线时间
271 小时
注册时间
2008-2-22
帖子
7691

贵宾

6
发表于 2008-10-10 05:36:07 | 只看该作者
差不多吧,只是 功能没你的多就是了。

《天空之城 —— 破碎的命运》
回复 支持 反对

使用道具 举报

Lv2.观梦者

傻♂逼

梦石
0
星屑
369
在线时间
1605 小时
注册时间
2007-3-13
帖子
6562

烫烫烫开拓者

7
发表于 2008-10-10 06:01:49 | 只看该作者
嘿嘿,菜单没我大
哎呀,蛋疼什么的最有爱了
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3251
在线时间
3616 小时
注册时间
2006-9-6
帖子
37398

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

8
发表于 2008-10-10 22:45:32 | 只看该作者
想想还有什么功能……
回复 支持 反对

使用道具 举报

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
539
在线时间
1238 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

9
发表于 2008-10-11 05:09:25 | 只看该作者
这个也没有执行RGSS功能

点评

哪天我就再搞这个,结构发现国外早就有了。  发表于 2010-7-17 13:38
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上
回复 支持 反对

使用道具 举报

Lv1.梦旅人

B

梦石
0
星屑
50
在线时间
26 小时
注册时间
2007-8-26
帖子
3693
10
发表于 2008-10-12 02:44:27 | 只看该作者
以下引用八云蓝于2008-10-9 16:58:10的发言:

流星姐抢了我的工作,555555


可以制作个战斗debug啊~

一般大型的rpg都需要的。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 14:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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