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

Project1

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

[讨论] 自己添加一些鬼畜的东西【第一弹】

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
跳转到指定楼层
1
发表于 2017-4-22 06:50:01 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式

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

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

x
本帖最后由 chenmissjin 于 2017-4-22 07:08 编辑

这个帖子会讲一些比较另类的东西。

首先第一个,物品【圣书】,这个东西是受B站【迷样神君】启发做出来的。功能是随时随地存档,同时记录位置+全恢复,或者可以传送至上次记录的位置(必须先记录一次)
物品+公共事件属性如图所示。

这玩意有啥用?比如说某些不能随时存档的游戏啦,又比如说某些不能随时存档的游戏啦,再比如说某些不能随时存档的游戏啦。。。。。

不喜欢某些功能的话自己去除吧,毕竟还是比较明了的

还有,就算这个是第一弹,第二弹也不一定会有,看情况吧

4.JPG (51.08 KB, 下载次数: 7)

物品属性

物品属性

3.JPG (53.3 KB, 下载次数: 9)

公共事件属性

公共事件属性

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
14
 楼主| 发表于 2017-4-25 15:24:55 | 只看该作者
真是搞笑了,难道长度超出就报错?

报错.JPG (25.96 KB, 下载次数: 11)

报错.JPG
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
13
 楼主| 发表于 2017-4-25 15:22:04 | 只看该作者
我自己的帖子怎么都回复不了了?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
12
 楼主| 发表于 2017-4-25 13:32:09 | 只看该作者
这个是large choice

=begin
#==============================================================================
Title Large Choices
Author: Hime
Date: Nov 18, 2013
------------------------------------------------------------------------------
** Change log
Nov 18, 2013
   - updated to preserve the event page's original list
Apr 10, 2013
   - added option to disable automatic show combining
Mar 26, 2013
   - fixed bug where cancel choice was not properly updated
Jan 12, 2013
   - fixed bug where the first set of nested options were numbered incorrectly
Dec 7, 2012
   - implemented proper branch canceling
Dec 6, 2012
   - Initial release
------------------------------------------------------------------------------   
** Terms of Use
* Free to use in non-commercial projects
* Contact me for commercial use
* No real support. The script is provided as-is
* Will do bug fixes, but no compatibility patches
* Features may be requested but no guarantees, especially if it is non-trivial
* Preserve this header
------------------------------------------------------------------------------
** Description

This script combines groups of "show choice" options together as one large
command. This allows you to create more than 4 choices by simply creating
several "show choice" commands.
------------------------------------------------------------------------------
** Installation

Place this script below Materials and above Main

------------------------------------------------------------------------------
** Usage

Add a show choice command.
If you want more choices, add another one, and fill it out as usual.

Note that you should only specify one cancel choice (if you specify more than
one, then the last one is taken).

For "branch" canceling, note that *all* cancel branches are executed.
You should only have a cancel branch on the last set of choices

You can disable automatic choice combining by enabling the "Manual Combine"
option, which will require you to make this script call before the first
show choice command

    combine_choices
   
In order to combine choices together
#==============================================================================
=end
$imported = {} if $imported.nil?
$imported["TH_LargeChoices"] = true
#==============================================================================
# ** Configuration
#==============================================================================
module TH
  module Large_Choices
   
    # Turning this option on will require you to manually specify that
    # a sequence of Show Choice options should be combined
    Manual_Combine = false
   
#==============================================================================
# ** Rest of the script
#==============================================================================     
    Code_Filter = [402, 403, 404]
    Regex = /<large choices>/i
  end
end

class Game_Temp
  
  # temp solution to get this working
  attr_accessor :branch_choice
  
  def branch_choice
    @branch_choice || 5
  end
end

