设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 105|回复: 0

[转载发布] Difficulty Selection

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 11:01:06 | 显示全部楼层 |阅读模式
    Difficulty Selection 1.0.0

    by Todd (or DoctorTodd on RMRK)

    Introduction

    Lets the player select the games difficulty. Each difficulty multiplies the enemies parameters.

    Screenshot:

    http://desmond.image...png&res=landing

    Features


    • Option to add to menu.
    • Pick between easy, normal, heroic, hard.
    How to UsePaste above main.

    Configure the script to the way you like it.

    Script

    Spoiler#===============================================================================## DT's Difficulty# Author: DoctorTodd# Date (06/24/2012)# Version: (1.0.0) (VXA)# Level: (Medium)# Email: Todd@beacongames.com##===============================================================================## NOTES: 1)This script will only work with ace.#        2)A difficulty must be selected before the first battle or the game WILL#        CRASH.##===============================================================================## Description: Lets the player select the games difficulty.## Credits: Me (DoctorTodd), D&P3 for saving bug fix.##===============================================================================## Instructions# Paste above main.##===============================================================================## Free for any use as long as I'm credited.##===============================================================================## Editing begins 38 and ends on 71.##===============================================================================module TODDDIFFICULTY   #Easy Text.  EASYT = "Easy"   #Normal Text.  NORMALT = "Normal"   #Heroic Text.  HEROICT = "Heroic"   #Hard Text.  HARDT = "Hard"   #Easy enemy parameters multiplier.  EASYM = 0.5   #Heroic enemy parameters multiplier (Normal is skipped since it's what put  #you into the database).  HEROICM = 1.5   #Hard enemy parameters multiplier.  HARDM = 2   #The text above where the selection is made.  TEXT = "Please select a difficulty:"   #Menu command?  MENU = true   #Sound effect to play when difficulty is selected.  SE = "Darkness8"   #Switch to allow cancelling the difficulty selection.  #MUST NOT BE ON WHEN SELECTING FOR THE FIRST TIME.  SWITCH = 5end#==============================================================================# ** Game_Enemy#------------------------------------------------------------------------------#  This class handles enemies. It used within the Game_Troop class# ($game_troop).#==============================================================================class Game_Enemy < Game_Battler  #--------------------------------------------------------------------------  # * Get Base Value of Parameter  #--------------------------------------------------------------------------  alias todd_difficulty_gmen_param_base param_base  def param_base(param_id, *args)  n1 = todd_difficulty_gmen_param_base(param_id, *args)  n2 = case $game_system.todd_difficulty  when 0 then TODDDIFFICULTY::EASYM  when 1 then 1  when 2 then TODDDIFFICULTY::HEROICM  when 3 then TODDDIFFICULTY::HARDM  end  return n1 * n2 endend#==============================================================================# ** Game_System#------------------------------------------------------------------------------#  This class handles system data. It saves the disable state of saving and# menus. Instances of this class are referenced by $game_system.#==============================================================================class Game_System  #--------------------------------------------------------------------------  # * Public Instance Variables  #--------------------------------------------------------------------------  attr_accessor :todd_difficulty            # save forbidden  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  alias todd_difficulty_gamesystem_init initialize  def initialize    @todd_difficulty = 0    todd_difficulty_gamesystem_init  endend#==============================================================================# ** Window_DifficultySelection#==============================================================================class Window_DifficultySelection < Window_HorzCommand  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super(0, 0)  end  #--------------------------------------------------------------------------  # * Get Window Width  #--------------------------------------------------------------------------  def window_width    Graphics.width/2 + 20  end  #--------------------------------------------------------------------------  # * Get Digit Count  #--------------------------------------------------------------------------  def col_max    return 4  end  #--------------------------------------------------------------------------  # * Create Command List  #--------------------------------------------------------------------------  def make_command_list    add_command(TODDDIFFICULTY::EASYT,     :easy)    add_command(TODDDIFFICULTY::NORMALT,   :normal)    add_command(TODDDIFFICULTY::HEROICT,    :heroic)    add_command(TODDDIFFICULTY::HARDT, :hard)  endend#==============================================================================# ** Window_DifficultyName#==============================================================================class Window_DifficultyName < Window_Base  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super(0, 0, window_width, fitting_height(1))    refresh  end  #--------------------------------------------------------------------------  # * Get Window Width  #--------------------------------------------------------------------------  def window_width    return Graphics.width/2 + 20  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_text(15, -27, 400, 80, TODDDIFFICULTY::TEXT)  endend#==============================================================================# ** Scene_Difficulty#==============================================================================class Scene_Difficulty < Scene_MenuBase  #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  def start    super    create_command_window    create_name_window  end  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------  def create_command_window    @command_window = Window_DifficultySelection.new    @command_window.set_handler
    easy,      method
    command_easy))    @command_window.set_handler
    normal,     method
    command_normal))    @command_window.set_handler
    heroic,     method
    command_heroic))    @command_window.set_handler
    hard,    method
    command_hard))    @command_window.set_handler
    cancel,    method
    return_scene))if $game_switches[TODDDIFFICULTY::SWITCH] == true    @command_window.x = Graphics.width/2 - 170    @command_window.y = Graphics.height/2 - 50  end  #--------------------------------------------------------------------------  # * Create Difficulty Window  #--------------------------------------------------------------------------  def create_name_window    @name_window = Window_DifficultyName.new    @name_window.x = Graphics.width/2 - 170    @name_window.y = Graphics.height/2 - 97  end  #--------------------------------------------------------------------------  # * [easy] Command  #--------------------------------------------------------------------------  def command_easy    $game_system.todd_difficulty = 0    Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)    return_scene   end  #--------------------------------------------------------------------------  # * [normal] Command  #--------------------------------------------------------------------------  def command_normal    $game_system.todd_difficulty = 1    Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)    return_scene   end  #--------------------------------------------------------------------------  # * [heroic] Command  #--------------------------------------------------------------------------  def command_heroic    $game_system.todd_difficulty = 2      Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)    return_scene   end  #--------------------------------------------------------------------------  # * [hard] Command  #--------------------------------------------------------------------------  def command_hard    $game_system.todd_difficulty = 3        Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)    return_scene   end end if TODDDIFFICULTY::MENU == true#==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------#  This class performs the menu screen processing.#==============================================================================class Scene_Menu < Scene_MenuBase  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------  alias todd_dif_menu_add_menu_command create_command_window  def create_command_window    todd_dif_menu_add_menu_command    @command_window.set_handler
    dif,      method
    command_dif))  endend  #--------------------------------------------------------------------------  # * [Difficulty] Command  #--------------------------------------------------------------------------  def command_dif  SceneManager.call(Scene_Difficulty)  endendif TODDDIFFICULTY::MENU == true#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------#  This command window appears on the menu screen.#==============================================================================class Window_MenuCommand < Window_Command  #--------------------------------------------------------------------------  # * Add Main Commands to List  #--------------------------------------------------------------------------  alias todd_dif_menu_command_add_to_menu add_main_commands  def add_main_commands     todd_dif_menu_command_add_to_menu    add_command("Difficulty",   :dif,   main_commands_enabled)  end endend 



    FAQ

    None right now.

    Credit and Thanks

    - Todd

    Author's Notes

    See the header of the script.


    本贴来自国际rpgmaker官方论坛作者:Todd处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/difficulty-selection.2789/

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 12:44 , Processed in 0.106324 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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