替换已有派系建立新派系How to add a new faction replacing an existing
本帖最后由 thundersl 于 2012-3-31 23:25 编辑原文地址:http://www.twcenter.net/forums/showthread.php?p=6517960#post6517960
TWC上随便选了一篇文章,有空的话慢慢翻译。
After some requests I've decided to make this tutorial on " How to add a new faction replacing an existing one". As you might know it is not possible yet to add new elements such as factions, regions, cities, etc. But we can replace them making some more interesting starting positions.
数次要求之后我下定决心要做这个教程(如何替换已有派系建立新派系)。正如你可能知道,暂时还不可能在全面战争中加入新的元素例如派系、地区、城市等等,但是我们可以替换掉现有的,做几个更有趣的初始位置。
As an example I am going to use Finland that was replaced Saxony in my mod Sturm und Drang. The necessary tools for the modifications are:
我将在我的mod:Sturm and Drang中将芬兰分给萨克逊来举例。必要的修改工具如下:
1. EsfEditor 1.4.5:http://www.twcenter.net/forums/showthread.php?t=303205
2. PFM(Pack File Manager): http://www.twcenter.net/forums/showthread.php?t=234546
3. OpenOffice spreadsheet
4. Gimp
Other needed modifications that are included and more references about startpos.esf can be found herehttp://www.twcenter.net/forums/showthread.php?t=272139 . Since changes in startpos are always dangerous for errors I don't type the changes but I copy/paste them from a spread sheet that I have opened side by side with the editor, but that's me...
需要的关于startpos.esf(译者注:startpos应该是start position的简写,即初始位置)的其他修改工具在http://www.twcenter.net/forums/showthread.php?t=272139可以找到。因为在startpos中的修改经常非常危险易出错,我并不会直接输入这些改动,而是从一个与修改器一起打开的分析表中复制/粘贴,但是,这只是我的选择。。。
1. Preparing startpos.esf
1、准备startpos.esf文件
First you have to choose which faction is going to be replaced by the new one. Some good choices are minor factions which will not be so unhistorical if their regions are given to the proper nearby major faction. Here I choose Saxony and first thing is give to it the region of Finland. This can be done in two ways:
首先你要选择你要替换哪个派系。一些好的选择是小的派系,如果它们的地区被划到邻近的主要派系时,不会显著地不合历史事实。这里我选择了萨克逊,第一步是把芬兰地区分配给它,这可以有两种方法来完成:
a. The hard one is to edit the startpos and change Finland's region ownership from Sweden to Saxony following the proper modification (see STARTPOS ESF threadhttp://www.twcenter.net/forums/showthread.php?t=272139).
a. 难的一个是编辑startpos文件,根据适当的修改步骤,将芬兰的所属势力从瑞典(Sweden)更改为萨克逊(Saxony),见startpos esf这个帖子(http://www.twcenter.net/forums/showthread.php?t=272139)。
b. The easy one is making hybrid startpos which I'll follow. To make hybrid we need the original startpos and a saved game. For more details see in STARTPOS ESF thread. Here are the steps: Start the game as Sweden (owner of Finland), offer Finland to Saxony, save, exit, make hybrid. This is going to be the new startpos until a new hybrid is made.
b.简单的一种方法是我要采用的,创建混杂(杂交)初始位置。要创建混杂,我们需要原始的startpos以及一个游戏存档。更多的细节见前文提到的STARTPOS ESF的那个帖子。这里是具体步骤:开一个瑞典(芬兰的所有派系)的新档,将芬兰送给萨克逊(译者注:即要把什么地盘给另一个派系,用这个地盘本派系开档,然后将地盘送给目标派系。),保存,退出,创建混杂。在创建一个新的混杂之前,这将是新的初始位置。
c. Whatever way you choose open (new or modded) startpos with the editor go to REGION Saxony, note the region's Id then go in FACTION Saxony and make it faction's capital (see how to in STARTPOS ESF thread).
c.无论你选了哪个方法(新建或者修改已有的),用编辑器打开startpos,找到REGION Saxony(萨克逊地区),注意这个地区的Id(名字),到FACTION Saxony(萨克逊派系)部分将刚才那个地区设为首都(见startpos esf那个帖子(http://www.twcenter.net/forums/showthread.php?t=272139)。
d. Saxony has a starting army and two characters (gentleman and rake), all stationed in city capital. We have to remove them in Finland region. See "how to" in STARTPOS ESF thread. Here I'll repeat some important things about it, since I often receive messages about it. Moving an army to a new place means that we have to change the coordinates for the army and the leading character (general or colonel, sometimes both). The same stands for gentlemen and rakes who have an army record too. Character's position is found in startpos
萨克逊有初始军队和两个人物(绅士和浪子(难道是外交官和刺客??下面先按照字面意思翻译吧)),两个人物都在首都里。我们要把他们移动到芬兰地区。见startpos esf那个帖子(http://www.twcenter.net/forums/showthread.php?t=272139)。因为我经常收到一些消息,这里我要重复一些有关这个的重点。移动一支部队到新的地方意味着我们要更改军队的坐标以及带队人物(将军或上校,有时均有)。同样,对于萨克逊的这俩绅士和浪子,我们也要更改他们的军队记录。人物位置在startpos里面的如下位置可以找到:
[...]CAMPAIGN_ENV/CAMPAIN_MODEL/WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER/LOCOMOTABLE where there are two pairs of grids in the first 4 lines. Armies position is in
[...]CAMPAIGN_ENV/CAMPAIN_MODEL/WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER/LOCOMOTABLE
前四行里有坐标的两部分。部队位置如下:
[...]CAMPAIGN_ENV/CAMPAIN_MODEL/CAI_INTERFACE/CAI_WORLD/CAI_WORLD_RESOURCE_MOBILES/CAI_SITUATED
where in two first lines are the coordination and in third the CAI_REGION id. So if we want to change an army's position we have to enter new coordinates in the places I've noted above and the new CAI_REGION Id. Note that every sea has a CAI_REGION Id so removing navies is exactly the same. Another important thing is that if a character or army is stationed in a city there are some other entries that need to be changed in WORLD and CAI_WORLD fields but we shall avoid these to make things easier. There is one more serious reason that I will do this, which is that I've never managed to remove stationed characters like gentlemen or rakes in a new place.
[...]CAMPAIGN_ENV/CAMPAIN_MODEL/CAI_INTERFACE/CAI_WORLD/CAI_WORLD_RESOURCE_MOBILES/CAI_SITUATED
前两行里有坐标,第三行里有CAI_REGION的名字。如果我们想要更换一支军队的位置,我们要在上面提到的位置输入新的坐标值以及新的CAI_REGION名。注意,每片海域都有CAI_REGION名,所以移动海军部队和陆军一模一样。另一个重要的是,如果一个角色或者一支部队放在了一座城市里面,WORLD和CAI_WORLD里面的入口也要改,但我们会为了简单而避免这一点。我要这么干还有一个很严重的原因,因为我从未成功地将一个绅士或浪子放到新的地方。
So let's put all things together: in order to move the army plus general, gentleman and rake from Saxony to Finland I have to have available 3 new pairs of coordinates. Then I'll need to make the changes to startpos. Here is how I am doing these:
让我们将所有事情总结一下:为了将一支军队及其将军、绅士、浪子从萨克森移动到芬兰,我必须准备三组可用坐标,接下来我要更改startpos,一下是步骤:
d1. I start the game (using your new startpos) as Saxony and I move the army, character and rake out of the city. I save the game giving the name "hybrid" to saved_game but do not exit. I go in Finland (it already belongs to Saxony) and I recruit three units. Play the turn and move the new units in three deferent positions near the city. I save the game giving the name" grids" and exit. The hybrid saved game is going to be used for making hybrid startpos and grids saved_game to take the needed new coordinates.
d1.以萨克森进入游戏(用你的startpos),将军队、人物、浪子移出城市。保存游戏为“混杂”但不退出。到芬兰(已经属于萨克森了)招募三个单位。结束回合,将三个新单位移动到邻近游戏的三个不同位置,保存游戏为“格子”并退出。“混杂”这个档将用于制作混杂startpos,“格子”则用来提取需要的坐标。
Important Note: If gentleman and rake were not present I could simply disband the army here and save my time (and my nerves) from the next complex d2 step and d3. But since there is not a way to disband this kind of characters I have to go on d2, d3.
注意:如果这里不存在绅士和浪子,我只需简单地解散军队以为接下来复杂的d2和d3步节省时间(以及脑细胞。。。)。但既然无法解散这两种人物(我猜中了么?gentleman和rake就是指外交官和刺客么?),我继续进行d2和d3步骤。
EDIT: After I've finished this tutorial I saw some new ideas about deleting characters. So if next steps are too complex for you take a look here and here. If these ideas are working go straight to e. When you are in game delete army and characters and continue the tutorial. If you want to keep starting army and characters then proceed to next step d2.
d2. Before go on I need to have available the three CAI_ARMY Id's (CAI_WORLD_RESOURCE_MOBILES). This is a little tricky so here it is in details. I go first in [...]WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER and note the Id (first line) for every character. Then I go in CAI_WORLD/ CAI_WORLD_REGIONS to find Saxony's and Finland's record. The only tip I can give for an easy spotting of these CAI records is to open regions.esf (!!!) and count in what place in root/region_data/region list are these regions. Then count the list CAI_WORLD/ CAI_WORLD_REGIONS and spot them checking the name in CAI_WORLD_REGIONS/CAI_REGION. From Finland I need the CAI_REGION Id which is the number of the record and I note it down. From Saxony I want something else. I go in CAI_WORLD_REGIONS/CAI_REGION and I note the CAI_SETTLEMENT Id in 3rd line. Then I use it to find Saxony's CAI_SETTLEMENT record in CAI_WORLD_ SETTLEMENTS and go further in CAI_WORLD_ SETTLEMENTS/CAI_GARISSONABLE. In first line there is CAI_ARMY Id! This is the first sight of Ithaca but the Odyssey is not over yet. Using this I spot the CAI_WORLD_RESOURCE_MOBILES record of the army. I go there and in CAI_WORLD_RESOURCE_MOBILES/ CAI_RESOURCE_MOBILE I note the CAI_CHARACTER's Id in 1st line (this is for general). Although the nearby records are the other two cai armies needed there is only one way to be sure, since characters like gentlemen and rakes have not simple army Id to confirm it. Go in CAI_WORLD_ CHARACTERS/CAI_ CHARACTERS using the Id found for the general and spot it. Checking the nearby records using the characters Id's I've noted down from [...]WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER (9 digits, it should appear in CAI_WORLD_ CHARACTERS/CAI_ CHARACTERS 4th line) I can spot the records for gentleman and rake. In CAI_WORLD_ CHARACTERS/CAI_ CHARACTERS 1st line is the CAI_ARMY I am looking for so I note them down making sure to also note which cai army Id belongs to whom.
d3. Now the last thing I have to note are the new coordinates. I open the grids saved_game, go on WORLD/FACTION_ARRAY/FACTION(saxony)/CAHARCTER_ARRAY/CHARACTER and I spot the three colonels records which belong to the three new units I've made in the game at Finland region. In LOCOMOTABLE I find the new coordinates and note them down deciding which I'll give to whom.
d4. Using startpos and hybrid saved game I make a new hybrid startpos. I open it and go in Saxony's [...]WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER and I enter the new coordinates I've noted before (double enter in the first four lines). Then I go in CAI_WORLD_RESOURCE_MOBILES record for every character using the CAI_RESOURCE_MOBILE Id I've already found and in CAI_SITUATED I enter the new coordinates (checking to be the same that I've entered in CHARACTER's record) in the first 2 lines and in third the CAI_REGION Id for Finland which I've already found in step d2. Save and exit.
e. Start the game as Saxony and if everything is o.k. now I should have: Saxony faction owning two regions (Saxony and Finland), Finland as capital region, characters and army placed in Finland. I give Saxony region to Prussia, save and exit. I make the last hybrid startpos and I open it for the last couple but easy modifications. I go in [...]CAMPAIGN_PREOPEN_MAP_INFO/REGION_OWNERSHIP_BY_THEATRE and I change the owner for Finland from Sweden to Saxony, and for Saxony from Saxony to Prussia. Then I go in [...]WORLD/FACTION_ARRAY/FACTION(saxony)/FACTION_FLAG_AND_COLOURS and I change the R,G,B colors which the game will use on the map, in tooltips, e.t.c. You can open a program like paint.net (free) and in colors select the color that suits to your new faction and copy the R,G,B numbers. I picked a light blue (86, 173, 255). These numbers will be used also in mod.pack/db/faction_tables.
2. Preparing mod pack file.
Make a new folder and name it as you like e.g. mymod. Open patch.pack with PFM and extract db/factions_table and after that export as a TSV, pointing as destination for both mymod folder. Do the same for units_to_exclusive_faction_permissions, warscape_rigid_lod_tables and warscape_rigid_tables, extracting and exporting as TSV each table. Then open models.pack and extract rigidmodels/ campaignbuildings/campaignagenticons, flags/textures and naval/textures. Last open ui.pack and extract flags/saxony (in my case the old faction).
a. Open factions.TSV using a spreadsheet and go in the row with the faction. Live first two cells unchanged where the faction name and code are (Faction Id and Id2). In Category enter the proper entry using one of another faction with the same or similar culture with the new one. Here I use some of the entries for Sweden. In Type, Nation, Nationality enter the proper entries. Not all of these entries affect the game and many of them are just for info use. In Names enter the name_group for your new faction. If your new faction has names that there are not available (as it happened with me for Finland) then you have to make major changes in localisation.loc. Anyway here you should enter an existing group name since I haven't find a way to mod names_group table and add new groups. But in most case you'll find a suitable one. Change also Sounds with an appropriate entry, Icons for the units, in R1, G1, B1, ..., repeat the color numbers you've already used for startpos. In Group is determined the type of units the new faction will have. Names 1 live it as names_english and in Names 2 repeat the entry of Names. When you've done delete all factions rows except the one you've modded. Exit and save changes in TSV.
b. units_to_exclusive_faction_permissions.TSV. For Finland I've entered in faction table to use sweden_denmark_group units. But in Swedish army there are units that only Sweden can use. Also there is one that is Finnish. So in Unit Id ref column I keep only the specific Swedish units (e.g euro_dragoons_sweden, euro_heavy_cavalry_sweden, etc.) and the Swedish unit hakkapeliitat and delete all the rest. Using saxony/true I assign these units to be available also for Saxony. For hakkapelitat I make a second row using sweden/false so only Finland(Saxony) will have this unit. Exit and save changes in TSV.
c. warscape_rigid_lod_tables.TSV . Open it and short it in alphabetical order for easy control. Delete all rows and keep only the one that will have your old faction's agent model, in my case RigidModels/CampaignBuildings/CampaignAgentIcons/agent_ID_saxony.rigid_model. Exit and save changes in TSV.
d. warscape_rigid_tables.TSV. Repeat the same keeping only the agent texture, in my case agent_ID_saxony.
e. There are two ways making the flags files. One is to make new one, the second that I'll follow is changing the existing one. In mymod folder go in ui/flags and delete all folders except the old faction, in my case saxony. Here are all the flags that are used in game (campaign map, hud, menu, etc.). You have to make new tga's in the same dimensions and names as the existing, for your new faction's flag, using a program like gimp (free). All the animation flags (11 pieces) can be the same just with deferent name. This is made for the effect of the waving flag in faction selection menu and in Ai turn. There is no point to waste your time make it like this (if you can) just use the same 200 X 100 tga. On campaign and battle map flags will be waving in the wind. The only difficult are the these for hud and portraits. All the other are the same in deferent dimensions and names. So make first large.tga in 512X256 from an image of the flag you should have already and proceed with the rest.
g. In rigidmodels/ campaignbuildings/campaignagenticons folder delete all but the old faction agent model, in my case agent_id_saxony.rigid_model. In texture folder keep only the agent's dds, in my case agent_id_saxony_diffuse.dds. Open it with gimp and change the flag colors (copy a circle from one of your flags you've made already). This is for the flag on top of the agent on campaign map. In flags/textures keep only the files flags.tai, flags0.dds, 1,2,3, naval_id.tai and naval_id0.dds. Find in which flagsX.dds is the old faction's flag. Then copy over it the latge.tga (512X256) you've already made. In naval_id0.dds replace the circle flag that will be shown on top of the ships. In naval/textures keep only faction's dds in my case ensign_saxony_diffuse.dds. Change this also using the large.tga and remaking the side long triangle flags.
h. Now we have everything we need to make the mod.pack file. Open PFM and make new pack file, pointing mymod folder. Choose a Pack Action/Change pack type and mark mod. Save the file as the name you like but you have to save it in mymod folder and do not exit. Right click on pack file and add directory. Add all folders that there are in mymod folder. Save. Expand db and go in db/factions table, import TSV and point factions.TSV file. Repeat with all db tables. Save. Open again db and rename every table. For example call my_factions, factions table, etc. Do this for all (and only) db tables. Save the file.
3. Preparing localisation.loc
Open patch_en.pack with PFM extract localisation_loc in mymod folder and also export as TSV. Close PFM and open localisation.TSV. Sort it in alphabetical order. Then find the entries factions_screen_adjective_xxxxxx and factions_screen_name_xxxxxx and enter in column B the appropriate names for your new faction. Exit and save TSV. Open PFM and make a new pack file of type movie this time. Save it is as the name you like but in mymod folder. Then add directory text and then import localisation.TSV in text/localisation_loc table..
Now you are ready to see your new faction. Place the two pack files you make in ETW/data folder. Start the game with Mod Manager marking your new mod to be activated. Enjoy your new faction with the proper name, flag and colors.
Other changes.
There are some other changes that have to be done in some cases. If your new faction uses deferent group names than the old then the existing characters will still have the old names. To correct that you have to edit startpos and change all names in FAMILY and CHARACTERS using new names from localisation.loc. Another element might be religion. Here you have to change the religion in FACTION record, in FAMILY records and in the REGION/POPULATION record of the new faction. Also the same maybe is needed to be done about type of government, diplomatic relations, etc. Most of these changes are in startpos FACTION record. In my mod Sturm und Drang you can see in the pack file the structure of it. There I've added three new faction until now and I've just changed some elements of three existing Italian faction as well. 这个英文好多{:soso_e145:} lija6868 发表于 2012-3-7 15:20 static/image/common/back.gif
这个英文好多
比未命名兄翻译的那个金刚兄的手册短多了 支持一下 :L英文 英文从未及格的人路过:dizzy: 假装 发表于 2012-3-7 16:57 static/image/common/back.gif
英文
我会慢慢把它译成中文的 期待雷的翻译大作{:5_113:} freefen 发表于 2012-3-11 14:18 static/image/common/back.gif
期待雷的翻译大作
哎,最近学业繁忙。。。 本帖最后由 thundersl 于 2012-3-13 23:57 编辑
555,焦虑死了,前途不明,连到论坛上翻译个帖子都没时间和心情了。。。
bless我被大雨淋个透吧! thundersl 发表于 2012-3-13 23:55 static/image/common/back.gif
555,焦虑死了,前途不明,连到论坛上翻译个帖子都没时间和心情了。。。
bless我被大雨淋个透吧! ...
不急,慢慢来,我当初不爽的时候就打打魔戒,HTB找找快感 未命名 发表于 2012-3-15 21:09 static/image/common/back.gif
不急,慢慢来,我当初不爽的时候就打打魔戒,HTB找找快感
嗯,谢谢侬的鼓励~
页:
[1]