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

[转载发布] Wecoc's Little Collection of Scripts #1

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

    连续签到: 2 天

    [LV.7]常住居民III

    4469

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    I decided to make three packs with some very simple scripts I made for RPG maker XP that don't require much explanation and probably don't deserve a whole topic for each. Some are very old scripts, but I revised them recently quite meticulously, so they shouldn't have bugs.

    If everything goes according to plan, the packs will be released monthly.

    Terms of use
    - Giving credits (Wecoc) is not required.
    - You can repost this pack.
    - You can edit the codes freely.
    - These scripts can be used on commercial games.

    Download
    Wecoc's Little Collection of XP Scripts 1.zip [35 kB]

    The pack only contains the codes as TXT, to use them simply copy the code above the script Main.


    Other packs
    - Wecoc's Little Collection of XP Scripts #2
    - Wecoc's Little Collection of XP Scripts #3 [Not available yet]

    I'm separating them in different topics because this way it's easier to focus on a certain script here if any issue appears.

    Contents
    I'll include a little explanation for each script, so they're a bit easier to find on the web.

    Spoiler: Castlevania Shop Item Counter
    By default, when you buy an item, a number window opens where you pick how many of that item you want to purchase. With this script, a number appears on the selecting window so you pick the number right there directly, using the directional arrows (like in Castlevania SOTN).

    I also included an extended version (Castlevania Shop Item Counter EXT) where the change is also applied on the selling window.
    Spoiler: Debug Eval
    This code replaces the Debug window to another which allows writing code commands in RGSS, so you can test more complex things inside the game itself.

    For example, if you write there p $game_variables[1] a popup window will display the variable 1. It's like a script call inside the game for testing purposes, it even supports multi-line.

    I also included an extra script (Debug Eval Shortcuts) with some common shortcuts that may be handy there.

    I think this one maybe deserves a bit more explanation.
    Spoiler: More info
    This is how it looks.




    The shortcuts are:
    help - Print the current commands [from the main script]
    help("command") - Print info of a command (if available)
    debug - Change to the default Debug window [from the main script]
    var - Same as $game_variables
    stch - Same as $game_switches
    control_event(id) - You start controlling a certain event instead of the player
    control_player - Back to control the player
    erase_event(id) - Erase a certain event
    transfer(map_id, x, y, direction) - Teleport to another map (direction is optional)
    fullscreen - Toggle fullscreen mode.

    Some other useful common calls:

    $game_player.move_speed = (speed)
    $game_player.moveto(x, y)
    $game_map.events[(id)].moveto(x, y)
    Spoiler: Fix Scroll
    A little script that allows disabling the map scroll completely. In some cases you may want the screen to stay fix even if the player moves around.

    Script call: $game_system.fixed_scroll = true/false

    I also included an extra script (Fix Scroll Passability Addon) that forbids the player to step outside the screen when it's fixed.
    Spoiler: Horizontal choices support
    When message choices are short enough, they will display horizontally instead of vertically.

                    Code:       
    > Should we enter the castle?> [ Yes ]    No


    It can be enabled/disabled via script call using $game_temp.choice_short = true/false
    Spoiler: Items by Actor
    With this script the Item menu is actor-based like the Skill menu. The item bag is still shared but some actors can't use certain items, and some can't use items at all. You can also make states that disable item usage. All the instructions are on the script.

    I also included an extra script (Items by Actor Addon) where each actor has its individual inventory.
    Spoiler: MV-Type Weather System
    A very simple rewrite of the Weather effects, very similar to the default but less pixel-based. With a few adjustments you could control some variables via script call.

    Spoiler: Page Support
    New script calls for extended event page control.
    The calls follow this structure $game_map.events[ID].(CALL) where ID is the event id, and it also can be @event_id for the current event.

    page - Get the current event page, starting from 0.
    pages - Get an array with all the event pages (RPG::Event:
    age), it's meant for internal use but you can for example get the number of pages with pages.size
    go_to_page(id) - Force the event to a specific page manually
    valid_page?(id) - Check if a page is valid (check if all page conditions are triggered)
    valid_page? - Check if the current page is valid
    valid_pages - Get an array with all the pages (RPG::Event:
    age), it's meant for internal use like the command pages.
    top_valid_page - Get the top valid page (with higher priority)
    top_valid_page?(id) - Check if a page is the top valid page
    top_valid_page? - Check if the current page is the top valid page
    Spoiler: Passability by terrain
    Make some actors or events have certain terrain IDs marked as non-passable. More info on the script.
    Spoiler: Protected enemies
    This is meant for bosses where to attack the boss you must first kill its guards.
    Spoiler: Scene File modified
    The Scene File now looks like a list with as many slots as you want (12 by default) and a lot more space for info (for example you can display the current chapter, the map name, description of the current map, etc.) The info available is meant to be modified by the script user.
    Spoiler: Shop Buy and Sell Independent Scenes
    With this script the buy and sell scenes are completely independent, the default shop call is only for buying, and for selling you should use a script call with $scene = Scene_Shop.new(1)

    I'm not sure why this exists, to be honest... I totally forgot about this one.
    Spoiler: Shop with Actor Selection
    You can swap actors with Q/W in the shop (like in menu scenes). This way there's more space for displaying info about the current actor.
    Spoiler: Unidentified Weaponry
    When you obtain a weapon or armor type you've never seen before, it's marked as unidentified, and it needs to be properly identified to use it or sell it with full price. If you've played Diablo 2 you'll know what I'm talking about. Everything is unidentified by default, so on the first map of the game you may want to identify some IDs directly via script call.

    These are the available commands (you can change "weapons" to "armors" in each one)
    $data_weapons[id].identified - Check if a weapon is identified
    $game_party.unidentified_weapons - Get a list of the non-identified weapons you actually have
    $game_party.all_unidentified_weapons - Get a list of ALL the non-identified weapons
    $game_party.identify_weapon(id) - Identify a weapon
    $game_party.identify_weapons - Identify all possessed weapons
    $game_party.identify_weapons_price(price) - Check if the group has enough money to identify all possessed weapons
    Spoiler: Weapon Attacks by Skill or Item
    With this script certain weapons can attack using a skill or item.
    Spoiler: Wecoc Database Eval Script
    This script allows to use eval in database string inputs. You can name an item as always, but with this you have several more options, for example include an actor's name "Basil's Spear" (where "Basil" would be a name defined by the player).
    I hope you find something useful on this list



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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 17:54 , Processed in 0.093340 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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