最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

維多利亞3開發(fā)日志#60 | 9/29 模組

2022-10-13 17:09 作者:牧有漢化  | 我要投稿

牧游社 牧有漢化翻譯


Victoria 3 - Dev Diary #60 – Modding

Ofaloaf, Content Designer


Hi folks! I'm Mike, one of the Game Designers who specializes in content for V3, and today we're going to talk about the delights of modding.

大家好!我是Mike,一個專心于維多利亞3內(nèi)容的游戲設計師,今天我們將要討論模組的樂趣。


Modding is a whole world of things in Paradox games. Some mods are total overhauls, some are just simple little tweaks. I've seen sweet little mods that just add a person's pet as a graphic, or even one that I spotted on Hearts of Iron's workshop page as I wrote this that added in a dearly-departed office cat as a replacement for Joseph Stalin. There's all sorts of mods out there! And, hopefully, by the time you've finished reading this dev diary, you'll know how to create the start of your own mod for Victoria 3, too.

在P社游戲中,模組構成了一個完整的世界。有些模組對本體進行了徹底的重做,有些只是簡單的小調(diào)整。我看到過一些可愛小模組,比如只是在圖標中加入了某人的寵物,甚至就在撰寫這篇文章時,我還在鋼鐵雄心的創(chuàng)意工坊上看到了一個用離世不久的辦公室貓貓代替約瑟夫·斯大林的模組。那里總是有各種各樣的模組!同樣地,希望你在讀完這篇開發(fā)日志后,你也能知道如何開始為維多利亞3創(chuàng)建屬于自己的模組!


Starting with the launcher

從啟動器開始


First thing's first: the way the innards of Victoria 3 operate is similar, but not exactly the same as, Crusader Kings 3 and Imperator, since they're all derived from the Jomini engine we also use. If you know how those games tick scripting-wise, you're 90% of the way to knowing how to make a V3 mod. If not, I will happily let Crusader Kings 3 explain a bit about how scripting in Jomini works.

