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

[转载发布] Ixfuru's Toolbox

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 207 天

    连续签到: 1 天

    [LV.7]常住居民III

    3646

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    IXFURUS TOOLBOX 1.0

    INTRODUCTION

    This script displays a small window during Scene_Map which enables a quick peek at the party's most-used tools or items.

    HOW TO USE

    Copy the script below into your script editor, below materials and above main.   You'll need to configure what items you want to show up in the window, by altering, adding or deleting values in the TOOLS array.  Then, you'll want to locate the TOOLSWITCH and change the value to link it to an in game switch.   This script will then be toggled by the TOOLBOX_INPUT constant, which you can also configure to your needs.   Also, there are plenty of other customizations, but mainly they are cosmetic.

    SCREENSHOTS

    Spoiler





    Above is the script in action.  Note that items which are not possessed by the party are shown in their NO_TOOLS_COLOR!

    THE SCRIPT

    Spoiler                Code:       
    ################################################################################# IXFURU'S TOOLBOX# Written By: IXFURU# 8/11/12################################################################################################################################################################# This script allows you to add a 'callable' window through player# input which will show a quick window with icons of items and a value next# to it showing the amount of the item which is currently in possession.################################################################################################################################################################# Credit: IXFURU# Please give credit if you use, a link to the project would be thanks enough################################################################################################################################################################# CONFIGURATION SECTION################################################################################module ITBTOOLS = [3, 5, 8, 12, 21] #item ids of tools to displayTOOLSWITCH = 20 # Switch toggled to open/close window if above is trueTOOLSWITCH_INPUT = Input::R # This is the input key# used to open and close the toolbox window.TOOL_TEXT = "Tools" #Text displayed at top of toolbox windowTOOL_TEXT_COLOR = 29 # Text color for TOOL_TEXT. Integer 0-31TOOLBOX_X = 440 #X location of where the toolbox opensTOOLBOX_Y = 100 #Y location of where the toolbox opensNO_TOOLS_COLOR = 18 #Color of tool amount when zero are in possessionSOME_TOOLS_COLOR = 0 #Color of tool amount when one or more are in possessionTOOLBOX_WIDTH = 100 #width of the windowTOOLBOX_HEIGHT_MULTIPLIER = 38 #height of the window is based on amount of tools#multiplied by this valueend################################################################################# END CONFIGURATION SECTION################################################################################class Window_Toolbox < Window_Basedef initializesuper(ITB::TOOLBOX_X, ITB::TOOLBOX_Y, ITB::TOOLBOX_WIDTH, ITB::TOOLS.size * ITB::TOOLBOX_HEIGHT_MULTIPLIER)@x = ITB::TOOLBOX_X #set the x position of toolbox@y = ITB::TOOLBOX_Y #set teh y position of toolboxdraw_toolbox_text #call method to draw textenddef draw_toolbox_textself.contents.font.color = text_color(ITB::TOOL_TEXT_COLOR) #set color of textself.contents.draw_text((ITB::TOOLBOX_WIDTH-self.width)/2, 4, self.width, WLH, ITB::TOOL_TEXT) # draw the textenddef refreshcontents.cleardraw_toolbox_texttib = 0 # create the iteration variabletibsy = 30 #set iteration variable used for y positioningfor i in ITB::TOOLS # once for each item in the toolboxtool = $data_items[ITB::TOOLS[tib]]draw_icon(tool.icon_index, 4, tibsy, enabled = true)if $game_party.item_number($data_items[ITB::TOOLS[tib]]) == 0 # if party doesn't have this itemself.contents.font.color = text_color(ITB::NO_TOOLS_COLOR)elseself.contents.font.color = text_color(ITB::SOME_TOOLS_COLOR)endself.contents.draw_text(40, tibsy, self.width, WLH, $game_party.item_number($data_items[ITB::TOOLS[tib]]))tibsy += 24tib += 1endend #End of Methodend #End of Class############################################################################### Scene_Map##############################################################################class Scene_Map < Scene_Basedef close_toolboxSound.play_decision$game_switches[ITB::TOOLSWITCH] = false@tool_window.disposeenddef update_toolbox@tool_window.refreshenddef open_toolboxSound.play_decision$game_switches[ITB::TOOLSWITCH] = true@tool_window = Window_Toolbox.newenddef check_for_toolbox_inputif Input.trigger?(ITB::TOOLSWITCH_INPUT)if $game_switches[ITB::TOOLSWITCH] == falseopen_toolboxelseclose_toolboxendendendalias itb_sm_update updatedef updateitb_sm_updateif $game_switches[ITB::TOOLSWITCH] == trueupdate_toolboxcheck_for_toolbox_inputelsecheck_for_toolbox_inputendendalias itb_sm_call_battle call_battledef call_battleitb_sm_call_battle$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_shop call_shopdef call_shopitb_sm_call_shop$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_name call_namedef call_nameitb_sm_call_name$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_menu call_menudef call_menuitb_sm_call_menu$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_save call_savedef call_saveitb_sm_call_save$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_debug call_debugdef call_debugitb_sm_call_debug$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_gameover call_gameoverdef call_gameoveritb_sm_call_gameover$game_switches[ITB::TOOLSWITCH] = falseendalias itb_sm_call_title call_titledef call_titleitb_sm_call_title$game_switches[ITB::TOOLSWITCH] = falseendend





    If you try the script, please let me know how you like it/hate it.  And also, link me to your project if you use it. Other than that, feel free to use it, as long as you give me credit.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-10 02:06 , Processed in 0.067421 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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