class Game_Interpreter
  
  #-----------------------------------------------------------------------------
  # Clean up
  #-----------------------------------------------------------------------------
  alias :th_large_choices_clear :clear
  def clear
    th_large_choices_clear
    @first_choice_cmd = nil
    @choice_search = 0
    @combine_choices = false
  end
  
  #-----------------------------------------------------------------------------
  # Prepare for more choices
  #-----------------------------------------------------------------------------
  alias :th_large_choices_setup_choices :setup_choices
  def setup_choices(params)
   
    # Make a copy of our list so we don't modify the original
    @list = Marshal.load(Marshal.dump(@list))
   
    # start with our original choices
    th_large_choices_setup_choices(params)
   
    return if TH::Large_Choices::Manual_Combine && !@combine_choices
   
    # store our "first" choice in the sequence
    @first_choice_cmd = @list[@index]
   
    # reset branch choice
    $game_temp.branch_choice = @first_choice_cmd.parameters[1]
   
    # Start searching for more choices
    @num_choices = $game_message.choices.size
    @choice_search = @index + 1
    search_more_choices
  end
  
  def combine_choices
    @combine_choices = true
  end
  
  #-----------------------------------------------------------------------------
  # New. Check whether the next command (after all branches) is another choice
  # command. If so, merge it with the first choice command.
  #-----------------------------------------------------------------------------
  def search_more_choices
    skip_choice_branches
    next_cmd = @list[@choice_search]
   
    # Next command isn't a "show choice" so we're done
    return if next_cmd.code != 102
   
    @choice_search += 1
    # Otherwise, push the choices into the first choice command to merge
    # the commands.
    @first_choice_cmd.parameters[0].concat(next_cmd.parameters[0])
   
    # Update all cases to reflect merged choices
    update_show_choices(next_cmd.parameters)
    update_cancel_choice(next_cmd.parameters)
    update_choice_numbers
   
    # delete the command to effectively merge the branches
    @list.delete(next_cmd)
   
    # Now search for more
    search_more_choices
  end

  #-----------------------------------------------------------------------------
  # New. Update the options for the first "show choice" command
  #-----------------------------------------------------------------------------
  def update_show_choices(params)
    params[0].each {|s| $game_message.choices.push(s) }
  end
  
  #-----------------------------------------------------------------------------
  # New. If cancel specified, update it to reflect merged choice numbers
  # The last one is taken if multiple cancel choices are specified
  #-----------------------------------------------------------------------------
  def update_cancel_choice(params)
   
    # disallow, just ignore
    return if params[1] == 0   
   
    # branch on cancel
    return update_branch_choice if params[1] == 5
   
    # num_choices is not one-based
    cancel_choice = params[1] + (@num_choices)
    # update cancel choice, as well as the first choice command
    $game_message.choice_cancel_type = cancel_choice
    @first_choice_cmd.parameters[1] = cancel_choice
  end
  
  #-----------------------------------------------------------------------------
  # New. Set the initial choice command to "branch cancel"
  #-----------------------------------------------------------------------------
  def update_branch_choice
    branch_choice = $game_message.choices.size + 1
    $game_message.choice_cancel_type = branch_choice
    $game_temp.branch_choice = branch_choice
    @first_choice_cmd.parameters[1] = branch_choice
  end
  
  def command_403
    command_skip if @branch[@indent] != $game_temp.branch_choice - 1
  end
  
  #-----------------------------------------------------------------------------
  # New. For each branch, update it to reflect the merged choice numbers.
  #-----------------------------------------------------------------------------
  def update_choice_numbers
   
    # Begin searching immediately after cmd 102 (show choice)
    i = @choice_search
   
    # Rough search for "When" commands. The search must skip nested commands
    while TH::Large_Choices::Code_Filter.include?(@list.code) || @list.indent != @indent
      if @list.code == 402 && @list.indent == @indent
        @list.parameters[0] = @num_choices
        @num_choices += 1
      end
      i += 1
    end
  end
  
  #-----------------------------------------------------------------------------
  # New. Returns the next command after our choice branches
  #-----------------------------------------------------------------------------
  def skip_choice_branches
    # start search at the next command
    # skip all choice branch-related commands and any branches
    while TH::Large_Choices::Code_Filter.include?(@list[@choice_search].code) || @list[@choice_search].indent != @indent
      @choice_search += 1
    end
    return @choice_search
  end
end
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
11
 楼主| 发表于 2017-4-25 13:30:51 | 只看该作者
【圣书最终版】已经完成,以下是制作的过程:
1.首先要有一个物品,详细信息参考1楼
2.设置公共事件【圣书】,执行内容如图所示(有几样没放出来的都是重复的,仔细看一下就知道怎么弄了)
3.设置公共事件【圣书记录位置】,执行内容如图所示
4.设置公共事件【圣书传送到上一次位置】,执行内容如图所示

好,现在我们已经把【事件】部分做完了,要上脚本了
这里涉及到4个脚本,分别是 large choice, disable choice, check mapname, 和move_to
这四个脚本我会在楼下发出来,请依次安装

公共事件【圣书】1.JPG (62.96 KB, 下载次数: 14)

公共事件【圣书】1.JPG

公共事件【圣书】2.JPG (44.79 KB, 下载次数: 11)

公共事件【圣书】2.JPG

公共事件【圣书传送】.JPG (37.04 KB, 下载次数: 7)

公共事件【圣书传送】.JPG

公共事件【圣书第一次传送】.JPG (70.05 KB, 下载次数: 10)

公共事件【圣书第一次传送】.JPG

公共事件【圣书记录】(选项不保存也要开启开关).JPG (53.31 KB, 下载次数: 10)

公共事件【圣书记录】(选项不保存也要开启开关).JPG
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
10
 楼主| 发表于 2017-4-25 05:32:10 | 只看该作者
guoxiaomi 发表于 2017-4-24 09:50
XP是 $game_temp.message_text = "你要的文字"

这个在ACE不适用。不过问题已解决。谢谢回复

点评

话是这么说……但是有人整理写出来还是该鼓励吧  发表于 2017-4-25 12:21
这些功能,稍微会点事件的,都是一抓一大把系列。  发表于 2017-4-25 10:24
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (版主)

梦石
1
星屑
23963
在线时间
3338 小时
注册时间
2011-7-8
帖子
3925

开拓者

9
发表于 2017-4-24 09:50:09 | 只看该作者
chenmissjin 发表于 2017-4-24 05:08
我用   puts  试过了, 完全没有用。难道是   print?

XP是 $game_temp.message_text = "你要的文字"
熟悉rgss和ruby,xp区版主~
正在填坑:《膜拜组传奇》讲述膜拜组和学霸们的故事。
已上steam:与TXBD合作的Reformers《变革者》
* 战斗调用公共事件 *
* RGSOS 网络脚本 *
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
8
 楼主| 发表于 2017-4-24 05:08:16 | 只看该作者
我用   puts  试过了, 完全没有用。难道是   print?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
7
 楼主| 发表于 2017-4-24 05:02:59 | 只看该作者
本帖最后由 chenmissjin 于 2017-4-24 05:07 编辑

【圣书升级版】基本已经完工了, 然而事件里面的【显示文字】用脚本死都做不出来。。。卡住了。。。有没有人救救我。。。
至于为什么要用脚本来表述这么简单的东西,讲不大清楚,上图好了。

而且,我后面还要加地图。。。(一个游戏不会只有3个地图吧?)

有几个位置就有几个分支.JPG (39.28 KB, 下载次数: 11)

所以了,8个记录位置就是8个分支

所以了,8个记录位置就是8个分支
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2017-4-11
帖子
33
6
 楼主| 发表于 2017-4-24 02:22:18 | 只看该作者
没什么人啊,难道这东西就没有人要吗?
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-6-2 11:14

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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