最初的最初:維多利亞3與十字軍之王3、帝皇羅馬的內(nèi)核操作方式相似,但不完全相同,這是因為他們都來源于我們采用的Jomini引擎。如果你知道十字軍之王3和帝皇羅馬里的游戲腳本是怎樣運行的,那你基本上知道了維多利亞3模組制作中90%的內(nèi)容。如果不知道,我很樂意用十字軍之王3來向你展示Jomini中游戲腳本是怎樣運行的(見十字軍之王3的開發(fā)日志#30、開發(fā)日志#37)。


If that stuff still leaves you a little baffled, don't worry about it! We're gonna walk through the basics of making a whole mod, from the first point of creation to actually running the darn thing.

如果這些事情仍然讓你有點疑惑,別擔心!接下來我們將學習制作整個模組的基礎知識,從第一步創(chuàng)建模組到把這個該死的模組跑起來。


So! Let's start from the top. When you fire up Victoria 3, you'll be greeted by the game's launcher. If you look in the upper-left of the launcher, you'll see four little options: Home, DLC, Mods, and Game settings. Click the Mods one. Go on. You know you want to.

那么,讓我們從頭開始!當你啟動維多利亞3時,游戲的啟動器會出來迎接你。在啟動器的左上方可以看到四個小選項:主頁(Home)、下載內(nèi)容(DLC)、模組(Mods)以及游戲設置(Game settings)。繼續(xù),你知道你想這么做。



From the Mods menu, you'll be greeted with three buttons. If you click "Mod tools" in the middle, you'll be greeted with a prompt to create a new mod if you haven't got any yet, otherwise you'll have to find the button on the menu and click it to bring up the Create new mod prompt.

在模組菜單中,你會看到三個按鈕。點擊中間的“模組工具(Mod tools)”,如果你沒有任何模組,你就會看到創(chuàng)建新模組的提示,否則就需要找到菜單上的按鈕并點擊,最后彈出創(chuàng)建新模組的提示。


Let's make something simple, shall we? How's about we make a country out of Ohio. Yeah, let's just make one country and make it show up in-game, that'll be a good test of all this stuff.

讓我們簡單點,可以嗎?比如把俄亥俄變成一個國家。是的,創(chuàng)建一個國家,并讓它在游戲中出現(xiàn),這是測試模組全部內(nèi)容的好方法。



Slam that create button, and the launcher will create a new directory in your mod folder wherever your savegames and such are stored. In my case, and in most of your cases, that'll be in some place like

按下“創(chuàng)建(Create)”按鈕,啟動器會在mod文件夾中自動創(chuàng)建一個新目錄——mod文件夾就在你的savegames和其它類似文件存儲的同一個儲存目錄下。在我的例子,以及絕大多數(shù)你們的情況中,這一路徑大概在圖示的位置。



Found the directory? Good. Inside that directly, you're gonna find a folder named ".metadata", with a single file inside that, called "metadata.json". That folder and file is where all the data is stored that the launcher reads when checking out the mod, including the mod's name, version number if you wanna be fancy, and so forth. If you want to tinker with that stuff later, go on ahead, but we're not gonna touch it for this. Go back to the main directory, so that you're looking at "[...]\Paradox Interactive\Victoria 3\mod\It's Ohio!"

找到目錄了嗎?好,直接進去,你會發(fā)現(xiàn)一個名為“.metadata”的文件夾,里面有一個名為“metadata.json”的文件。啟動器打開模組時需要讀取和檢查的所有數(shù)據(jù)都存儲在這個文件夾和這個文件中,包括模組名、版本號(如果需要的話)等等。如果以后還想要修改這些內(nèi)容,盡管去改,但我們今天不會觸及這部分內(nèi)容?;氐街髂夸?,可以發(fā)現(xiàn)這個模組的地址在“[...]\Paradox Interactive\Victoria 3\mod\It's Ohio”


Mucking with files

充實文件


Let's start defining Ohio. The key thing with how to set up a mod is that you have to essentially copy the paths used in the main game, so the game reads everything right. In V3, country definitions are stored at "Victoria 3\game\common\country_definitions", so in our "It's Ohio!" directory we're going to make a "common" folder, and then a "country_definitions" folder within that. This mimics the path of the base game (that "Victoria 3\game" bit), so when the game reads this mod and tries to figure out how it interacts with the base game, it doesn't scream and die.

讓我開始定義Ohio吧。完全復制游戲本體中所用到的路徑,這樣游戲才能正確讀取,這是模組設置中的關鍵。在維多利亞3中,國家定義文件被存儲在“Victoria 3\game\common\country_definitions”中,因此需要在“It's Ohio!”目錄中創(chuàng)建“common”文件夾,在這個文件夾中繼續(xù)創(chuàng)建“country_definitions”文件夾。這參照了游戲本體的路徑(即“Victoria 3\game”),所以當游戲讀取這個模組并試圖找出它與游戲本體的交互方式時,不會出現(xiàn)尖叫和死亡。


Inside our mod's "common\country_definitions" folder, we're going to make a little file I've arbitrarily called "ohio.txt". Open it up, and we'll paste text like this bad boy into it:

在模組的“common\country_definitions”文件夾中,需要創(chuàng)建一個被我隨意命名為“ohio.txt”的小文件,打開它,像這樣壞壞地把文本粘貼進去:



Wow! We've defined Ohio. Now let's tinker with history files so Ohio appears in-game.

哇哦!我們已經(jīng)定義了俄亥俄。現(xiàn)在讓我們修改history文件,俄亥俄就會出現(xiàn)在游戲中。


Country control of a state is defined in a couple history files, found in the following directories:

國家控制的地區(qū)被定義在幾個history文件中,可以在如下目錄中找到它們:


common\history\buildings
common\history\pops
common\history\states


All three of these will need the base game files copied over- we sadly can't just add a new entry in a new file, because we also need to remove/replace the USA-related data in these as well. Make sure you duplicate these folder paths in the It's Ohio! mod folder, like you did with common\country_definitions.

所有這些都需要從游戲本體中將文件復制過來——很遺憾我們不能直接在新文件中添加新條目,因為還需要在上述文件中移除/替換與美國相關的數(shù)據(jù)。請確保在“It's Ohio”模組文件夾中復制了這些文件路徑,就像在“common\country_definitions”中做的那樣。


Starting with the buildings directory, what we do is find "STATE_OHIO" among the buildings files- turns out it's in 05_north_america.txt. Copy that file and plop it into your mod's history\buildings folder, open it up there, then search for STATE_OHIO. You'll find a section that starts off with

接下來開始建筑目錄的介紹,我們需要在建筑文件中找到“STATE_OHIO”,建筑文件在“05_north_america.txt”文件中。復制該文件,將其放入模組的“history/building”文件夾中,打開并搜索STATE_OHIO,可以找到其中一節(jié)的開頭是:



and goes on from there. What's happening there is that we've declared that within the state region of Ohio (that is, "s:STATE_OHIO"), there should be a state controlled by the USA ("region_state:USA") that constitutes American Ohio. But we're making an independent Ohio, so all the data referring to American Ohio is useless and will confuse the game. All we're going to do is change that "region_state:USA={ " line to "region_state:OSU={ " so the same section now reads

然后從那里繼續(xù)。這里發(fā)生的事情是,我們已經(jīng)聲明,在俄亥俄州的地域內(nèi)(即“s:state_Ohio”),應該有一個由美國控制的地區(qū)(“region_state:USA”)構成美國的俄亥俄地區(qū)。但我們正建立一個獨立的俄亥俄,所以所有涉及美國俄亥俄地區(qū)的數(shù)據(jù)都是無用的,會讓游戲弄混。我們要做的就是將“region_state:USA={”這一行行更改為“region_state:OSU={”,因此,這一節(jié)現(xiàn)在是這樣的:



Now, instead of telling the game that within the state region of Ohio we want to create a state controlled by the USA filled with the following buildings, we've told the game to create a state in Ohio that is just… Ohio, and that should be filled with the following buildings.

現(xiàn)在,我們不是告訴游戲,在俄亥俄地域的地區(qū),創(chuàng)建一個由美國控制的地區(qū),并填充以下建筑,而是告訴游戲在俄亥俄地域創(chuàng)建一個地區(qū),即……俄亥俄,并應填充以下建筑。


The same thing applies for common\history\pops. There's a 05_north_america.txt file we're gonna copy over, and we're going to find the STATE_OHIO entry, and change USA control to OSU.

在”common\history\pops”中也要進行同樣的事情。復制05_north_america.txt文件,找到STATE_OHIO條目,將控制者由美國(USA)改為俄亥俄(OSU)。


State history is all saved in a single file, so in common\history\states\ you're just going to copy over the entire 00_states.txt file into your mod directory, and again crack open the file and search for STATE_OHIO. There, you'll find this entry:

地區(qū)歷史都保存在一個文件中,因此在common\history\states\中,只需復制整個00_states.txt文件,將其放入模組目錄,然后再次打開該文件并搜索STATE_OHIO。在那里,可以找到以下條目:



A state is created out of provinces, which are all just x + whatever the hex code (a color expressed as six characters) for their province color is in the province map we used to create the whole map. In places like Ohio, there's only one state created per state region, but in places like Germany this section looks far more chaotic, as it is possible to create multiple states within a single state region. Don't think about Germany though, think about Ohio.

一個地區(qū)由省份組成,而表示省份的是x加上組成世界地圖的省份地圖中代表省份顏色的6位代碼(用6個字符表示顏色)。在俄亥俄這樣的地方,一個地域中只創(chuàng)建了一個地區(qū),而在諸如德意志這樣的地方則更加混亂,因為可以在一個地域中創(chuàng)建多個地區(qū)。不過為了方便理解還是別去想德意志了,先弄明白俄亥俄吧。


Hopefully you've picked up on the pattern of changes we've been doing- here again, we're just going to change that "country = c:USA" bit to "country = c:OSU", so that the whole STATE_OHIO section becomes

希望你已經(jīng)理解了我們正在進行的改動的套路——這里我們再將“country = c:USA”改為“country = c:OSU”,這樣整個STATE_OHIO一個就變成了:



Exciting! I wonder what happens if we start up the game now?

亦可賽艇!我很好奇如果現(xiàn)在打開游戲會是什么樣?


Checking our work

檢驗成果



First, we need to get the darn thing enabled in the launcher. Open up the launcher, add a new playset, and call it "ohio!" or the name of your choice.

首先我們需要在啟動器中啟用這個破玩意。打開啟動器,創(chuàng)建一個新的播放集并取名為“ohio!”或者你自己想取的名字。



The launcher's going to say that the playset looks empty, so click the "ADD MODS" button that appears, so you can add mods, and then add “It's Ohio!”

啟動器會提示播放集為空,因此我們點擊“添加mod”按鈕,這樣就能添加mod了,然后將“It's Ohio!”添加進去。


Make sure the playset is enabled, and then let's play the game and see what happens.

確認啟用了播放集后,我們就可以進入游戲看看會發(fā)生什么了。



Hold on… something feels wrong here. Let's quit out of the game, right-click on Vicky 3 in Steam, open up properties, and change the launch settings by plugging in "-debug_mode".

等等……好像有什么不對。我們先退出游戲——在Steam中點擊維多利亞3,打開屬性,然后將啟動設置改為“-debug_mode”。



This enables the error log to appear in game. Let's see what happens when we load up the game now.

這會允許在游戲中顯示錯誤日志。我們現(xiàn)在再打開游戲看看會怎樣。



We have errors! We'll open up the error log, which can be found at "...\Paradox Interactive\Victoria 3\logs\error.log", and let's take a look at the error messages. Any time you're working on a mod, I cannot emphasize enough how useful it is to run the game with debug mode on and do your best to resolve any issues reported in the error log.

出現(xiàn)了錯誤!讓我們在“...\Paradox Interactive\Victoria 3\logs\error.log”打開錯誤日志來看看其中的錯誤信息。當你在制作mod時,經(jīng)常通過調(diào)試模式進入游戲并盡量解決錯誤日志中出現(xiàn)的問題,其有用性是如何強調(diào)都不過分的。


Please read the error log and fix errors reported there. I'm not even talking to just potential V3 modders now. Please, I beg you… read the error logs and fix the errors reported there.

請你閱讀錯誤日志并修復其中的錯誤。這句話甚至不光是對未來的維多利亞3的mod制作者說的。求求你……讀一下錯誤日志并且修復其中的錯誤吧。


Anyways! In our case, there's four sources to these errors:

不管怎樣!在我們的案例中,有4個錯誤的原因:


By removing Ohio from the USA, we've reduced wine consumption enough that a scripted trade route that the USA starts with needs to be changed or removed. Easy enough, I'll copy the trade route history file over and remove that entry outright so I don't have to think about it anymore.
我們將俄亥俄移出了美國,使得葡萄酒的消費下降過多,因此游戲開始時美國建立的一條貿(mào)易路線需要進行更改或移除。這個很簡單,我只需要把貿(mào)易路線的歷史文件粘貼過來,再把這條進口路線完全移除,就再也不用擔心了。

I didn't localize the Ohio tag (OSU)! I'll get around to localization after fixing the next two items.
我沒有給俄亥俄tag(OSU)設置本地化文本!我會在修復以下兩條錯誤以后進行設定。

I've completely forgotten to add country history, so Ohio's technological know-how hasn't been defined at all.
我完全忘記了添加國家歷史,因此沒有對俄亥俄的科技水平作出任何設定。

Starting pop prosperity, located in a separate "populations" file, hasn't been defined for Ohio.
沒有對俄亥俄的初始人口繁榮度進行設定(在單獨的“populations”文件)。


Country histories cover technology and politics. To make this easy on myself and avoid scripting everything from scratch, I'm going to copy the country history of Ohio's natural counterpart at vanilla game start: Belgium. All I'm going to do is get to "common\history\countries\bel - belgium.txt" in the base game, copy that file over to the same path in the mod, rename it to "osu - ohio.txt", and open it up real quick. Inside, the file has a whole section enclosed within "c:BEL". That section contains several effects that set the starting laws and ruling interest groups of the country. I'm just gonna change that c:BEL there to c:OSU, so all those effects regarding politics and technology now apply to our OSU tag, then I'm gonna save the file and close out there.

國家歷史包括了科技和政治。為了減輕工作量而非從頭編寫一切,我會將原版游戲中與俄亥俄情況非常相似的比利時的國家歷史粘貼過來。我只需要從游戲中找到“common\history\countries\bel - belgium.txt”文件,將其粘貼到mod中的相同路徑,重命名為“osu - ohio.txt”,然后就可以打開這個文件。其中包含一個以“c:BEL”開頭的部分。這個部分通過多個效果設定了游戲開始時的法律和統(tǒng)治國家的利益集團。我只需要將c:BEL改成c:OSU,這樣那些政治和科技的效果就會應用于OSU,最后保存并退出文件。


The other history file I need to add is a population file. The population file contains some scripted effects which distribute health and literacy rates among a country's starting pops. We're going to find the Belgian one at "common\history\population\bel - belgium.txt". Like with the country history stuff, we're going to rename our copy to "osu - ohio.txt" (as long as it's named anything other than an existing history file, it won't accidentally overwrite anything, but keeping the same naming convention in place is useful for organization), and inside that file change the scope from c:BEL to c:OSU so the effects of the population file actually apply to Ohioans.

另外一個需要添加的歷史文件是人口文件。人口文件中編碼了一些效果來為全國的初始人口設定健康程度和識字率。我們找到比利時對應的“common\history\population\bel - belgium.txt”。和國家歷史一樣,粘貼并重命名為“osu - ohio.txt”(只要名字不和已有歷史文件重合,就不會錯誤覆蓋掉其他文件,但保持統(tǒng)一有助于管理),然后在文件中將作用域c:BEL改為c:OSU,這樣人口文件的效果就會應用在俄亥俄人上。


Speaking of "Ohioans", let's get that localization sorted. Base game localization is stored at "Victoria 3\game\localization" and further divided into the various languages the game is available in. I'm an Anglophone, so I'm going to default to English for this stuff. We're going to recreate the whole English-language localization folder path in our mod (so "It's Ohio!\localization\english"), then we're going to create our own little loc file to throw in there- let's call it ohio_l_english.yml just to stick to the theme. Now, all we need to add in that file is

說到“俄亥俄人”,我們來搞定國名的事。游戲中的本地化文件儲存在“Victoria 3\game\localization”中,并且按照游戲的語言進一步細分。我是說英語的,所以就默認設定在英語的文件中了。我們先在mod路徑中創(chuàng)建一個英語本地化文件夾(也就是“It's Ohio!\localization\english”),然后再在其中創(chuàng)建自己的迷你本地化文件——為了扣題我們就叫ohio_l_english.yml吧。下面需要向文件中寫入的就只有:



And now our country should have a name and an adjective!

現(xiàn)在我們的國家就有了自己的名稱和形容詞了!


Some of you folks with modding experience may have noticed that existing localization in our games tends to have a number after the colon in these localization entries (like 'FRA:0 "France" ', for example). Those numbers are just there to help us and our translators keep track of when entries are changed and require revised translations- they have no functional purpose beyond that, and if you're just modding in one language and don't intend to translate your mod with the same tools we use, there's no need for you to include that number bit after the colon.

一些具有mod制作經(jīng)驗的人可能會注意到,在原版的本地化文件中,通常在條目的冒號后面還會有一個數(shù)字(比如FRA:0 "France")。這些數(shù)字只是用來提醒我們和本地化小組每個條目何時經(jīng)歷了改動并且需要再次翻譯的——除此之外沒有實際意義,如果你只使用一種語言制作mod,并且沒有考慮過像我們一樣使用這種方法對你的mod進行翻譯,那么就沒有必要在冒號后面加上那個數(shù)字。


With those errors hopefully fixed, let's start up V3 again.

讓我們再次運行維多利亞3,并且希望這些錯誤都能被正確修正。



Ladies and gentlemen, we have Ohio. It still doesn't have a scripted flag- you can read more about how those work and are scripted here - but it's a country that functions. You could select Ohio and play as Ohio now, if you wanted, or you could elaborate further, and start writing events and journal entries. You could script up individual characters, or replace all Yankee pops in Ohio with your own bespoke Ohioan culture where everyone has names like "Bud" and "Janet". Explore the game itself, and the insides that make it all work!

女士們先生們,俄亥俄出現(xiàn)了。雖然依舊沒有腳本編寫設定的國旗——你可以在這里閱讀更多有關國旗的工作原理和編碼方法的內(nèi)容(開發(fā)日志#28)——但它已經(jīng)是一個可以運行的國家了。如果你想的話,現(xiàn)在就可以選擇俄亥俄開始游戲,或者也可以進一步精雕細琢,為其編寫一些事件和任務日志。你可以創(chuàng)建人物角色,或者將俄亥俄所有的揚基人口換成你獨家的俄亥俄文化(大家通常取名像是“巴德”或者“珍內(nèi)特”那樣的)。你可以探索游戲本身,以及驅(qū)動游戲運行的內(nèi)在邏輯!


In our Dev Diary next week, Paul will be talking about Data Visualization!

在下期開發(fā)日志中,Paul將會介紹有關數(shù)據(jù)可視化的內(nèi)容!



翻譯:格拉摩根伯爵 李勛回來了

校對:三等文官猹中堂


歡迎關注UP主和主播小牧Phenix!

歡迎關注牧游社微信公眾號和知乎專欄!微信公眾號改版為信息流,歡迎【置頂訂閱】不迷路,即時獲得推送消息!

B站在關注分組中設置為【特別關注】,將會在私信內(nèi)及時收到視頻和專欄投稿的推送!

歡迎加入牧有漢化,致力于為玩家社群提供優(yōu)質(zhì)內(nèi)容!組員急切募集中!測試群組822400145!? ?

本作品英文原文著作權屬Paradox interactive AB所有,中文譯文著作權屬牧有漢化所有。?

維多利亞3開發(fā)日志#60 | 9/29 模組的評論 (共 條)

分享到微博請遵守國家法律
昌宁县| 扶绥县| 日照市| 蓝田县| 出国| 碌曲县| 井陉县| 枣强县| 屯留县| 曲周县| 沂源县| 宁德市| 鹤岗市| 石林| 简阳市| 伊川县| 依安县| 榆社县| 山阳县| 桑植县| 肥东县| 女性| 本溪市| 广宗县| 建宁县| 华容县| 辽阳市| 麻城市| 门头沟区| 泸定县| 克什克腾旗| 湖州市| 凤山县| 鲜城| 皋兰县| 海城市| 邓州市| 贵州省| 栾城县| 湖南省| 丘北县|