Warband Refined and Enhanced Compiler Kit 增強編譯器套件

作者 Lav·版本 v0.610b3·更新於 2019-01-20

Warband Refined and Enhanced Compiler Kit 增強編譯器套件

截圖 共 1 張

模組介紹 作者原文

Warband Refined and Enhanced Compiler Kit 增強編譯器套件

戰團精製&增強編譯器工具包(w ^。- [R。ê。Ç。ķ。)

WRECK描述和特性

W.RECK旨在替代 Taleworlds提供的模塊系統編譯器,提供顯着改進的性能,增強的錯誤報告和一些在Warband mod開發中可能有用的高級功能。

基本 WRECK功能:

編譯速度比vanilla編譯器高几倍。

WRECK實際上檢測並報告了許多未被 vanilla編譯器檢測到的潛在錯誤。此外,與vanilla編譯器不同,由於單個錯誤,WRECK不會在屏幕上出現大量錯誤消息。

WRECK爲modder提供了輕鬆更改項目修飾符,遊戲UI字符串和用戶提示的工具,這些工具有時非常有用。爲此,它引入了三個新的可選模塊:module_item_modifiers.py,module_ui_strings.py和module_user_hints.py,它們分別編譯爲Data / item_modifiers.txt,languages / en / ui.csv和languages / en / hints.csv文件。。如果模塊系統中缺少模塊文件,則不會生成任何文件(使Warband回退到標準文件)。

高級WRECK功能,僅在與模塊系統正確集成後纔可用(參見下面的“集成”一章):

Vanilla編譯器需要兩組實體引用:ID _ *.py文件(icon_player)中包含的靜態引用和在編譯時計算的引用引用(“icon_player”)。這產生了許多問題。例如,不可能簡單地添加一個新圖標和一個將使用該圖標的新方:modder必須添加一個新圖標,編譯模塊以重新生成ID文件,然後才能添加新的一方。WRECK通過引入一個動態引用(icon.player)來解決這個問題,它可以在任何地方自由使用,取代了兩種類型的vanilla引用。請注意,WRECK時堅持標準的Warband前綴,字符串被引用爲s。<string_name>而不是str。<string_name>。這是與方案的唯一偏差,因爲str是Python中的全局關鍵字。

全局變量和局部變量也可以使用這種語法,“:variable”變爲l.variable,“$ variable”變爲g.variable。

更重要的是,新的動態參考可以在數學表達式中自由使用。只要表達式可以在編譯時計算,它將在編譯時計算,計算出的值將用於生成的代碼中。

爲了進一步擴展此功能,實際上可以在代碼塊的表達式中使用包含運行時變量(本地,全局,寄存器)的數學表達式。對於這樣的表達式,編譯器將自動生成模塊系統代碼,該代碼將計算數學表達式並將其插入到代碼中,對於modder完全透明。請注意,出於顯而易見的原因,不建議在作爲this_or_next操作塊一部分的條件操作中使用此功能。

Vanilla模塊系統依賴於header_skills.py文件來正確聲明與技能相關的常量,這使得改變遊戲技能變得不必要,因爲必須在header_skills.py中手動鏡像對module_skills.py的任何更改。WRECK編譯器自動並動態計算所有必需的常量。

可以使用動態引用(imod。<modifier>和imodbit。<modifier>)代替vanilla imod_ *常量。[/ li]

[li] WRECK將透明地生成skl_ *,從模塊文件中知道_ * _ *,imod_ *和imodbit_ *常量以實現向後兼容性。

WRECK爲相當高級的插件系統提供支持。現在可以創建插件文件,其可以包括所有類型的模塊系統數據,將代碼和數據條目注入現有模塊系統,擴展操作語法並對模塊數據執行任意處理。插件功能在下面更詳細地描述。

模塊系統已經取消了許多人爲限制。WRECK支持數字,字符串和位置寄存器,分別高達reg127,s127和pos127。項目重量和max_ammo參數沒有人爲限制(對於彈藥項目不是很有用,但對於食品和貿易商品可能非常好)。

提供了新的ATTR()和SKILLS()函數,用於module_troops.py文件中的部隊定義。Modder可以使用ATTR(8,9,6,4,3 )代替str_8 | agi_9 | int_6 | cha_4 | level(3)和SKILLS(trade = 2,riding = 6)而不是knows_trade_2 | knows_riding_6,從而獲得更好的可讀性碼。另外一個好處是,此語法不受header_troops.py中定義的常量的限制,因此可以輕鬆定義30以上的屬性值和10以上的技能級別。

Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.)

W.R.E.C.K. Description and Features

W.R.E.C.K. is designed as replacement for the module system compiler provided by Taleworlds, providing drastically improved performance, enhanced error reporting and a number of advanced features potentially useful in Warband mod development.

Basic W.R.E.C.K. features:

Compilation speed is several times higher than vanilla compiler.

A number of potential errors which are not detected by vanilla compiler are actually detected and reported by W.R.E.C.K. Also, unlike vanilla compiler, W.R.E.C.K. will not flood your screen with tons of error messages because of a single bug.

W.R.E.C.K. provides modder with the tools to easily change item modifiers, game UI strings and user hints, which sometimes is extremely useful. For that purpose, it introduces three new optional modules: module_item_modifiers.py, module_ui_strings.py and module_user_hints.py, which are compiled into Data/item_modifiers.txt, languages/en/ui.csv and languages/en/hints.csv files respectively. If module files are missing from your module system, no files will be generated (making Warband fallback to standard ones).

Advanced W.R.E.C.K. features, which only become available after proper integration with Module System (see "Integration" chapter below):

Vanilla compiler requires two sets of entity references: static references contained in ID_*.py files (icon_player) and quoted references ("icon_player") which are calculated at compile-time. This creates a number of problems. For example, it's impossible to simply add a new icon and a new party which will use that icon: modder must add a new icon, compile the module to regenerate the ID files, and only then he can add a new party. W.R.E.C.K. offers a solution to this problem by introducing a dynamic reference (icon.player) which can be used freely and everywhere, replacing both types of vanilla references. Note that while W.R.E.C.K. sticks to standard Warband prefixes, strings are referenced as s.<stri …

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 這類遊戲沒有通用的模組管理器:有的模組直接替換遊戲檔案、有的放進遊戲專屬的 Mods 資料夾、有的要先裝遊戲對應的社群載入器或工具,以包內說明為準。
  3. 嚴格按說明放置檔案;標註「前置依賴」的模組需要把依賴一併裝好。
  4. 啟動遊戲確認載入成功;部分遊戲需要在設定或模組選單裡手動啟用。

不同遊戲、不同模組的安裝位置差異很大,包內說明是最可靠的依據。

檔案與校驗

檔案名稱
Warband Refined and Enhanced Compiler Kit 增强编译器套件
檔案大小
1.2 MiB