ASI支持RAGE插件鉤子
截圖 共 1 張
模組介紹 作者原文
這是一個RPH插件,可以將ASI mod轉換爲UASI(“Universal ASI”)mods,可以使用與ScriptHookV加載ASI mod相同的方式加載RAGE Plugin Hook。除了原始的DirectX訪問(“現在的回調”)之外的所有內容都已實現,因此大多數ASI應該加載並正常工作。
要使用此插件,您必須:.NET Framework 4.6
RAGE插件鉤子
它是如何工作的?
第一個版本完全用C ++ / CLI編碼:本機C ++代碼用於與本機ASI插件交互,代碼的“CLI”(或“託管”)部分用於與.NET Framework和RAGE插件交互鉤。雖然託管代碼和本機代碼之間的這種混合造成了問題和混亂:錯誤很難追查,程序很難維護,並且插件不適用於很多人。
這個版本是在兼容性和用戶友好性的基礎上創建的:託管代碼在自己的文件中(“AsiSupport.dll”,這是RPH插件),所有非託管代碼(插件工作的最低限度)都在UnvAsiIntrf.dll(代表“通用ASI接口”)。最終用戶應該支持UnvAsiIntrf.dll,因爲它是純C ++,如果最終用戶具有使用RPH的所有必需依賴項,AsiSupport.dll也不應該導致任何問題。
UnvAsiIntrf.dll已經被創建爲ASI插件與另一個實體交互的通用方式:所述實體將註冊爲“API處理程序”,可以訪問GTA V(在這種情況下,RPH可以訪問GTA V)哪個會加載UASI文件(轉換後的ASI文件);然後,ASI腳本將與使用ScriptHookV完成它的方式與GTA V交互,除非他們通過UnvAsiIntrf.dll進行交互,UnvAsiIntrf.dll本身作爲UASI腳本和API處理程序之間的簡單橋樑。
報告錯誤和崩潰
由於插件仍處於測試階段且可能不穩定,因此您可能會遇到錯誤和/或崩潰。在這種情況下,請在Github,GTA5-mods.com評論部分或RPH Discord上報告錯誤/崩潰。如果您報告崩潰,請同時發送崩潰報告(位於GTA V文件夾中的“CrashReports”目錄內)。
更新日誌:
0.3.2
*如果加載或轉換ASI文件失敗,插件不應再崩潰
*該插件現在可以檢測非ScriptHookV腳本,而不是嘗試轉換它們
0.3.1
*提高性能
0.3.0
- AsiSupport插件已在C#中重寫,以刪除C ++ / CLI依賴項
*與ASI腳本的互操作現在通過UnvAsiIntrf.dll(用純C ++編碼)完成
- AsiSupport不再使用.rasi文件:它使用.uasi(通用ASI)文件
*將ASI文件轉換爲UASI現在應該更快
*當RPH控制台打開時,不再將關鍵事件傳輸到ASI插件
*更好地處理異常:插件不應再崩潰(大多數情況下),而是顯示用戶友好的錯誤消息
*現在可以卸載和重新加載大多數ASI插件而無需重啓遊戲(抱歉,ELS不是其中之一)
*現在可以在外部的,易於編輯的文件中讀取一些以前硬編碼的值
0.2.0
*如果腳本已經加載了SHV,則SHV腳本將被終止
*依賴性問題現已修復
*該插件現在也適用於Windows 7,8和8.1
- OpenIV.asi不再處理,因爲它是獨立的,無論如何都會工作
*如果原始.asi文件發生更改,則會更新轉換後的.rasi文件
0.1.0
+首次公開發布
請注意我只創建它才能使用非活動作者創建的舊ASI插件。如果您是想要創建GTA V插件的新開發人員,我強烈建議您直接使用RPH,因爲它會提高性能。
感謝MulleDK19和LMS用於RAGE Plugin Hook
感謝Alexander Blade for ScriptHookV
感謝JackD111 for OpenVHook
感謝alexguirre幫助我弄清楚東西
根據GPLv3許可證,Github上提供了該源代碼。
This is a RPH plugin that converts ASI mods into UASI ("Universal ASI") mods which can be loaded with RAGE Plugin Hook in the same way ASI mods are loaded with ScriptHookV. Everything but the raw DirectX access ("Present callbacks") has been implemented, so most ASIs should load and work properly.
To use this plugin, you must have:.NET Framework 4.6
RAGE Plugin Hook
How does it work?
The first version was entirely coded in C++/CLI: native C++ code was used to interact with native ASI plugins, and the "CLI" (or "managed") part of the code was used to interact with the.NET Framework and RAGE Plugin Hook. Though, this mix between managed and native code created problems and confusion: errors were hard to track down, the program was hard to maintain, and the plugin didn't work for a lot of people.
This version was created with compatibility and user-friendliness in mind: managed code is in its own file ("AsiSupport.dll", which is the RPH Plugin), and all unmanaged code (the bare minimum the make the plugin work) is in UnvAsiIntrf.dll (which stands for "Universal ASI Interface"). UnvAsiIntrf.dll should be supported by the end user as it is pure C++, and AsiSupport.dll should also not cause any problem if the end user has all required dependencies to use RPH.
UnvAsiIntrf.dll has been created as a generic way for ASI plugins to interact with another entity: said entity would register as an "API Handler" which has access to GTA V (in this instance, to RPH which gives it access to GTA V) and which would load UASI files (converted ASI files); then, the ASI scripts would interact with GTA V the same way the would've done it with ScriptHookV, except they would do via UnvAsiIntrf.dll, which itself serves as a simple bridge between UASI scripts and the API Handler.
Reporting bugs and crashes
As the plugin is still in beta and might be unstable, you may experience bugs and / or crashes. In that case, please report the bug/crash either on Github, in the GTA5-mods.com comment section, or on the RPH Discord. If you're reporting a crash, please also send the crash report (located inside the "CrashReports" directory in your GTA V folder).
Changelog:
0.3.2
- The plugin should no longer crash if it failed to load or convert an ASI file
- The plugin now detects non ScriptHookV scripts instead of trying to convert them …
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 這類遊戲沒有通用的模組管理器:有的模組直接替換遊戲檔案、有的放進遊戲專屬的 Mods 資料夾、有的要先裝遊戲對應的社群載入器或工具,以包內說明為準。
- 嚴格按說明放置檔案;標註「前置依賴」的模組需要把依賴一併裝好。
- 啟動遊戲確認載入成功;部分遊戲需要在設定或模組選單裡手動啟用。
不同遊戲、不同模組的安裝位置差異很大,包內說明是最可靠的依據。