《上古卷軸5:天際》如何為你的MOD加入選擇界面,寫入NMM加載腳本,完成FOMOD的封包

首先你需要一個干凈的XML文件,這里給大家一個寫好開頭的XML
<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=http://qconsulting.ca/fo3/ModConfig5.0.xsd>這個文件需要放在MOD的壓縮包的根目錄FOMOD文件夾里面,當然我們是沒有FOMOD文件夾的,所以我們要在解壓后的MOD文件夾新建一個FOMOD文件夾
你們要做的是用記事本打開XML編輯
然后我們可以開始編寫XML了 , 我們拿一個比較麻煩的MOD來說明如何實現NMM加載MOD的選擇界面,這個MOD就是被棄坑的天際戰爭 。由于棄坑的太突然,所以沒有NMM版本,所以我開始為大家寫一個XML,讓大家能夠自定義選擇,下面是先行設置 。
打開原來的天際戰爭漢化版文件夾,發現如下文件,先劃分文件夾,由于XML導入文件是認文件夾,不認文件名,所以單個ESP必須放在文件夾里面,文件夾的名字不支持任何符號,所以修正后 , 文件夾如下所示
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
文件夾的劃分完成了,大家可以看到我把材質的文件夾放到了主目錄,因為下面要用到 。下面寫代碼:
<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qconsulting.ca/fo3/ModConfig5.0.xsd">
<moduleName>天際戰爭完美漢化版</moduleName>
<moduleDependencies>
<fileDependency file="Skyrim.esm" state="Active"></fileDependency>
</moduleDependencies>
<requiredInstallFiles>
<folder source="textures" />
</requiredInstallFiles>
<installSteps order="Explicit">
<installStep name="Options">
<optionalFileGroups>
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
這里我們可以看到,天際戰爭的先決條件是skyrim.esm被激活
<requiredInstallFiles>
<folder source="textures" />
</requiredInstallFiles>
requiredinstallfiles:這個是要求先安裝的主體文件,由于天際戰爭的材質就一個所以我們在folder source(文件夾包含的資源)里面寫入文件夾的名稱 。
如果是其他的MOD,就要求我們一個個把文件夾的路徑寫入 。
特別注意:XML里面的路徑是以主文件夾開始算的,比如textures在主目錄下,所以我們寫入textures 。
<installSteps order="Explicit">:安裝步驟命令
<installStep name="Options">:安裝步驟名稱
<optionalFileGroups>:可選文件群組
======代碼======
<group name="1. 難度選擇" type="SelectExactlyOne">
<plugins order="Explicit">
<plugin name="友好時代">
<description>沒有改變原游戲,打斗很少,你不會到處受到敵人的攻擊,難以見到英雄與反派之間的對決同時也很難看到厲害的敵人,游戲本體不會受MOD太大影響
.</description>
<files>
<folder source="WiS IV MAIN FILE\lore friendly" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="正常模式">
<description>彩虹模式的加強版,打斗相對更多,可能會影響游戲主體任務
</description>
<files>
<folder source="WiS IV MAIN FILE\nomal mode" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
因為我們寫入的N個plugin
所以在后面加一個終止符
</plugins>
完成了N個難度的plugin的修飾后,
這個難度的group我們就完成了
所以再加一句
</group>
至此我們完成了第一個group 。
然后我們按照同樣的格式 。
寫入N個你需要寫入的group
分group是有規律的,比如,可共存的將type設置為SelcectAny
這樣這個group下面的所有的plugin都可以共存,都可以選擇,選不選就任玩家選擇了
不能共存的 , 就設置為SelectExactlyOne 。
完成了全部的group的修飾后
然后為整個XML寫上修飾終止符
</optionalFileGroups>
</installStep>
</installSteps>
</config>
我們可以發現,這些就是最開始的修飾符的對應的終止修飾符 。至此我們完成了一個MOD的NMM加載信息腳本的XML的文件寫入 。
重新打包MOD,NMM載入后,我們會發現這樣的界面
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
PS:是可以加入圖片 , 但是你得在做好海報,然后在對應的name類后面加入修飾圖片路徑
比如我在模塊name的后面加了一個路徑
<moduleImage path="fomod\img\wis.jpg" />
然后我們發現在“天際戰爭完美漢化版”的字體旁邊出現了海報 。
對應的 , 你想在哪個版塊加入你的圖片,只要設置好路徑和文件即可.
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
這個是我寫的天際戰爭的XML,大家可以拿去研究,或者看看我漢化的東方同伴管理MOD , 我也為那個MOD寫了一個簡單的XML , 對比一下就能發現規律了
下一步,我將開始教大家如何寫info.XML,這是一個介紹界面 , 只要你在NMM安裝之前,點擊NMM列表的MOD壓縮包,就會在右邊窗口出現MOD的更新信息 。待編輯ING
<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qconsulting.ca/fo3/ModConfig5.0.xsd">
<moduleName>天際戰爭完美漢化版</moduleName>
<moduleImage path="fomod\img\wis.jpg" />
<moduleDependencies>
<fileDependency file="Skyrim.esm" state="Active"></fileDependency>
</moduleDependencies>
<requiredInstallFiles>
<folder source="textures" />
</requiredInstallFiles>
<installSteps order="Explicit">
<installStep name="Options">
<optionalFileGroups>
<group name="1. 難度選擇" type="SelectExactlyOne">
<plugins order="Explicit">
<plugin name="友好時代">
<description>沒有改變原游戲,打斗很少 , 你不會到處受到敵人的攻擊 , 難以見到英雄與反派之間的對決同時也很難看到厲害的敵人,游戲本體不會受MOD太大影響
.</description>
<files>
<folder source="WiS IV MAIN FILE\lore friendly" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="正常模式">
<description>彩虹模式的加強版,打斗相對更多,可能會影響游戲主體任務
</description>
<files>
<folder source="WiS IV MAIN FILE\nomal mode" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="噩夢黑暗時代">
<description>大量的敵人,當你高級別時,能一下遇到三十個敵人在一起,當你等級低時很可能遇到高等級敵人,嚴重影響游戲本身任務
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
</description>
<files>
<folder source="WiS IV MAIN FILE\dark age nighemare" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="黑暗彩虹">
<description>你也許穿過一個森林只看見一支鹿,回家的時候連續遇到吸血鬼 。能在附近找到很荒涼的營地,但隨后幾分鐘會發現幾名法師和強盜混戰 。這個難度是黃金,黑暗時代的混合,并且是彩虹模式的沉浸版 。
</description>
<files>
<folder source="WiS IV MAIN FILE\dark rainbow" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="黃金時代">
<description>游戲性改變很大,雙倍的敵人,雙倍的打斗,沿岸將有更多的敵人,比較小機會見到強勁的敵人
</description>
<files>
<folder source="WiS IV MAIN FILE\golden age" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
</plugins>
</group>
<group name="2. 英雄和反派" type="SelectExactlyOne">
<plugins order="Explicit">
<plugin name="普通版">
<description>英雄和反派的行為舉止正常.</description>
<files>
<folder source="WiS IV Heroes Villains\easy" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="瘋狂版">
<description>英雄和反派的行為舉止變得瘋狂.</description>
<files>
<folder source="WiS IV Heroes Villains\hard" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
</plugins>
</group>
<group name="3. 定制內容" type="SelectAny">
<plugins order="Explicit">
<plugin name="治療與重生">
<description>NPC具有治療自己和重生別人的能力 , 增加敵人和己方的生命力,這樣游戲會持續的更久,不會幾個敵人一下解決掉了搞的很沒意思 。</description>
<files>
<folder source="WiS IV plugins\Heal Other Resurrect" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="強力(蓄力)攻擊">
<description>強力(蓄力)攻擊造成以往三倍的傷害 。</description>
<files>
<folder source="WiS IV plugins\Bash Power Attack" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="瘟疫">
<description>疾病傳播得更加瘋狂 , 造成生命,魔法,體力的嚴重損害 。</description>
<files>
<folder source="WiS IV plugins\Disease" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="強力弓箭">
<description>雙倍弓箭傷害</description>
<files>
<folder source="WiS IV plugins\Double Arrow Damage" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="摔落懲罰">
<description>摔落雙倍傷害</description>
<files>
<folder source="WiS IV plugins\Double Fall Damage" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="NPC技能">
<description>NPC技能增長的更快,原游戲為每級2-3點,現在為每級5-7點 。.</description>
<files>
<folder source="WiS IV plugins\Perks for NPCs" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="種族修改">
<description>巨人等等種族真實化.</description>
<files>
<folder source="WiS IV plugins\Races" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="潛行者的噩夢">
<description>潛行將更加困難 。在潛行模式下進攻敵人,他們會搜你個2分鐘 (原游戲為15-30秒) 。光天化日之下將更加難以潛行 , 雙倍難于原游戲 。</description>
<files>
<folder source="WiS IV plugins\Difficult Stealth" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="水下作戰">
<description>水下作戰 。NPC和敵人可以游泳,你躲河里再也沒用了 。除了不死族怕水以外 。</description>
<files>
<folder source="WiS IV plugins\Water Wars" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="矛與盾的糾結">
<description>裝甲與防守,很有意思,戰斗時間將變長 。盾牌吸收100%的傷害,體力充足了話擋格雙倍,裝甲提升三倍,武器將造成更小的傷害
</description>
<files>
<folder source="WiS IV plugins\Armors Blocks" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
</plugins>
</group>
<group name="4. 等級關聯" type="SelectExactlyOne">
<plugins order="Explicit">
<plugin name="等級倍數X1">
<description>天際戰爭世界的NPC和怪物等級.</description>
<files>
<folder source="WiS IV plugins\Leveled World\X1" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="等級倍數X2">
<description>天際戰爭世界的NPC和怪物等級是玩家的兩倍.</description>
<files>
<folder source="WiS IV plugins\Leveled World\X2" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="等級倍數X3">
<description>天際戰爭世界的NPC和怪物等級是玩家的三倍.</description>
<files>
<folder source="WiS IV plugins\Leveled World\X3" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="等級倍數X4">
<description>天際戰爭世界的NPC和怪物等級是玩家的四倍.</description>
<files>
<folder source="WiS IV plugins\Leveled World\X4" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="等級倍數X10">
<description>天際戰爭世界的NPC和怪物等級是玩家的十倍.</description>
<files>
<folder source="WiS IV plugins\Leveled World\X10" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="等級倍數X30">
<description>天際戰爭世界的NPC和怪物等級是玩家的三十倍.</description>
<files>
<folder source="WiS IV plugins\Leveled World\X30" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
</plugins>
</group>
<group name="5. 刷怪速度" type="SelectExactlyOne">
<plugins order="Explicit">
<plugin name="緩慢">
<description>5天重生怪,已清理的區域要10天 。.</description>
<files>
<folder source="WiS IV Blood Coins\slow" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="正常">
<description>1天重生怪,已清理區域要2天 。.</description>
<files>
<folder source="WiS IV Blood Coins\normal" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="瘋狂">
<description>5天重生怪,已清理區域要1天 。.</description>
<files>
<folder source="WiS IV Blood Coins\insane" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
</plugins>
</group>
<group name="6. NPC血量" type="SelectExactlyOne">
<plugins order="Explicit">
<plugin name="一半">
<description>NPC生命值減半.</description>
<files>
<folder source="WiS IV plugins\Life Npc\half" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
<plugin name="兩倍">
<description>NPC生命值X2.</description>
<files>
<folder source="WiS IV plugins\Life Npc\double" destination="" />
</files>
<typeDescriptor>
<type name="Optional" />
</typeDescriptor>
</plugin>
</plugins>
</group>
</optionalFileGroups>
</installStep>
</installSteps>
</config>
《上古卷軸5》專題站:http://www.ali213.net/zt/esv/
【《上古卷軸5:天際》如何為你的MOD加入選擇界面,寫入NMM加載腳本,完成FOMOD的封包】
