主页
论坛
新帖
最新消息
新帖
最新动态
制作互助群
登录
注册
Toggle sidebar
Toggle sidebar
菜单
安装应用
安装
回复主题
【进站必读】宝可饭堂社区全局规定v1.10
关于坚决维护同人创作社群秩序与共识的公告
论坛
独立开发
开发用品
【转载|18-20】更好的加速模式
禁用JavaScript。为了获得更好的体验,请在运行之前启用浏览器中的JavaScript。
您正在使用一款已经过时的浏览器!部分功能不能正常使用。
请尝试升级或使用
其他浏览器
。
信息
<blockquote data-quote="ES泽洛" data-source="post: 732" data-attributes="member: 2"><p><span style="font-size: 18px"><a href="https://pastebin.com/raw/VvJg8kRZ" target="_blank">原来的代码</a>来自<a href="https://www.pokecommunity.com/showthread.php?t=401043" target="_blank">PokeCommunity</a>,作者Marin。</span></p><p>[SPOILER="对于18"]</p><p><span style="font-size: 18px">再加上考虑到GBA模拟器玩家的使用习惯,所以我就改成了按下空格键切换。</span></p><p>[CODE=ruby]</p><p>#==============================================================================#</p><p># Better Fast-forward Mode #</p><p># v1.0 #</p><p># #</p><p># by Marin #</p><p>#==============================================================================#</p><p># Usage #</p><p># #</p><p># SPEEDUP_STAGES are the speed stages the game will pick from. If you click F, #</p><p># it'll choose the next number in that array. It goes back to the first number #</p><p># afterward. #</p><p># #</p><p># $GameSpeed is the current index in the speed up array. #</p><p># Should you want to change that manually, you can do, say, $GameSpeed = 0 #</p><p># #</p><p># If you don't want the user to be able to speed up at certain points, you can #</p><p># use "pbDisallowSpeedup" and "pbAllowSpeedup". #</p><p>#==============================================================================#</p><p></p><p># When the user clicks F, it'll pick the next number in this array.</p><p>SPEEDUP_STAGES = [1,2,4,8]</p><p></p><p></p><p>def pbAllowSpeedup</p><p> $CanToggle = true</p><p>end</p><p></p><p>def pbDisallowSpeedup</p><p> $CanToggle = false</p><p>end</p><p></p><p># Default game speed.</p><p>$GameSpeed = 0</p><p></p><p>$frame = 0</p><p>$CanToggle = true</p><p>module Graphics</p><p> class << Graphics</p><p> alias fast_forward_update update</p><p> end</p><p> </p><p> def self.update</p><p> if $CanToggle && Input.trigger?(Input::SPACE)</p><p> $GameSpeed += 1</p><p> $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size</p><p> end</p><p> $frame += 1</p><p> return unless $frame % SPEEDUP_STAGES[$GameSpeed] == 0</p><p> fast_forward_update</p><p> $frame = 0</p><p> end</p><p>end</p><p></p><p>=begin</p><p>module Input</p><p> class << Input</p><p> alias fast_forward_button_to_key buttonToKey</p><p> end</p><p>end</p><p>=end</p><p>[/CODE]</p><p><span style="font-size: 18px">除此之外,还需要加上一些东西。</span></p><p><span style="font-size: 18px">在PSystem_Controls中,加上这一行,具体数字看情况,上面数字加一。</span></p><p><span style="font-size: 18px">[ATTACH=full]969[/ATTACH]</span></p><p><span style="font-size: 18px">往下面翻一点点,将C那一行后面的0x20删掉,在下面加一行</span></p><p><span style="font-size: 18px">[CODE=ruby]</span></p><p><span style="font-size: 18px">when Input::SPACE; return [0x20] # Space</span></p><p><span style="font-size: 18px">[/CODE]</span></p><p>[ATTACH=full]971[/ATTACH]</p><p>[/SPOILER]</p><p>[SPOILER="对于20或19"]</p><p><span style="font-size: 18px">由于20不能添加绑定按键,所以只好用Ctrl键了。</span></p><p>[CODE=ruby]</p><p>#==============================================================================#</p><p># Better Fast-forward Mode #</p><p># v1.0 #</p><p># #</p><p># by Marin #</p><p>#==============================================================================#</p><p># Usage #</p><p># #</p><p># SPEEDUP_STAGES are the speed stages the game will pick from. If you click F, #</p><p># it'll choose the next number in that array. It goes back to the first number #</p><p># afterward. #</p><p># #</p><p># $GameSpeed is the current index in the speed up array. #</p><p># Should you want to change that manually, you can do, say, $GameSpeed = 0 #</p><p># #</p><p># If you don't want the user to be able to speed up at certain points, you can #</p><p># use "pbDisallowSpeedup" and "pbAllowSpeedup". #</p><p>#==============================================================================#</p><p></p><p># When the user clicks F, it'll pick the next number in this array.</p><p>SPEEDUP_STAGES = [1,2,4,8]</p><p></p><p></p><p>def pbAllowSpeedup</p><p> $CanToggle = true</p><p>end</p><p></p><p>def pbDisallowSpeedup</p><p> $CanToggle = false</p><p>end</p><p></p><p># Default game speed.</p><p>$GameSpeed = 0</p><p></p><p>$frame = 0</p><p>$CanToggle = true</p><p>module Graphics</p><p> class << Graphics</p><p> alias fast_forward_update update</p><p> end</p><p> </p><p> def self.update</p><p> if $CanToggle && Input.trigger?(Input::CTRL)</p><p> $GameSpeed += 1</p><p> $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size</p><p> end</p><p> $frame += 1</p><p> return unless $frame % SPEEDUP_STAGES[$GameSpeed] == 0</p><p> fast_forward_update</p><p> $frame = 0</p><p> end</p><p>end</p><p>[/CODE]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="ES泽洛, post: 732, member: 2"] [SIZE=5][URL='https://pastebin.com/raw/VvJg8kRZ']原来的代码[/URL]来自[URL='https://www.pokecommunity.com/showthread.php?t=401043']PokeCommunity[/URL],作者Marin。[/SIZE] [SPOILER="对于18"] [SIZE=5]再加上考虑到GBA模拟器玩家的使用习惯,所以我就改成了按下空格键切换。[/SIZE] [CODE=ruby] #==============================================================================# # Better Fast-forward Mode # # v1.0 # # # # by Marin # #==============================================================================# # Usage # # # # SPEEDUP_STAGES are the speed stages the game will pick from. If you click F, # # it'll choose the next number in that array. It goes back to the first number # # afterward. # # # # $GameSpeed is the current index in the speed up array. # # Should you want to change that manually, you can do, say, $GameSpeed = 0 # # # # If you don't want the user to be able to speed up at certain points, you can # # use "pbDisallowSpeedup" and "pbAllowSpeedup". # #==============================================================================# # When the user clicks F, it'll pick the next number in this array. SPEEDUP_STAGES = [1,2,4,8] def pbAllowSpeedup $CanToggle = true end def pbDisallowSpeedup $CanToggle = false end # Default game speed. $GameSpeed = 0 $frame = 0 $CanToggle = true module Graphics class << Graphics alias fast_forward_update update end def self.update if $CanToggle && Input.trigger?(Input::SPACE) $GameSpeed += 1 $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size end $frame += 1 return unless $frame % SPEEDUP_STAGES[$GameSpeed] == 0 fast_forward_update $frame = 0 end end =begin module Input class << Input alias fast_forward_button_to_key buttonToKey end end =end [/CODE] [SIZE=5]除此之外,还需要加上一些东西。 在PSystem_Controls中,加上这一行,具体数字看情况,上面数字加一。 [ATTACH type="full" width="60%" alt="1681289556477.png"]969[/ATTACH] 往下面翻一点点,将C那一行后面的0x20删掉,在下面加一行 [CODE=ruby] when Input::SPACE; return [0x20] # Space [/CODE][/SIZE] [ATTACH type="full" width="60%" alt="1681295185201.png"]971[/ATTACH] [/SPOILER] [SPOILER="对于20或19"] [SIZE=5]由于20不能添加绑定按键,所以只好用Ctrl键了。[/SIZE] [CODE=ruby] #==============================================================================# # Better Fast-forward Mode # # v1.0 # # # # by Marin # #==============================================================================# # Usage # # # # SPEEDUP_STAGES are the speed stages the game will pick from. If you click F, # # it'll choose the next number in that array. It goes back to the first number # # afterward. # # # # $GameSpeed is the current index in the speed up array. # # Should you want to change that manually, you can do, say, $GameSpeed = 0 # # # # If you don't want the user to be able to speed up at certain points, you can # # use "pbDisallowSpeedup" and "pbAllowSpeedup". # #==============================================================================# # When the user clicks F, it'll pick the next number in this array. SPEEDUP_STAGES = [1,2,4,8] def pbAllowSpeedup $CanToggle = true end def pbDisallowSpeedup $CanToggle = false end # Default game speed. $GameSpeed = 0 $frame = 0 $CanToggle = true module Graphics class << Graphics alias fast_forward_update update end def self.update if $CanToggle && Input.trigger?(Input::CTRL) $GameSpeed += 1 $GameSpeed = 0 if $GameSpeed >= SPEEDUP_STAGES.size end $frame += 1 return unless $frame % SPEEDUP_STAGES[$GameSpeed] == 0 fast_forward_update $frame = 0 end end [/CODE] [/SPOILER] [/QUOTE]
验证
我们通常会将Pokemon Essentials简称为哪3个字母?
回复帖子
最新帖子
全
我想切换视角讲述故事
最新更新:全民制作人
星期三,21:43
开发问题
Z
将GBA打包成APK
最新更新:zheyeyeye
星期三,21:27
GBA教程
Z
【进站必读】宝可饭堂社区全局规定v1.10
最新更新:z1652646304
星期三,20:25
公告规定
雨
pokeemerald怎么改箱子数
最新更新:雨落天晴
星期二,10:16
开发问题
[讨论]什么契机导致你想做游戏的
最新更新:A原翼
星期一,00:12
其他相关讨论
论坛统计
主题
559
消息
2,422
成员
3,879
最新成员
stonezz
联系我们
QQ
2201858342
邮箱
pokefans@qq.com
论坛
独立开发
开发用品
【转载|18-20】更好的加速模式
顶部