├── TEMP
├── TEST.rb
├── TEST2.rb
├── test.js
├── 固定远景图.rb
├── 【学习笔记】.rb
├── 获取鼠标滚轮.rb
└── 鹰题头模板.rb
├── _config.yml
├── Demos
├── DEMO_EagleDice
│ ├── Game.rvproj2
│ ├── Game.exe
│ ├── Data
│ │ ├── Items.rvdata2
│ │ ├── Actors.rvdata2
│ │ ├── Armors.rvdata2
│ │ ├── Classes.rvdata2
│ │ ├── Enemies.rvdata2
│ │ ├── Map001.rvdata2
│ │ ├── Map002.rvdata2
│ │ ├── Scripts.rvdata2
│ │ ├── Skills.rvdata2
│ │ ├── States.rvdata2
│ │ ├── System.rvdata2
│ │ ├── Troops.rvdata2
│ │ ├── Weapons.rvdata2
│ │ ├── Animations.rvdata2
│ │ ├── Tilesets.rvdata2
│ │ ├── CommonEvents.rvdata2
│ │ └── MapInfos.rvdata2
│ ├── System
│ │ └── RGSS300.dll
│ ├── Game.ini
│ ├── Graphics
│ │ └── System
│ │ │ ├── Cursor.png
│ │ │ ├── Cursor.psd
│ │ │ ├── Window.png
│ │ │ └── Window_Tag.png
│ └── README.md
├── DEMO_EagleEventEX
│ ├── Game.rvproj2
│ ├── Game.exe
│ ├── Data
│ │ ├── Actors.rvdata2
│ │ ├── Armors.rvdata2
│ │ ├── Classes.rvdata2
│ │ ├── Enemies.rvdata2
│ │ ├── Items.rvdata2
│ │ ├── Map001.rvdata2
│ │ ├── Map002.rvdata2
│ │ ├── Scripts.rvdata2
│ │ ├── Skills.rvdata2
│ │ ├── States.rvdata2
│ │ ├── System.rvdata2
│ │ ├── Troops.rvdata2
│ │ ├── Weapons.rvdata2
│ │ ├── MapInfos.rvdata2
│ │ ├── Tilesets.rvdata2
│ │ ├── Animations.rvdata2
│ │ └── CommonEvents.rvdata2
│ ├── System
│ │ ├── RGSS300.dll
│ │ └── RGSS301.dll
│ ├── Graphics
│ │ ├── Characters
│ │ │ ├── !$plant1.png
│ │ │ └── !$plant1.psd
│ │ └── Pictures
│ │ │ └── LOGO_EAGLE.png
│ ├── Game.ini
│ └── README.md
├── DEMO_EagleMessageEX
│ ├── Game.rvproj2
│ ├── Game.exe
│ ├── Save01.rvdata2
│ ├── Data
│ │ ├── Items.rvdata2
│ │ ├── Actors.rvdata2
│ │ ├── Armors.rvdata2
│ │ ├── Classes.rvdata2
│ │ ├── Enemies.rvdata2
│ │ ├── Map001.rvdata2
│ │ ├── Map002.rvdata2
│ │ ├── Map003.rvdata2
│ │ ├── Scripts.rvdata2
│ │ ├── Skills.rvdata2
│ │ ├── States.rvdata2
│ │ ├── System.rvdata2
│ │ ├── Troops.rvdata2
│ │ ├── Weapons.rvdata2
│ │ ├── Animations.rvdata2
│ │ ├── MapInfos.rvdata2
│ │ ├── Tilesets.rvdata2
│ │ └── CommonEvents.rvdata2
│ ├── System
│ │ └── RGSS300.dll
│ ├── Game.ini
│ ├── Graphics
│ │ ├── System
│ │ │ ├── LOGO_EAGLE.png
│ │ │ ├── Window_Tag.png
│ │ │ ├── Window_NameBG.png
│ │ │ ├── Window_NameBG.psd
│ │ │ └── Window_congwsbn.png
│ │ └── Pictures
│ │ │ └── bird_happy.jpg
│ ├── Eagle
│ │ └── PARA.eagle
│ └── README.md
├── DEMO_EagleDice 0623.zip
├── DEMO_EagleEventEX 0623.zip
└── DEMO_EagleMessageEX 1109.zip
├── LOGO.png
├── .gitattributes
├── Event System
├── 像素级移动
│ └── AddOn-兼容ULDS.rb
├── 地图卷动
│ ├── 地图卷动-缓动.rb
│ └── 地图卷动-缓动VX.rb
├── 事件消息机制
│ └── AddOn-不中断消息的场景呼叫.rb
├── 呼叫指定事件
│ └── 事件页替换VX.rb
├── 地图震动扩展.rb
├── 【废弃】
│ └── 事件警报机制
│ │ └── AddOn-事件页自动播放BGS.rb
├── 事件自主移动扩展.rb
└── 简易地图放大.rb
├── LICENSE
├── Extra Parts
├── 组件-位图Marshal化.rb
├── 组件-读取加密档案中的TXT.rb
├── 组件-位图存储PNG.rb
├── 组件-下载服务器端文件.rb
├── 组件-字符串编码转换.rb
├── 组件-Sion_GradientText.rb
├── 组件-网页读取.rb
├── 组件-位图绘制窗口皮肤.rb
├── 组件-位图绘制指示文本.rb
└── 组件-JSON读取.rb
├── UI Parts
├── 【废弃】
│ ├── 帮助窗口单行滚动显示.rb
│ ├── UI系统.rb
│ ├── 粒子模板-归位类.rb
│ └── 粒子发射器
│ │ └── AddOn-地图灰尘飘散.rb
├── 自由显示光标
│ └── AddOn-战斗中角色选择光标.rb
├── 粒子系统V3
│ ├── 预设粒子模板.rb
│ └── AddOn-地图切换特效.rb
├── 窗口光标缓动.rb
└── 显示图片缓动.rb
├── Message System
├── 【废弃】
│ └── 多语言提取-核心.rb
└── 对话框扩展
│ ├── AddOn-自定义文字移出.rb
│ ├── AddOn-并行对话-战斗.rb
│ ├── AddOn2-兼容HiKiMo的SRPG.rb
│ └── AddOn2-兼容鼠标.rb
├── Battle System
├── 装备附加属性
│ ├── AddOn-随机属性装备.rb
│ └── AddOn-属性帮助文本.rb
├── 敌人行动扩展.rb
├── 技能条件及效果扩展.rb
└── 敌人掉落扩展.rb
└── README.md
/TEMP/TEST.rb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/TEMP/TEST2.rb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/TEMP/test.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-leap-day
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Game.rvproj2:
--------------------------------------------------------------------------------
1 | RPGVXAce 1.00
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Game.rvproj2:
--------------------------------------------------------------------------------
1 | RPGVXAce 1.00
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Game.rvproj2:
--------------------------------------------------------------------------------
1 | RPGVXAce 1.00
--------------------------------------------------------------------------------
/LOGO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/LOGO.png
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice 0623.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice 0623.zip
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Game.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Game.exe
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX 0623.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX 0623.zip
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Game.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Game.exe
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX 1109.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX 1109.zip
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Game.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Game.exe
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Items.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Items.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/System/RGSS300.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/System/RGSS300.dll
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Actors.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Actors.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Armors.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Armors.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Classes.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Classes.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Enemies.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Enemies.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Map001.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Map001.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Map002.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Map002.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Scripts.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Scripts.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Skills.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Skills.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/States.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/States.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/System.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/System.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Troops.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Troops.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Weapons.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Weapons.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Save01.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Save01.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Animations.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Animations.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/Tilesets.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/Tilesets.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Game.ini:
--------------------------------------------------------------------------------
1 | [Game]
2 | RTP=RPGVXAce
3 | Library=System\RGSS300.dll
4 | Scripts=Data\Scripts.rvdata2
5 | Title=DEMO_EagleDice
6 |
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Actors.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Actors.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Armors.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Armors.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Classes.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Classes.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Enemies.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Enemies.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Items.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Items.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Map001.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Map001.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Map002.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Map002.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Scripts.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Scripts.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Skills.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Skills.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/States.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/States.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/System.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/System.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Troops.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Troops.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Weapons.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Weapons.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/System/RGSS300.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/System/RGSS300.dll
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/System/RGSS301.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/System/RGSS301.dll
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Items.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Items.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/System/RGSS300.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/System/RGSS300.dll
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/CommonEvents.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Data/CommonEvents.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/MapInfos.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/MapInfos.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Tilesets.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Tilesets.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Actors.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Actors.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Armors.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Armors.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Classes.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Classes.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Enemies.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Enemies.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Map001.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Map001.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Map002.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Map002.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Map003.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Map003.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Scripts.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Scripts.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Skills.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Skills.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/States.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/States.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/System.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/System.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Troops.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Troops.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Weapons.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Weapons.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Graphics/System/Cursor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Graphics/System/Cursor.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Graphics/System/Cursor.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Graphics/System/Cursor.psd
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Graphics/System/Window.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Graphics/System/Window.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/Animations.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/Animations.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Data/CommonEvents.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Data/CommonEvents.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Animations.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Animations.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/MapInfos.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/MapInfos.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/Tilesets.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/Tilesets.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Game.ini:
--------------------------------------------------------------------------------
1 | [Game]
2 | RTP=RPGVXAce
3 | Library=System\RGSS300.dll
4 | Scripts=Data\Scripts.rvdata2
5 | Title=DEMO_EagleMessageEX
6 |
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Graphics/System/Window_Tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleDice/Graphics/System/Window_Tag.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Data/CommonEvents.rvdata2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Data/CommonEvents.rvdata2
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Graphics/Characters/!$plant1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Graphics/Characters/!$plant1.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Graphics/Characters/!$plant1.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Graphics/Characters/!$plant1.psd
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Graphics/Pictures/LOGO_EAGLE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleEventEX/Graphics/Pictures/LOGO_EAGLE.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Graphics/System/LOGO_EAGLE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Graphics/System/LOGO_EAGLE.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Graphics/System/Window_Tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Graphics/System/Window_Tag.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Graphics/Pictures/bird_happy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Graphics/Pictures/bird_happy.jpg
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Graphics/System/Window_NameBG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Graphics/System/Window_NameBG.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Graphics/System/Window_NameBG.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Graphics/System/Window_NameBG.psd
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Graphics/System/Window_congwsbn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneEyedEagle/EAGLE-RGSS3/HEAD/Demos/DEMO_EagleMessageEX/Graphics/System/Window_congwsbn.png
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/Data/MapInfos.rvdata2:
--------------------------------------------------------------------------------
1 | {io:RPG::MapInfo:
2 | @nameI"MAP001:ET:@parent_idi :@orderi:@expandedF:@scroll_xiP:@scroll_yiio; ;I"MAP002;T;i ; i;
3 | F;i`;i@
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/Game.ini:
--------------------------------------------------------------------------------
1 | [Game]
2 | RTP=RPGVXAce
3 | Library=System\RGSS300.dll
4 | Scripts=Data\Scripts.rvdata2
5 | Title=DEMO_EagleEventEX
6 | Description=(no description)
7 | CreationDate=1635084356
8 |
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/Eagle/PARA.eagle:
--------------------------------------------------------------------------------
1 | \win[dw1dh1fw1fh1]\pic[bird_happy]欢迎来到这个DEMO!\win[dw1dh1fw1fh1]这句话来自【Add-On并行对话】,\nl你可以在目录下的Eagle/PARA.eagle文件里看到。\win[dw1dh1fw1fh1]悄悄说一句:\nl这个文件就是普通的文本文件,\nl你可以直接用文本文档打开hhhh
2 |
--------------------------------------------------------------------------------
/Demos/DEMO_EagleEventEX/README.md:
--------------------------------------------------------------------------------
1 | # DEMO - 事件交互扩展
2 |
3 | 本目录下为 Event System 目录下的插件的范例工程。
4 |
5 | ## 注意
6 |
7 | 由于老鹰的懒惰,工程中所使用的插件版本可能并不是最新版,请自己比对。
8 |
9 | ## 素材来源
10 |
11 | Graphics/Pictures 目录下的 LOGO_EAGLE.png 文件由 [葱兔](http://onira.lofter.com/) 帮忙绘制,禁止使用在其他任何地方。
12 |
13 | Graphics/System 目录下的 Window_Tag.png 文件由 [晓寞](http://xiaomoxiaomoxiaomo.lofter.com/) 帮忙绘制,禁止使用在其他任何地方。
--------------------------------------------------------------------------------
/Demos/DEMO_EagleDice/README.md:
--------------------------------------------------------------------------------
1 | # DEMO - 地图大富翁(骰子系统)
2 |
3 | 本目录下为 UI Parts 目录下的 骰子系统 插件的范例工程。
4 |
5 | ## 注意
6 |
7 | 由于老鹰的懒惰,工程中所使用的插件版本可能并不是最新版,请自己比对。
8 |
9 | ## 素材来源
10 |
11 | Graphics/System 目录下的 Window.png 文件来自于 [葱式解谜用简易菜单脚本](http://rpg.blue/thread-476318-1-1.html) 中的范例工程所提供窗口皮肤,具体使用版权请查看原工程中说明。
12 |
13 | Graphics/System 目录下的 Cursor.png 文件由我自行绘制,允许任意使用。
14 |
15 | Graphics/System 目录下的 Window_Tag.png 文件由 [晓寞](http://xiaomoxiaomoxiaomo.lofter.com/) 帮忙绘制,禁止使用在其他任何地方。
--------------------------------------------------------------------------------
/Demos/DEMO_EagleMessageEX/README.md:
--------------------------------------------------------------------------------
1 | # DEMO - 对话框扩展
2 |
3 | 本目录下为 Message System 目录下的 对话框扩展 及其 Add-On 插件的范例工程。
4 |
5 | ## 注意
6 |
7 | 由于老鹰的懒惰,工程中所使用的插件版本可能并不是最新版,请自己比对。
8 |
9 | ## 素材来源
10 |
11 | Graphics/System 目录下的 Window_congwsbn.png 文件来自于 [葱式解谜用简易菜单脚本](http://rpg.blue/thread-476318-1-1.html) 中的范例工程所提供窗口皮肤,具体使用版权请查看原工程中说明。
12 |
13 | Graphics/System 目录下的 LOGO_EAGLE.png 文件由 [葱兔](http://onira.lofter.com/) 帮忙绘制,禁止使用在其他任何地方。
14 |
15 | Graphics/System 目录下的 Window_Tag.png 文件由 [晓寞](http://xiaomoxiaomoxiaomo.lofter.com/) 帮忙绘制,禁止使用在其他任何地方。
--------------------------------------------------------------------------------
/TEMP/固定远景图.rb:
--------------------------------------------------------------------------------
1 | class Spriteset_Map
2 | #--------------------------------------------------------------------------
3 | # ● 更新远景图
4 | #--------------------------------------------------------------------------
5 | def update_parallax
6 | if @parallax_name != $game_map.parallax_name
7 | @parallax_name = $game_map.parallax_name
8 | @parallax.bitmap.dispose if @parallax.bitmap
9 | @parallax.bitmap = Cache.parallax(@parallax_name)
10 | Graphics.frame_reset
11 | end
12 | @parallax.ox = $game_map.display_x * 32 #$game_map.parallax_ox(@parallax.bitmap)
13 | @parallax.oy = $game_map.display_y * 32 #$game_map.parallax_oy(@parallax.bitmap)
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/Event System/像素级移动/AddOn-兼容ULDS.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 兼容ULDS by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【无限图层显示系统 by Taroxd】与【像素级移动 by老鹰】之下
4 | #==============================================================================
5 | # - 2022.5.6.23
6 | #=============================================================================
7 | # - 本插件将 ULDS 中的默认最小单位修改为了 像素级移动 中的最小单位,
8 | # 保证了 ULDS 的远景图能够正常移动
9 | #=============================================================================
10 |
11 | module Taroxd::ULDS
12 | class << self
13 | private
14 | # 只计算一次的初始化代码
15 | def init_attr_code
16 | "#{set_attr_code 'z', DEFAULT_Z}
17 | #{set_attr_code 'scroll_x', PIXEL_MOVE::PIXEL_PER_UNIT}
18 | #{set_attr_code 'scroll_y', PIXEL_MOVE::PIXEL_PER_UNIT}
19 | #{set_attr_code 'blend_type'}
20 | #{set_attr_code 'color'}
21 | #{set_attr_code 'tone'}"
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Eagle
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/TEMP/【学习笔记】.rb:
--------------------------------------------------------------------------------
1 | #=============================================================================
2 | # Win32API
3 | # http://www.rubytips.org/2008/05/13/accessing-windows-api-from-ruby-using-win32api-library/
4 | #=============================================================================
5 | require "Win32API"
6 | # Returns current logged in Windows user name
7 | def getUserName
8 | name = " " * 128
9 | size = "128"
10 | Win32API.new('advapi32','GetUserName', ['P','P'],'I').call(name,size)
11 | return name.unpack("A*")
12 | end
13 | p getUserName
14 |
15 | ShellExecute = Win32API.new("shell32.dll", "ShellExecute", "LPPPPI", "I")
16 | def run_text
17 | ShellExecute.call(0, "open", "README.md", nil, nil, 1)
18 | end
19 | run_text
20 | #p Dir.pwd
21 |
22 | # 是否有网络连接?
23 | def inet_connected?
24 | Win32API.new('wininet', 'InternetGetConnectedState', 'ii', 'i').call(0, 0) == 1
25 | end
26 | p inet_connected?
27 |
28 |
29 | # 获取某个按键的状态
30 | # 返回:高位为1代表被按下,低位为1代表被激活(如大写)
31 | #@getKeyState = Win32API.new("user32", "GetKeyState", 'i', 'i')
32 | #p @getKeyState.Call(65)
33 |
34 | #=============================================================================
35 | # 单件方法 - 重定义指定实例中的方法
36 | #=============================================================================
37 | class A
38 | def a; p 1; end
39 | end
40 |
41 | _a = A.new
42 | _a.a # => 1
43 | def _a.a # 单件方法
44 | p A.instance_method(:a).bind(self).call
45 | p 2
46 | end
47 | _a.a # => 1\n2
48 |
49 | _b = A.new
50 | _b.a # => 1
51 |
--------------------------------------------------------------------------------
/Extra Parts/组件-位图Marshal化.rb:
--------------------------------------------------------------------------------
1 | #encoding:utf-8
2 | #==============================================================================
3 | # ■ 组件-位图Marshal化(VX/VA)
4 | # 来源:https://rpg.blue/thread-87968-1-1.html
5 | #==============================================================================
6 | $imported ||= {}
7 | $imported["BitmapMarshal"] = "1.0.0"
8 | #=============================================================================
9 | # - 2022.5.4.22
10 | #=============================================================================
11 |
12 | class Font
13 | def marshal_dump;end
14 | def marshal_load(obj);end
15 | end
16 |
17 | class Bitmap
18 | # 传送到内存的API函数
19 | RtlMoveMemory_pi = Win32API.new('kernel32', 'RtlMoveMemory', 'pii', 'i')
20 | RtlMoveMemory_ip = Win32API.new('kernel32', 'RtlMoveMemory', 'ipi', 'i')
21 |
22 | def _dump(limit)
23 | data = "rgba" * width * height
24 | RtlMoveMemory_pi.call(data, address, data.length)
25 | [width, height, Zlib::Deflate.deflate(data)].pack("LLa*") # 压缩
26 | end
27 |
28 | def self._load(str)
29 | w, h, zdata = str.unpack("LLa*"); b = new(w, h)
30 | RtlMoveMemory_ip.call(b.address, Zlib::Inflate.inflate(zdata), w * h * 4); b
31 | end
32 |
33 | # [[[bitmap.object_id * 2 + 16] + 8] + 16] == 数据的开头
34 | #
35 | def address
36 | buffer, ad = "xxxx", object_id * 2 + 16
37 | RtlMoveMemory_pi.call(buffer, ad, 4); ad = buffer.unpack("L")[0] + 8
38 | RtlMoveMemory_pi.call(buffer, ad, 4); ad = buffer.unpack("L")[0] + 16
39 | RtlMoveMemory_pi.call(buffer, ad, 4); return buffer.unpack("L")[0]
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/Extra Parts/组件-读取加密档案中的TXT.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 组件-读取加密档案中的TXT by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-LoadTXT"] = "1.0.0"
6 | #==============================================================================
7 | # - 2020.5.28.14
8 | #==============================================================================
9 | # - 本插件定义了能够读取加密档案中的 TXT 文件(UTF-8编码)的 EAGLE.load_text 方法,
10 | # - 请将本插件放置于其他老鹰的插件之上
11 | #==============================================================================
12 |
13 | #==============================================================================
14 | # ○ 【读取部分】
15 | #==============================================================================
16 | module EAGLE
17 | #--------------------------------------------------------------------------
18 | # ● 读取TXT文本(UTF-8编码)
19 | #--------------------------------------------------------------------------
20 | def self.load_text(filename)
21 | t = Packaged.read_data(filename)
22 | t.force_encoding("utf-8")
23 | t.encode("utf-8")
24 | end
25 | end
26 |
27 | #==============================================================================
28 | # ○ 核心 by Fux2
29 | # from http://rpg.blue/thread-341724-1-1.html
30 | #==============================================================================
31 | module Packaged
32 | #--------------------------------------------------------------------------
33 | # ● 读取数据
34 | #--------------------------------------------------------------------------
35 | def self.read_data(name)
36 | x = Marshal.method(:load)
37 | y = class << Marshal; self; end
38 | y.send(:define_method, :load){|a, *b| a.respond_to?(:read) ? a.read : a.to_s}
39 | ret = nil
40 | begin
41 | ret = load_data(name)
42 | ensure
43 | y.send(:define_method, :load, x)
44 | end
45 | ret
46 | end
47 | end
48 |
--------------------------------------------------------------------------------
/Extra Parts/组件-位图存储PNG.rb:
--------------------------------------------------------------------------------
1 | #encoding:utf-8
2 | #==============================================================================
3 | # ■ 组件-位图存储PNG(VX/VA)
4 | # 来源:https://rpg.blue/forum.php?mod=viewthread&tid=382258
5 | #==============================================================================
6 | $imported ||= {}
7 | $imported["SaveBitmapToPNG"] = "1.0.0"
8 | #=============================================================================
9 | # - 2022.5.4.20
10 | #=============================================================================
11 |
12 | class Bitmap
13 | #-------------------------------------------------------------------#
14 | #借鉴dant所成
15 | #当然 我也努力了 —_—||
16 | #不 是很努力呢 -By SixRC
17 | #-------------------------------------------------------------------#
18 | #用法为 bitmap.ToPng(filename)
19 | #假如很追求速度的话 下面的第34行改成
20 | #data2 = Zlib::Deflate.deflate(@bit_data,1)
21 | #这样压缩速度会提高(约快一倍) 虽然文件会变大 那个数值可以是1-9 0是不压缩 但不骗你 很慢 因为 写入慢了
22 | #-------------------------------------------------------------------#
23 | #--------------------------获取数据头地址---------------
24 | CWP = Win32API.new('user32.dll','CallWindowProc','ppiii','i')
25 | GetAddr=[139,116,36,8,139,54,139,118,8,139,118,16,139,124,36,4,137,55,194,16,0].pack("C*")
26 | def addr
27 | s="\0"*4
28 | CWP.call(GetAddr,s,object_id*2+16,0,0)
29 | s.unpack("L")[0]
30 | end
31 | #--------------------------保存为png--------------------
32 | D1="\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x0\x0\x0\xdIHDR"
33 | D2="\x8\x6\x0\x0\x0"
34 | D3="\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
35 | GetData=[85,137,229,139,125,8,49,210,139,101,20,137,227,68,139,69,16,137,198,193,230,3,193,224,2,15,175,224,139,69,12,1,196,139,77,16,66,41,244,88,15,200,193,200,8,137,4,23,141,82,4,73,117,241,75,117,232,137,236,93,194,16,0].pack("C*")
36 | def ToPng(pl)
37 | unless @kg
38 | @addr=addr
39 | @kg=[width].pack("N")+[height].pack("N")
40 | c1="IHDR"+@kg+D2
41 | @crc1=[Zlib.crc32(c1)].pack("N")
42 | @bit_data="\0"*height*(width*4+1)
43 | end
44 | CWP.call(GetData,@bit_data,@addr,width,height)
45 | data2 = Zlib::Deflate.deflate(@bit_data)
46 | crc2=[Zlib.crc32("IDAT"+data2)].pack("N")
47 | sod=[data2.length].pack("N")
48 | File.open(pl, "wb") { |i| i << D1 << @kg << D2 << @crc1 << sod << 'IDAT' << data2 << crc2 << D3}
49 | end
50 | end
51 |
--------------------------------------------------------------------------------
/Extra Parts/组件-下载服务器端文件.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 组件-下载服务器端文件 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-DownloadFromServer"] = "1.0.0"
6 | #==============================================================================
7 | # - 2021.2.15.23
8 | #==============================================================================
9 | # - 本插件定义了能够存储服务器端文件到本地的方法:
10 | #
11 | # EAGLE.download_from_url(file_server, file_save)
12 | #
13 | # 其中 file_server 为位于服务器上的文件的完整路径(含后缀名)
14 | # 其中 file_save 为保存到本地的文件(含后缀名)
15 | #
16 | # 返回 true 代表下载完毕;返回 false 代表出现问题,请查看控制台。
17 | #
18 | # - 示例:
19 | =begin
20 | # 定义位于服务器端的文件地址
21 | file1 = "https://raw.githubusercontent.com/OneEyedEagle/EAGLE-CATALOG/master/versions/%E5%BC%B1%E6%B0%B4%E6%84%BF.txt"
22 | # 定义本地存储的文件
23 | file2 = "Data/version.txt"
24 | # 把github上的版本文件下载到 exe 同级目录下的Data文件夹下,
25 | # 并存储为 version.txt 文件
26 | EAGLE.download_from_url(file1, file2)
27 | # 之后可以在本地打开文件并进行处理
28 | # 比如:按行读取txt,并输出
29 | File.open(file2, "r") do |file|
30 | file.each_line do |line|
31 | puts line
32 | end
33 | end
34 | =end
35 | #
36 | # - 本质为调用Win32API,利用Windows的 urlmon.lib 库进行文件的下载
37 | #==============================================================================
38 |
39 | # require "Win32API"
40 |
41 | #==============================================================================
42 | # ○ 【读取部分】
43 | #==============================================================================
44 | module EAGLE
45 |
46 | @@URLDownloadToFile = Win32API.new('urlmon','URLDownloadToFile',"IPPIP",'I')
47 | @@DeleteUrlCacheEntry = Win32API.new('wininet','DeleteUrlCacheEntry',"P",'I')
48 |
49 | def self.download_from_url(file1, file2)
50 | if !inet_connected?
51 | p "【错误】没有连接到互联网!"
52 | return false
53 | end
54 | begin
55 | @@URLDownloadToFile.call(0, file1, file2, 0, 0)
56 | rescue
57 | p "【错误】与 #{file1} 的链接出现问题!"
58 | p "【错误】下载文件到 #{file2} 失败!"
59 | return false
60 | end
61 | p "【成功】已保存文件 #{file2} "
62 | @@DeleteUrlCacheEntry.call(file1)
63 | return true
64 | end
65 |
66 | def self.inet_connected?
67 | Win32API.new('wininet', 'InternetGetConnectedState', 'ii', 'i').call(0, 0) == 1
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/UI Parts/【废弃】/帮助窗口单行滚动显示.rb:
--------------------------------------------------------------------------------
1 | #===============================================================================
2 | # ○ 帮助窗口单行滚动显示 by老鹰
3 | # 注:本脚本只修改了默认的 帮助窗口,且只在单行文本下生效
4 | #===============================================================================
5 | class Window_Help < Window_Base
6 | #--------------------------------------------------------------------------
7 | # ● 初始化对象
8 | #--------------------------------------------------------------------------
9 | alias eagle_auto_scroll_init initialize
10 | def initialize(line_number = 2)
11 | @line_number = line_number
12 | eagle_auto_scroll_init(line_number)
13 | @d = 0
14 | end
15 | #--------------------------------------------------------------------------
16 | # ● 设置内容
17 | #--------------------------------------------------------------------------
18 | def set_text(text)
19 | return if text == @text
20 | @text = text
21 | if @line_number == 1 && text != ""
22 | width = text.scan(/(\e|\\)*i\[\d+\]/m).inject(0) { |sum, id| sum += 24 }
23 | _text = text.gsub(/(\e|\\)*\w+\[\d+\]/m, "")
24 | @width = text_size(_text).width + width
25 | contents.dispose
26 | self.contents = Bitmap.new(@width, contents_height)
27 | init_scroll
28 | end
29 | reset_scroll
30 | refresh
31 | end
32 | #--------------------------------------------------------------------------
33 | # ● 初始化滚动
34 | #--------------------------------------------------------------------------
35 | def init_scroll
36 | @d = @width - self.width + 2 * standard_padding
37 | @wait = 80 # frames of waiting when starting or ending
38 | @speed = 5 # moving 1 pixel within @speed frames
39 | end
40 | #--------------------------------------------------------------------------
41 | # ● 重置滚动
42 | #--------------------------------------------------------------------------
43 | def reset_scroll
44 | self.ox = 0
45 | @_wait = @wait
46 | @_speed = @speed
47 | end
48 | #--------------------------------------------------------------------------
49 | # ● 更新滚动
50 | #--------------------------------------------------------------------------
51 | def update_scroll
52 | if @_wait > 0
53 | return @_wait -= 1
54 | else
55 | return reset_scroll if self.ox > @d
56 | return @_speed -= 1 if @_speed > 0
57 | self.ox += 1
58 | return if self.ox <= @d
59 | @_wait = @wait
60 | end
61 | end
62 | #--------------------------------------------------------------------------
63 | # ● 更新
64 | #--------------------------------------------------------------------------
65 | def update
66 | super
67 | update_scroll if @line_number == 1 && @d > 0
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/Message System/【废弃】/多语言提取-核心.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 多语言提取-核心 by 老鹰(http://oneeyedeagle.lofter.com/)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-MultiLangCore"] = true
6 | #=============================================================================
7 | # - 2019.10.13.11
8 | #=============================================================================
9 | # - 本插件提供了从字符串中提取指定语言的标签对内容的方法
10 | # - 利用 标签对编写不同语言的内容
11 | # 其中 sym 替换成所设置的语言符号的字符串
12 | # - 示例:
13 | # t = "......"
14 | # t2 = MultiLang.extract(t)
15 | # 若当前语言为 :CN,则 t2 = "..."
16 | #-----------------------------------------------------------------------------
17 |
18 | module MultiLang
19 | #--------------------------------------------------------------------------
20 | # ● 常量
21 | #--------------------------------------------------------------------------
22 | # 全部语言符号的数组
23 | # (推荐符号全大写,但在文本中标签大小写均可)
24 | ALL_LANGUAGES = [:CN, :EN, :JP]
25 | # 新游戏时默认语言的符号(注:每个存档的语言独立存储)
26 | DEFAULT_LANGUAGE = :CN
27 | # 无标签文本被归类语言的符号
28 | #(默认为 :ALL 代表全部语言下均显示 )
29 | NO_LABEL_TEXT_TYPE = :ALL
30 | #--------------------------------------------------------------------------
31 | # ● 设置当前语言
32 | #--------------------------------------------------------------------------
33 | def self.set(sym = DEFAULT_LANGUAGE)
34 | return if !ALL_LANGUAGES.include?(sym)
35 | $game_system.eagle_lang = sym
36 | end
37 | #--------------------------------------------------------------------------
38 | # ● 提取当前语言的文本
39 | #--------------------------------------------------------------------------
40 | def self.extract(text)
41 | sym_def = NO_LABEL_TEXT_TYPE
42 | sym_cur = $game_system.eagle_lang
43 | ALL_LANGUAGES.each do |l|
44 | # 无标签文本在全部语言下显示 or 无标签文本归类到 当前语言 下
45 | if sym_def == :ALL || sym_def == sym_cur
46 | # 将其余语言的文本清除
47 | next text.gsub!(/<(#{l})>(.*?)<\/\1>/im) { l == sym_cur ? $2 : "" }
48 | end
49 | # 不需要无标签文本,提取出全部当前语言的文本并返回
50 | next if l != sym_cur
51 | return text.scan(/\[(#{l})\](.*?)\[\/\1\]/im).inject(""){|t, x| t + x[1] }
52 | end
53 | return text
54 | end
55 | end # end of module MultiLang
56 |
57 | class Game_System
58 | attr_accessor :eagle_lang
59 | #--------------------------------------------------------------------------
60 | # ● 初始化对象
61 | #--------------------------------------------------------------------------
62 | alias eagle_multilang_init initialize
63 | def initialize
64 | eagle_multilang_init
65 | @eagle_lang = MultiLang::DEFAULT_LANGUAGE # 存储当前语言的标记
66 | end
67 | end
68 |
69 | #class Game_Message
70 | # def all_text
71 | # t = @texts.inject("") {|r, text| r += text + "\n" }
72 | # t = MultiLang.extract(t)
73 | # t.gsub!(/\n/) { "" }
74 | # t
75 | # end
76 | #end
77 |
--------------------------------------------------------------------------------
/Extra Parts/组件-字符串编码转换.rb:
--------------------------------------------------------------------------------
1 | #encoding:utf-8
2 | #==============================================================================
3 | # 字符串编码转换 by 灼眼的夏娜
4 | # 来源:http://rpg.blue/thread-222831-1-1.html
5 | #==============================================================================
6 |
7 | #==============================================================================
8 | # ■ String
9 | #------------------------------------------------------------------------------
10 | # String 类追加定义。
11 | #==============================================================================
12 |
13 | class String
14 | #----------------------------------------------------------------------------
15 | # ● API
16 | #----------------------------------------------------------------------------
17 | @@MultiByteToWideChar = Win32API.new('kernel32', 'MultiByteToWideChar', 'ilpipi', 'i')
18 | @@WideCharToMultiByte = Win32API.new('kernel32', 'WideCharToMultiByte', 'ilpipipp', 'i')
19 | #----------------------------------------------------------------------------
20 | # ● UTF-8 转 Unicode
21 | #----------------------------------------------------------------------------
22 | def u2w
23 | i = @@MultiByteToWideChar.call(65001, 0 , self, -1, nil,0)
24 | buffer = "\0" * (i*2)
25 | @@MultiByteToWideChar.call(65001, 0 , self, -1, buffer, i)
26 | buffer.chop!
27 | return buffer
28 | end
29 | #----------------------------------------------------------------------------
30 | # ● UTF-8 转系统编码
31 | #----------------------------------------------------------------------------
32 | def u2s
33 | i = @@MultiByteToWideChar.call(65001, 0 , self, -1, nil,0)
34 | buffer = "\0" * (i*2)
35 | @@MultiByteToWideChar.call(65001, 0 , self, -1, buffer, i)
36 | i = @@WideCharToMultiByte.call(0, 0, buffer, -1, nil, 0, nil, nil)
37 | result = "\0" * i
38 | @@WideCharToMultiByte.call(0, 0, buffer, -1, result, i, nil, nil)
39 | result.chop!
40 | return result
41 | end
42 | #----------------------------------------------------------------------------
43 | # ● 系统编码转 UTF-8
44 | #----------------------------------------------------------------------------
45 | def s2u
46 | i = @@MultiByteToWideChar.call(0, 0, self, -1, nil, 0)
47 | buffer = "\0" * (i*2)
48 | @@MultiByteToWideChar.call(0, 0, self, -1, buffer, buffer.size / 2)
49 | i = @@WideCharToMultiByte.call(65001, 0, buffer, -1, nil, 0, nil, nil)
50 | result = "\0" * i
51 | @@WideCharToMultiByte.call(65001, 0, buffer, -1, result, result.size, nil, nil)
52 | result.chop!
53 | return result
54 | end
55 | end
56 |
57 | #==============================================================================
58 | # ○ 来自黄鸡(http://rpg.blue/home.php?mod=space&uid=65553)
59 | #==============================================================================
60 | module FUX2
61 | #--------------------------------------------------------------------------
62 | # ● 读取加密档案中的TXT文本(不破坏原有load_data方法)
63 | #--------------------------------------------------------------------------
64 | def self.read_data(name)
65 | x = Marshal.method(:load)
66 | y = class << Marshal; self; end
67 | y.send(:define_method, :load){|f,*args| f.respond_to?(:read) ? f.read : f.to_s}
68 | ret = load_data(name)
69 | y.send(:define_method, :load, x)
70 | ret.s2u
71 | end
72 | end
73 |
--------------------------------------------------------------------------------
/Message System/对话框扩展/AddOn-自定义文字移出.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 自定义文字移出 by 老鹰
3 | # ※ 本插件需要放置在【对话框扩展 by老鹰】与【UI移动控制 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-MessageCharasOutEX"] = "1.0.0"
7 | #==============================================================================
8 | # - 2020.6.6.21
9 | #==============================================================================
10 | # - 本插件为对话框的文字精灵新增自定义的移出模式
11 | #----------------------------------------------------------------------------
12 | # - 对话框中新增了转义符 \eout[type] 用于指定使用的移出模式
13 | # (优先级高于位于本插件上方的其他移出方式)
14 | #
15 | # type → 传入数字,指定 EAGLE_UI_MOVE_TYPE 中的移出类型
16 | #
17 | # 【注意】
18 | #
19 | # “指令序列”的最后一项,需要固定为 eval:obj.finish ,用于结束文字的移动
20 | #==============================================================================
21 |
22 | #=============================================================================
23 | # ○ 【设置部分】
24 | #=============================================================================
25 | module MESSAGE_EX
26 | #--------------------------------------------------------------------------
27 | # ● 【常量】定义 type → UI移动控制的参数
28 | # (具体写法请参考【UI移动控制 by老鹰】中的注释)
29 | #--------------------------------------------------------------------------
30 | EAGLE_UI_MOVE_TYPE = {
31 | # type => ["string", {params}],
32 | 1 => ["vy:-5; ay:1; t:60; eval:obj.finish", {}],
33 | }
34 | #--------------------------------------------------------------------------
35 | # ● 【常量】定义参数默认值
36 | #--------------------------------------------------------------------------
37 | EOUT_PARAMS_INIT = {
38 | # \eout[]
39 | :type => nil,
40 | }
41 | end
42 | #==============================================================================
43 | # ○ 定义能够响应的文字特效
44 | #==============================================================================
45 | module MESSAGE_EX::CHARA_EFFECTS
46 | #--------------------------------------------------------------------------
47 | # ● UI移动控制
48 | #--------------------------------------------------------------------------
49 | def eagle_chara_effect_eout(param = '')
50 | end
51 | end
52 | #=============================================================================
53 | # ○ 单个文字的精灵
54 | #=============================================================================
55 | class Sprite_EagleCharacter < Sprite
56 | #--------------------------------------------------------------------------
57 | # ● 处理移出模式
58 | #--------------------------------------------------------------------------
59 | alias eagle_ui_move_process_move_out process_move_out
60 | def process_move_out
61 | return move_out_eout(@params[:eout]) if @params[:eout] && !@params[:eout].empty?
62 | eagle_ui_move_process_move_out
63 | end
64 | #--------------------------------------------------------------------------
65 | # ● UI移动控制的移出
66 | #--------------------------------------------------------------------------
67 | def start_effect_eout(params, param_s)
68 | params[:type] = nil
69 | parse_param(params, param_s, :type)
70 | if params[:type].nil? || MESSAGE_EX::EAGLE_UI_MOVE_TYPE[params[:type]].nil?
71 | params.clear
72 | end
73 | end
74 | def move_out_eout(params)
75 | arr = MESSAGE_EX::EAGLE_UI_MOVE_TYPE[params[:type]]
76 | EAGLE_UI_MOVE.new(self, arr[0], arr[1])
77 | @flag_update_pos = false # 阻止自身的更新
78 | @flag_move = nil
79 | end
80 | end
81 |
--------------------------------------------------------------------------------
/Battle System/装备附加属性/AddOn-随机属性装备.rb:
--------------------------------------------------------------------------------
1 | #=============================================================================
2 | # ■ Add-On 随机属性装备 by 老鹰(http://oneeyedeagle.lofter.com/)
3 | # ※ 本插件需要放置在【装备附加属性-核心 by老鹰】与【Add-On 随机规则 by老鹰】之下
4 | #=============================================================================
5 | # - 2019.5.2.12
6 | #=============================================================================
7 | # - 本插件实现了简单的随机属性装备的获取与丢失
8 | #--------------------------------------------------------------------------
9 | # -【推荐】结合 物品帮助增强 来显示属性(http://rpg.blue/thread-372464-1-1.html)
10 | #=============================================================================
11 | module EQUIP_EX
12 | #--------------------------------------------------------------------------
13 | # ○ 常量:敌人掉落装备将具有随机属性?
14 | #--------------------------------------------------------------------------
15 | ENEMY_DROP = true
16 | #--------------------------------------------------------------------------
17 | # ○ 常量:商店购买装备将具有随机属性?
18 | #--------------------------------------------------------------------------
19 | SHOP_BUY = true
20 | #--------------------------------------------------------------------------
21 | # ○ 生成随机属性装备
22 | #--------------------------------------------------------------------------
23 | def self.new_equip_ex(item)
24 | return item unless can_ex?(item)
25 | attrs = EQUIP_EX.new_attrs(item)
26 | id_ex = EQUIP_EX.new_ex(item, attrs)
27 | EQUIP_EX.get_equip(item, id_ex)
28 | end
29 | end
30 | #=============================================================================
31 | # ○ 绑定队伍失去物品
32 | #=============================================================================
33 | class Game_Party < Game_Unit
34 | #--------------------------------------------------------------------------
35 | # ● 减少物品
36 | # include_equip : 是否包括装备
37 | #--------------------------------------------------------------------------
38 | alias eagle_equip_ex_lose_item lose_item
39 | def lose_item(item, amount, include_equip = false)
40 | eagle_equip_ex_lose_item(item, -amount, include_equip)
41 | EQUIP_EX.delete_ex(item)
42 | end
43 | end
44 | #=============================================================================
45 | # ○ 绑定敌人掉落
46 | #=============================================================================
47 | class Game_Enemy < Game_Battler
48 | #--------------------------------------------------------------------------
49 | # ● 生成物品数组
50 | #--------------------------------------------------------------------------
51 | alias eagle_equip_ex_make_drop_items make_drop_items
52 | def make_drop_items
53 | drops = eagle_equip_ex_make_drop_items
54 | drops = drops.collect { |e| EQUIP_EX.new_equip_ex(e) } if EQUIP_EX::ENEMY_DROP
55 | drops
56 | end
57 | end
58 | #=============================================================================
59 | # ○ 绑定商店购买
60 | #=============================================================================
61 | class Scene_Shop < Scene_MenuBase
62 | #--------------------------------------------------------------------------
63 | # ● (覆盖)执行买入
64 | #--------------------------------------------------------------------------
65 | def do_buy(number)
66 | $game_party.lose_gold(number * buying_price)
67 | if EQUIP_EX::SHOP_BUY
68 | number.times do
69 | item = EQUIP_EX.new_equip_ex(@item)
70 | $game_party.gain_item(item, 1)
71 | end
72 | else
73 | $game_party.gain_item(@item, number)
74 | end
75 | end
76 | end
77 |
--------------------------------------------------------------------------------
/Event System/地图卷动/地图卷动-缓动.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 地图卷动-缓动 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【组件-缓动函数 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-MapEaseScroll"] = "1.0.1"
7 | #==============================================================================
8 | # - 2023.10.18.2 兼容 Map Effects v1.4.1 for VX and VXace by Zeus81
9 | #==============================================================================
10 | # - 本插件新增了地图中使用的缓动版地图卷动
11 | #-----------------------------------------------------------------------------
12 | # 【使用】
13 | #
14 | # 利用 全局脚本 调用缓动版地图卷动(不包含等待):
15 | #
16 | # $game_map.eagle_start_scroll(x, y, t, type)
17 | #
18 | # 其中 x y 为卷动后的画面中心位置(地图坐标)
19 | # (注:显示的范围不会超过地图大小)
20 | #
21 | # 其中 t 为卷动耗时帧数(1秒等于60帧)
22 | #
23 | # 其中 type 为缓动函数名称(字符串)
24 | # (具体见【组件-缓动函数 by老鹰】中的“方法调用(字符串)”部分)
25 | #
26 | # 【示例】
27 | #
28 | # $game_map.eagle_start_scroll(15, 14)
29 | #
30 | # → 正弦缓动,60帧内,卷动到地图(15,14)为中心的位置
31 | #
32 | # $game_map.eagle_start_scroll(0, 0, 120)
33 | #
34 | # → 正弦缓动,120帧内,卷动到地图(0,0)为中心的位置
35 | # 但由于(0,0)为中心时,地图左上角将超出范围,因此将修正为 (8,6) 为中心
36 | #
37 | # $game_map.eagle_start_scroll(5, 10, 60, "easeInCubic")
38 | #
39 | # → 立方缓动,60帧内,卷动到地图(5,10)为中心的位置
40 | #
41 | #==============================================================================
42 |
43 | class Game_Map
44 | #--------------------------------------------------------------------------
45 | # ● 更新卷动
46 | #--------------------------------------------------------------------------
47 | alias eagle_ease_update_scroll update_scroll
48 | def update_scroll
49 | return eagle_update_scroll if @eagle_scroll != nil
50 | eagle_ease_update_scroll
51 | end
52 | #--------------------------------------------------------------------------
53 | # ● 开始卷动
54 | #--------------------------------------------------------------------------
55 | def eagle_start_scroll(map_x, map_y, t=60, type="easeInSine")
56 | @eagle_scroll = {}
57 | @eagle_scroll["x1"] = @display_x
58 | @eagle_scroll["y1"] = @display_y
59 | @eagle_scroll["x2"] = map_x - $game_player.center_x
60 | @eagle_scroll["y2"] = map_y - $game_player.center_y
61 | @eagle_scroll["xd"] = @eagle_scroll["x2"] - @eagle_scroll["x1"]
62 | @eagle_scroll["yd"] = @eagle_scroll["y2"] - @eagle_scroll["y1"]
63 | @eagle_scroll["t"] = t
64 | @eagle_scroll["c"] = 0
65 | @eagle_scroll["type"] = type
66 | end
67 | #--------------------------------------------------------------------------
68 | # ● 更新卷动
69 | #--------------------------------------------------------------------------
70 | def eagle_update_scroll
71 | return @eagle_scroll = nil if @eagle_scroll["c"] > @eagle_scroll["t"]
72 | t = @eagle_scroll["c"] * 1.0 / @eagle_scroll["t"]
73 | v = EasingFuction.call(@eagle_scroll["type"], t)
74 | @eagle_scroll["c"] += 1
75 | @display_x = @eagle_scroll["x1"] + @eagle_scroll["xd"] * v
76 | @display_y = @eagle_scroll["y1"] + @eagle_scroll["yd"] * v
77 |
78 | if $imported[:Zeus_Map_Effects]
79 | @display_x = limit_x(@display_x)
80 | @display_y = limit_y(@display_y)
81 | return
82 | end
83 |
84 | @display_x = [@display_x, 0].max
85 | @display_y = [@display_y, 0].max
86 | @display_x = [@display_x, (width - screen_tile_x)].min
87 | @display_y = [@display_y, height - screen_tile_y].min
88 | end
89 | end
90 |
--------------------------------------------------------------------------------
/UI Parts/自由显示光标/AddOn-战斗中角色选择光标.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 战斗中角色选择光标 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【自由显示光标 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-Cursor-Battler"] = "1.0.0"
7 | #=============================================================================
8 | # - 2022.9.25.16
9 | #=============================================================================
10 | # - 本插件新增:在战斗中进行角色/敌人选择时,显示一个动态光标
11 | #-----------------------------------------------------------------------------
12 | # - 具体请自行搜索并修改 CURSOR.set_sprite 方法的参数
13 | #=============================================================================
14 |
15 | module CURSOR
16 | #--------------------------------------------------------------------------
17 | # ●【常量】光标的参数(详见 利用全局脚本定位光标 中的 ps参数)
18 | #--------------------------------------------------------------------------
19 | BATTLER_CURSOR_PARAMS = {
20 | :d => 6,
21 | }
22 | end
23 |
24 | class Window_BattleActor < Window_BattleStatus
25 | #--------------------------------------------------------------------------
26 | # ● 调用帮助窗口的更新方法
27 | #--------------------------------------------------------------------------
28 | def call_update_help
29 | super
30 | ss = SceneManager.scene.spriteset.actor_sprites
31 | ss.each do |s|
32 | if s.battler == $game_party.members[index]
33 | # 光标移动到当前选中的我方队员
34 | ps = CURSOR::BATTLER_CURSOR_PARAMS.dup
35 | ps[:text] = s.battler.name
36 | CURSOR.set_sprite("战斗角色", s, ps)
37 | break
38 | end
39 | end
40 | end
41 | #--------------------------------------------------------------------------
42 | # ● 隐藏
43 | #--------------------------------------------------------------------------
44 | alias eagle_cursor_hide hide
45 | def hide
46 | CURSOR.reset("战斗角色")
47 | eagle_cursor_hide
48 | end
49 | end
50 |
51 | class Window_BattleEnemy < Window_Selectable
52 | #--------------------------------------------------------------------------
53 | # ● 调用帮助窗口的更新方法
54 | #--------------------------------------------------------------------------
55 | def call_update_help
56 | super
57 | ss = SceneManager.scene.spriteset.enemy_sprites
58 | ss.each do |s|
59 | if s.battler == enemy
60 | # 光标移动到当前选中的敌人
61 | ps = CURSOR::BATTLER_CURSOR_PARAMS.dup
62 | ps[:text] = s.battler.name
63 | CURSOR.set_sprite("战斗角色", s, ps)
64 | break
65 | end
66 | end
67 | end
68 | #--------------------------------------------------------------------------
69 | # ● 隐藏
70 | #--------------------------------------------------------------------------
71 | alias eagle_cursor_hide hide
72 | def hide
73 | CURSOR.reset("战斗角色")
74 | eagle_cursor_hide
75 | end
76 | end
77 |
78 | class Scene_Battle < Scene_Base
79 | #--------------------------------------------------------------------------
80 | # ● 开始后处理
81 | #--------------------------------------------------------------------------
82 | alias eagle_cursor_post_start post_start
83 | def post_start
84 | eagle_cursor_post_start
85 | CURSOR.new("战斗角色")
86 | end
87 | #--------------------------------------------------------------------------
88 | # ● 结束前处理
89 | #--------------------------------------------------------------------------
90 | alias eagle_cursor_pre_terminate pre_terminate
91 | def pre_terminate
92 | CURSOR.delete("战斗角色")
93 | eagle_cursor_pre_terminate
94 | end
95 | end
96 |
--------------------------------------------------------------------------------
/Message System/对话框扩展/AddOn-并行对话-战斗.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 并行对话-战斗 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【Add-On 并行对话 by老鹰】之下
4 | #==============================================================================
5 | # - 2019.9.18.15
6 | #==============================================================================
7 | # - 本插件新增了在战斗中呼叫指定名称的并行对话的功能
8 | #--------------------------------------------------------------------------
9 | # ○ 编写与战斗者相关的并行对话
10 | #--------------------------------------------------------------------------
11 | # - 此类并行对话必须为预设对话,且“标签序列”的唯一名称按以下格式编写
12 | #
13 | # 主动方标志+主动方id+_+目标方标志+目标方id+_+序号
14 | #
15 | # 其中 主动方标志 与 目标方标志 为 字母a(代表角色) 或 字母e(代表敌人)
16 | # 其中 主动方id 与 目标方id 为对应的在数据库中的id编号
17 | # 其中 序号 为并行对话的序号,用于区分同一组角色/敌人下的不同对话序列
18 | #
19 | # 如 主动方为我方1号角色,目标为3号敌人,对话序列为1号,则唯一名称为 :a1_e3_1
20 | #
21 | # 其余与原始并行对话一致
22 | #--------------------------------------------------------------------------
23 | # ○ 事件中调用
24 | #--------------------------------------------------------------------------
25 | # - 利用事件脚本 para_msg(v, a_id, b) 呼叫指定并行对话
26 | # 其中 v 为对话标志
27 | # 若传入符号,则直接调用该符号对应名称的并行对话
28 | # 若传入正数,则为 指定序号
29 | # 若传入负数,则取 1~负数绝对值 中的一个随机数作为 指定序号
30 | # 其中 a_id 对应的角色为对话主动方
31 | # 若传入正数,则代表角色数据库id,
32 | # 若传入负数,则代表敌人index,
33 | # 若省略,取数据库1号角色
34 | # 其中 b 对应的角色为对话目标方
35 | # 若传入正数,则代表角色数据库id
36 | # 若传入负数,则代表敌人index
37 | # 若传入 Game_Battler 对象,则直接取它
38 | # 若传入 Game_Battler 对象数组,则随机取其中一个,
39 | # 若省略,取当前敌群中随机一个敌人
40 | # - 示例:
41 | # para_msg(1, 4, -1) 将呼叫名称为 :a4_e1_1 的并行对话
42 | # para_msg(-3, -1, 1) 将呼叫名称为 :e1_a1_1 :e1_a1_2 :e1_a1_3 中的一个
43 | # para_msg(-2, 3) 将随机选取战场上一名存活敌人,其数据库id为(id),
44 | # 呼叫名称为 :a3_e(id)_1 :a3_e(id)_2 中的一个并行对话
45 | #--------------------------------------------------------------------------
46 | # ○ 技能公式中调用
47 | #--------------------------------------------------------------------------
48 | # - 在技能公式中,利用 a.para_msg(v, b) 呼叫
49 | # 其中 a 为对话主动方,b 为目标方,均为 Game_Battler 对象
50 | # v 与上述一致
51 | # 若省略 b,则取当前敌群中随机一个存活的敌人
52 | #==============================================================================
53 |
54 | module MESSAGE_PARA
55 | #--------------------------------------------------------------------------
56 | # ●【常量】预设文本文件的路径(用 / 分隔)与文件名(含后缀名)的数组
57 | #--------------------------------------------------------------------------
58 | FILES_MSG_LIST += [ "Data/battle_msg.txt" ]
59 | end
60 |
61 | class Game_Battler
62 | #--------------------------------------------------------------------------
63 | # ● 呼叫指定的并行对话
64 | #--------------------------------------------------------------------------
65 | def para_msg(v, b = nil)
66 | b = $game_troop.alive_members if b.nil?
67 | b = b[rand(b.size)] if b.is_a?(Array)
68 | s = (self.actor? ? "a#{self.id}_" : "e#{self.enemy_id}_")
69 | s += (b.enemy? ? "e#{b.enemy_id}_" : "a#{b.id}_")
70 | s += (v >= 0 ? "#{v}" : "#{rand(v.abs)+1}")
71 | MESSAGE_PARA.call(s.to_sym)
72 | end
73 | end
74 |
75 | class Game_Interpreter
76 | #--------------------------------------------------------------------------
77 | # ● 呼叫指定的并行对话
78 | #--------------------------------------------------------------------------
79 | def para_msg(v, a_id = 1, b = nil)
80 | if v.is_a?(Symbol)
81 | MESSAGE_PARA.call(v)
82 | end
83 | if b.is_a?(Integer)
84 | if b > 0
85 | b = $game_party.members.select {|a| a.actor.id == b }[0]
86 | elsif b < 0
87 | b = $game_troop.members[b.abs]
88 | else
89 | return
90 | end
91 | end
92 | if a_id > 0
93 | $game_party.members.select {|a| a.actor.id == a_id }[0].para_msg(v, b)
94 | elsif a_id < 0
95 | $game_troop.members[a_id.abs].para_msg(v, b)
96 | end
97 | end
98 | end
99 |
--------------------------------------------------------------------------------
/UI Parts/粒子系统V3/预设粒子模板.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 粒子模板预设 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【粒子系统V3 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-PT-PreSet"] = "3.1.0"
7 | #==============================================================================
8 | # - 2025.6.21.10 编写一些新范例
9 | #==============================================================================
10 |
11 | class << PARTICLE
12 | alias eagle_particle_init init
13 | def init
14 | eagle_particle_init
15 |
16 | # --------------------------------------------------------------------
17 | # 在此处编写你想要预设的模板
18 | # 之后直接按照你设定的名字进行调用就可以用啦!
19 | # --------------------------------------------------------------------
20 |
21 | # 模板 - 全屏随机显示红色的小方块
22 | f = PT_Emitter.new
23 | b = Bitmap.new(3, 3)
24 | b.fill_rect(b.rect, Color.new(255,0,0,255))
25 | f.params[:bitmaps].push(b) # 可以传入多个,粒子会随机选一个
26 | f.params[:pos_rect] = Rect.new(0, 0, Graphics.width, Graphics.height)
27 | f.params[:theta] = VarValue.new(0, 360) # 初速度方向(角度)
28 | f.params[:speed] = VarValue.new(2, 1) # 初速度值(标量)
29 | f.params[:life] = VarValue.new(300, 120) # 存在时间
30 | setup("测试", f) # 这个粒子模板的名称为 "测试"
31 | # 需要用时,使用全局脚本 PARTICLE.start("测试")
32 |
33 |
34 | # 能力待学习的特效
35 | f = PT_Moveto.new
36 | f.params[:total] = 40
37 | f.params[:new_wait] = 10
38 | b = Bitmap.new(6, 6)
39 | b.fill_rect(b.rect, Color.new(255,255,255,200))
40 | f.params[:bitmaps].push(b)
41 | f.params[:xys] = [ [Graphics.width/2, Graphics.height/2] ]
42 | f.params[:xys_type] = 10
43 | f.params[:zoom] = 0.5
44 | f.params[:opacity] = 0
45 | f.params[:move_type] = "easeOutExpo"
46 | setup("可学习", f) # 这个粒子模板的名称为 "测试"
47 |
48 | # 能力完成学习的特效
49 | f = PT_Emitter.new
50 | f.flag_start_once = true
51 | f.params[:total] = 30
52 | b = Bitmap.new(2, 2)
53 | b.fill_rect(b.rect, Color.new(255,255,255,255))
54 | f.params[:bitmaps].push(b)
55 | #f.params[:pos_rect] = Rect.new(0, 0, Graphics.width, Graphics.height)
56 | f.params[:theta] = VarValue.new(0, 360) # 初速度方向(角度)
57 | f.params[:speed] = VarValue.new(2, 1) # 初速度值(标量)
58 | f.params[:life] = VarValue.new(60, 20) # 存在时间
59 | f.params[:z] = 100
60 | setup("能力学习完成", f)
61 |
62 | end
63 |
64 | #--------------------------------------------------------------------------
65 | # ● (测试用)图片散开再聚拢
66 | #--------------------------------------------------------------------------
67 | def test_img_split
68 | # 导入 Graphics/System 下的图片,调用 组件-通用方法汇总 中的方法切割成n个矩形
69 | s = Sprite.new
70 | s.bitmap = Cache.system("face_eagle")
71 | s.x = (Graphics.width - s.width ) / 2
72 | s.y = (Graphics.height - s.height ) / 2
73 | ss, pos = EAGLE_COMMON.img2rects(s)
74 | s.dispose
75 |
76 | # 处理这些矩形的四散
77 | f = PT_Emitter.new
78 | f.flag_start_once = true
79 | f.params[:sprites] = ss.dup
80 | f.params[:total] = ss.size
81 | f.params[:pos_rect] = Rect.new(0, 0, Graphics.width, Graphics.height)
82 | f.params[:theta] = VarValue.new(0, 360) # 初速度方向(角度)
83 | f.params[:speed] = VarValue.new(2, 1) # 初速度值(标量)
84 | f.params[:life] = 50 # 存在时间
85 | f.params[:force] = Vector.new(0,1)
86 | setup("test-1", f)
87 | start("test-1")
88 |
89 | # 事件脚本中使用,等待散开完成
90 | 60.times { Fiber.yield }
91 |
92 | # 处理这些矩形的归位(依靠之前存的 pos,让精灵按顺序移动回原位置)
93 | f = PT_Moveto.new
94 | f.flag_start_once = true
95 | f.params[:sprites] = ss
96 | f.params[:total] = ss.size
97 | f.params[:xys] = pos
98 | f.params[:xys_type] = 1
99 | f.params[:life] = 120 # 存在时间
100 | f.params[:t] = 100
101 | # 因为之后没有这些精灵的事情了,而粒子系统里外部导入的精灵不会自动释放,
102 | # 所以在粒子生命结束时手动释放
103 | f.params[:eval2] = "cur.bitmap.dispose; cur.dispose"
104 | setup("test-2", f)
105 | start("test-2")
106 | end
107 |
108 | end
109 |
--------------------------------------------------------------------------------
/Event System/地图卷动/地图卷动-缓动VX.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 地图卷动-缓动VX by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【组件-缓动函数 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-VX-MapEaseScroll"] = "1.0.1"
7 | #==============================================================================
8 | # - 2023.10.18.2 兼容 Map Effects v1.4.1 for VX and VXace by Zeus81
9 | #==============================================================================
10 | # - 本插件新增了地图中使用的缓动版地图卷动
11 | #-----------------------------------------------------------------------------
12 | # 【使用】
13 | #
14 | # 利用 全局脚本 调用缓动版地图卷动(不包含等待):
15 | #
16 | # $game_map.eagle_start_scroll(x, y, t, type)
17 | #
18 | # 其中 x y 为卷动后的画面中心位置(地图坐标)
19 | # (注:显示的范围不会超过地图大小)
20 | #
21 | # 其中 t 为卷动耗时帧数(1秒等于60帧)
22 | #
23 | # 其中 type 为缓动函数名称(字符串)
24 | # (具体见【组件-缓动函数 by老鹰】中的“方法调用(字符串)”部分)
25 | #
26 | # 【示例】
27 | #
28 | # $game_map.eagle_start_scroll(15, 14)
29 | #
30 | # → 正弦缓动,60帧内,卷动到地图(15,14)为中心的位置
31 | #
32 | # $game_map.eagle_start_scroll(0, 0, 120)
33 | #
34 | # → 正弦缓动,120帧内,卷动到地图(0,0)为中心的位置
35 | # 但由于(0,0)为中心时,地图左上角将超出范围,因此将修正为 (8,6) 为中心
36 | #
37 | # $game_map.eagle_start_scroll(5, 10, 60, "easeInCubic")
38 | #
39 | # → 立方缓动,60帧内,卷动到地图(5,10)为中心的位置
40 | #
41 | #==============================================================================
42 |
43 | class Game_Map
44 | #--------------------------------------------------------------------------
45 | # ● 更新卷动
46 | #--------------------------------------------------------------------------
47 | alias eagle_ease_update_scroll update_scroll
48 | def update_scroll
49 | return eagle_update_scroll if @eagle_scroll != nil
50 | eagle_ease_update_scroll
51 | end
52 | #--------------------------------------------------------------------------
53 | # ● 开始卷动
54 | #--------------------------------------------------------------------------
55 | def eagle_start_scroll(map_x, map_y, t=60, type="easeInSine")
56 | @eagle_scroll = {}
57 | @eagle_scroll["x1"] = @display_x / 256.0
58 | @eagle_scroll["y1"] = @display_y / 256.0
59 | @eagle_scroll["x2"] = map_x - Game_Player::CENTER_X / 256.0
60 | @eagle_scroll["y2"] = map_y - Game_Player::CENTER_Y / 256.0
61 | @eagle_scroll["xd"] = @eagle_scroll["x2"] - @eagle_scroll["x1"]
62 | @eagle_scroll["yd"] = @eagle_scroll["y2"] - @eagle_scroll["y1"]
63 | @eagle_scroll["t"] = t
64 | @eagle_scroll["c"] = 0
65 | @eagle_scroll["type"] = type
66 | end
67 | #--------------------------------------------------------------------------
68 | # ● 更新卷动
69 | #--------------------------------------------------------------------------
70 | def eagle_update_scroll
71 | return @eagle_scroll = nil if @eagle_scroll["c"] > @eagle_scroll["t"]
72 | t = @eagle_scroll["c"] * 1.0 / @eagle_scroll["t"]
73 | v = EasingFuction.call(@eagle_scroll["type"], t)
74 | @eagle_scroll["c"] += 1
75 | @display_x = @eagle_scroll["x1"] + @eagle_scroll["xd"] * v
76 | @display_y = @eagle_scroll["y1"] + @eagle_scroll["yd"] * v
77 |
78 | @display_x = @display_x * 256
79 | @display_y = @display_y * 256
80 |
81 | if $imported[:Zeus_Map_Effects]
82 | @display_x = limit_x(@display_x)
83 | @display_y = limit_y(@display_y)
84 | return
85 | end
86 |
87 | @display_x = [@display_x, 0].max
88 | @display_y = [@display_y, 0].max
89 | @display_x = [@display_x, (width - screen_tile_x) * 256].min
90 | @display_y = [@display_y, (height - screen_tile_y) * 256].min
91 | end
92 | #--------------------------------------------------------------------------
93 | # ● 画面的横向图块数
94 | #--------------------------------------------------------------------------
95 | def screen_tile_x
96 | Graphics.width / 32
97 | end
98 | #--------------------------------------------------------------------------
99 | # ● 画面的纵向图块数
100 | #--------------------------------------------------------------------------
101 | def screen_tile_y
102 | Graphics.height / 32
103 | end
104 | end
105 |
--------------------------------------------------------------------------------
/Event System/事件消息机制/AddOn-不中断消息的场景呼叫.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 不中断消息的场景呼叫 by 老鹰
3 | # ※ 本插件需要放置在【事件消息机制 by老鹰】与【场景自由呼叫 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-EventMsgCallScene"] = "1.0.0"
7 | #==============================================================================
8 | # - 2022.10.18.22
9 | #==============================================================================
10 | # - 本插件让消息中的场景呼叫不中止当前消息执行
11 | #----------------------------------------------------------------------------
12 | # 【原理】
13 | #
14 | # 由于呼叫 scene 会导致消息终止执行,进而影响原本的设计流程,
15 | # 因此使用【场景自由呼叫 by老鹰】中的方法替换了原始的 SceneManager.call
16 | #
17 | # EAGLE.call_scene(scene) → 呼叫指定场景
18 | # Fiber.yield while EAGLE.call_scene? → 等待场景处理结束
19 | #
20 | #==============================================================================
21 |
22 | class Game_Interpreter_EagleMsg
23 | #--------------------------------------------------------------------------
24 | # ● 战斗的处理
25 | #--------------------------------------------------------------------------
26 | def command_301
27 | return if $game_party.in_battle
28 | if @params[0] == 0 # 直接指定
29 | troop_id = @params[1]
30 | elsif @params[0] == 1 # 变量指定
31 | troop_id = $game_variables[@params[1]]
32 | else # 地图指定的敌群
33 | troop_id = $game_player.make_encounter_troop_id
34 | end
35 | if $data_troops[troop_id]
36 | BattleManager.setup(troop_id, @params[2], @params[3])
37 | BattleManager.event_proc = Proc.new {|n| @branch[@indent] = n }
38 | $game_player.make_encounter_count
39 | #SceneManager.call(Scene_Battle) # EAGLE 注释
40 | EAGLE.call_scene(Scene_Battle) # EAGLE 修改
41 | Fiber.yield while EAGLE.call_scene? # EAGLE 修改
42 | end
43 | Fiber.yield
44 | end
45 | #--------------------------------------------------------------------------
46 | # ● 商店的处理
47 | #--------------------------------------------------------------------------
48 | def command_302
49 | return if $game_party.in_battle
50 | goods = [@params]
51 | while next_event_code == 605
52 | @index += 1
53 | goods.push(@list[@index].parameters)
54 | end
55 | #SceneManager.call(Scene_Shop) # EAGLE 注释
56 | EAGLE.call_scene(Scene_Shop) # EAGLE 修改
57 | #SceneManager.scene.prepare(goods, @params[4]) # EAGLE 注释
58 | SceneManager.eagle_scene.prepare(goods, @params[4]) # EAGLE 修改
59 | Fiber.yield while EAGLE.call_scene? # EAGLE 修改
60 | Fiber.yield
61 | end
62 | #--------------------------------------------------------------------------
63 | # ● 名字输入的处理
64 | #--------------------------------------------------------------------------
65 | def command_303
66 | return if $game_party.in_battle
67 | if $data_actors[@params[0]]
68 | #SceneManager.call(Scene_Name) # EAGLE 注释
69 | EAGLE.call_scene(Scene_Name) # EAGLE 修改
70 | #SceneManager.scene.prepare(@params[0], @params[1]) # EAGLE 注释
71 | SceneManager.eagle_scene.prepare(@params[0], @params[1]) # EAGLE 修改
72 | Fiber.yield while EAGLE.call_scene? # EAGLE 修改
73 | Fiber.yield
74 | end
75 | end
76 | #--------------------------------------------------------------------------
77 | # ● 打开菜单画面
78 | #--------------------------------------------------------------------------
79 | def command_351
80 | return if $game_party.in_battle
81 | #SceneManager.call(Scene_Menu) # EAGLE 注释
82 | EAGLE.call_scene(Scene_Menu) # EAGLE 修改
83 | Window_MenuCommand::init_command_position
84 | Fiber.yield while EAGLE.call_scene? # EAGLE 修改
85 | Fiber.yield
86 | end
87 | #--------------------------------------------------------------------------
88 | # ● 打开存档画面
89 | #--------------------------------------------------------------------------
90 | def command_352
91 | return if $game_party.in_battle
92 | #SceneManager.call(Scene_Save) # EAGLE 注释
93 | EAGLE.call_scene(Scene_Save) # EAGLE 修改
94 | Fiber.yield while EAGLE.call_scene? # EAGLE 修改
95 | Fiber.yield
96 | end
97 | end
98 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 老鹰的脚本小巢 - RGSS3
2 |
3 | 
4 |
5 | *LOGO绘制by[葱兔](http://onira.lofter.com/)*
6 |
7 | ## 基本信息
8 |
9 | 这里放置的是老鹰平时所写的用于RPG Maker VX Ace的RGSS3类型扩展插件,一般无法用于其他版本。
10 |
11 | ### 文件夹说明
12 |
13 | - Message System → 对默认对话框的扩展 或 与文本显示相关的插件
14 | - Event System → 对事件的扩展 或 地图上可用的扩展
15 | - Battle System → 战斗相关插件 或 对VA数据库的扩展
16 | - UI Parts → 功能系统 或 UI类的插件
17 | - Extra Parts → 额外扩展组件,用于实现一些基础功能
18 | - Demos → 一些特定插件的范例工程,具体见各个子文件夹下的README文件
19 | - TEMP → (不推荐使用)仍在设计中的或修改中的未完成品
20 |
21 | ### 插件版本
22 |
23 | - 在插件头部注释中,有一行会以 年份.月份.日期.序号[.序号] 的格式记录当前插件的更新版本/修改信息,请按照时间最新、序号最大的方式进行新旧版本号的比较。
24 |
25 | - 在新版本的插件中,头部的 _$imported["插件名称"] = "1.2.3"_ 将直接写明该插件的版本号,比如此处的 _"1.2.3"_,其中第一个数字 _1_ 代表大版本,当该数字不同时,代表插件出现了较大的变动,且使用方法也会发生较大变化,可能完全无法直接进行替换,其中第二个数字 _2_ 代表功能更新,一般新增或删除了部分功能,请注意核查注释,尤其是替换掉对被删除功能的调用,其中第三个数字 _3_ 为BUG修复,可以直接复制并覆盖旧版本
26 |
27 | ### 下载方式
28 |
29 | - 【推荐】在当前页的文件列表的右上处,有绿色的“Code”按钮,点击后在弹出的框中选择“Download ZIP”,即可打包下载整个仓库,.rb的文件可以使用文本文档打开
30 |
31 | - 点击进入脚本文件的预览页面后,右上有“Raw”字样的按钮,点击进入只含有文件内容的页面,可利用Ctrl+A进行全选,再复制黏贴到你的工程中的空白脚本页内
32 |
33 | - 【借助第三方工具】若你已经登录了GitHub,可以通过设置GitHub Key后利用第三方工具(如[这个](https://download-directory.github.io/))下载仓库中的独立文件夹:点击your GitHub token后跳转到你自己账户下的key生成界面,拖至最底部点击绿色按键生成key,然后复制key的字符串(注意:该字符串以后无法再找到,请保存好)到原网页中的输入框;此时可以通过在浏览器地址栏输入比如 [这个链接](https://download-directory.github.io?url=https://github.com/OneEyedEagle/EAGLE-RGSS3/tree/master/Demos/DEMO_EagleMessageEX) 来下载本仓库的Demos/DEMO_EagleMessageEX整个文件夹
34 |
35 | ### 更多示例
36 |
37 | - 针对 Message System 里的[【对话框扩展】](https://github.com/OneEyedEagle/EAGLE-RGSS3/tree/master/Message%20System/%E5%AF%B9%E8%AF%9D%E6%A1%86%E6%89%A9%E5%B1%95),欢迎到Project1论坛中的[对话框扩展发布页](https://rpg.blue/thread-476586-1-1.html)查看更多使用范例,其中也有⑨姐姐帮忙创建的Q群,希望我的对话框扩展能帮到你吧~
38 |
39 | - 针对 Event System 里的[【事件消息机制】](https://github.com/OneEyedEagle/EAGLE-RGSS3/blob/master/Event%20System/%E4%BA%8B%E4%BB%B6%E6%B6%88%E6%81%AF%E6%9C%BA%E5%88%B6.rb),可以查看论坛中的[帖子](https://rpg.blue/thread-479571-1-1.html)
40 |
41 | - 针对 UI Parts 里的[【简易合成分解系统】](https://github.com/OneEyedEagle/EAGLE-RGSS3/blob/master/UI%20Parts/%E7%AE%80%E6%98%93%E5%90%88%E6%88%90%E5%88%86%E8%A7%A3%E7%B3%BB%E7%BB%9F.rb),可以查看论坛中的[帖子](https://rpg.blue/thread-479599-1-1.html)
42 |
43 | - 针对 Message System 里的[【对话日志】](https://github.com/OneEyedEagle/EAGLE-RGSS3/blob/master/Message%20System/%E5%AF%B9%E8%AF%9D%E6%97%A5%E5%BF%97.rb),可以查看论坛中的[帖子](https://rpg.blue/thread-482638-1-1.html)
44 |
45 | - 针对 Message System 里的【AddOn-Live2D扩展】,可以查看论坛中的[帖子](https://rpg.blue/thread-483306-1-1.html)
46 |
47 | - 针对 Event System 里的[【事件互动扩展】](https://github.com/OneEyedEagle/EAGLE-RGSS3/tree/master/Event%20System/%E4%BA%8B%E4%BB%B6%E4%BA%92%E5%8A%A8%E6%89%A9%E5%B1%95),可以查看论坛中的[帖子](https://rpg.blue/thread-485177-1-1.html)
48 |
49 | - 针对 UI Parts 里的[【能力学习系统】](https://github.com/OneEyedEagle/EAGLE-RGSS3/blob/master/UI%20Parts/%E8%83%BD%E5%8A%9B%E5%AD%A6%E4%B9%A0%E7%B3%BB%E7%BB%9F.rb),可以查看论坛中的[帖子](https://rpg.blue/thread-487653-1-1.html)
50 |
51 | - 针对 Message System 里的[【通知队列】](https://github.com/OneEyedEagle/EAGLE-RGSS3/tree/master/Message%20System/%E9%80%9A%E7%9F%A5%E9%98%9F%E5%88%97),可以查看论坛中的[帖子](https://rpg.blue/thread-488207-1-1.html)
52 |
53 | - 针对 Event System 里的[【角色头顶显示图标】](https://github.com/OneEyedEagle/EAGLE-RGSS3/tree/master/Event%20System/%E8%A7%92%E8%89%B2%E5%A4%B4%E9%A1%B6%E6%98%BE%E7%A4%BA%E5%9B%BE%E6%A0%87),可以查看论坛中的[帖子](https://rpg.blue/thread-489304-1-1.html)
54 |
55 |
56 | ### 英语版
57 | 超级感谢 Roninator2 和 BCj 努力把我的三个DEMO翻译成了英语版!具体请见[这里](https://forums.rpgmakerweb.com/index.php?threads/eagle-rgss3-scripts-and-demos-english-translated-by-google.160872/)。
58 |
59 | BIIIIIG THANKS to Roninator2 and BCj! They made awesome works to translate my three DEMOs into English version. More information is [HERE](https://forums.rpgmakerweb.com/index.php?threads/eagle-rgss3-scripts-and-demos-english-translated-by-google.160872/).
60 |
61 |
62 | ## 利用规约
63 |
64 | 
65 |
66 | 本repo下的代码基本遵循MIT开源协议
67 |
68 | (部分插件的头部可能会有特殊的使用说明)
69 |
70 | - 自由地用于任何工程内(不可违反当地法律法规)
71 |
72 | - 需要署名(老鹰 / 独眼老鹰)
73 |
74 | - 不强制报告(可发邮件至 eagle_zhou@foxmail.com 以表达感谢、使用报告、赠予试玩版hhh)
75 |
76 | - 允许修改、扩展、二次上传(二次发布需遵循MIT协议),但应注明修改内容并保留原作者信息
77 |
78 | ## 特别声明
79 |
80 | 由于本人精力有限,此处分享的脚本不会对其余脚本进行特别的兼容与整合(除非我自己在用)。
81 |
82 | 如果需要付费将某些脚本与指定脚本进行兼容,请在[Project1论坛](https://rpg.blue/home.php?mod=space&uid=287268)私信联系我,或微博[@独眼老鹰](https://www.weibo.com/oneeyedeagle)短消息联系我。
83 |
--------------------------------------------------------------------------------
/TEMP/获取鼠标滚轮.rb:
--------------------------------------------------------------------------------
1 | module ::API_List
2 |
3 | DragAcceptFiles = Win32API.new('shell32','DragAcceptFiles','ll','v')
4 | DragQueryFile = Win32API.new('shell32','DragQueryFile','llpl','i')
5 | DragFinish = Win32API.new('shell32','DragFinish','l','v')
6 |
7 | CloseHandle = Win32API.new('kernel32','CloseHandle','l','l')
8 | CreateFile = Win32API.new('kernel32','CreateFile','pllplll','l')
9 | CreateFileMapping = Win32API.new('kernel32','CreateFileMapping','lplllp','l')
10 | MapViewOfFile = Win32API.new('kernel32','MapViewOfFile','lllll','l')
11 | UnmapViewOfFile = Win32API.new('kernel32','UnmapViewOfFile','l','l')
12 | RtlMoveMemoryPL = Win32API.new('kernel32','RtlMoveMemory','pll','l')
13 | RtlMoveMemoryLP = Win32API.new('kernel32','RtlMoveMemory','lpl','l')
14 | RtlMoveMemoryPP = Win32API.new('kernel32','RtlMoveMemory','ppl','l')
15 | GetModuleHandle = Win32API.new('kernel32','GetModuleHandle','p','i')
16 | GetProcAddress = Win32API.new('kernel32','GetProcAddress','ip','l')
17 | MultiByteToWideChar = Win32API.new('kernel32', 'MultiByteToWideChar', 'ilpipi', 'i')
18 | WideCharToMultiByte = Win32API.new('kernel32', 'WideCharToMultiByte', 'ilpipipp', 'i')
19 |
20 | GetWindowLong = Win32API.new('user32','GetWindowLong','ii','i')
21 | SetWindowLong = Win32API.new('user32','SetWindowLong','iii','i')
22 |
23 | Malloc = Win32API.new('msvcrt','malloc','i','i')
24 | Memcpy = Win32API.new('msvcrt','memcpy','ipi','v')
25 |
26 | end
27 |
28 |
29 | # by 晴兰
30 | # 乱改 by fux2
31 | module ::WndProc
32 |
33 | include API_List
34 |
35 | module_function
36 | def getwndproc
37 | @wndproc
38 | end
39 | def setwndproc(obj)
40 | @wndproc = obj
41 | end
42 | def hwnd
43 | return @hwnd
44 | end
45 | def findProc(l, n)
46 | lib = GetModuleHandle.call(l)
47 | ret = GetProcAddress.call(lib, n)
48 | return ret
49 | end
50 | def enable
51 | @hwnd = INPUT_EX.get_cur_window # $win_handle
52 | sprintf = findProc("msvcrt","sprintf")
53 | rgsseval = findProc("RGSS300","RGSSGetInt")
54 | defv = findProc("user32","CallWindowProcA")
55 | old = GetWindowLong.call(@hwnd, -4)
56 | buf = Malloc.call(1024)
57 | fmt = Malloc.call(2048)
58 | sprintfvar = Malloc.call(8)
59 | rgssevalvar = Malloc.call(8)
60 | oldvar = Malloc.call(8)
61 | fmtvar = Malloc.call(8)
62 | bufvar = Malloc.call(8)
63 | defvar = Malloc.call(8)
64 | magic_str = "WndProc.getwndproc.call(%d,%d,%d,%d)"
65 | RtlMoveMemoryPP.call(fmt,magic_str,magic_str.size)
66 | Memcpy.call(sprintfvar, [sprintf].pack("i"), 4)
67 | Memcpy.call(rgssevalvar,[rgsseval].pack("i"), 4)
68 | Memcpy.call(oldvar, [old].pack("i"), 4)
69 | Memcpy.call(fmtvar, [fmt].pack("i"), 4)
70 | Memcpy.call(bufvar, [buf].pack("i"), 4)
71 | Memcpy.call(defvar, [defv].pack("i"), 4)
72 | @code = [0x55,0x89,0xE5,0x8B,0x45,0x0C,0xFF,0x75,0x14,0xFF,0x75,0x10,0xFF,0x75,0x0c,0xFF,0x75,0x08].pack("C*")
73 | @code << [0x3D,0x0A,0x02,0x00,0x00,0x75,0x1D].pack("C*")
74 | @code << [0xFF,0x35].pack('C*') << [fmtvar].pack('l')
75 | @code << [0xFF,0x35].pack('C*') << [bufvar].pack('l')
76 | @code << [0xFF,0x15].pack('C*') << [sprintfvar].pack("l")
77 | @code << [0xFF,0x15].pack('C*') << [rgssevalvar].pack("l")
78 | @code << [0x83,0xC4,0x18,0xEB,0x0F].pack('C*')
79 | @code << [0xFF,0x35].pack('C*') << [oldvar].pack("l")
80 | @code << [0xFF,0x15].pack('C*') << [defvar].pack("l")
81 | @code << [0x83,0xC4,0x10].pack("C*")
82 | @code << [0xC9,0xC2,0x10,0x00].pack('C*')
83 | @shellcode = Malloc.call(2048)
84 | Memcpy.call(@shellcode, @code, @code.size)
85 | @@oHandle = SetWindowLong.call(@hwnd, -4, @shellcode)
86 | end
87 |
88 | def init
89 | enable unless $hacked
90 | setwndproc (
91 | lambda {|hwnd, msg, wp, lp|
92 | p wp # 返回鼠标滚轮状态
93 | }
94 | )
95 | end
96 | end
97 |
98 | class << DataManager
99 | #--------------------------------------------------------------------------
100 | # ● 初始化模块
101 | #--------------------------------------------------------------------------
102 | alias eagle_input_msg_ex_init init
103 | def init
104 | eagle_input_msg_ex_init
105 | WndProc.init
106 | end
107 | end
108 |
--------------------------------------------------------------------------------
/Message System/对话框扩展/AddOn2-兼容HiKiMo的SRPG.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On2 兼容HiKiMo的SRPG by 老鹰
3 | # ※ 本插件需要放置在【对话框扩展 by老鹰】之下
4 | #==============================================================================
5 | # - HiKiMo的SRPG 汉化版可以在 https://rpg.blue/thread-479957-1-1.html 找到
6 | #=============================================================================
7 | # - 2021.2.11.17 更新
8 | #=============================================================================
9 |
10 | class Window_EagleMessage
11 | #--------------------------------------------------------------------------
12 | # ● 获取pop的弹出对象(需要有x、y、width、height方法)
13 | #--------------------------------------------------------------------------
14 | alias eagle_hikimo_srpg_get_pop_obj eagle_get_pop_obj
15 | def eagle_get_pop_obj
16 | return eagle_get_pop_obj_hikimosrpg if SceneManager.scene_is?(Scene_SrpgMap)
17 | eagle_hikimo_srpg_get_pop_obj
18 | end
19 | #--------------------------------------------------------------------------
20 | # ○ 兼容HiKiMo的SRPG战斗场景
21 | #--------------------------------------------------------------------------
22 | def eagle_get_pop_obj_hikimosrpg
23 | pop_params[:type] = :map_chara
24 | id = pop_params[:id]
25 | if id == 0 # 当前事件
26 | return $game_srpgmap.events[game_message.event_id]
27 | elsif id > 0 # 第id号事件
28 | chara = $game_srpgmap.events[id]
29 | chara ||= $game_srpgmap.events[game_message.event_id]
30 | return chara
31 | elsif id < 0 # 队伍中数据库id号角色(不存在则取队长)
32 | id = id.abs
33 | $game_srpgmap.actor_events.each do |a|
34 | return a if a.battler.id == id
35 | end
36 | return nil
37 | end
38 | end
39 | #--------------------------------------------------------------------------
40 | # ● 获取pop对象的精灵(用于计算偏移值)
41 | #--------------------------------------------------------------------------
42 | alias eagle_hikimo_srpg_get_pop_sprite eagle_get_pop_sprite
43 | def eagle_get_pop_sprite
44 | return eagle_get_pop_sprite_hikimosrpg if SceneManager.scene_is?(Scene_SrpgMap)
45 | eagle_hikimo_srpg_get_pop_sprite
46 | end
47 | #--------------------------------------------------------------------------
48 | # ○ 兼容HiKiMo的SRPG战斗场景
49 | #--------------------------------------------------------------------------
50 | def eagle_get_pop_sprite_hikimosrpg
51 | SceneManager.scene.spriteset.character_sprites.each do |s|
52 | return s if s.character == @eagle_pop_obj
53 | end
54 | SceneManager.scene.spriteset.actor_event_sprites.each do |s|
55 | next if s.nil?
56 | return s if s.character == @eagle_pop_obj
57 | end
58 | return nil
59 | end
60 | end
61 | class Game_SrpgInterpreter
62 | #--------------------------------------------------------------------------
63 | # ● 显示文字
64 | #--------------------------------------------------------------------------
65 | alias eagle_hikimo_srpg_command_101 command_101
66 | def command_101
67 | $game_message.event_id = @event_id
68 | eagle_hikimo_srpg_command_101
69 | end
70 | end
71 | class Spriteset_SrpgMap
72 | attr_reader :character_sprites
73 | attr_reader :actor_event_sprites
74 | end
75 | class Scene_SrpgMap < Scene_Base
76 | attr_reader :spriteset
77 | end
78 | #=============================================================================
79 | # ○ Scene_SrpgMap
80 | #=============================================================================
81 | class Scene_SrpgMap < Scene_Base
82 | attr_reader :spriteset, :message_window
83 | if EAGLE_MSG_EX_COMPAT_MODE == true
84 | alias eagle_message_ex_compa_mode_update_all_windows update_all_windows
85 | alias eagle_message_ex_compa_mode_dispose_all_windows dispose_all_windows
86 | include MESSAGE_EX::COMPA_MODE
87 | #--------------------------------------------------------------------------
88 | # ● 生成信息窗口
89 | #--------------------------------------------------------------------------
90 | def create_message_window
91 | @msg_windows = [Window_Message.new, Window_EagleMessage.new]
92 | @message_window = @msg_windows[0]
93 | end
94 | else
95 | #--------------------------------------------------------------------------
96 | # ● 生成信息窗口
97 | #--------------------------------------------------------------------------
98 | def create_message_window
99 | @message_window = Window_EagleMessage.new
100 | end
101 | end
102 | end
103 |
--------------------------------------------------------------------------------
/UI Parts/窗口光标缓动.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 窗口光标缓动 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-WinCursorEase"] = "1.0.0"
6 | #==============================================================================
7 | # - 2025.7.31.22 修复窗口每帧激活时,光标错位的bug
8 | #==============================================================================
9 | # - 本插件新增了窗口光标的缓动移动。
10 | #==============================================================================
11 |
12 | module EAGLE
13 | #--------------------------------------------------------------------------
14 | # ● 常量:光标每次移动所需时间(单位:帧)
15 | #-------------------------------------------------------------------------
16 | WIN_CURSOR_MOVE_TIME = 20
17 | #--------------------------------------------------------------------------
18 | # ● 函数:光标移动使用的缓动函数
19 | # x 为 当前移动计时 ÷ 总移动时间 的小数(0~1)
20 | # 返回为该时刻的 移动距离/总距离 的比值
21 | # 若直接返回 x,则为直线移动
22 | #-------------------------------------------------------------------------
23 | def self.cursor_dynamic_ease(x)
24 | 1 - 2**(-10 * x)
25 | end
26 | end
27 |
28 | class Window_Selectable
29 | #--------------------------------------------------------------------------
30 | # ● 初始化对象
31 | #-------------------------------------------------------------------------
32 | alias eagle_dynamic_cursor_initialize initialize
33 | def initialize(x, y, width, height)
34 | eagle_dynamic_cursor_initialize(x, y, width, height)
35 | @cursor_c = @cursor_t = 0
36 | end
37 | #--------------------------------------------------------------------------
38 | # ● 更新光标
39 | #--------------------------------------------------------------------------
40 | def update_cursor
41 | last = @cursor_des
42 | if @cursor_all
43 | #cursor_rect.set(0, 0, contents.width, row_max * item_height)
44 | @cursor_des = Rect.new(0, 0, contents.width, row_max * item_height)
45 | self.top_row = 0
46 | elsif @index < 0
47 | #cursor_rect.empty
48 | @cursor_des = Rect.new(0,0,0,0)
49 | else
50 | ensure_cursor_visible
51 | #cursor_rect.set(item_rect(@index))
52 | @cursor_des = item_rect(@index)
53 | end
54 | if last && last.x == @cursor_des.x && last.y == @cursor_des.y
55 | if last.width == @cursor_des.width && last.height == @cursor_des.height
56 | return
57 | end
58 | end
59 | @cursor_c = @cursor_t = EAGLE::WIN_CURSOR_MOVE_TIME
60 | @cursor_ease = {}
61 | end
62 | #--------------------------------------------------------------------------
63 | # ● 更新
64 | #--------------------------------------------------------------------------
65 | alias eagle_dynamic_cursor_update update
66 | def update
67 | eagle_dynamic_cursor_update
68 | update_cursor_dynamic
69 | end
70 | #--------------------------------------------------------------------------
71 | # ● 动态更新光标
72 | #--------------------------------------------------------------------------
73 | def update_cursor_dynamic
74 | return if @cursor_c == 0
75 | if @cursor_c == @cursor_t
76 | r = cursor_rect
77 | @cursor_ease[:x0] = r.x
78 | @cursor_ease[:x1] = @cursor_des.x
79 | @cursor_ease[:dx] = @cursor_ease[:x1] - @cursor_ease[:x0]
80 | @cursor_ease[:y0] = r.y
81 | @cursor_ease[:y1] = @cursor_des.y
82 | @cursor_ease[:dy] = @cursor_ease[:y1] - @cursor_ease[:y0]
83 | @cursor_ease[:w0] = r.width
84 | @cursor_ease[:w1] = @cursor_des.width
85 | @cursor_ease[:dw] = @cursor_ease[:w1] - @cursor_ease[:w0]
86 | @cursor_ease[:h0] = r.height
87 | @cursor_ease[:h1] = @cursor_des.height
88 | @cursor_ease[:dh] = @cursor_ease[:h1] - @cursor_ease[:h0]
89 | end
90 | @cursor_c -= 1
91 | if @cursor_c == 0
92 | x = @cursor_ease[:x1]
93 | y = @cursor_ease[:y1]
94 | w = @cursor_ease[:w1]
95 | h = @cursor_ease[:h1]
96 | else
97 | v = (@cursor_t - @cursor_c) * 1.0 / @cursor_t
98 | v = EAGLE.cursor_dynamic_ease(v)
99 | x = @cursor_ease[:x0] + v * @cursor_ease[:dx]
100 | y = @cursor_ease[:y0] + v * @cursor_ease[:dy]
101 | w = @cursor_ease[:w0] + v * @cursor_ease[:dw]
102 | h = @cursor_ease[:h0] + v * @cursor_ease[:dh]
103 | end
104 | cursor_rect.set(x,y,w,h)
105 | cursor_rect.empty if w == 0 && h == 0
106 | end
107 | end
108 |
--------------------------------------------------------------------------------
/Extra Parts/组件-Sion_GradientText.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 绘制渐变文字 by Sion
3 | # 原贴地址:https://rpg.blue/forum.php?mod=viewthread&tid=335184&highlight=%E6%B8%90%E5%8F%98
4 | #==============================================================================
5 | # 绘制色彩渐变v1.1 更新取消了脚本基需求,脑残了 - -b
6 | # 说明:文字中输入\u[颜色1,颜色2...] 就以渐变色绘制文字,结束渐变插入\u,大小写均可
7 | # 插入文本框测试例子:\u[0,18,9,8]这是渐变文字\u渐变结束
8 | class Window_Base
9 | GRADUAL_SYM = 'U' #修改控制符,需大写。
10 | #-
11 | alias_method :process_escape_character_NOgradual, :process_escape_character
12 | def process_escape_character(code, text, pos)
13 | code.upcase == GRADUAL_SYM ?
14 | obtain_gradual_param(text, pos) :
15 | process_escape_character_NOgradual(code, text, pos)
16 | end
17 | def obtain_gradual_param(text, pos)
18 | text = text.slice!(/^\[.*]/)
19 | if text
20 | pos[:colors] = []
21 | text.scan(/\d+/).each_with_index {|c, i| pos[:colors][i] = c.to_i}
22 | return if pos[:colors].size >= 2
23 | end
24 | pos[:colors] = nil
25 | end
26 | #
27 | alias_method :process_nomarl_character_NOgradual, :process_normal_character
28 | def process_normal_character(c, pos)
29 | pos[:colors] ?
30 | process_nomarl_character_gradual(c, pos) :
31 | process_nomarl_character_NOgradual(c, pos)
32 | end
33 | def process_nomarl_character_gradual(c, pos)
34 | text_width = text_size(c).width
35 | draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
36 | colors = pos[:colors].collect {|c| text_color(c)}
37 | csz = colors.size
38 | uy = pos[:y]
39 | l = (pos[:y] + pos[:height] - uy).fdiv(csz - 1)
40 | for x in pos[:x]...(pos[:x] + text_width)
41 | sy = uy
42 | colors.each_with_index {|c1, i|
43 | for y in sy.round...(sy + l).round
44 | c = contents.get_pixel(x, y)
45 | next if c.alpha == 0
46 | r = (y - sy) / l
47 | c2 = colors[i + 1]
48 | c.red *= calc_gradual_rgb(r, c1.red, c2.red)
49 | c.blue *= calc_gradual_rgb(r, c1.blue, c2.blue)
50 | c.green *= calc_gradual_rgb(r, c1.green, c2.green)
51 | contents.set_pixel(x, y, c)
52 | end
53 | break if i == csz - 2
54 | sy += l
55 | }
56 | end
57 | pos[:x] += text_width
58 | end
59 | def calc_gradual_rgb(r, v1,v2)
60 | (v2 > v1 ? (r * (v2-v1) + v1) : ((1-r) * (v1-v2) + v2)) / 255
61 | end
62 | end
63 |
64 | #==============================================================================
65 | # ■ Add-On 模块扩展 by 老鹰
66 | #==============================================================================
67 | module Sion_GradientText
68 | #--------------------------------------------------------------------------
69 | # ● 绘制渐变文字
70 | # colors - 颜色实例or颜色索引号的数组(逐个由上至下绘制)
71 | #--------------------------------------------------------------------------
72 | def self.draw_text(bitmap, x, y, w, h, t, align, colors)
73 | bitmap.draw_text(x, y, w, h, t, align)
74 | rect_ = bitmap.text_size(t)
75 | text_width = rect_.width
76 | y = y + (h - rect_.height) / 2 # 替换为文字绘制的起始y值
77 | h = rect_.height # 替换为真正的文字高度
78 | case align
79 | when 0;
80 | when 1; x = x + (w - text_width) / 2
81 | when 2; x = x + w - text_width # 替换为文字绘制的起始x值
82 | end
83 | colors = colors.collect { |c| c.is_a?(Color) ? c : text_color(c) }
84 | csz = colors.size
85 | uy = y
86 | l = (y + h - uy).fdiv(csz - 1)
87 | for _x in x...(x + text_width)
88 | sy = uy
89 | colors.each_with_index {|c1, i|
90 | for _y in sy.round...(sy + l).round
91 | c = bitmap.get_pixel(_x, _y)
92 | next if c.alpha == 0
93 | r = (_y - sy) / l
94 | c2 = colors[i + 1]
95 | c.red *= calc_gradual_rgb(r, c1.red, c2.red)
96 | c.blue *= calc_gradual_rgb(r, c1.blue, c2.blue)
97 | c.green *= calc_gradual_rgb(r, c1.green, c2.green)
98 | bitmap.set_pixel(_x, _y, c)
99 | end
100 | break if i == csz - 2
101 | sy += l
102 | }
103 | end
104 | end
105 | def self.calc_gradual_rgb(r, v1, v2)
106 | (v2 > v1 ? (r * (v2-v1) + v1) : ((1-r) * (v1-v2) + v2)) / 255
107 | end
108 | #--------------------------------------------------------------------------
109 | # ● 获取文字颜色
110 | # n : 文字颜色编号(0..31)
111 | #--------------------------------------------------------------------------
112 | def self.text_color(n)
113 | Cache.system("Window").get_pixel(64 + (n % 8) * 8, 96 + (n / 8) * 8)
114 | end
115 | end
116 |
--------------------------------------------------------------------------------
/Battle System/敌人行动扩展.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 敌人行动扩展 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #=============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-EnemyActionEX"] = "1.0.0"
6 | #==============================================================================
7 | # - 2018.3.9.13
8 | #==============================================================================
9 | # - 新增敌人行动指令扩展
10 | # - 数据库-敌人备注栏填写 ,可新增敌人行动
11 | # skill_id - 指定的技能id
12 | # rating - 该行动的优先级
13 | # eval_cond - (可选)被eval后返回真时,该行动才有效
14 | # 【注】eval字符串中可用变量缩写
15 | # a - 该敌人的实例 as - 所有敌人实例数组 bs - 所有我方实例数组
16 | # s - 全局开关数组 v - 全局变量数组
17 | #
18 | # - 新增敌人行动释放目标直接指定
19 | # 数据库-敌人备注栏填写 ,可指定行动目标
20 | # skill_id - 所有满足该技能id的行动,都会被重新指定目标
21 | # eval_target - 被eval后返回目标实例数组(变量缩写见上)
22 | #
23 | # - 将敌人行动指令修改为
24 | # 1、去除不满足执行条件的行动
25 | # 2、将全部剩余行动依据优先级由大到小排序
26 | # 3、优先级最小的行动被选中概率为100%,然后随着优先级增加,其被选中概率降低10%
27 | # 4、由优先级最大的行动开始依次判定其选中概率,如果成功,则确定其为敌人行动
28 | #
29 | # 举例:(注:全部为满足执行条件的行动,格式为 技能-优先级-选中概率)
30 | # 1、初始:【攻击-4】【防御-3】【火球-6】【治疗-4】
31 | # 2、排序赋概率:【火球-6-70%】【攻击-4-80%】【治疗-4-90%】【防御-3-100%】
32 | # (注:若优先级相同,则排序后顺序可能不定)
33 | # 3、逐个判定概率,最后必定有一个行动被选中作为当前敌人行动
34 | #
35 | # - 覆盖了 Game_Enemy#make_actions 方法与 Game_Action#set_enemy_action方法
36 | #==============================================================================
37 | module EAGLE
38 | # 数据库-敌人备注栏中填写,用于新增敌人行动
39 | #
40 | REGEXP_ENEMY_ACTION_EX = /<(?i:action): ?(\d+)[ ,]*(\d+)[ ,]*(.*)>/
41 | # 数据库-敌人备注栏中填写,用于指定其全部对应行动的目标
42 | #
43 | REGEXP_ENEMY_ACTION_TARGET = /<(?i:action target): ?(\d+)[ ,]*(.*)>/
44 | end
45 |
46 | class RPG::Enemy::Action
47 | attr_accessor :targets # 默认为nil
48 | end
49 |
50 | class Game_Enemy < Game_Battler
51 | #--------------------------------------------------------------------------
52 | # ● 获取敌人的全部Enemy::Action
53 | #--------------------------------------------------------------------------
54 | def all_actions
55 | a = self
56 | as = friends_unit.members
57 | bs = opponents_unit.members
58 | s = $game_switches
59 | v = $game_variables
60 | array = enemy.note.scan(EAGLE::REGEXP_ENEMY_ACTION_EX).collect do |param|
61 | next if param[2] != "" && eval(param[2]) == false
62 | t = RPG::Enemy::Action.new
63 | t.skill_id = param[0].to_i
64 | t.rating = param[1].to_i
65 | t
66 | end
67 | array = array.compact + enemy.actions
68 | enemy.note.scan(EAGLE::REGEXP_ENEMY_ACTION_TARGET).each do |param|
69 | array.each do |action|
70 | next if action.skill_id != param[0].to_i
71 | action.targets = [eval(param[1])].flatten.compact
72 | end
73 | end
74 | array
75 | end
76 | #--------------------------------------------------------------------------
77 | # ● 生成战斗行动
78 | #--------------------------------------------------------------------------
79 | def make_actions
80 | super
81 | return if @actions.empty?
82 | action_list = all_actions.select {|a| action_valid?(a) }
83 | return if action_list.empty?
84 | action_list.sort! { |a, b| b.rating <=> a.rating }
85 | p0 = 1 - 0.1 * (action_list.size - 1)
86 | @actions.each do |action|
87 | temp_list = action_list.dup
88 | temp_count = 0
89 | temp_action = nil
90 | while temp_action.nil?
91 | t = temp_list.shift
92 | temp_action = t if rand < p0 + 0.1 * temp_count
93 | temp_count += 1
94 | end
95 | action.set_enemy_action(temp_action)
96 | end
97 | end
98 | end
99 |
100 | class Game_Action
101 | #--------------------------------------------------------------------------
102 | # ● 设置敌人的战斗行动
103 | # action : RPG::Enemy::Action
104 | #--------------------------------------------------------------------------
105 | def set_enemy_action(action)
106 | if action
107 | @enemy_action = action
108 | set_skill(action.skill_id)
109 | else
110 | @enemy_action = nil
111 | clear
112 | end
113 | end
114 | #--------------------------------------------------------------------------
115 | # ● 生成目标数组(battler的实例数组)
116 | #--------------------------------------------------------------------------
117 | alias eagle_enemy_action_make_targets make_targets
118 | def make_targets
119 | return @enemy_action.targets if @enemy_action && @enemy_action.targets
120 | eagle_enemy_action_make_targets
121 | end
122 | end
123 |
--------------------------------------------------------------------------------
/Extra Parts/组件-网页读取.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 组件-网页读取
3 | #==============================================================================
4 | =begin
5 | ===============================================================================
6 | EFE's Request Script
7 | Version: RGSS & RGSS2 & RGSS3
8 | Special thanks : Ryex, Gustavo Bicalho, Kubiwa Taicho
9 | ===============================================================================
10 | This script will allow to request to some servers WITHOUT posting. (Only GET)
11 | --------------------------------------------------------------------------------
12 | Used WINAPI functions:
13 | WinHTTPOpen
14 | WinnHTTLConnect
15 | WinHTTPOpenRequest
16 | WinHTTPSendRequest
17 | WinHTTPReceiveResponse
18 | WinHttpQueryDataAvailable
19 | WinHttpReadData
20 | Call:
21 | EFE.request(host, path, buf, post, port)
22 | host : "www.rpgmakervxace.net" (without http:// prefix)
23 | path : "/forum/login.php" ( the directory path of your php file )
24 | buf : 9999 ( the size of the buffer string)
25 | post : "username=kfdsfdsl&password=24324234"
26 | port : 80 is default.
27 | =end
28 |
29 | # require "Win32API"
30 |
31 | module EFE
32 | WinHttpOpen = Win32API.new('winhttp','WinHttpOpen',"PIPPI",'I')
33 | WinHttpConnect = Win32API.new('winhttp','WinHttpConnect',"IPII",'I')
34 | WinHttpOpenRequest = Win32API.new('winhttp','WinHttpOpenRequest',"IPPPPII",'I')
35 | WinHttpSendRequest = Win32API.new('winhttp','WinHttpSendRequest',"IIIIIII",'I')
36 | WinHttpReceiveResponse = Win32API.new('winhttp','WinHttpReceiveResponse',"IP",'I')
37 | WinHttpQueryDataAvailable = Win32API.new('winhttp', 'WinHttpQueryDataAvailable', "II", "I")
38 | WinHttpReadData = Win32API.new('winhttp','WinHttpReadData',"IPIP",'I')
39 |
40 | # I took this method from Gustavo Bicalho's WebKit script. Special thanks him.
41 | def self.to_ws(str)
42 | str = str.to_s();
43 | wstr = "";
44 | for i in 0..str.size
45 | wstr += str[i,1]+"\0";
46 | end
47 | wstr += "\0";
48 | return wstr;
49 | end
50 |
51 | def self.request(host, path, buf, post="",port=80)
52 | p = path
53 | if(post != "")
54 | p = p + "?" + post
55 | end
56 | p = p.to_s
57 | pwszUserAgent = ''
58 | pwszProxyName = ''
59 | pwszProxyBypass = ''
60 | httpOpen = WinHttpOpen.call(pwszUserAgent, 0, pwszProxyName, pwszProxyBypass, 0)
61 | if httpOpen
62 | httpConnect = WinHttpConnect.call(httpOpen, to_ws(host), port, 0)
63 | if httpConnect
64 | httpOpenR = WinHttpOpenRequest.call(httpConnect, nil, to_ws(p), "", '',0,0)
65 | if httpOpenR
66 | httpSendR = WinHttpSendRequest.call(httpOpenR, 0, 0 , 0, 0,0,0)
67 | if httpSendR
68 | httpReceiveR = WinHttpReceiveResponse.call(httpOpenR, nil)
69 | if httpReceiveR
70 | received = 0
71 | httpAvailable = WinHttpQueryDataAvailable.call(httpOpenR, received)
72 | if httpAvailable
73 | ali = ' ' * buf
74 | n = 0
75 | httpRead = WinHttpReadData.call(httpOpenR, ali, buf, o=[n].pack('i!'))
76 | n=o.unpack('i!')[0]
77 | return ali[0, n]
78 | else
79 | p("Error about query data available")
80 | end
81 | else
82 | p("Error when receiving response")
83 | end
84 | else
85 | p("Error when sending request")
86 | end
87 | else
88 | p("Error when opening request")
89 | end
90 | else
91 | p("Error when connecting to the host")
92 | end
93 | else
94 | p("Error when opening connection")
95 | end
96 | end
97 | end
98 |
99 | ## Encoding
100 |
101 | MultiByteToWideChar = Win32API.new('kernel32', 'MultiByteToWideChar', 'llplpl', 'l')
102 | WideCharToMultiByte = Win32API.new('kernel32', 'WideCharToMultiByte', 'llplplpp', 'l')
103 |
104 | def s2u(text)
105 | len = MultiByteToWideChar.call(0, 0, text, -1, nil, 0)
106 | buf = '\0' * (len*2)
107 | MultiByteToWideChar.call(0, 0, text, -1, buf, buf.size/2)
108 | len = WideCharToMultiByte.call(65001, 0, buf, -1, nil, 0, nil, nil)
109 | ret = '\0' * len
110 | WideCharToMultiByte.call(65001, 0, buf, -1, ret, ret.size, nil, nil)
111 | return ret.delete("\0")
112 | end
113 | #-------------------------------------------------------------------------------
114 | #===============================================================================
115 |
116 | # TESTING
117 | # req = s2u(EFE.request("github.com", "/jubin-park/rgss/blob/master/windows/mouse_sensitivity.rb", 9999))
118 | # print(req)
119 |
--------------------------------------------------------------------------------
/Message System/对话框扩展/AddOn2-兼容鼠标.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On2 兼容鼠标 by 老鹰(http://oneeyedeagle.lofter.com/)
3 | # ※ 本插件需要放置在【鼠标扩展 by老鹰】以及各个被兼容脚本之下
4 | #==============================================================================
5 | # - 2024.2.3.14
6 | #==============================================================================
7 | # - 本插件对【对话框扩展 by老鹰】及其AddOn进行了简单的鼠标操作兼容
8 | #==============================================================================
9 |
10 | #===============================================================================
11 | # ○ 兼容【对话框扩展 by老鹰】
12 | # 1. 在文字显示完毕、等待按键时,按鼠标左键等同于按空格键继续对话
13 | # 2. 在文字显示中途时,鼠标在对话框内部时,按鼠标左键可以快速显示剩余对话
14 | #===============================================================================
15 | if $imported["EAGLE-MessageEX"]
16 | class Window_EagleMessage
17 | #--------------------------------------------------------------------------
18 | # ● 等待按键时,按键继续的处理
19 | #--------------------------------------------------------------------------
20 | alias eagle_mouse_ex_process_input_pause_key process_input_pause_key
21 | def process_input_pause_key
22 | if MOUSE_EX.up?(:ML)
23 | return @flag_input_loop = false
24 | end
25 | eagle_mouse_ex_process_input_pause_key
26 | end
27 | #--------------------------------------------------------------------------
28 | # ● 监听“确定”键的按下,更新快进的标志
29 | #--------------------------------------------------------------------------
30 | alias eagle_mouse_ex_update_show_fast update_show_fast
31 | def update_show_fast
32 | eagle_mouse_ex_update_show_fast
33 | @show_fast = true if mouse_in? && MOUSE_EX.up?(:ML)
34 | end
35 | end
36 | end
37 |
38 | #===============================================================================
39 | # ○ 兼容【Add-On 选择框扩展 by老鹰】
40 | # 1. 鼠标必须停留在选项上,才能按鼠标左键来选择该选项
41 | #===============================================================================
42 | if $imported["EAGLE-ChoiceEX"]
43 | class Window_EagleChoiceList
44 | #--------------------------------------------------------------------------
45 | # ● 重置
46 | #--------------------------------------------------------------------------
47 | alias eagle_mouse_ex_reset eagle_reset
48 | def eagle_reset
49 | eagle_mouse_ex_reset
50 | @flag_mouse_in_win_when_ok = true # 鼠标必须在选项内,才能按鼠标左键确定
51 | end
52 | end
53 | end
54 |
55 | #===============================================================================
56 | # ○ 兼容【Add-On 数值输入框扩展 by老鹰】
57 | # 1. 鼠标移动到各个数字上时,可以选中对应数字进行修改
58 | # 2. 当使用RGD时,鼠标滚轮可以用来变更当前选中的数字
59 | #===============================================================================
60 | if $imported["EAGLE-NumberInputEX"]
61 | class Window_EagleNumberInput
62 | #--------------------------------------------------------------------------
63 | # ● 处理数字的更改
64 | #--------------------------------------------------------------------------
65 | alias eagle_mouse_ex_process_digit_change process_digit_change
66 | def process_digit_change
67 | eagle_mouse_ex_process_digit_change
68 | return unless active
69 | if MOUSE_EX.scroll_up? || MOUSE_EX.scroll_down?
70 | Sound.play_cursor
71 | n = @numbers[@index]
72 | n = (n + 1) % 10 if MOUSE_EX.scroll_up?
73 | n = (n + 9) % 10 if MOUSE_EX.scroll_down?
74 | @numbers[@index] = n
75 | refresh
76 | end
77 | end
78 | #--------------------------------------------------------------------------
79 | # ● 处理光标的移动
80 | #--------------------------------------------------------------------------
81 | alias eagle_mouse_ex_process_cursor_move process_cursor_move
82 | def process_cursor_move
83 | eagle_mouse_ex_process_cursor_move
84 | return unless active
85 | last_index = @index
86 | @numbers_rect.each do |i, r|
87 | _r = r.dup
88 | _r.x += self.x + standard_padding; _r.y += self.y + standard_padding
89 | break @index = i if MOUSE_EX.in?(_r)
90 | end
91 | Sound.play_cursor if @index != last_index
92 | end
93 | #--------------------------------------------------------------------------
94 | # ● “确定”和“取消”的处理
95 | #--------------------------------------------------------------------------
96 | alias eagle_mouse_ex_process_handling process_handling
97 | def process_handling
98 | eagle_mouse_ex_process_handling
99 | return unless active
100 | return process_ok if MOUSE_EX.up?(:ML)
101 | return process_cancel if MOUSE_EX.up?(:MR)
102 | end
103 | end
104 | end
105 |
106 | #==============================================================================
107 | # ○ 兼容【Add-On 并行对话 by老鹰】
108 | # 1. 现在对于需要按键继续的并行对话,在对话框内点击鼠标左键也能同样继续
109 | #==============================================================================
110 | if $imported["EAGLE-MessagePara"]
111 | class Window_EagleMessage_Para < Window_EagleMessage
112 | #--------------------------------------------------------------------------
113 | # ● 处理等待时按键继续
114 | #--------------------------------------------------------------------------
115 | alias eagle_mouse_ex_msg_para_process_input_pause_key process_input_pause_key
116 | def process_input_pause_key
117 | if mouse_in? && MOUSE_EX.up?(:ML)
118 | return true
119 | end
120 | eagle_mouse_ex_msg_para_process_input_pause_key
121 | end
122 | end
123 | end
124 |
--------------------------------------------------------------------------------
/Event System/呼叫指定事件/事件页替换VX.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 事件页替换VX by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【组件-通用方法汇总 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-ReplaceEventCommand"] = "1.0.0"
7 | #==============================================================================
8 | # - 2025.9.8.23
9 | #==============================================================================
10 | # - 本插件新增了事件页的插入,通过注释,可以把指定事件页的全部内容黏贴到注释位置
11 | # (就仿佛一开始编写了这些指令,可以确保像是【事件消息机制】等能够找到标签)
12 | #---------------------------------------------------------------------------
13 | # 【使用】
14 | #
15 | # - 考虑到有些插件会依据事件页中存在的指令来进行设置,比如【事件消息机制 by老鹰】,
16 | # 就是检查事件页的指令列表中,是否含有指定名称的“标签”。
17 | #
18 | # 因此增加该功能,可以在事件生成时,依据指定注释指令进行指令的替换,
19 | # 把目标事件页完整的复制到该注释的位置处,就仿佛一开始便写了这一些指令在事件页中。
20 | #
21 | # - 在事件指令-注释中,编写该样式文本:
22 | #
23 | # 事件页替换|tag字符串
24 | #
25 | # 其中 事件页替换 为固定的识别文本,不可缺少
26 | # 其中 tags 为以下语句的任意组合,用空格分隔
27 | # (等号左右可以添加冗余空格)
28 | #
29 | # mid=数字 → 数字 替换为编辑器中的地图序号
30 | # (若填入 0,或不写该语句,则取当前地图)
31 | # (若填入 -1,则取公共事件)
32 | # eid=数字 → 数字 替换为编辑器中的事件序号
33 | # (若填入 0,或不写该语句,则取当前事件)
34 | # pid=数字 → 数字 替换为事件编辑器中的页号
35 | # (若填入 0,或不写该语句,则取符合出现条件的最大页号)
36 | #
37 | # - 示例:
38 | #
39 | # · 事件注释 “事件页替换|mid=1 eid=2 pid=1”
40 | # 为在该注释位置处,插入1号地图2号事件的1号页的全部指令
41 | #
42 | # - 注意:
43 | #
44 | # · 请确保每个注释指令中,只含有一个事件页替换
45 | #
46 | #=============================================================================
47 | module EAGLE
48 | #--------------------------------------------------------------------------
49 | # ○【常量】事件指令-注释 中进行事件页替换的文本
50 | #--------------------------------------------------------------------------
51 | #COMMENT_PAGE_REPLACE = /^事件页替换 *?\| *?(.*)/mi
52 | COMMENT_PAGE_REPLACE = /^sub event *?\| *?(\d+), *(\d+), *(\d+)/mi
53 | #--------------------------------------------------------------------------
54 | # ○ 处理事件指令的替换
55 | #--------------------------------------------------------------------------
56 | def self.process_page_replace(event, list)
57 | index = 0
58 | while(true)
59 | index_start = index
60 | command = list[index]
61 | index += 1
62 | break if command == nil
63 | break if command.code == 0
64 | next if command.code != 108
65 | # 获取完整的注释内容
66 | comments = [command.parameters[0]]
67 | while list[index + 1] && list[index + 1].code == 408
68 | index += 1
69 | comments.push(list[index].parameters[0])
70 | end
71 | index_end = index
72 | t = comments.inject { |t, v| t = t + "\n" + v }
73 | # 检查是否存在事件页替换
74 | t =~ EAGLE::COMMENT_PAGE_REPLACE
75 | if $1
76 | #ps = [$1.strip] # tags string # 去除前后空格
77 | ps = [$1.to_i, $2.to_i, $3.to_i]
78 | h = call_event_args(ps)
79 | next if h == nil
80 | page = call_event_page(h)
81 | list2 = page.list
82 | # 去除结尾的空指令
83 | list2.pop if list2[-1].code == 0
84 | # 加入到当前列表
85 | list.insert(index, list2)
86 | list.flatten!
87 | # 删去注释指令
88 | d = index_end - index_start
89 | d.times { list.delete_at(index_start) }
90 | end
91 | end
92 | return list
93 | end
94 | #--------------------------------------------------------------------------
95 | # ● 呼叫指定事件 - 解析参数
96 | #--------------------------------------------------------------------------
97 | def self.call_event_args(args)
98 | h = {}
99 | if args.size == 1
100 | # 当只传入1个参数时,认定为tag字符串
101 | _h = EAGLE_COMMON.parse_tags(args[0])
102 | h.merge!(_h)
103 | h[:mid] = h[:mid].to_i if h[:mid]
104 | h[:eid] = h[:eid].to_i if h[:eid]
105 | h[:pid] = h[:pid].to_i if h[:pid]
106 | elsif args.size == 3
107 | # 当传入3个参数时,认定为 地图ID,事件ID,页ID
108 | h[:mid] = args[0]
109 | h[:eid] = args[1]
110 | h[:pid] = args[2]
111 | else
112 | # 否则返回nil,在调用处进行报错提示
113 | return nil
114 | end
115 | return h
116 | end
117 | #--------------------------------------------------------------------------
118 | # ● 呼叫指定事件 - 获取事件页
119 | #--------------------------------------------------------------------------
120 | def self.call_event_page(h)
121 | event = nil
122 | if h[:mid] == -1
123 | return $data_common_events[h[:eid]]
124 | end
125 | h[:mid] = $game_map.map_id if h[:mid] == 0
126 | map = EAGLE_COMMON.get_map_data(h[:mid])
127 | event_data = map.events[h[:eid]] rescue return
128 | event = Game_Event.new(h[:mid], event_data)
129 | page = nil
130 | if h[:pid] == nil || h[:pid] == 0
131 | page = event.find_proper_page
132 | else
133 | page = event.event.pages[h[:pid]-1] rescue return
134 | end
135 | return page
136 | end
137 | end
138 | #===============================================================================
139 | # ○ Game_Event
140 | #===============================================================================
141 | class Game_Event < Game_Character
142 | attr_reader :event
143 | #--------------------------------------------------------------------------
144 | # ● 设置事件页
145 | #--------------------------------------------------------------------------
146 | alias eagle_page_replace_setup setup
147 | def setup(new_page)
148 | eagle_page_replace_setup(new_page)
149 | @list = EAGLE.process_page_replace(self, @page.list) if @page
150 | end
151 | end
152 |
--------------------------------------------------------------------------------
/UI Parts/粒子系统V3/AddOn-地图切换特效.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 地图切换特效 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【粒子模板-归位类 by老鹰】与【组件-通用方法汇总 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-Particle-MapTransfer"] = "3.0.1"
7 | #==============================================================================
8 | # - 2023.5.13.21 适配 粒子系统 3.0.0版本
9 | #==============================================================================
10 | # - 本插件新增了基于粒子的地图切换特效
11 | #----------------------------------------------------------------------------
12 | # 【使用方法】
13 | #
14 | # - 当 事件指令-场所移动 中,淡入淡出效果选择“无”,
15 | # 且V_ID_MAP_TRANSFER序号变量的值不为0时,
16 | # 将开启粒子散开与聚合的地图切换特效
17 | #
18 | # - 如果想自定义,请依据脚本中的注释修改各项参数
19 | #
20 | #==============================================================================
21 |
22 | module PARTICLE
23 | #--------------------------------------------------------------------------
24 | # 利用一个全局变量来控制该效果的开关:
25 | #
26 | # 1. 当该序号的变量的值为 0 时,代表关闭该地图切换特效
27 | #
28 | # 2. 当该序号的变量的值为 1 时,代表仅开启地图移出时的特效
29 | #
30 | # 3. 当该序号的变量的值为 2 时,代表仅开启地图移入时的特效
31 | #
32 | # 4. 当该序号的变量的值为 3 时,代表开启地图移入移出时的特效
33 | #
34 | #--------------------------------------------------------------------------
35 | V_ID_MAP_TRANSFER = 18
36 |
37 | end
38 |
39 | class Spriteset_Map
40 | attr_reader :viewport1
41 | end
42 |
43 | class Scene_Map
44 | #--------------------------------------------------------------------------
45 | # ● 场所移动前的处理
46 | #--------------------------------------------------------------------------
47 | alias eagle_partical_maptransfer_pre_transfer pre_transfer
48 | def pre_transfer
49 | eagle_partical_maptransfer_pre_transfer
50 | return if $game_temp.fade_type != 2
51 | v = $game_variables[PARTICLE::V_ID_MAP_TRANSFER]
52 | return if v & 1 == 0
53 |
54 | # 将当前地图的元素截图
55 | b = EAGLE_COMMON.snapshot_custom([@spriteset.viewport1])
56 | # 此处修改场所移出时,截图拆分的参数
57 | ps = {
58 | # 横向拆分为 :nx 块,纵向拆分为 :ny 块
59 | :nx => 20,
60 | :ny => 15,
61 | # 拆分后,每个小块的显示原点为中心处
62 | :ox => 0.5,
63 | :oy => 0.5,
64 | }
65 | # 将截图进行拆分
66 | ss, pos = EAGLE_COMMON.img2rects(b, ps)
67 |
68 | # 粒子移出所耗帧数
69 | t = 30 # 注意,由于存在update_wait=2,因为是每隔1帧更新一次
70 | # 采用 单点斥力场 模板
71 | f = PT_Emitter_Single_Repulsion.new
72 | # 一次性生成全部粒子
73 | f.flag_start_once = true
74 | # 斥力点的位置
75 | f.params[:center] = Vector.new(Graphics.width/2,Graphics.height/2)
76 | # 斥力大小
77 | f.params[:gravity] = 3
78 | # 导入之前拆分的精灵数组
79 | f.params[:sprites] = ss
80 | f.params[:total] = ss.size
81 | # 单个精灵的存在时间
82 | f.params[:life] = t
83 | # 由于外部导入的精灵,粒子系统不会释放,因此手动在粒子生命结束时释放
84 | f.params[:eval2] = "cur.bitmap.dispose; cur.dispose"
85 | # 开始处理
86 | PARTICLE.setup("eagle-map-transfer-out", f)
87 | PARTICLE.start("eagle-map-transfer-out")
88 | # 等待一半时间,防止切换过快而卡顿
89 | (t / 2).times { update_basic }
90 | end
91 | #--------------------------------------------------------------------------
92 | # ● 场所移动后的处理
93 | #--------------------------------------------------------------------------
94 | alias eagle_partical_maptransfer_post_transfer post_transfer
95 | def post_transfer
96 | eagle_partical_maptransfer_post_transfer
97 | return if $game_temp.fade_type != 2
98 | v = $game_variables[PARTICLE::V_ID_MAP_TRANSFER]
99 | return if v & 2 == 0
100 |
101 | # 等待1帧,确保切换到了新地图
102 | 1.times { update }
103 | # 新地图截图
104 | b = EAGLE_COMMON.snapshot_custom([@spriteset.viewport1])
105 | # 增加一个黑色块盖住地图
106 | s = Sprite.new(@spriteset.viewport1)
107 | s.bitmap = Bitmap.new(1,1)
108 | s.bitmap.fill_rect(0,0,s.width,s.height, Color.new(0,0,0))
109 | s.zoom_x = Graphics.width
110 | s.zoom_y = Graphics.height
111 | s.z = 200
112 |
113 | # 此处修改场所移出时,截图拆分的参数
114 | ps = {
115 | # 横向拆分为 :nx 块,纵向拆分为 :ny 块
116 | :nx => 20,
117 | :ny => 15,
118 | # 拆分后,每个小块的显示原点为中心处
119 | :ox => 0.5,
120 | :oy => 0.5,
121 | }
122 | # 将截图进行拆分
123 | ss, pos = EAGLE_COMMON.img2rects(b, ps)
124 | # 为每个块设置初始位置
125 | ss.each { |s|
126 | # 以屏幕中点为基准,向四方向扩散
127 | s.x = Graphics.width / 2 + (s.x - Graphics.width / 2) * (5)
128 | s.y = Graphics.height / 2 + (s.y - Graphics.height / 2) * (5)
129 | s.z = 500 # z值大于之前盖住地图的黑色块
130 | s.opacity = 0
131 | }
132 |
133 | # 粒子移入所耗帧数
134 | t = 25 # 注意,由于存在update_wait=2,因为是每隔1帧更新一次
135 | # 采用 归位类模板
136 | f = PT_Moveto.new(@spriteset.viewport1)
137 | # 一次性生成全部粒子
138 | f.flag_start_once = true
139 | # 导入之前拆分的精灵数组
140 | f.params[:sprites] = ss
141 | f.params[:total] = ss.size
142 | # 导入拆分时每个块精灵的初始位置,作为它移动后的停留位置
143 | f.params[:xys] = pos
144 | # 按顺序取出,确保拆分位置与精灵顺序一一对应
145 | f.params[:xys_type] = 1
146 | # 移动后的不透明度
147 | f.params[:opacity] = 255
148 | # 移动所耗帧数
149 | f.params[:t] = t
150 | # 单个精灵的存在时间
151 | f.params[:life] = t*2-1 # 存在时间
152 | # 所使用的移动缓动函数
153 | f.params[:move_type] = "easeOutCirc"
154 | # 移动结束时的处理,直接指定不透明度为0,防止因未及时移出导致玩家移动出现凝滞感
155 | f.params[:eval_pt] = "cur.opacity = 0"
156 | # 由于外部导入的精灵,粒子系统不会释放,因此手动在粒子生命结束时释放
157 | f.params[:eval2] = "cur.bitmap.dispose; cur.dispose"
158 | # 开始处理
159 | PARTICLE.setup("eagle-map-transfer-in", f)
160 | PARTICLE.start("eagle-map-transfer-in")
161 | # 等待结束
162 | (2*t).times { update_basic }
163 | # 将盖住地图的黑色块释放
164 | s.bitmap.dispose
165 | s.dispose
166 | end
167 | end
168 |
--------------------------------------------------------------------------------
/Extra Parts/组件-位图绘制窗口皮肤.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 组件-位图绘制窗口皮肤 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-DrawWindowSkin"] = "1.0.1"
6 | #==============================================================================
7 | # - 2025.1.27.10 新增背景不透明度的设置
8 | #==============================================================================
9 | # - 本插件提供了在位图上绘制窗口皮肤的方法
10 | #-----------------------------------------------------------------------------
11 | # - 在位图上指定区域绘制指定的窗口皮肤
12 | #
13 | # EAGLE.draw_windowskin(windowskin, bitmap[, rect_b, params])
14 | #
15 | # 其中 windowskin 为 Graphics/System 目录下的窗口皮肤文件名称(字符串)
16 | # bitmap 为需要将窗口皮肤绘制在其上的位图对象
17 | # rect_b 【可省略】为位图对象被绘制的区域(默认取整个位图区域)
18 | # params 【可省略】设置更多细节参数的Hash
19 | # :cx => 数字, # 设置绘制时在x方向上的偏移增量
20 | # :cy => 数字, # 设置绘制时在y方向上的偏移增量
21 | # :opa => 数字, # 设置背景的不透明度
22 | #
23 | #==============================================================================
24 |
25 | module EAGLE
26 | #--------------------------------------------------------------------------
27 | # ● 在位图上绘制窗口皮肤
28 | # windowskin → 在 Graphics/System 目录下的窗口皮肤文件名称,字符串
29 | # bitmap → 需要将窗口皮肤绘制在其上的位图对象
30 | # rect_b → 位图对象被绘制的区域(当w、h为0时,取整个位图)
31 | # params → :cx 设置在x方向上的偏移量
32 | # :cy 设置在y方向上的偏移量
33 | # :opa 设置背景的透明度
34 | #--------------------------------------------------------------------------
35 | def self.draw_windowskin(windowskin, bitmap, rect_b = nil, params = {})
36 | rect_b ||= Rect.new(0,0,0,0)
37 | rect_b.width = bitmap.width if rect_b.width <= 0 # 绘制宽度
38 | rect_b.height = bitmap.height if rect_b.height <= 0 # 绘制高度
39 | return if rect_b.width < 32 || rect_b.height < 32
40 | params[:cx] ||= 2
41 | params[:cy] ||= 2
42 | skin = Cache.system(windowskin) rescue return
43 | draw_windowskin_bg(bitmap, skin, rect_b, params)
44 | draw_windowskin_bg2(bitmap, skin, rect_b, params)
45 | draw_windowskin_border(bitmap, skin, rect_b)
46 | end
47 | #--------------------------------------------------------------------------
48 | # ● 拉伸绘制背景层
49 | #--------------------------------------------------------------------------
50 | def self.draw_windowskin_bg(bitmap, skin, rect_b, params)
51 | rect = Rect.new(rect_b.x + params[:cx], rect_b.y + params[:cy],
52 | rect_b.width - params[:cx] * 2, rect_b.height - params[:cy] * 2)
53 | src_rect = Rect.new(0, 0, 64, 64)
54 | opa = params[:opa] || 255
55 | bitmap.stretch_blt(rect, skin, src_rect, opa)
56 | end
57 | #--------------------------------------------------------------------------
58 | # ● 平铺绘制背景花纹
59 | #--------------------------------------------------------------------------
60 | def self.draw_windowskin_bg2(bitmap, skin, rect_b, params)
61 | rect = Rect.new(rect_b.x + params[:cx], rect_b.y + params[:cy],
62 | rect_b.width - params[:cx] * 2, rect_b.height - params[:cy] * 2)
63 | _x = rect.x
64 | _y = rect.y
65 | opa = params[:opa] || 255
66 | while(_y < rect.y + rect.height)
67 | src_rect = Rect.new(0, 64, 64, 64)
68 | d = rect.y + rect.height - _y
69 | src_rect.height = d if d < 64
70 | while(_x < rect.x + rect.width)
71 | d = rect.x + rect.width - _x
72 | src_rect.width = d if d < 64
73 | bitmap.blt(_x, _y, skin, src_rect, opa)
74 | _x += src_rect.width
75 | end
76 | _x = rect.x
77 | _y += src_rect.height
78 | end
79 | end
80 | #--------------------------------------------------------------------------
81 | # ● 剪切绘制边框
82 | #--------------------------------------------------------------------------
83 | # 16像素为一个单位
84 | def self.draw_windowskin_border(bitmap, skin, rect_b)
85 | # 左上
86 | draw_windowskin_corner(rect_b.x, rect_b.y, skin, Rect.new(64, 0, 16, 16), bitmap)
87 | # 右上
88 | draw_windowskin_corner(rect_b.x + rect_b.width - 16, rect_b.y, skin, Rect.new(112, 0, 16, 16), bitmap)
89 | # 左下
90 | draw_windowskin_corner(rect_b.x, rect_b.y + rect_b.height - 16, skin, Rect.new(64, 48, 16, 16), bitmap)
91 | # 右下
92 | draw_windowskin_corner(rect_b.x + rect_b.width - 16, rect_b.y + rect_b.height - 16,
93 | skin, Rect.new(112, 48, 16, 16), bitmap)
94 | # 上边界
95 | draw_windowskin_h_border(rect_b.y, skin, Rect.new(80, 0, 32, 16), bitmap, rect_b)
96 | # 下边界
97 | draw_windowskin_h_border(rect_b.y + rect_b.height - 16, skin, Rect.new(80, 48, 32, 16), bitmap, rect_b)
98 | # 左边界
99 | draw_windowskin_v_border(rect_b.x, skin, Rect.new(64, 16, 16, 32), bitmap, rect_b)
100 | # 右边界
101 | draw_windowskin_v_border(rect_b.x + rect_b.width - 16, skin, Rect.new(112, 16, 16, 32), bitmap, rect_b)
102 | end
103 | # 绘制四角
104 | def self.draw_windowskin_corner(x, y, skin, src_rect, bitmap)
105 | bitmap.blt(x, y, skin, src_rect)
106 | end
107 | # 绘制水平边框
108 | def self.draw_windowskin_h_border(y, skin, src_rect, bitmap, rect_b)
109 | _x = rect_b.x + 16
110 | _y = y
111 | _src_rect = src_rect
112 | while(_x < rect_b.x + rect_b.width - 16)
113 | d = rect_b.x + rect_b.width - 16 - _x
114 | src_rect.width = d if d < 32
115 | bitmap.blt(_x, _y, skin, _src_rect)
116 | _x += src_rect.width
117 | end
118 | end
119 | # 绘制垂直边框
120 | def self.draw_windowskin_v_border(x, skin, src_rect, bitmap, rect_b)
121 | _x = x
122 | _y = rect_b.y + 16
123 | _src_rect = src_rect
124 | while(_y < rect_b.y + rect_b.height - 16)
125 | d = rect_b.y + rect_b.height - 16 - _y
126 | src_rect.height = d if d < 32
127 | bitmap.blt(_x, _y, skin, _src_rect)
128 | _y += src_rect.height
129 | end
130 | end
131 | end
132 |
--------------------------------------------------------------------------------
/Extra Parts/组件-位图绘制指示文本.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 组件-位图绘制指示文本 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【组件-位图绘制转义符文本 by老鹰】与
4 | # 【组件-形状绘制 by老鹰】之下
5 | #==============================================================================
6 | $imported ||= {}
7 | $imported["EAGLE-DrawHintText"] = "1.0.3"
8 | #==============================================================================
9 | # - 2023.9.30.23 增加行间距
10 | #==============================================================================
11 | # - 本插件提供了在位图上绘制指示型文本的方法
12 | # - 指示型文本示例:
13 | # __文本__ __文本__
14 | # / \
15 | # ○ ○
16 | #-----------------------------------------------------------------------------
17 | # - 为指定精灵创建一个位图,并绘制指示型文本
18 | #
19 | # EAGLE.draw_hint_text(sprite, text, params1 = {}, params2 = {})
20 | #
21 | # 其中 sprite 为一个不含有bitmap的精灵,在执行后将拥有一个bitmap
22 | # 其中 text 为需要显示的文本的字符串
23 | # 其中 params1 为参数Hash,具体见方法注释
24 | # 其中 params2 为【组件-位图绘制转义符文本 by老鹰】的参数Hash
25 | #
26 | # - 在绘制完成后,sprite 的显示原点将定位在 指示圆点 处,同时坐标移动到传入的:x, :y处
27 | #
28 | # - 示例:
29 | #
30 | # 事件脚本中测试使用,触发后将在1号事件上显示“指示牌”,按下确定键后结束显示
31 | =begin
32 | e = $game_map.events[1]
33 | x = e.screen_x
34 | y = e.screen_y - 16
35 | s1 = Sprite.new
36 | ps1 = { :x => x, :y => y,
37 | :dx => 40, :dy => 30 }
38 | t = "指示牌"
39 | EAGLE.draw_hint_text(s1, t, ps1)
40 | Fiber.yield until Input.trigger?(:C)
41 | =end
42 | #
43 | #==============================================================================
44 | module EAGLE
45 | #--------------------------------------------------------------------------
46 | # ● 绘制
47 | # params1 # 指示线绘制
48 | # :x 和 :y → 指示点的屏幕坐标,也为精灵的显示原点
49 | # :dx 和 :dy → 文字底部横线 与 指示圆点 连线的一端的偏移坐标(以指示点坐标为始)
50 | # :line → 连线的宽度
51 | # :padding → 位图四周的留空像素值
52 | # :dl → 文字区域的左留空像素值
53 | # :dr → 文字区域的右留空像素值
54 | # :du → 文字区域的上留空像素值
55 | # :dd → 文字区域的下留空像素值
56 | # :dc → 文字区域的背景颜色(若不传入,则为透明,否则应该为Color.new)
57 | #
58 | # params2 # 文字绘制
59 | # :font_size → 绘制初始的文字大小
60 | # :font_color → 指定初始的绘制颜色 Color.new
61 | # :x0 → 指定每行的向右偏移值
62 | # :y0 → 指定首行的向下偏移值
63 | # :w → 规定最大行宽,若超出则会进行自动换行
64 | # :lhd → 在换行时,与下一行的间隔距离
65 | #--------------------------------------------------------------------------
66 | def self.draw_hint_text(sprite, text, params1 = {}, params2 = {})
67 | params1 = params1
68 | params2 = params2
69 |
70 | params1[:x] ||= 0
71 | params1[:x] = params1[:x].to_i
72 | params1[:y] ||= 0
73 | params1[:y] = params1[:y].to_i
74 | params1[:dx] ||= 0
75 | params1[:dx] = params1[:dx].to_i
76 | params1[:dy] ||= 0
77 | params1[:dy] = params1[:dy].to_i
78 | params1[:line] ||= 2 # 线宽度
79 | params1[:line] = params1[:line].to_i
80 | params1[:padding] ||= 4 # 位图四周的留空
81 | params1[:padding] = params1[:padding].to_i
82 | params1[:dl] ||= 12 # 文字区域的左留空
83 | params1[:dl] = params1[:dl].to_i
84 | params1[:dr] ||= 8 # 文字区域的右留空
85 | params1[:dr] = params1[:dr].to_i
86 | params1[:du] ||= 8 # 文字区域的上留空
87 | params1[:du] = params1[:du].to_i
88 | params1[:dd] ||= 4 # 文字区域的下留空
89 | params1[:dd] = params1[:dd].to_i
90 |
91 | params2[:lhd] ||= 2
92 |
93 | proc_draw_text = Process_DrawTextEX.new(text, params2)
94 | params1[:text_w] = proc_draw_text.width # 文字的宽高
95 | params1[:text_h] = proc_draw_text.height
96 | dw = params1[:dx].abs # 斜线占据的宽高
97 | dh = params1[:dy].abs
98 |
99 | w_text = params1[:dl] + params1[:text_w] + params1[:dr] # 文字和留空的宽度
100 | h_text = params1[:du] + params1[:text_h] + params1[:dd] # 文字和留空的高度
101 |
102 | x0 = y0 = 0 # 文字的起始绘制位置
103 | x_p0 = y_p0 = 0 # 指示点在位图里的位置
104 | x_p2 = y_p2 = 0 # 直线远端的坐标偏移量
105 | # 计算位图宽高,各个绘制的位置
106 | w = params1[:padding] * 2 + dw + w_text
107 | if params1[:dx] >= 0 # 文字显示在右侧
108 | x0 = params1[:padding] + dw + params1[:dl]
109 | x_p0 = params1[:padding]
110 | x_p2 = w_text
111 | else # 文字显示在左侧
112 | x0 = params1[:padding] + params1[:dl]
113 | x_p0 = w - params1[:padding]
114 | x_p2 = -w_text
115 | end
116 | h = 0
117 | if params1[:dy] >= 0 # 文字显示在下侧
118 | h = params1[:padding] * 2 + [dh, h_text].max
119 | if dh > h_text
120 | y0 = params1[:padding] + (dh - h_text) + params1[:du]
121 | y_p0 = params1[:padding]
122 | else
123 | y0 = params1[:padding] + params1[:du]
124 | y_p0 = params1[:padding] + (h_text - dh)
125 | end
126 | else # 文字显示在上侧
127 | h = params1[:padding] * 2 + dh + h_text
128 | y0 = params1[:padding] + params1[:du]
129 | y_p0 = h - params1[:padding]
130 | end
131 |
132 | # 创建位图
133 | sprite.bitmap = Bitmap.new(w, h)
134 |
135 | # 绘制文本的背景
136 | if params1[:dc] && params1[:dc].is_a?(Color)
137 | sprite.bitmap.fill_rect(x0-params1[:dl], y0-params1[:du],
138 | w_text, h_text,
139 | params1[:dc])
140 | #sprite.bitmap.blur
141 | end
142 |
143 | # 绘制文本
144 | params2[:x0] = x0
145 | params2[:y0] = y0
146 | proc_draw_text.bind_bitmap(sprite.bitmap)
147 | proc_draw_text.run
148 |
149 | # 绘制指示点处的圆
150 | EAGLE.Circle(sprite.bitmap, x_p0, y_p0, params1[:line], true,
151 | Color.new(255,255,255))
152 |
153 | # 绘制指示点与文本底部线的连线
154 | x_p1 = x_p0 + params1[:dx]
155 | y_p1 = y_p0 + params1[:dy]
156 | EAGLE.DDALine(sprite.bitmap, x_p0, y_p0, x_p1, y_p1, params1[:line],
157 | "1", Color.new(255,255,255))
158 |
159 | # 绘制文字底部的横线
160 | x_p2 += x_p1
161 | y_p2 += y_p1
162 | EAGLE.DDALine(sprite.bitmap, x_p1, y_p1, x_p2, y_p2, params1[:line],
163 | "1", Color.new(255,255,255))
164 |
165 | # 调整位置
166 | sprite.x = params1[:x]
167 | sprite.y = params1[:y]
168 | # 调整显示原点到指示点处
169 | sprite.ox = x_p0
170 | sprite.oy = y_p0
171 | end
172 | end
173 |
--------------------------------------------------------------------------------
/Battle System/装备附加属性/AddOn-属性帮助文本.rb:
--------------------------------------------------------------------------------
1 | #=============================================================================
2 | # ■ 属性帮助文本 by 老鹰(http://oneeyedeagle.lofter.com/)
3 | # ※ 本插件需要放置在【装备附加属性-核心 by老鹰】之下
4 | #=============================================================================
5 | # - 2019.10.13.11
6 | #=============================================================================
7 | # TODO
8 | # - 本插件新增了从attrs数组提取帮助文本数组的方法
9 | # EQUIP_EX.get_attrs_help(attrs)
10 | #--------------------------------------------------------------------------
11 |
12 | module EQUIP_EX
13 | #--------------------------------------------------------------------------
14 | # ○ 常量:数据库code_id一览
15 | #--------------------------------------------------------------------------
16 | HELP_CODE = {
17 | 11 => "属性抗性",
18 | 12 => "弱化抗性",
19 | 13 => "状态抗性",
20 | 14 => "状态免疫",
21 | 21 => "普通能力",
22 | 22 => "添加能力",
23 | 23 => "特殊能力",
24 | 31 => "附带属性",
25 | 32 => "附带状态",
26 | 33 => "攻击速度",
27 | 34 => "添加攻击次数",
28 | 41 => "添加技能类型",
29 | 42 => "禁用技能类型",
30 | 43 => "添加技能",
31 | 44 => "禁用技能",
32 | 51 => "可装备武器类型",
33 | 52 => "可装备护甲类型",
34 | 53 => "固定装备",
35 | 54 => "禁用装备",
36 | 55 => "装备风格",
37 | 61 => "添加行动次数",
38 | 62 => "特殊标志",
39 | 63 => "消失效果",
40 | 64 => "队伍能力"
41 | }
42 | #--------------------------------------------------------------------------
43 | # ○ 常量:普通能力一览
44 | #--------------------------------------------------------------------------
45 | # HELP_PARAMS = {
46 | # 0 => "最大HP",
47 | # 1 => "最大MP",
48 | # 2 => "物攻",
49 | # 3 => "物防",
50 | # 4 => "魔攻",
51 | # 5 => "魔防",
52 | # 6 => "敏捷",
53 | # 7 => "幸运"
54 | # }
55 | def self.get_params_help(param_id)
56 | if param_id >= 0 and param_id <= 7
57 | return Vocab.param(param_id)
58 | end
59 | return ""
60 | end
61 | #--------------------------------------------------------------------------
62 | # ○ 常量:添加能力一览
63 | #--------------------------------------------------------------------------
64 | HELP_XPARAMS = {
65 | 0 => "物理命中几率",
66 | 1 => "物理闪避几率",
67 | 2 => "必杀几率",
68 | 3 => "必杀闪避几率",
69 | 4 => "魔法闪避几率",
70 | 5 => "魔法反射几率",
71 | 6 => "物理反击几率",
72 | 7 => "体力值再生速度",
73 | 8 => "魔力值再生速度",
74 | 9 => "特技值再生速度"
75 | }
76 | #--------------------------------------------------------------------------
77 | # ○ 常量:特殊能力一览
78 | #--------------------------------------------------------------------------
79 | HELP_SPARAMS = {
80 | 0 => "受到攻击的几率",
81 | 1 => "防御效果比率",
82 | 2 => "恢复效果比率",
83 | 3 => "药理知识",
84 | 4 => "MP消费率",
85 | 5 => "TP消耗率",
86 | 6 => "物理伤害加成",
87 | 7 => "魔法伤害加成",
88 | 8 => "地形伤害加成",
89 | 9 => "经验获得加成"
90 | }
91 |
92 | def self.get_item_help(item)
93 | d = []
94 | item.params_o.each_with_index do |v, i|
95 | next if v == 0
96 | t = get_params_help(i) + attr_help_v2s(v)
97 | d.push(t)
98 | end
99 | item.features_o.each do |f|
100 | t = ""
101 | case f.code
102 | when 21; t = attr_help_params(f.data_id, f.value)
103 | when 22; t = attr_help_xparams(f.data_id, f.value)
104 | when 23; t = attr_help_sparams(f.data_id, f.value)
105 | end
106 | d.push(t) if t != ""
107 | end
108 | if item.eagle_ex
109 | d += get_attrs_help(attrs)
110 | end
111 | return d
112 | end
113 |
114 |
115 | #--------------------------------------------------------------------------
116 | # ○ 返回指定attrs数组的帮助文本数组
117 | #--------------------------------------------------------------------------
118 | def self.get_attrs_help(attrs)
119 | helps = attrs.collect { |e| attr_help(e) }
120 | helps.compact
121 | end
122 | #--------------------------------------------------------------------------
123 | # ○ 返回指定attr的帮助文本
124 | #--------------------------------------------------------------------------
125 | def self.attr_help(attr)
126 | return attr_help_ex(attr) if attr[0] == :ex
127 | return attr_help_params(PARAMS_TO_ID[attr[0]], attr[1]) if attr.size == 2
128 | if attr.size == 3
129 | return attr_help_params(attr[1], attr[2]) if attr[0] == 21
130 | return attr_help_xparams(attr[1], attr[2]) if attr[0] == 22
131 | return attr_help_sparams(attr[1], attr[2]) if attr[0] == 23
132 | end
133 | end
134 | #--------------------------------------------------------------------------
135 | # ○ 将数值转化成字符串
136 | #--------------------------------------------------------------------------
137 | def self.attr_help_v2s(value)
138 | return "0" if value == 0
139 | prefix = value > 0 ? " + " : " - "
140 | v_ = value.abs
141 | return sprintf("%s%d\%", prefix, v_ * 100) if v_ < 1
142 | return sprintf("%s%d", prefix, v_)
143 | end
144 | #--------------------------------------------------------------------------
145 | # ○ 获取普通能力帮助文本
146 | #--------------------------------------------------------------------------
147 | def self.attr_help_params(data_id, value)
148 | get_params_help(data_id) + attr_help_v2s(value)
149 | end
150 | #--------------------------------------------------------------------------
151 | # ○ 获取添加能力帮助文本
152 | #--------------------------------------------------------------------------
153 | def self.attr_help_xparams(data_id, value)
154 | HELP_XPARAMS[data_id] + attr_help_v2s(value)
155 | end
156 | #--------------------------------------------------------------------------
157 | # ○ 获取特殊能力帮助文本
158 | #--------------------------------------------------------------------------
159 | def self.attr_help_sparams(data_id, value)
160 | HELP_SPARAMS[data_id] + attr_help_v2s(value)
161 | end
162 | #--------------------------------------------------------------------------
163 | # ○ 获取额外属性帮助文本
164 | #--------------------------------------------------------------------------
165 | def self.attr_help_ex(attr)
166 | # attr = [:ex, ...]
167 | return nil if attr[1] == :lv
168 | end
169 | end
170 |
--------------------------------------------------------------------------------
/Event System/地图震动扩展.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 地图震动扩展 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # 【此插件兼容VX和VX Ace】
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-MapShakeEX"] = "1.0.2"
7 | #==============================================================================
8 | # - 2022.6.8.19
9 | #==============================================================================
10 | # - 在事件指令-地图震动中,只会进行左右晃动,本插件新增了扩展的地图震动指令
11 | #--------------------------------------------------------------------------
12 | # 【开关控制:地图震动】
13 | #
14 | # - 当设置的开关被开启时(默认设置 S_ID_SHAKE_Y = 1,即 1号开关),
15 | # 默认的 事件指令-地图震动 将被更改为上下震动
16 | #
17 | #--------------------------------------------------------------------------
18 | # 【事件脚本:地图震动】
19 | #
20 | # - 在事件脚本中,编写 map_shake(lx, ly, t, w, wait = false) 进行调用
21 | #
22 | # 其中 lx 为震动幅度(正整数),表示最大的左右方向向外移动的距离
23 | # 其中 ly 为震动幅度(正整数),表示最大的上下方向向外移动的距离
24 | # 其中 w 为每次震动后的等待帧数,可用于降低震动频率
25 | # 其中 t 为震动持续帧数(正整数)
26 | # 其中 wait 为是否等待震动结束,默认不等待
27 | #
28 | # - 示例:
29 | #
30 | # map_shake(2, 2, 40) → 震动幅度为 2,持续 40 帧,不等待结束
31 | #
32 | # map_shake(1, 1, 30, 0, true) → 震动幅度为 1,每次震动后不中断,
33 | # 持续 30 帧,并直至结束才继续执行之后的指令
34 | #
35 | #==============================================================================
36 |
37 | #=============================================================================
38 | # ■ 常量
39 | #=============================================================================
40 | module EAGLE
41 | #--------------------------------------------------------------------------
42 | # ●【常量】该序号的开关开启时,将默认的震动由x方向更改为y方向
43 | #--------------------------------------------------------------------------
44 | S_ID_SHAKE_Y = 1
45 | end
46 | #--------------------------------------------------------------------------
47 | # ●【常量】兼容
48 | #--------------------------------------------------------------------------
49 | MODE_VX = RUBY_VERSION[0..2] == "1.8"
50 | MODE_VA = RUBY_VERSION[0..2] == "1.9"
51 | #=============================================================================
52 | # ■ Game_Map
53 | #=============================================================================
54 | class Game_Map
55 | attr_reader :eagle_shake
56 | #--------------------------------------------------------------------------
57 | # ● 设置
58 | #--------------------------------------------------------------------------
59 | alias eagle_event_methods_ex_setup setup
60 | def setup(map_id)
61 | eagle_event_methods_ex_setup(map_id)
62 | @eagle_shake = {}
63 | end
64 | #--------------------------------------------------------------------------
65 | # ● 更新远景图
66 | #--------------------------------------------------------------------------
67 | alias eagle_event_methods_ex_update_parallax update_parallax
68 | def update_parallax
69 | eagle_event_methods_ex_update_parallax
70 | update_shake_ex
71 | end
72 | #--------------------------------------------------------------------------
73 | # ● 开启震动
74 | #--------------------------------------------------------------------------
75 | def start_shake_ex(lx, ly, t, w = 0)
76 | @eagle_shake[:lx] = lx.to_i # 震动幅度
77 | @eagle_shake[:ly] = ly.to_i # 震动幅度
78 | @eagle_shake[:t] = t.to_i # 持续时间
79 | @eagle_shake[:w] = w.to_i # 震动后的等待时间
80 | @eagle_shake[:delta] = 0.005 # 震动幅度修正参数(乘法)
81 | @eagle_shake[:active] = true
82 | @eagle_shake[:tc] = 0
83 | @eagle_shake[:wc] = 0
84 | @eagle_shake[:x] = @eagle_shake[:y] = 0
85 | end
86 | #--------------------------------------------------------------------------
87 | # ● 震动中?
88 | #--------------------------------------------------------------------------
89 | def shake_ex?
90 | @eagle_shake && @eagle_shake[:active] == true
91 | end
92 | #--------------------------------------------------------------------------
93 | # ● 更新震动
94 | #--------------------------------------------------------------------------
95 | def update_shake_ex
96 | return if !shake_ex?
97 | @eagle_shake[:tc] += 1
98 | if @eagle_shake[:wc] > 0
99 | @eagle_shake[:wc] -= 1
100 | return
101 | end
102 | if @eagle_shake[:lx] != 0
103 | _x = @eagle_shake[:delta] * (-1.0 + @eagle_shake[:lx] * rand())
104 | @eagle_shake[:x] = _x * Graphics.width
105 | end
106 | if @eagle_shake[:ly] != 0
107 | _y = @eagle_shake[:delta] * (-1.0 + @eagle_shake[:ly] * rand())
108 | @eagle_shake[:y] = _y * Graphics.height
109 | end
110 | @eagle_shake[:wc] = @eagle_shake[:w]
111 | @eagle_shake[:active] = false if @eagle_shake[:tc] > @eagle_shake[:t]
112 | end
113 | end
114 |
115 | #=============================================================================
116 | # ■ Spriteset_Map
117 | #=============================================================================
118 | class Spriteset_Map
119 | #--------------------------------------------------------------------------
120 | # ● 更新显示端口
121 | #--------------------------------------------------------------------------
122 | alias eagle_event_methods_ex_update_viewports update_viewports
123 | def update_viewports
124 | eagle_event_methods_ex_update_viewports
125 | if $game_map.shake_ex?
126 | @viewport1.ox = $game_map.eagle_shake[:x]
127 | @viewport1.oy = $game_map.eagle_shake[:y]
128 | return
129 | end
130 | if $game_switches[EAGLE::S_ID_SHAKE_Y]
131 | @viewport1.ox = 0
132 | @viewport1.oy = $game_map.screen.shake
133 | else
134 | @viewport1.ox = $game_map.screen.shake
135 | @viewport1.oy = 0
136 | end
137 | end
138 | end
139 |
140 | #=============================================================================
141 | # ■ Game_Interpreter
142 | #=============================================================================
143 | class Game_Interpreter
144 | def map_shake(lx, ly, t, w = 0, flag_wait = false)
145 | $game_map.start_shake_ex(lx, ly, t, w)
146 | if MODE_VX
147 | @wait_count = t if flag_wait
148 | return true
149 | end
150 | if MODE_VA
151 | Fiber.yield while $game_map.shake_ex? if flag_wait
152 | end
153 | end
154 | end
155 |
--------------------------------------------------------------------------------
/Battle System/技能条件及效果扩展.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 技能条件及效果扩展 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-SkillCondEX"] = "1.0.1"
6 | #==============================================================================
7 | # - 2025.2.27.23
8 | #==============================================================================
9 | # - 本插件新增了技能使用条件扩展及使用前后执行脚本的扩展
10 | #-----------------------------------------------------------------------------
11 | # 【设置:技能使用条件扩展】
12 | #
13 | # - 在 数据库-技能 的备注栏中填写:
14 | #
15 | # ...
16 | #
17 | # 其中 ... 替换为代表技能使用条件的脚本,在 eval 后返回 false 则代表不满足条件
18 | # 可以用 s 代表开关,v 代表变量,a 代表技能使用者
19 | #
20 | # - 比如:
21 | #
22 | # a.hp > a.mhp*0.5 → 使用者的hp在一半以上时,才能使用该技能
23 | # s[1] and a.luk>10 → 1号开关开启且使用者的幸运大于10,才能使用
24 | #
25 | #-----------------------------------------------
26 | # 【设置:技能效果扩展】
27 | #
28 | # 1. 在技能使用前执行的脚本:
29 | #
30 | # ...
31 | #
32 | # 其中 ... 替换为技能使用时执行的脚本,可用 a 代表技能使用者
33 | #
34 | # 注意:该脚本执行时机为角色开始使用该技能时,还未生成技能释放目标。
35 | #
36 | # 2.1 在技能对目标使用前执行的脚本:
37 | #
38 | # ...
39 | #
40 | # 其中 ... 替换为技能使用时执行的脚本,可用 a 代表技能使用者, b 代表技能目标
41 | #
42 | # 注意:如果有多个目标,则会分别对各个目标执行一次该脚本。
43 | #
44 | # 2.2 在技能对目标使用后执行的脚本:
45 | #
46 | # ...
47 | #
48 | # 其中 ... 替换为技能使用时执行的脚本,可用 a 代表技能使用者, b 代表技能目标
49 | # r 代表技能结果 Game_ActionResult
50 | #
51 | # 注意:如果有多个目标,则会分别对各个目标执行一次该脚本。
52 | #
53 | # 3. 在技能使用完成后执行的脚本:
54 | #
55 | # ...
56 | #
57 | # 其中 ... 替换为技能使用时执行的脚本,可用 a 代表技能使用者
58 | #
59 | # 注意:该脚本执行时机为角色使用完技能后,所有目标已经处理完成。
60 | #
61 | #==============================================================================
62 |
63 | class Game_BattlerBase
64 | #--------------------------------------------------------------------------
65 | # ● 检查技能的使用条件
66 | #--------------------------------------------------------------------------
67 | alias eagle_skill_cond_ex_skill_conditions_met? skill_conditions_met?
68 | def skill_conditions_met?(skill)
69 | eagle_skill_cond_ex_skill_conditions_met?(skill) && \
70 | skill_conditions_met_ex?(skill)
71 | end
72 | #--------------------------------------------------------------------------
73 | # ● 检查技能的使用条件(扩展)
74 | #--------------------------------------------------------------------------
75 | def skill_conditions_met_ex?(skill)
76 | s = $game_switches; v = $game_variables; a = self; b = nil
77 | skill.note.scan(/(.*?)<\/cond>/).each do |cond|
78 | return false if eval(cond[0]) == false
79 | end
80 | return true
81 | end
82 | end
83 |
84 | class Game_Battler < Game_BattlerBase
85 | #--------------------------------------------------------------------------
86 | # ● 技能使用前执行脚本
87 | #--------------------------------------------------------------------------
88 | def process_item_eval1(item)
89 | s = $game_switches; v = $game_variables; a = self; b = nil
90 | item.note.scan(/(.*?)<\/eval1>/).each { |cond| eval(cond[0]) }
91 | end
92 | #--------------------------------------------------------------------------
93 | # ● 技能对目标(自己)使用前执行脚本
94 | #--------------------------------------------------------------------------
95 | def process_item_eval2(item, user)
96 | s = $game_switches; v = $game_variables; a = user; b = self
97 | item.note.scan(/(.*?)<\/eval2>/).each { |cond| eval(cond[0]) }
98 | end
99 | #--------------------------------------------------------------------------
100 | # ● 技能对目标(自己)使用后执行脚本
101 | #--------------------------------------------------------------------------
102 | def process_item_eval3(item, user)
103 | s = $game_switches; v = $game_variables; a = user; b = self
104 | r = @result
105 | item.note.scan(/(.*?)<\/eval3>/).each { |cond| eval(cond[0]) }
106 | end
107 | #--------------------------------------------------------------------------
108 | # ● 技能使用完成后执行脚本
109 | #--------------------------------------------------------------------------
110 | def process_item_eval4(item)
111 | s = $game_switches; v = $game_variables; a = self; b = nil
112 | item.note.scan(/(.*?)<\/eval4>/).each { |cond| eval(cond[0]) }
113 | end
114 | #--------------------------------------------------------------------------
115 | # ● 技能/使用物品
116 | #--------------------------------------------------------------------------
117 | alias eagle_skill_cond_ex_use_item use_item
118 | def use_item(item)
119 | eagle_skill_cond_ex_use_item(item)
120 | process_item_eval1(item)
121 | end
122 | end
123 |
124 | class Scene_Battle < Scene_Base
125 | #--------------------------------------------------------------------------
126 | # ● 发动技能/物品
127 | #--------------------------------------------------------------------------
128 | alias eagle_skill_cond_ex_invoke_item invoke_item
129 | def invoke_item(target, item)
130 | # 技能对目标使用前
131 | target.process_item_eval2(item, @subject)
132 | eagle_skill_cond_ex_invoke_item(target, item)
133 | # 技能对目标使用后
134 | target.process_item_eval3(item, @subject)
135 | end
136 | #--------------------------------------------------------------------------
137 | # ● 使用技能/物品
138 | #--------------------------------------------------------------------------
139 | alias eagle_skill_cond_ex_use_item use_item
140 | def use_item
141 | item = @subject.current_action.item
142 | eagle_skill_cond_ex_use_item
143 | @subject.process_item_eval4(item)
144 | end
145 |
146 | if $imported["EAGLE-ActionEX"]
147 | #------------------------------------------------------------------------
148 | # ● 如果使用了【任意时刻行动 by老鹰】
149 | # 因为其新增的行动未使用 Scene_Battle#use_item 方法,
150 | # 故在它自己的方法中新增对技能使用完成后的处理
151 | #------------------------------------------------------------------------
152 | alias eagle_skill_cond_ex_process_after_use_item process_after_use_item
153 | def process_after_use_item
154 | eagle_skill_cond_ex_process_after_use_item
155 | @subject.process_item_eval4(@subject_item) if @subject_item
156 | end
157 | end
158 | end
159 |
--------------------------------------------------------------------------------
/UI Parts/显示图片缓动.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 显示图片缓动 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # 【此插件兼容VX和VX Ace】
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-PictureMoveEase"] = "1.0.0"
7 | #==============================================================================
8 | # - 2025.7.31.22 图片消除时,将同步清除缓动设置
9 | #==============================================================================
10 | # - 本插件新增了显示图片的缓动移动。
11 | #
12 | # - 对于地图上的显示图片:
13 | #
14 | # 1. 调用该方法启用1号图片的缓动移动:
15 | #
16 | # $game_map.screen.pictures[1].ease = 1
17 | #
18 | # ease 值所对应的缓动函数请自行在 picture_move_ease 方法中设置。
19 | #
20 | # 2. 调用该方法取消1号图片的缓动处理,使用默认的直线移动:
21 | #
22 | # $game_map.screen.pictures[1].ease = nil
23 | #
24 | # 3. 若执行了事件指令-消除图片,则该缓动处理将同步清除。
25 | #
26 | #==============================================================================
27 |
28 | #-----------------------------------------------------------------------------
29 | # 【兼容VX】
30 | #-----------------------------------------------------------------------------
31 | MODE_VX = RUBY_VERSION[0..2] == "1.8"
32 |
33 | module EAGLE
34 | #--------------------------------------------------------------------------
35 | # ● 函数:图片移动使用的缓动函数
36 | # x 为 当前移动计时 ÷ 总移动时间 的小数(0~1)
37 | # 返回为该时刻的 移动距离/总距离 的比值
38 | # 若直接返回 x,则为直线移动
39 | #-------------------------------------------------------------------------
40 | def self.picture_move_ease(type, x)
41 | # 自己编写 ease 值所对应的缓动函数
42 | case type
43 | when 0; return x # 直线运动
44 | when 1; return x * x
45 | end
46 | # 利用【组件-缓动函数 by老鹰】
47 | if $imported["EAGLE-EasingFunction"]
48 | begin
49 | return EasingFuction.call(type, x)
50 | rescue
51 | end
52 | end
53 | # 如果都找不到,则用这个函数
54 | return 1 - 2**(-10 * x)
55 | end
56 | end
57 |
58 | class Game_Picture
59 | attr_accessor :ease
60 | #--------------------------------------------------------------------------
61 | # ● 初始化对象
62 | #--------------------------------------------------------------------------
63 | alias eagle_ease_pic_initialize initialize
64 | def initialize(number)
65 | eagle_ease_pic_initialize(number)
66 | @ease = nil
67 | @ease_params = {}
68 | end
69 | #--------------------------------------------------------------------------
70 | # ● 移动图片
71 | #--------------------------------------------------------------------------
72 | alias eagle_ease_pic_move move
73 | def move(origin, x, y, zoom_x, zoom_y, opacity, blend_type, duration)
74 | eagle_ease_pic_move(origin, x, y, zoom_x, zoom_y, opacity, blend_type, duration)
75 | @ease_params[:x0] = @x; @ease_params[:dx] = x - @x
76 | @ease_params[:y0] = @y; @ease_params[:dy] = y - @y
77 | @ease_params[:zoom_x0] = @zoom_x; @ease_params[:dzoom_x] = zoom_x - @zoom_x
78 | @ease_params[:zoom_y0] = @zoom_y; @ease_params[:dzoom_y] = zoom_y - @zoom_y
79 | @ease_params[:opacity0] = @opacity; @ease_params[:dopacity] = opacity - @opacity
80 | @ease_params[:t] = duration
81 | end
82 |
83 | if MODE_VX
84 | #--------------------------------------------------------------------------
85 | # ● 刷新画面
86 | #--------------------------------------------------------------------------
87 | def update
88 | update_move
89 | update_tone_change
90 | update_rotate
91 | end
92 | #--------------------------------------------------------------------------
93 | # ● 更新图片移动
94 | #--------------------------------------------------------------------------
95 | def update_move
96 | if @duration >= 1
97 | d = @duration
98 | @x = (@x * (d - 1) + @target_x) / d
99 | @y = (@y * (d - 1) + @target_y) / d
100 | @zoom_x = (@zoom_x * (d - 1) + @target_zoom_x) / d
101 | @zoom_y = (@zoom_y * (d - 1) + @target_zoom_y) / d
102 | @opacity = (@opacity * (d - 1) + @target_opacity) / d
103 | @duration -= 1
104 | end
105 | end
106 | #--------------------------------------------------------------------------
107 | # ● 更新色调更改
108 | #--------------------------------------------------------------------------
109 | def update_tone_change
110 | if @tone_duration >= 1
111 | d = @tone_duration
112 | @tone.red = (@tone.red * (d - 1) + @tone_target.red) / d
113 | @tone.green = (@tone.green * (d - 1) + @tone_target.green) / d
114 | @tone.blue = (@tone.blue * (d - 1) + @tone_target.blue) / d
115 | @tone.gray = (@tone.gray * (d - 1) + @tone_target.gray) / d
116 | @tone_duration -= 1
117 | end
118 | end
119 | #--------------------------------------------------------------------------
120 | # ● 更新旋转
121 | #--------------------------------------------------------------------------
122 | def update_rotate
123 | if @rotate_speed != 0
124 | @angle += @rotate_speed / 2.0
125 | while @angle < 0
126 | @angle += 360
127 | end
128 | @angle %= 360
129 | end
130 | end
131 | end
132 |
133 | #--------------------------------------------------------------------------
134 | # ● 更新图片移动
135 | #--------------------------------------------------------------------------
136 | alias eagle_ease_pic_update_move update_move
137 | def update_move
138 | return eagle_ease_pic_update_move if @ease == nil
139 | return if @duration == 0
140 | @duration -= 1
141 | per = (@ease_params[:t] - @duration) * 1.0 / @ease_params[:t]
142 | v = EAGLE.picture_move_ease(@ease, per)
143 | v = 1 if @duration == 0
144 | @x = @ease_params[:x0] + @ease_params[:dx] * v
145 | @y = @ease_params[:y0] + @ease_params[:dy] * v
146 | @zoom_x = @ease_params[:zoom_x0] + @ease_params[:dzoom_x] * v
147 | @zoom_y = @ease_params[:zoom_y0] + @ease_params[:dzoom_y] * v
148 | @opacity = @ease_params[:opacity0] + @ease_params[:dopacity] * v
149 | end
150 | #--------------------------------------------------------------------------
151 | # ● 消除图片
152 | #--------------------------------------------------------------------------
153 | alias eagle_ease_pic_erase erase
154 | def erase
155 | eagle_ease_pic_erase
156 | @ease = nil
157 | @ease_params = {}
158 | end
159 | end
160 |
--------------------------------------------------------------------------------
/Event System/【废弃】/事件警报机制/AddOn-事件页自动播放BGS.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 事件页自动播放BGS by 老鹰(http://oneeyedeagle.lofter.com/)
3 | # ※ 本插件需要放置在【事件警报机制 by老鹰】之下
4 | # 【此插件兼容VX和VX Ace】
5 | #==============================================================================
6 | $imported ||= {}
7 | $imported["EAGLE-EventAutoBGS"] = true
8 | #==============================================================================
9 | # - 2021.9.25.18
10 | #==============================================================================
11 | # - 本插件新增事件页的自动播放BGS机制,同时按照与角色的距离减小音量
12 | # - 本插件调用了【事件警报机制 by老鹰】中的方法
13 | #--------------------------------------------------------------------------
14 | # ○ 事件页设置
15 | #--------------------------------------------------------------------------
16 | # - 当事件页的第一个指令为 注释 时,在其中按下述格式填写,以设置自动播放
17 | #
18 | #
19 | #
20 | # 其中 bgs 为固定的识别文字,不要修改
21 | #
22 | # 其中 name 为在常量DATA中预设的键值,自由设置,字符串
23 | #
24 | # 其中 distance 为BGS播放的最大距离(玩家与事件之间的格子数)(可省略)
25 | # 当玩家与事件之间的格子数大于该值时,将不再播放
26 | #
27 | # - 示例:
28 | #
29 | # → 在距离5格内,播放Clock音效,且距离越小,音量越大
30 | #
31 | # - 注意:
32 | #
33 | # ·当首次超出设置的最大距离时,将调用一次BGS暂停播放
34 | #
35 | #==============================================================================
36 | module EAGLE
37 | #--------------------------------------------------------------------------
38 | # ○【常量】预设可以播放的BGS
39 | #--------------------------------------------------------------------------
40 | DATA = {
41 | #name => [filename, volume, pitch, pri],
42 | # 写在备注中的名称 => [文件名, 初始音量, 音调, 优先级],
43 | # 其中 优先级 为数字,但填写 nil 时代表优先级最高。
44 | #
45 | # 若同时有两个BGS播放请求,则优先级高的播放,
46 | # 若它们具有相同优先级,则事件ID大的播放
47 |
48 | "clock" => ["Clock", 80, 100, 0],
49 | "wind" => ["Wind", 80, 100, 0],
50 |
51 | }
52 | #--------------------------------------------------------------------------
53 | # ○【常量】距离每增加1,BGS的音量的减少量
54 | #--------------------------------------------------------------------------
55 | DOWN_PER_DISTANCE = 5
56 | #--------------------------------------------------------------------------
57 | # ○【常量】默认的最大距离
58 | #--------------------------------------------------------------------------
59 | DEFAULT_DISTANCE = 3
60 |
61 | #--------------------------------------------------------------------------
62 | # ● 读取BGS数据
63 | #--------------------------------------------------------------------------
64 | def self.bgs_data(name)
65 | DATA[name] || ["", 80, 100, 0]
66 | end
67 | #--------------------------------------------------------------------------
68 | # ● 播放指定BGS
69 | #--------------------------------------------------------------------------
70 | @last_bgs = nil # [event_id, name, pri]
71 | def self.bgs_play(name, d, event_id)
72 | name = name.downcase
73 | if @last_bgs
74 | return if @last_bgs[-1] == nil
75 | data = bgs_data(name)
76 | if data[1] != name && data[-1] != nil
77 | return if data[-1] < @last_bgs[-1]
78 | if @last_bgs[-1] == data[-1] # 如果优先级相同,按事件ID
79 | return if event_id < @last_bgs[0]
80 | end
81 | end
82 | end
83 | data = bgs_data(name)
84 | filename = data[0]
85 | volume = data[1] - d * DOWN_PER_DISTANCE
86 | return bgs_stop(name) if volume <= 0
87 | pitch = data[2]
88 | pri = data[3] || 0
89 | Audio.bgs_play('Audio/BGS/' + filename, volume, pitch)
90 | @last_bgs = [event_id, name, pri]
91 | end
92 | #--------------------------------------------------------------------------
93 | # ● 指定BGS暂停播放
94 | #--------------------------------------------------------------------------
95 | def self.bgs_stop(name = nil)
96 | return if @last_bgs == nil
97 | if name == nil || name == @last_bgs[1]
98 | RPG::BGS.fade(10)
99 | @last_bgs = nil
100 | end
101 | end
102 | #--------------------------------------------------------------------------
103 | # ● 直接设置当前已经在播放的BGS
104 | #--------------------------------------------------------------------------
105 | def self.bgs_set(event_id, name, pri)
106 | @last_bgs = [event_id, name, pri]
107 | end
108 | #--------------------------------------------------------------------------
109 | # ● 重置已经在播放的BGS
110 | #--------------------------------------------------------------------------
111 | def self.bgs_reset
112 | @last_bgs = nil
113 | end
114 | end
115 |
116 | class << EVENT_ALERT
117 | #--------------------------------------------------------------------------
118 | # ● 解析
119 | #--------------------------------------------------------------------------
120 | alias eagle_bgs_parse_note parse_note
121 | def parse_note(str)
122 | _array = eagle_bgs_parse_note(str)
123 | str.scan( //m ).each do |params|
124 | _hash = { :t_id => 0 }
125 | _hash[:repeat] = true
126 | _hash[:cond] = "dx+dy <= #{$2 ? $2.to_i : EAGLE::DEFAULT_DISTANCE}"
127 | _hash[:eval] = "EAGLE.bgs_play('#{$1}', dx + dy, a.id)"
128 | _hash[:evaln] = "EAGLE.bgs_stop('#{$1}')"
129 | _array.push(_hash)
130 | end
131 | _array
132 | end
133 | end
134 |
135 | class Scene_Map
136 | #--------------------------------------------------------------------------
137 | # ● 场所移动后的处理
138 | #--------------------------------------------------------------------------
139 | alias eagle_bgs_post_transfer post_transfer
140 | def post_transfer
141 | eagle_bgs_post_transfer
142 | EAGLE.bgs_stop
143 | end
144 | end
145 |
146 | class RPG::BGS < RPG::AudioFile
147 | #--------------------------------------------------------------------------
148 | # ● 覆盖,用于保证事件中的播放BGS指令也能加入判定
149 | #--------------------------------------------------------------------------
150 | alias eagle_bgs_play play
151 | if RUBY_VERSION[0..2] == "1.8" # 兼容VX
152 | def play
153 | eagle_bgs_play
154 | eagle_play
155 | end
156 | else
157 | def play(pos = 0)
158 | eagle_bgs_play(pos)
159 | eagle_play
160 | end
161 | end
162 | def eagle_play
163 | if @name.empty?
164 | EAGLE.bgs_reset
165 | else
166 | EAGLE.bgs_set(0, @name, nil) # 播放优先级nil最高,事件ID取0
167 | end
168 | end
169 |
170 | def self.stop
171 | Audio.bgs_stop
172 | @@last = RPG::BGS.new
173 | EAGLE.bgs_reset
174 | end
175 | def self.fade(time)
176 | Audio.bgs_fade(time)
177 | @@last = RPG::BGS.new
178 | EAGLE.bgs_reset
179 | end
180 | end
181 |
--------------------------------------------------------------------------------
/TEMP/鹰题头模板.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | ===============================================================================
3 |
4 | ┌--------------------------------------------------------------------┐
5 | ┆ ,""---. ┆
6 | ┆ ㄏ `. ┆
7 | ┆ _ノ ㄏō \ ┆
8 | ┆ / ´ y ┆
9 | ┆ \J==ノ by.老鹰 (脚本小巢 → http://oneeyedeagle.lofter.com/)
10 | └--------------------------------------------------------------------┘
11 |
12 | ■ 脚本标题 ver1.01
13 |
14 | 脚本的介绍说明口口口口口口口口口口口口口口口口口口口口口口一行到这里,
15 | 下一行口口口口口口口口口。
16 |
17 |
18 | ▼ 使用方法 ·=========================================================
19 |
20 | event = $game_map.copy_event(map_id, event_id, x, y, sub_id)
21 |
22 | map_id → 存放模版事件的地图id,若传入 0 则为当前地图。
23 | event_id → 模版事件的id
24 | x, y → 拷贝事件的地图坐标
25 | sub_id → (选填)覆盖当前地图已存在的相同id事件;
26 | 默认为当前地图最大事件id+100,不覆盖现有事件。
27 | event → (选填)对复制事件的扩展运用。若拷贝失败,则为nil。
28 |
29 | ------------------------------------------------------------------
30 | □ 示例
31 |
32 | $game_map.copy_event(0, 3, 2, 2)
33 | → 将当前地图的3号事件拷贝一份,并放置到(2,2)。
34 |
35 | event = $game_map.copy_event(1, 6, 12, 5, 1)
36 | → 将1号地图的6号事件拷贝一份,并放置到(12,5),
37 | 它在当前地图的实例为 event,ID为1(覆盖原ID为1的事件)。
38 |
39 | ------------------------------------------------------------------
40 | □ 注意
41 |
42 | 当未指定拷贝后的事件ID时,拷贝事件的ID是动态增加的,
43 | 因此推荐不要在事件内部使用独立开关,
44 | 独立开关是全局存储,且只与地图ID/事件ID/开关名称相关,易发生冲突。
45 |
46 | ======================================================================
47 | - -
48 |
49 | ▼ 拷贝事件的保存 ·===================================================
50 |
51 | 在任意地方(事件脚本、全局脚本)调用 $game_map.save_copy
52 | 来保存当前地图的拷贝事件,下一次返回该地图时,将全部复原
53 |
54 | 每一次切换地图时,该值将重置为关闭,即不复原拷贝事件,
55 | 如果想继续使当前地图也能复原拷贝事件,请再次调用该事件脚本
56 |
57 | 或者可以通过打开 S_ID_COPY_SAVE 号开关,来长时间启用这个 保存-复原 的
58 | 状态当开关开启时,将不用再管事件脚本的开关
59 |
60 | 只会保存基本信息,下一次回到地图复原时,本质依然是从原始地图拷贝到保存
61 | 的位置。
62 |
63 | ======================================================================
64 | - -
65 |
66 | ▼ 使用方法例二 ·=====================================================
67 |
68 | □ 文本替换类
69 |
70 | \M - 自定义扩张(宏)。
71 | \RB - 利用Ruby脚本获取替换文本。
72 | \info - 显示数据库指定对象的图标和名称。
73 | \nl - 新增的换行符。
74 |
75 | ------------------------------------------------------------------
76 |
77 | □ 绘制类
78 |
79 | \pic - 绘制图片。
80 |
81 | ------------------------------------------------------------------
82 |
83 | □ 控制类
84 |
85 | \font - 文字绘制的基本设置,包括文字大小、加粗、阴影、边框、
86 | 发光、底纹等。
87 | \win - 对话框的基本设置,包括对话框皮肤背景、位置、大小、文字
88 | 显示等。
89 | \move - 对话框的动态移动。
90 | \auto - 自动对话的设置,包括自动继续的等待时间、
91 | 是否新对话框重置等。
92 | \pop - 气泡对话框的基本设置,包括显示位置、大小、指示箭头等。
93 | \face - 脸图的动态设置,包括脸图当前显示索引、循环等。
94 | \facep - 脸图的预先设置,包括脸图位置、移入移出方式等。
95 | \facem - 脸图的实时动作,包括跳跃、移动等。
96 |
97 | ======================================================================
98 | - -
99 |
100 | ▼ 使用方法例三 ·=====================================================
101 |
102 | □ 文本替换类
103 | 此类别的转义符将会在绘制开始前,预先进行目标文本的替换,
104 | 将按照下面的排列顺序进行先后替换,因此请注意相互之间的嵌套模式。
105 |
106 | \conv[n]
107 |
108 | 替换文本(宏)。替换【设置】中 CONVERT_ESCAPE列表里的n号文本。
109 | 根据使用方法的不同,可以大幅简化各种文章的嵌入作业。
110 |
111 | ------------------------------------------------------------------
112 |
113 | □ 控制类
114 |
115 | ▍格式写法:\xx[a1b2c3]
116 |
117 | a、b、c等左英文 为“功能项”。
118 | - 只需填写需要的功能,不写的取【设置】中的预设值,可打乱顺序。
119 |
120 | 1、2、3等右数字 为对应“功能项”的值。
121 | - 下方含有“是否”描述的功能项,正数(推荐1)→ true ;0 → false。
122 | - 符号 $ 代表nil。未说明 nil 的功能项,请不要传入 nil($)。
123 |
124 |
125 | \font[p] ▍单个文字的绘制
126 |
127 | size - 字体大小(默认值24)
128 | i - 是否 文字斜体(1/0)
129 | b - 是否 文字加粗(1/0)
130 | s - 是否 文字阴影(1/0)
131 | ca - 文字不透明度(0~255)
132 | o - 是否 添加边框(1/0)
133 | or/og/ob/oa - 边框颜色 RGBA(0~255) 例:[or255og255ob255oa0]
134 | p - 底部花纹 类型(0不绘制,1边框,2实心方框)
135 | pc - 底部花纹 颜色序号(同\C[n]中的n)
136 | l - 是否绘制外发光(1/0)
137 | lc - 外发光 颜色序号(同\C[n]中的n)
138 | d - 是否 绘制删除线(1/0)
139 | dc - 删除线 颜色序号(同\C[n]中的n)
140 |
141 |
142 | \win[p] ▍对话框窗口的基本设置
143 |
144 | z - 窗口z值(仅正整数有效)(默认值200)
145 | skin - 窗口皮肤(【设置】中 INDEX_TO_WINDOWSKIN 的序号)
146 |
147 |
148 | ======================================================================
149 | - -
150 |
151 | 更新历史
152 | ----------------------------------------------------------------------
153 | - 2019.12.16.20 增强pop的兼容性
154 | - 2019.12.16.20 增强pop的兼容性
155 | ----------------------------------------------------------------------
156 | - 2018.1.16.20 增强pop的兼容性
157 | ----------------------------------------------------------------------
158 |
159 | ===============================================================================
160 | =end
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | $imported ||= {}
169 | $imported["EAGLE-MessageEX"] = true
170 | #==============================================================================
171 | # ■ Window_Message
172 | #==============================================================================
173 |
174 |
175 |
--------------------------------------------------------------------------------
/Extra Parts/组件-JSON读取.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 组件-JSON解析
3 | # From: https://github.com/RGSS3/SJSON
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["JSONParser"] = "1.0.0"
7 | #=============================================================================
8 | # - 2020.6.29.11
9 | #=============================================================================
10 | # - 使用示例
11 | =begin
12 | text = '{ "programmers": [
13 | { "firstName": "Brett", "lastName":"McLaughlin", "age": 26, "email": "brett@newInstance.com" },
14 | { "firstName": "Jason", "lastName":"Hunter", "age": 24, "email": "jason@servlets.com" },
15 | { "firstName": "Elliotte", "lastName":"Harold", "age": 31, "email": "elharo@macfaq.com" }
16 | ] }'
17 | s = JSONParser.new(text)
18 | p hash_result = s.parse
19 | =end
20 | #=============================================================================
21 |
22 | class JSONParser
23 | SyntaxError = Class.new(StandardError)
24 | def raise(a)
25 | utext = @text[0, @pos]
26 | lines = utext.count("\n") + 1
27 | cols = utext.sub(/^.*\n/, "").length
28 | super SyntaxError, "JSONParser: line #{lines} col #{@pos - cols}, #{a}"
29 | end
30 |
31 | def initialize(text)
32 | @text = text.gsub(/\r\n/, "\n")
33 | reset
34 | end
35 |
36 | def reset
37 | @pos = 0
38 | end
39 |
40 | def peek?(st)
41 | @text[@pos, 1] == st
42 | ensure
43 | $@.shift if $@
44 | end
45 |
46 | def peekany?(st)
47 | st.index(@text[@pos, 1])
48 | ensure
49 | $@.shift if $@
50 | end
51 |
52 | def match(st)
53 | raise "excepted #{st.inspect}, got #{@text[@pos, 1].inspect}" if @text[@pos, 1] != st
54 | getchar
55 | ensure
56 | $@.shift if $@
57 | end
58 |
59 | def matchany(st)
60 | raise "excepted any of #{st.inspect}, got #{@text[@pos, 1].inspect}" if !st.index(@text[@pos, 1])
61 | getchar
62 | ensure
63 | $@.shift if $@
64 | end
65 |
66 | def skipany(s)
67 | @pos += 1 while peekany?(s)
68 | ensure
69 | $@.shift if $@
70 | end
71 |
72 | def getchar
73 | @pos += 1
74 | @text[@pos - 1, 1]
75 | ensure
76 | $@.shift if $@
77 | end
78 |
79 | def ws
80 | skipany " \n\t"
81 | if peek?("#")
82 | @pos += 1 while @pos < @text.length && @text[@pos, 1] != "\n"
83 | @pos += 1 if @text[@pos, 1] == "\n"
84 | end
85 | skipany " \n\t"
86 | ensure
87 | $@.shift if $@
88 | end
89 |
90 | def object
91 | result = {}
92 | ws
93 | match "{"
94 | ws
95 | while 0
96 | ws
97 | break getchar if peek? "}"
98 | ws; name = string
99 | ws; match ":"
100 | ws; val = value
101 | result[name] = val
102 | ws
103 | case
104 | when peek?(",")
105 | match ","; raise "unexpected }" if peek?("}"); next
106 | when peek?("}")
107 | match "}"; break
108 | else
109 | raise "expected , or }, got #{getchar.inspect}"
110 | end
111 | end
112 | result
113 | ensure
114 | $@.shift if $@
115 | end
116 |
117 | def array
118 | result = []
119 | ws; match '['
120 | ws;
121 | while 0
122 | ws
123 | break getchar if peek? "]"
124 | result.push value
125 | ws;
126 | case
127 | when peek?(",")
128 | match ","; raise "unexpected ]" if peek?("]"); next
129 | when peek?("]")
130 | match "]"; break
131 | else
132 | raise "expected , or ], got #{getchar.inspect}"
133 | end
134 | end
135 | result
136 | ensure
137 | $@.shift if $@
138 | end
139 |
140 | def value
141 | ws;
142 | case
143 | when peek?("\"") then string
144 | when peekany?("-0123456789") then number
145 | when peek?("[") then array
146 | when peek?("{") then object
147 | when peek?("t") then match("t"); match("r"); match("u"); match("e"); true
148 | when peek?("f") then match("f"); match("a"); match("l"); match("s"); match("e"); false
149 | when peek?("n") then match("n"); match("u"); match("l"); match("l"); ()
150 | end
151 | ensure
152 | $@.shift if $@
153 | end
154 |
155 | def string
156 | ws
157 | result = ""
158 | match "\""
159 | while 0
160 | break getchar if peek? "\""
161 | case
162 | when peek?("\\")
163 | match "\\"
164 | ch = getchar
165 | case ch
166 | when "\"" then result << "\""
167 | when "\\" then result << "\\"
168 | when "/" then result << "/"
169 | when "b" then result << "\b"
170 | when "f" then result << "\f"
171 | when "n" then result << "\n"
172 | when "r" then result << "\r"
173 | when "t" then result << "\t"
174 | when "x" then result << (getchar << getchar).to_i(16).chr
175 | when "u" then result << [(getchar << getchar << getchar << getchar).reverse].pack("h*")
176 | else
177 | raise "unexpected #{ch.inspect}"
178 | end
179 | when peek?("\"")
180 | match "\""; break
181 | else
182 | result << getchar
183 | end
184 | end
185 | result
186 | ensure
187 | $@.shift if $@
188 | end
189 |
190 | def number
191 | ws;
192 | r = @pos
193 | if peek?("-")
194 | match "-"
195 | end
196 | if peek?("0")
197 | getchar
198 | else
199 | matchany("0123456789")
200 | getchar while peekany?("0123456789")
201 | if peek?(".")
202 | getchar
203 | matchany("0123456789")
204 | getchar while peekany?("0123456789")
205 | end
206 | if peekany?("eE")
207 | getchar
208 | matchany("0123456789+-")
209 | getchar while peekany?("0123456789")
210 | end
211 | end
212 | Float(@text[r, @pos-r])
213 | ensure
214 | $@.shift if $@
215 | end
216 |
217 | def parse
218 | ws;
219 | case
220 | when peek?("[") then array
221 | when peek?("{") then object
222 | else raise "expected [ or {, got #{getchar.inspect}"
223 | end
224 | end
225 | end
226 |
--------------------------------------------------------------------------------
/Event System/事件自主移动扩展.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 事件自主移动扩展 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-EventSelfMoveEX"] = "1.0.0"
6 | #=============================================================================
7 | # - 2020.5.24.16 增强性能
8 | #=============================================================================
9 | # - 本插件对事件的自主移动模式进行了扩展
10 | #-----------------------------------------------------------------------------
11 | # - 为指定事件应用(指定地图的、指定事件的、指定页的)自主移动模式
12 | #
13 | # event.set_move_type(map_id, event_id, page_id)
14 | #
15 | # 其中 event 为 Game_Event 类的实例
16 | # (可利用 $game_map.events[id] 获取当前地图的id号事件实例)
17 | #
18 | # 若 map_id 传入 0,则取当前地图的ID
19 | # 其中 page_id 与编辑器中所显示的事件页编号一致
20 | #
21 | # - 假设要把 4 号地图的 2 号事件的第 3 页的自主移动模式应用到当前地图的 6 号事件上
22 | # → $game_map.events[6].set_move_type(4, 2, 3)
23 | #
24 | # - 在设置事件的自主移动路线时,由于当前执行域为 Game_CharacterBase,
25 | # 因此可以在 移动路线-脚本 中写 set_move_type(map_id, event_id, page_id)
26 | # 来直接覆盖当前的自主移动模式
27 | #
28 | # -【注意】
29 | # ·此为临时设置,不存储,不影响编辑器中事件数据
30 | # ·若当前激活的事件页发生切换,则应用新事件页的自主移动
31 | #-----------------------------------------------------------------------------
32 | # - 为指定事件应用预设的自主移动模式
33 | #
34 | # event.set_move_type(move_type_sym)
35 | #
36 | # 其中 move_type_sym 为 MOVE_TYPES 常量中设置的唯一标识符
37 | #
38 | # - 本质依然为拷贝指定地图指定事件指定事件页的自主移动模式
39 | #-----------------------------------------------------------------------------
40 | # - 重置指定事件的自主移动模式
41 | #
42 | # event.reset_move_type
43 | #
44 | # 可将指定事件的自主移动模式重置为编辑器中预设
45 | #=============================================================================
46 | module MOVE_TYPE_EX
47 | #--------------------------------------------------------------------------
48 | # ●【设置】预设移动模式标识符及其数据来源
49 | #--------------------------------------------------------------------------
50 | MOVE_TYPES = {
51 | # Symbol => [map_id, event_id, page_id],
52 | :move_1 => [2, 3, 1],
53 | }
54 | #--------------------------------------------------------------------------
55 | # ● 读取移动路线所在的事件页
56 | #--------------------------------------------------------------------------
57 | def self.get_page(move_type)
58 | params = move_type
59 | params = MOVE_TYPES[move_type] if MOVE_TYPES.has_key?(move_type)
60 | map_id = params[0]
61 | map_id = $game_map.map_id if map_id == 0
62 | map = EAGLE.cache_load_map(map_id)
63 | event = map.events[params[1]]
64 | return nil if event.nil?
65 | return event.pages[params[2]-1]
66 | end
67 | end
68 | #=============================================================================
69 | # ○ EAGLE - Cache
70 | #=============================================================================
71 | module EAGLE
72 | #--------------------------------------------------------------------------
73 | # ● 读取地图
74 | #--------------------------------------------------------------------------
75 | def self.cache_load_map(map_id)
76 | @cache_map ||= {}
77 | return @cache_map[map_id] if @cache_map[map_id]
78 | @cache_map[map_id] = load_data(sprintf("Data/Map%03d.rvdata2", map_id))
79 | @cache_map[map_id]
80 | end
81 | #--------------------------------------------------------------------------
82 | # ● 清空缓存
83 | #--------------------------------------------------------------------------
84 | def self.cache_clear
85 | @cache_map ||= {}
86 | @cache_map.clear
87 | GC.start
88 | end
89 | end
90 | #=============================================================================
91 | # ■ Game_Event
92 | #=============================================================================
93 | class Game_Event < Game_Character
94 | #--------------------------------------------------------------------------
95 | # ● 设置事件页的设置
96 | #--------------------------------------------------------------------------
97 | alias eagle_move_type_ex_setup_page_settings setup_page_settings
98 | def setup_page_settings
99 | eagle_move_type_ex_setup_page_settings
100 | @eagle_origin_move_type = @page.move_type
101 | @eagle_origin_move_speed = @page.move_speed
102 | @eagle_origin_move_frequency = @page.move_frequency
103 | @eagle_origin_move_route = @page.move_route
104 | end
105 | #--------------------------------------------------------------------------
106 | # ● (覆盖)自主移动的更新
107 | #--------------------------------------------------------------------------
108 | def update_self_movement
109 | return if !near_the_screen?
110 | return if @stop_count <= stop_count_threshold
111 | case @move_type
112 | when 0; return
113 | when 1; move_type_random
114 | when 2; move_type_toward_player
115 | when 3; move_type_custom
116 | else; move_type_eagle_ex
117 | end
118 | end
119 | #--------------------------------------------------------------------------
120 | # ● 自主移动模式扩展
121 | #--------------------------------------------------------------------------
122 | def move_type_eagle_ex
123 | page = MOVE_TYPE_EX.get_page(@move_type)
124 | return if page.nil?
125 | @move_type = page.move_type
126 | @move_speed = page.move_speed
127 | @move_frequency = page.move_frequency
128 | @move_route = page.move_route
129 | clear_move_type
130 | end
131 | #--------------------------------------------------------------------------
132 | # ● 设置自主移动模式
133 | #--------------------------------------------------------------------------
134 | def set_move_type(*move_type)
135 | move_type = move_type[0] if move_type.size == 1
136 | @move_type = move_type
137 | end
138 | #--------------------------------------------------------------------------
139 | # ● 重置自主移动模式
140 | #--------------------------------------------------------------------------
141 | def reset_move_type
142 | return if @eagle_origin_move_type.nil?
143 | @move_type = @eagle_origin_move_type
144 | @move_speed = @eagle_origin_move_speed
145 | @move_frequency = @eagle_origin_move_frequency
146 | @move_route = @eagle_origin_move_route
147 | clear_move_type
148 | end
149 | #--------------------------------------------------------------------------
150 | # ● 清除当前移动
151 | #--------------------------------------------------------------------------
152 | def clear_move_type
153 | @move_route_index = 0
154 | @move_route_forcing = false
155 | @wait_count = 0
156 | end
157 | end
158 |
--------------------------------------------------------------------------------
/UI Parts/【废弃】/UI系统.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ UI系统 by 老鹰(http://oneeyedeagle.lofter.com/)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-UISystem"] = true
6 | #=============================================================================
7 | # - 2019.11.11.20
8 | #=============================================================================
9 | # - 本插件提供了对简单UI精灵的生成及控制
10 | #-----------------------------------------------------------------------------
11 | # - 生成并绑定新的UI精灵(在Scene切换时自动释放)
12 | # s = EAGLE_UI.new(sym, params)
13 | # 其中 s 为所生成的UI精灵
14 | # 其中 sym 为该UI精灵的唯一标识符
15 | # 其中 params 为下列参数的Hash
16 | #
17 | # - 获取指定 sym 的UI精灵,并赋值给变量 s(若无精灵,则返回 nil)
18 | # s = EAGLE_UI.get(sym)
19 | #
20 | # - UI精灵的实例方法:
21 | # .active → 获取当前按键判定状态
22 | # .active=(flag) → 设置按键判定的允许状态为flag
23 | # .bind_key(sym, method) → 绑定按下对应键时调用的方法(sym为常量中的绑定符号)
24 | # 其中 method 方法的参数为UI精灵实例
25 | #
26 | #=============================================================================
27 |
28 | module EAGLE_UI
29 | #--------------------------------------------------------------------------
30 | # ● 【常量】按键对应
31 | #--------------------------------------------------------------------------
32 | BUTTONS = {
33 | # 绑定的符号 => 判定按键的符号
34 | :OK => :C,
35 | :CANCEL => :B,
36 | :ST => :A,
37 | }
38 | #--------------------------------------------------------------------------
39 | # ● 按键判定成功?
40 | #--------------------------------------------------------------------------
41 | def self.trigger?(sym_bind, sprite)
42 | sym = BUTTONS[sym_bind]
43 | if sym.is_a?(Symbol)
44 | return Input.trigger?(sym)
45 | else
46 | return false
47 | end
48 | end
49 | #--------------------------------------------------------------------------
50 | # ● 生成新的UI精灵
51 | #--------------------------------------------------------------------------
52 | def self.new(sym, params = {})
53 | s = Eagle_UI_Sprite.new(nil, params)
54 | @uis[sym].dispose if @uis[sym]
55 | @uis[sym] = s
56 | s
57 | end
58 | #--------------------------------------------------------------------------
59 | # ● 获取UI精灵
60 | #--------------------------------------------------------------------------
61 | def self.get(sym)
62 | @uis[sym]
63 | end
64 | #--------------------------------------------------------------------------
65 | # ● 初始化
66 | #--------------------------------------------------------------------------
67 | def self.init
68 | @uis = {} # sym => Sprite
69 | end
70 | #--------------------------------------------------------------------------
71 | # ● 更新
72 | #--------------------------------------------------------------------------
73 | def self.update
74 | @uis.each { |k, s| s.update }
75 | end
76 | #--------------------------------------------------------------------------
77 | # ● 清除
78 | #--------------------------------------------------------------------------
79 | def self.clear
80 | @uis.each { |k, s| s.dispose }
81 | @uis.clear
82 | end
83 | end
84 | #=============================================================================
85 | # ○ UI精灵
86 | #=============================================================================
87 | class Eagle_UI_Sprite < Sprite
88 | attr_reader :active, :params
89 | #--------------------------------------------------------------------------
90 | # ● 初始化
91 | #--------------------------------------------------------------------------
92 | def initialize(viewport, params)
93 | super(viewport)
94 | @params = params
95 | @event_list = {}
96 | @active = true # 激活中?
97 | @key_list = {}
98 | end
99 | #--------------------------------------------------------------------------
100 | # ● 更新
101 | #--------------------------------------------------------------------------
102 | def update
103 | super
104 | update_key if @active
105 | end
106 | #--------------------------------------------------------------------------
107 | # ● 释放
108 | #--------------------------------------------------------------------------
109 | def dispose
110 | super
111 | self.bitmap.dispose if self.bitmap
112 | end
113 | #--------------------------------------------------------------------------
114 | # ● 绑定按键
115 | #--------------------------------------------------------------------------
116 | def bind_key(sym, method)
117 | @key_list[sym] = method
118 | end
119 | #--------------------------------------------------------------------------
120 | # ● 更新按键
121 | #--------------------------------------------------------------------------
122 | def update_key
123 | @key_list.each { |sym, m| m.call(self) if EAGLE_UI.trigger?(sym, self) }
124 | end
125 |
126 | #--------------------------------------------------------------------------
127 | # ● 绑定方法
128 | #--------------------------------------------------------------------------
129 | def bind(sym, method)
130 | @event_list[sym] = method
131 | end
132 | #--------------------------------------------------------------------------
133 | # ● 呼叫方法
134 | #--------------------------------------------------------------------------
135 | def call(sym, *params)
136 | @event_list[sym].call(*params) if @event_list[sym]
137 | end
138 | end
139 | #=============================================================================
140 | # ○ 绑定
141 | #=============================================================================
142 | class << DataManager
143 | #--------------------------------------------------------------------------
144 | # ● 初始化模块
145 | #--------------------------------------------------------------------------
146 | alias eagle_eui_init init
147 | def init
148 | eagle_eui_init
149 | EAGLE_UI.init
150 | end
151 | end
152 | class Scene_Base
153 | #--------------------------------------------------------------------------
154 | # ● 基础更新
155 | #--------------------------------------------------------------------------
156 | alias eagle_eui_update_basic update_basic
157 | def update_basic
158 | eagle_eui_update_basic
159 | EAGLE_UI.update
160 | end
161 | #--------------------------------------------------------------------------
162 | # ● 结束处理
163 | #--------------------------------------------------------------------------
164 | alias eagle_eui_terminate terminate
165 | def terminate
166 | eagle_eui_terminate
167 | EAGLE_UI.clear
168 | end
169 | end
170 |
--------------------------------------------------------------------------------
/Battle System/敌人掉落扩展.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 敌人掉落扩展 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #=============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-EnemyDropEX"] = "1.0.0"
6 | #=============================================================================
7 | # - 2021.9.10.17
8 | #=============================================================================
9 | # - 敌人死亡时进行掉落物判定,若为我方造成最后一击,我方角色将影响物品掉落率
10 | #---------------------------------------------------------------------------
11 | # 【掉落池】
12 | #
13 | # - 新增多个敌人共同使用的掉落池
14 | # 在常量中设置指定名称的掉落池中的物品及其概率后,在敌人备注栏内填入
15 | #
16 | #
17 | #
18 | # 其中 name 替换成掉落池的名称,即可使该敌人追加整个掉落池的判定(逐个判定)
19 | #
20 | # 示例:
21 | # 将会索引 DROP_POOLS 常量中 "1" 名称的掉落池
22 | #
23 | #---------------------------------------------------------------------------
24 | # 【掉落扩展】
25 | #
26 | # - 新增对单个敌人掉落物的扩展
27 | #
28 | # 在敌人备注栏内填入(可用空格或逗号分隔内部各项)(可重复填入)(每项只处理1个物品)
29 | #
30 | #
31 | #
32 | # 物品类型字符: i 代表物品, w 代表武器, a 代表护甲 (其余值无效)
33 | # 物品id: 对应类型的数据库中物品的id号
34 | # 掉落概率小数: 物品的掉落概率小数,范围为 0.0 ~ 1.0
35 | # 出现条件(可选):当字符串被eval后返回的值为true时,启用该条物品掉落
36 | # 可用 s 代表 $game_switches, v 代表 $game_variables
37 | #
38 | # - 示例:
39 | #
40 | # → 必定增加掉落一个 1号物品
41 | #
42 | #
43 | # → 以 0.5/1 的概率 增加掉落一个 5号物品
44 | #
45 | #
46 | # → 当1号开关开启时,以 40% 的概率 增加掉落一个 10号武器
47 | #
48 | # 5>
49 | # → 当1号变量大于5时,必定掉落一个 1号护甲
50 | #
51 | #==============================================================================
52 | module DROP_EX
53 | #--------------------------------------------------------------------------
54 | # ● 【常量】掉落池
55 | #--------------------------------------------------------------------------
56 | DROP_POOLS = {
57 | # 掉落池的名称 => { 物品类型字符和id的字符串 => 掉落概率小数 },
58 | "1" => { "i1" => 1.0, },
59 | }
60 |
61 | #--------------------------------------------------------------------------
62 | # ● 【常量】获取敌人追加的掉落池的正则
63 | #--------------------------------------------------------------------------
64 | DROP_POOL_REGEXP = /<(?i:drop pool): *(.*)>/
65 | #--------------------------------------------------------------------------
66 | # ● 【常量】获取敌人追加掉落的正则
67 | # $1 - 类型字符与id $2 - 概率小数 $3 - 出现条件
68 | #--------------------------------------------------------------------------
69 | EX_DROP_REGEXP = /<(?i:drop):?[ ,]*([iwa]\d+)[ ,]*([\.\d]+)[ ,]*(.*)>/
70 | #--------------------------------------------------------------------------
71 | # ● 设置我方角色造成最后一击时,对物品掉落率的影响
72 | # user 为我方战斗角色的实例,具体参考 Game_Actor类
73 | # pro 为敌人掉落物中某一物品的原始掉落率(小数)
74 | # 需要返回新的掉落率(小数)
75 | #--------------------------------------------------------------------------
76 | def self.user_affect_prob(user, pro)
77 | v = 1 - 50 / (50 + user.luk)
78 | return pro * v
79 | end
80 | #--------------------------------------------------------------------------
81 | # ● 【常量】类型字符与对应INDEX
82 | #--------------------------------------------------------------------------
83 | EX_DROP_KIND_CHAR_TO_INDEX = { 'i' => 1, 'w' => 2, 'a' => 3 }
84 | end
85 |
86 | class Game_Enemy < Game_Battler
87 | #--------------------------------------------------------------------------
88 | # ● 初始化对象
89 | #--------------------------------------------------------------------------
90 | alias eagle_item_drop_ex_init initialize
91 | def initialize(index, enemy_id)
92 | eagle_item_drop_ex_init(index, enemy_id)
93 | @drop_items = []
94 | end
95 | #--------------------------------------------------------------------------
96 | # ● 应用伤害
97 | #--------------------------------------------------------------------------
98 | def execute_damage(user)
99 | super(user)
100 | @drop_items = calc_drop_items(user) if self.hp <= 0
101 | end
102 | #--------------------------------------------------------------------------
103 | # ● (覆盖)获取掉落物品数组
104 | #--------------------------------------------------------------------------
105 | def make_drop_items
106 | @drop_items
107 | end
108 | #--------------------------------------------------------------------------
109 | # ● 生成掉落物品数组
110 | #--------------------------------------------------------------------------
111 | def calc_drop_items(user)
112 | r = enemy.drop_items.inject([]) do |r, di|
113 | if di.kind > 0 && rand < drop_item_pro(user, 1.0 / di.denominator)
114 | r.push(item_object(di.kind, di.data_id))
115 | else
116 | r
117 | end
118 | end
119 | r += calc_extra_drops(user)
120 | r += calc_drop_pool(user)
121 | r
122 | end
123 | #--------------------------------------------------------------------------
124 | # ● 生成额外掉落物品数组
125 | #--------------------------------------------------------------------------
126 | def calc_extra_drops(user)
127 | s = $game_switches; v = $game_variables
128 | enemy.note.scan(DROP_EX::EX_DROP_REGEXP).inject([]) do |r, param|
129 | next r if (param[2] != "" && eval(param[2]) == false)
130 | pro = (param[1] != "" ? param[1].to_f : 1)
131 | if rand < drop_item_pro(user, pro)
132 | r.push(item_object(param[0].slice!(0, 1), param[0].to_i))
133 | else
134 | r
135 | end
136 | end
137 | end
138 | #--------------------------------------------------------------------------
139 | # ● 生成额外掉落池中的物品数组
140 | #--------------------------------------------------------------------------
141 | def calc_drop_pool(user)
142 | enemy.note.scan(DROP_EX::DROP_POOL_REGEXP).inject([]) do |r, param|
143 | next r if DROP_EX::DROP_POOLS[param[0]].nil?
144 | DROP_EX::DROP_POOLS[param[0]].each do |str, pro|
145 | if rand < drop_item_pro(user, pro)
146 | t = str.dup
147 | r.push(item_object(t.slice!(0, 1), t.to_i))
148 | end
149 | end
150 | r
151 | end
152 | end
153 | #--------------------------------------------------------------------------
154 | # ● 获取物品掉率
155 | #--------------------------------------------------------------------------
156 | def drop_item_pro(user, init_pro)
157 | pro = init_pro
158 | pro = DROP_EX.user_affect_prob(user, init_pro) if user && user.actor?
159 | return pro * drop_item_rate
160 | end
161 | #--------------------------------------------------------------------------
162 | # ● 获取物品实例
163 | #--------------------------------------------------------------------------
164 | alias eagle_item_drop_ex_item_object item_object
165 | def item_object(kind, data_id)
166 | kind = DROP_EX::EX_DROP_KIND_CHAR_TO_INDEX[kind] if kind.is_a?(String)
167 | eagle_item_drop_ex_item_object(kind, data_id)
168 | end
169 | end
170 |
--------------------------------------------------------------------------------
/UI Parts/【废弃】/粒子模板-归位类.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 粒子模板-归位类 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | # ※ 本插件需要放置在【粒子系统V3 by老鹰】与【组件-缓动函数 by老鹰】之下
4 | #==============================================================================
5 | $imported ||= {}
6 | $imported["EAGLE-PT-Moveto"] = "3.0.0"
7 | #==============================================================================
8 | # - 2023.4.30.13 重构,方便扩展多样化的模板
9 | #==============================================================================
10 | # - 本插件新增了使粒子从当前位置向指定位置缓动移动的模板
11 | #------------------------------------------------------------------------------
12 | # 【高级】
13 | #
14 | # - PT_Moveto 类的可设置参数,请见 init_settings 方法中的注释
15 | #
16 | #==============================================================================
17 | class PT_Moveto < ParticleTemplate
18 | #--------------------------------------------------------------------------
19 | # ● 初始化粒子的动态参数
20 | #--------------------------------------------------------------------------
21 | def init_settings
22 | super
23 | # 移动后的坐标数组
24 | @params[:xys] = []
25 | # 从 @params[:xys] 中获取一个xy的方式(0随机 1正序 -1倒序)
26 | @params[:xys_type] = 0
27 | # 移动后的角度
28 | @params[:angle] = 0
29 | # 移动后的不透明度
30 | @params[:opacity] = 255
31 | # 移动后的缩放
32 | @params[:zoom] = 1.0
33 | # 所使用的缓动函数
34 | @params[:move_type] = "easeInSine"
35 | # 所耗帧数(若为0,则取粒子的:life-1)
36 | @params[:t] = 0
37 | # 移动结束时执行脚本
38 | @params[:eval_pt] = ""
39 | end
40 | #--------------------------------------------------------------------------
41 | # ● 释放粒子的动态参数
42 | #--------------------------------------------------------------------------
43 | def dispose_settings
44 | super
45 | end
46 | #--------------------------------------------------------------------------
47 | # ● 粒子开始
48 | #--------------------------------------------------------------------------
49 | def start_particle
50 | super
51 | init_xy
52 | init_move
53 | init_others
54 | end
55 | #--------------------------------------------------------------------------
56 | # ● 粒子更新
57 | #--------------------------------------------------------------------------
58 | def update_particle
59 | super
60 | update_xy
61 | update_move
62 | update_others
63 | end
64 | #--------------------------------------------------------------------------
65 | # ● 粒子结束
66 | #--------------------------------------------------------------------------
67 | def finish_particle
68 | super
69 | end
70 |
71 | #--------------------------------------------------------------------------
72 | # ● 显示位置初值与每次更新
73 | #--------------------------------------------------------------------------
74 | def init_xy
75 | if particle_from_sprite?(@particle)
76 | v = Vector.new(@particle.x+@particle.ox, @particle.y+@particle.oy)
77 | else
78 | r = Rect.new(0,0,Graphics.width,Graphics.height) # 屏幕内随机位置
79 | v = Vector.new(r.x, r.y) + Vector.new(rand(r.width), rand(r.height))
80 | end
81 | # (屏幕坐标)初始显示位置
82 | @particle.eparams[:pos] = v
83 | # 移动中所产生的偏移值
84 | @particle.eparams[:pos_offset] = Vector.new
85 | end
86 | def update_xy
87 | @particle.x = @particle.eparams[:pos].x + @particle.eparams[:pos_offset].x
88 | @particle.y = @particle.eparams[:pos].y + @particle.eparams[:pos_offset].y
89 | end
90 | #--------------------------------------------------------------------------
91 | # ● 位置终值与每次更新
92 | #--------------------------------------------------------------------------
93 | def init_move
94 | # 获取最终位置
95 | @params[:xys_backup] = @params[:xys] if @params[:xys_backup] == nil
96 | @params[:xys] = @params[:xys_backup] if @params[:xys].empty?
97 | case @params[:xys_type]
98 | when 0 # 随机
99 | i = rand(@params[:xys].size)
100 | xy = @params[:xys][i]
101 | @params[:xys].delete_at(i)
102 | when 1 # 正序
103 | xy = @params[:xys].shift
104 | when -1 # 倒序
105 | xy = @params[:xys].pop
106 | end
107 | xy = [rand(Graphics.width), rand(Graphics.height)] if xy.nil?
108 | @particle.eparams[:pos_des] = v2 = Vector.new(xy[0], xy[1])
109 |
110 | # 计算位置差值
111 | v1 = @particle.eparams[:pos]
112 | @particle.eparams[:pos_d] = Vector.new(v2.x - v1.x, v2.y - v1.y)
113 |
114 | # 获取移动时间
115 | @particle.eparams[:t] = @params[:t]
116 | @particle.eparams[:t] = @particle.eparams[:life]-1 if @params[:t] == 0
117 | @particle.eparams[:c] = 0
118 |
119 | # 计算其它属性
120 | @particle.eparams[:angle] = @particle.angle
121 | @particle.eparams[:angle_des] = @params[:angle]
122 | @particle.eparams[:angle_d] = @particle.eparams[:angle_des] - @particle.angle
123 |
124 | @particle.eparams[:opacity] = @particle.opacity
125 | @particle.eparams[:opacity_des] = @params[:opacity]
126 | @particle.eparams[:opacity_d] = @particle.eparams[:opacity_des] - @particle.opacity
127 |
128 | @particle.eparams[:zoom] = @particle.zoom_x
129 | @particle.eparams[:zoom_des] = @params[:zoom]
130 | @particle.eparams[:zoom_d] = @particle.eparams[:zoom_des] - @particle.zoom_x
131 |
132 | @particle.eparams[:flag_fin] = false
133 | end
134 | def update_move
135 | return if @particle.eparams[:flag_fin] == true
136 | return finish_move if @particle.eparams[:c] >= @particle.eparams[:t]
137 | t = (@particle.eparams[:c]+1) * 1.0 / @particle.eparams[:t]
138 | v = EasingFuction.call(@params[:move_type], t)
139 | @particle.eparams[:pos_offset].x = @particle.eparams[:pos_d].x * v
140 | @particle.eparams[:pos_offset].y = @particle.eparams[:pos_d].y * v
141 |
142 | @particle.angle = @particle.eparams[:angle] + @particle.eparams[:angle_d] * v
143 | @particle.opacity = @particle.eparams[:opacity] + @particle.eparams[:opacity_d] * v
144 | @particle.zoom_x = @particle.zoom_y = @particle.eparams[:zoom] + @particle.eparams[:zoom_d] * v
145 | @particle.eparams[:c] += 1
146 | end
147 | def finish_move
148 | return if @particle.eparams[:flag_fin] == true
149 | @particle.eparams[:flag_fin] = true
150 | @particle.eparams[:pos].x = @particle.eparams[:pos_des].x
151 | @particle.eparams[:pos].y = @particle.eparams[:pos_des].y
152 | @particle.eparams[:pos_offset].x = 0
153 | @particle.eparams[:pos_offset].y = 0
154 | @particle.angle = @particle.eparams[:angle_des]
155 | @particle.opacity = @particle.eparams[:opacity_des]
156 | @particle.zoom_x = @particle.zoom_y = @particle.eparams[:zoom_des]
157 | run_eval(@params[:eval_pt])
158 | end
159 | #--------------------------------------------------------------------------
160 | # ● 其它初值与每次更新
161 | #--------------------------------------------------------------------------
162 | def init_others
163 | end
164 | def update_others
165 | end
166 | end
167 |
--------------------------------------------------------------------------------
/Event System/简易地图放大.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ 简易地图放大 by 老鹰(https://github.com/OneEyedEagle/EAGLE-RGSS3)
3 | #==============================================================================
4 | $imported ||= {}
5 | $imported["EAGLE-MapZoom"] = "1.0.3"
6 | #==============================================================================
7 | # - 2025.11.6.0 修改以方便兼容
8 | #==============================================================================
9 | # - 本插件新增了一个简单的地图放大功能
10 | # 本质为实时截图,并放大显示该截图
11 | #----------------------------------------------------------------------------
12 | # 【使用】
13 | #
14 | # - 利用脚本设置地图放大:
15 | #
16 | # $game_map.zoom = 数字
17 | #
18 | # · 其中 数字 为需要放大的百分数,比如 100 为 100%,200 为 200%
19 | #
20 | # (注:数字小于 100 时无效)
21 | #
22 | # - 利用脚本设置地图放大时的中心点:
23 | #
24 | # $game_map.zoom_center = 数字 或 数组
25 | #
26 | # · 其中 数字 为需要作为中心点的事件的ID
27 | #
28 | # · 其中 数组 为需要作为中心点的地图坐标[x,y]
29 | #
30 | # · 如果填入 nil 或 -1,则取屏幕中心为放大点
31 | #
32 | # · 如果填入 0 或对应事件不存在,则取玩家为中心
33 | #
34 | # · 该中心点并不是指目标作为屏幕中心,而是确保放大后其显示在可见区域内,
35 | # 如果100%缩放时目标事件位于屏幕外,则地图放大失效,重置为 100% 缩放
36 | #
37 | #----------------------------------------------------------------------------
38 | # 【示例】
39 | #
40 | # - 地图放大为 200%,且以1号事件为中心:
41 | #
42 | # $game_map.zoom = 200
43 | # $game_map.zoom_center = 1
44 | #
45 | # - 地图放大为 300%,且以玩家为中心:
46 | #
47 | # $game_map.zoom = 300
48 | # $game_map.zoom_center = 0
49 | #
50 | # - 地图放大为 150%,且以屏幕中心为中心:
51 | #
52 | # $game_map.zoom = 150
53 | # $game_map.zoom_center = nil
54 | #
55 | # - 地图放大为 120%,且以地图[1,1]为中心:
56 | #
57 | # $game_map.zoom = 120
58 | # $game_map.zoom_center = [1,1]
59 | #
60 | # - 地图复原:
61 | #
62 | # $game_map.zoom = 100
63 | #
64 | #----------------------------------------------------------------------------
65 | # 【高级】
66 | #
67 | # - 获取地图放大的中心点坐标(不动点)(屏幕坐标)
68 | #
69 | # x, y = $game_map.check_zoom_center
70 | #
71 | #==============================================================================
72 |
73 | module EAGLE
74 | #--------------------------------------------------------------------------
75 | # ●【常量】地图放缩时所用帧数
76 | #--------------------------------------------------------------------------
77 | MAP_ZOOM_T = 30
78 | #--------------------------------------------------------------------------
79 | # ●【常量】地图放缩时所用缓动函数
80 | #--------------------------------------------------------------------------
81 | def self.map_zoom_ease(x) # x 为0~1之间的小数
82 | 1 - 2**(-10 * x)
83 | end
84 | end
85 |
86 | module SceneManager
87 | #--------------------------------------------------------------------------
88 | # ● 生成指定元素的截图
89 | # 其中 objs 数组中的元素必须有 z 属性
90 | #--------------------------------------------------------------------------
91 | def self.snapshot_custom(objs=[])
92 | z_max = 65535
93 | sprite_back = Sprite.new
94 | sprite_back.bitmap = Bitmap.new(1,1)
95 | sprite_back.zoom_x = Graphics.width
96 | sprite_back.zoom_y = Graphics.height
97 | sprite_back.z = z_max
98 | objs.each { |s| s.z += z_max }
99 | b = Graphics.snap_to_bitmap
100 | objs.each { |s| s.z -= z_max }
101 | sprite_back.bitmap.dispose
102 | sprite_back.dispose
103 | return b
104 | end
105 | end
106 |
107 | class Game_Map
108 | attr_accessor :zoom, :zoom_center
109 | #--------------------------------------------------------------------------
110 | # ● 获取放大的中心点
111 | #--------------------------------------------------------------------------
112 | def check_zoom_center
113 | v = $game_map.zoom_center
114 | if v.is_a?(Array)
115 | _x = (v[0].to_i - $game_map.display_x) * 32 + 16
116 | _y = (v[1].to_i - $game_map.display_y) * 32 + 16
117 | return _x, _y
118 | end
119 | case v
120 | when -1, nil
121 | _x = Graphics.width / 2
122 | _y = Graphics.height / 2
123 | when 0
124 | e = $game_player
125 | _x = e.screen_x
126 | _y = e.screen_y
127 | else
128 | e = $game_map.events[v] rescue $game_player
129 | _x = e.screen_x
130 | _y = e.screen_y
131 | end
132 | return _x, _y
133 | end
134 | end
135 |
136 | class Spriteset_Map
137 | #--------------------------------------------------------------------------
138 | # ● 生成远景图
139 | #--------------------------------------------------------------------------
140 | alias eagle_map_zoom_create_parallax create_parallax
141 | def create_parallax
142 | eagle_map_zoom_create_parallax
143 | @eagle_sprite_zoom = Sprite.new
144 | @eagle_sprite_zoom.z = 1
145 | @eagle_sprite_zoom.visible = false
146 | @eagle_zoom = { :v_des => 100, :v => 100, :v1 => 0, :vd => 0,
147 | :t => EAGLE::MAP_ZOOM_T, :c => nil }
148 | end
149 | #--------------------------------------------------------------------------
150 | # ● 释放远景图
151 | #--------------------------------------------------------------------------
152 | alias eagle_map_zoom_dispose_parallax dispose_parallax
153 | def dispose_parallax
154 | eagle_map_zoom_dispose_parallax
155 | @eagle_sprite_zoom.bitmap.dispose if @eagle_sprite_zoom.bitmap
156 | @eagle_sprite_zoom.dispose
157 | end
158 | #--------------------------------------------------------------------------
159 | # ● 更新远景图
160 | #--------------------------------------------------------------------------
161 | alias eagle_map_zoom_update_parallax update_parallax
162 | def update_parallax
163 | eagle_map_zoom_update_parallax
164 | v = $game_map.zoom.to_i rescue 100
165 | v = 100 if v < 100
166 | if v != @eagle_zoom[:v_des]
167 | @eagle_zoom[:v_des] = v
168 | @eagle_zoom[:v1] = @eagle_zoom[:v]
169 | @eagle_zoom[:vd] = v - @eagle_zoom[:v]
170 | @eagle_zoom[:c] = 0
171 | @eagle_sprite_zoom.visible = true
172 | end
173 | if @eagle_zoom[:c] != nil
174 | @eagle_zoom[:c] += 1
175 | r = @eagle_zoom[:c] * 1.0 / @eagle_zoom[:t]
176 | v = @eagle_zoom[:v1] + @eagle_zoom[:vd] * EAGLE.map_zoom_ease(r)
177 | @eagle_zoom[:v] = v
178 | @eagle_sprite_zoom.zoom_x = @eagle_sprite_zoom.zoom_y = v / 100.0
179 | if @eagle_zoom[:c] == @eagle_zoom[:t]
180 | @eagle_zoom[:c] = nil
181 | @eagle_sprite_zoom.visible = false if @eagle_zoom[:v_des] == 100
182 | end
183 | end
184 | if @eagle_zoom[:v] > 100
185 | _x, _y = $game_map.check_zoom_center
186 | if _x > Graphics.width ||_x < 0 || _y > Graphics.height || _y < 0
187 | $game_map.zoom = 100
188 | $game_map.zoom_center = nil
189 | end
190 | s = @eagle_sprite_zoom
191 | s.x = s.ox = _x
192 | s.y = s.oy = _y
193 | s.bitmap.dispose if s.bitmap
194 | s.bitmap = SceneManager.snapshot_custom(get_snap_objs)
195 | end
196 | end
197 | #--------------------------------------------------------------------------
198 | # ● 获取放大时应被截图的内容
199 | #--------------------------------------------------------------------------
200 | def get_snap_objs
201 | [@viewport1]
202 | end
203 | end
204 |
--------------------------------------------------------------------------------
/UI Parts/【废弃】/粒子发射器/AddOn-地图灰尘飘散.rb:
--------------------------------------------------------------------------------
1 | #==============================================================================
2 | # ■ Add-On 地图灰尘飘散 by 老鹰(http://oneeyedeagle.lofter.com/)
3 | # ※ 本插件需要放置在【粒子发射器V2 by老鹰】之下
4 | #==============================================================================
5 | # - 2021.11.4.22
6 | #==============================================================================
7 | # - 本插件新增了在地图上指定位置进行飘散的粒子模板
8 | #----------------------------------------------------------------------------
9 | # 【使用方法】
10 | #
11 | # - 在 地图右键-属性-备注 中填写:
12 | #
13 | #
14 | # ...
15 | #
16 | #
17 | # 其中 ... 替换为 属性名:属性值 的设置项,每个设置项占一行
18 | #
19 | # - 设置项一览:
20 | #
21 | # pos: x,y,w,h →【必须】设置灰尘生成的位置(地图编辑器中的格子坐标与个数)
22 | # 比如 pos: 2,3, 4,5 就是从地图(2,3)处到地图(5,7)处的矩形
23 | #
24 | # size: v →【可选】灰尘粒子的大小为vxv(默认1x1)
25 | #
26 | # rgba: r,g,b,a →【可选】灰尘粒子的颜色为 Color.new(r,g,b,a)
27 | #
28 | # angle: v1, v2 →【可选】灰尘的移动方位在 v1角度 到 v2角度 之间
29 | # (水平向右为 0°,顺时针方向为正角,默认为 0~360°)
30 | #
31 | # v: v1, v2 →【可选】灰尘的移动速度(v1到v2之间的一个随机数)
32 | #
33 | # t: v1, v2 →【可选】单个灰尘粒子的存在时间(v1到v2之间的一个随机数)
34 | #
35 | # n: v1, v2 →【可选】每次生成的灰尘粒子数目
36 | #
37 | # all: v →【可选】灰尘粒子的总数(当前灰尘区域中的灰尘不会超过这个数目)
38 | #
39 | # z: v →【可选】灰尘粒子的z值(默认1,位于地图图块上,玩家下方)
40 | #
41 | # - 示例:
42 | #
43 | # 从地图的 (9,17) 为左上角,横向2格,纵向1格的区域里,随机生成灰尘粒子,
44 | # 且它们的存在时间为 60~90 帧;
45 | # 从地图的 (19,17) 为左上角,横向1格,纵向1格的区域里,随机生成灰尘粒子。
46 | #
47 | =begin
48 |
49 | pos: 9,17, 2,1
50 | t: 60,90
51 |
52 |
53 | pos: 19,17, 1,1
54 |
55 | =end
56 | #
57 | #==============================================================================
58 |
59 | module PARTICLE
60 | #--------------------------------------------------------------------------
61 | # ● 解析数字字符串
62 | #--------------------------------------------------------------------------
63 | def self.parse_number_string(s, flag_float=false)
64 | # s = "v, v,v..."
65 | s = (s.gsub(/ /){ "" }).split(/,/)
66 | s.collect { |v| flag_float ? v.to_f : v.to_i }
67 | end
68 | end
69 |
70 | class ParticleTemplate_DustOnMap < ParticleTemplate_OnMap
71 | def init_others
72 | super
73 | @particle.blend_type = 1
74 | end
75 | end
76 |
77 | class Spriteset_Map
78 | #--------------------------------------------------------------------------
79 | # ● 读取图块地图
80 | #--------------------------------------------------------------------------
81 | alias eagle_particle_mapdust_create_tilemap create_tilemap
82 | def create_tilemap
83 | eagle_particle_mapdust_create_tilemap
84 | create_dusts
85 | start_dusts
86 | end
87 | #--------------------------------------------------------------------------
88 | # ● 创建灰尘组
89 | #--------------------------------------------------------------------------
90 | def create_dusts
91 | @eagle_dusts = []
92 | i = 0
93 | $game_map.note.scan(/(.*?)<\/dust>/im).each do |ts|
94 | tags = ts[0].split(/\r|\n/)
95 | tags_hash = {}
96 | tags.each do |tag|
97 | next if tag.empty?
98 | vs = (tag.gsub(/ /){ "" }).split(/:/)
99 | tags_hash[ vs[0].to_sym ] = vs[1]
100 | end
101 | n = create_dust(tags_hash, i)
102 | next if n == nil
103 | @eagle_dusts.push(n)
104 | i += 1
105 | end
106 | end
107 | #--------------------------------------------------------------------------
108 | # ● 创建粒子发射器
109 | #--------------------------------------------------------------------------
110 | def create_dust(tags, i)
111 | n = "EAGLE-MAPDUST-#{i}"
112 |
113 | f = ParticleTemplate_DustOnMap.new
114 |
115 | # tags[:pos] = "x,y,w,h"
116 | arr = PARTICLE.parse_number_string(tags[:pos])
117 | return nil if arr.size != 4
118 | f.params[:pos_map] = Rect.new(arr[0], arr[1], arr[2], arr[3])
119 |
120 | # tags[:size] = "v"
121 | arr = PARTICLE.parse_number_string(tags[:size]) rescue []
122 | if arr.size == 1
123 | b = Bitmap.new(arr[0], arr[0])
124 | else
125 | b = Bitmap.new(1, 1)
126 | end
127 |
128 | # tags[:rgba] = "r,g,b,a"
129 | arr = PARTICLE.parse_number_string(tags[:rgba]) rescue []
130 | if arr.size == 3
131 | b.fill_rect(b.rect, Color.new(arr[0],arr[1],arr[2]))
132 | elsif arr.size == 4
133 | b.fill_rect(b.rect, Color.new(arr[0],arr[1],arr[2],arr[3]))
134 | else
135 | b.fill_rect(b.rect, Color.new(150,150,150,255))
136 | end
137 | f.params[:bitmaps].push(b)
138 |
139 | # tags[:angle] = "v1, v2"
140 | arr = PARTICLE.parse_number_string(tags[:angle]) rescue []
141 | if arr.size == 2
142 | f.params[:theta] = RangeValue.new(arr[0], arr[1]) # 初速度方向(角度)
143 | else
144 | f.params[:theta] = RangeValue.new(0, 360) # 初速度方向(角度)
145 | end
146 |
147 | # tags[:v] = "v1, v2"
148 | arr = PARTICLE.parse_number_string(tags[:v]) rescue []
149 | if arr.size == 2
150 | f.params[:speed] = RangeValue.new(arr[0], arr[1]) # 初速度值(标量)
151 | else
152 | f.params[:speed] = RangeValue.new(0, 1) # 初速度值(标量)
153 | end
154 |
155 | # tags[:t] = "v1, v2"
156 | arr = PARTICLE.parse_number_string(tags[:t]) rescue []
157 | if arr.size == 2
158 | f.params[:life] = RangeValue.new(arr[0], arr[1]) # 存在时间
159 | else
160 | f.params[:life] = VarValue.new(90, 30) # 存在时间
161 | end
162 |
163 | # tags[:n] = "v1, v2"
164 | arr = PARTICLE.parse_number_string(tags[:n]) rescue []
165 | if arr.size == 2
166 | f.params[:new_per_wave] = RangeValue.new(arr[0],arr[1])
167 | else
168 | f.params[:new_per_wave] = VarValue.new(3,2)
169 | end
170 |
171 | # tags[:all] = "v"
172 | arr = PARTICLE.parse_number_string(tags[:all]) rescue []
173 | if arr.size == 1
174 | f.params[:total] = arr[0]
175 | else
176 | f.params[:total] = 30
177 | end
178 |
179 | # tags[:z] = "v"
180 | arr = PARTICLE.parse_number_string(tags[:z]) rescue []
181 | if arr.size == 1
182 | f.params[:z] = arr[0]
183 | else
184 | f.params[:z] = 1
185 | end
186 |
187 | PARTICLE.setup(n, f, @viewport1)
188 | return n
189 | end
190 | #--------------------------------------------------------------------------
191 | # ● 启动灰尘组
192 | #--------------------------------------------------------------------------
193 | def start_dusts
194 | @eagle_dusts.each { |n| PARTICLE.start(n) }
195 | end
196 | #--------------------------------------------------------------------------
197 | # ● 释放地图图块
198 | #--------------------------------------------------------------------------
199 | alias eagle_particle_mapdust_dispose_tilemap dispose_tilemap
200 | def dispose_tilemap
201 | eagle_particle_mapdust_dispose_tilemap
202 | @eagle_dusts.each { |n| PARTICLE.dispose(n) }
203 | @eagle_dusts.clear
204 | end
205 | end
206 |
207 | class Game_Map
208 | #--------------------------------------------------------------------------
209 | # ● 获取备注
210 | #--------------------------------------------------------------------------
211 | def note
212 | @map.note
213 | end
214 | end
215 |
--------------------------------------------------------------------------------