中华MOD网

 找回密码
 立即加入

QQ登录

只需一步,快速开始

查看: 3946|回复: 3

[模型/地图/建筑] 给RTW 1.5增加全新建筑(第一部分环境建筑)(翻译完毕)

[复制链接]
发表于 2011-6-7 11:37:04 | 显示全部楼层 |阅读模式
本帖最后由 freefen 于 2011-6-9 13:49 编辑

看英文教程翻译区这么冷清 ,过来凑个热闹。
做为接触全战系列不到2个月的菜鸟,只是因为爱全战 爱论坛 才来献丑的!!有什么不对 请您指正!!
部分术语我会用自己的理解加以意译 ,不对请指正!!

找来找去找了个稍微新一点帖子,发于 March 25, 2011, 09:17 PM
Title: Krn3ll Guide to add brand new buildings to RTW 1.5
原帖地址  http://www.twcenter.net/forums/showthread.php?t=437930

这个帖子只翻译了第一部分
第二部分http://bbs.3mod.org/thread-16885-1-1.html (这个篇幅比较长)

原文在一楼
译文在二楼 三楼

Modding area: Buildings (strategic - battle map)
Required software: Notepad (or other text editor), 3dmax, graphic editor like photoshop or GIMP
Summary: This tutorial explains how to add totally new buildings to the gameplay, both in strategic and battle map modes.

PREMISE:
Just to be clear: I will NOT explain HOW to model buildings here, just how to add them to the gameplay. Specifically, I will explain step to step how to:
Add new buildings in the building tree of the game
Add their 3d models to the building DB so that they will appear in game

Before starting, keep in mind there are different type of buildings you can add to the game.

Ambient Buildings are the simpler ones. They need much less steps then the others. They can’t have recruiting capabilities, they can’t have bonus capabilities, they do not affect campaign game and in battles they are merely obstacles for troops or scenario decorations and they are discussed in this tutorial.

Game Buildings are the ones buildable by the players during the game in the settlements. They affect both campaign and battle game, and they are discussed in this tutorial.

Special buildings are walls and towers and they are somehow more complicated to manage due to their multiple features. They will not be discussed here, you can check my Wall Modding tutorial there:
-->Krn3ll's RTW wall modding guide






ADDING AMBIENT BUILDINGS TO RTW


adding ambient buildings
RTW host some buildings which are there just for decoration purposes. They shall indeed be improved to make them fully interactive with the game, host units or force passages in a city map, but those features will not be discussed here. Here I will only explain how to add or modify those models.

Files involved:
data\descr_items.db
data\descr_items.txt
data\descr_items\di_*.txt
data\descr_building_battle.txt
data\descr_building_battle\dbb_*_buildings.txt
data\settlement_plans\*CITYNAME*_plan.txt


As always, remember to backup those files before changing them, so if things go wrong you can always restore original situation.

We assume you already have the new model you want to add to the game.
Ambient buildings do not need specific text string nor they need to be added to any game related tree.
To have them in the game all you need is to have the models, register them in the game db and place them in the settlement plan where you want them to show up.

Lets say you want your new “MYHOUSE.cas” model in the game.

Put your "MYHOUSE.cas" model in Data\models_building and if it uses new textures put them in Data\models_building\textures.

1. open data\descr_items.txt
Add a line like “include di_MYOWN_buildings.txt”
Save and close

2. create a file named “di_MYOWN_buildings.txt”
Type in it:
Code:
type                MYHOUSE lodmax_distance        4000.0model_rigid        MYHOUSE.cas
Save it in data\descr_items\ folder and close

3. open data\descr_building_battle.txt
Add a line like “include dbb_MYOWN_buildings.txt”
Save and close

4. create a file named “dbb_MYOWN_buildings.txt”
Type in it:
Code:
MYHOUSE    {        stat_cat large_stone        localised_name ambient        level        {            min_health 1            battle_stats            item MYHOUSE            physical_info info_roman_small_temple.cas        }        transition default_large_stone        level        {            min_health 0            battle_stats            item roman_rubble_112x64            physical_info info_roman_rubble_112x64.cas        }    }

Three notes here:
- the string “physical_info” tells the game which INFO file to be used to define some features of the building. In the example I put the “info_roman_small_temple.cas” but you’ll need to put there one compatible cas model with your own building.
If you are not able to create your own INFO files you’ll have to add here an existing INFO file, so chose one of an item which have similar dimension of your model, or you’ll have weird results in game.
I will discuss how to create the INFO files for your buildings in another tutorial, I’ll post here a link when its ready.

- the “stat_cat” string tells the game the stats of resistance to damage of your building.
The stats I knew of are:
small_wooden
medium_wooden
small_stone
medium_stone
large_stone

- the “transition” paragraph tells the game what happens if your building is damaged/destroyed during battle. If you want it to be damageable/destroyable you’ll need either to create another model of your building remains when destroyed or to use in such paragraph the model of an existing building remains. If it’s the latter, pick the remains of a model with compatible dimensions. The “level” string is the level of damage of the building. You can add there more then one level of damage along with more then one model of your partially damaged building.
if you don’t want your new building to be damageable/destroyable, use such code:
Code:
MYHOUSE    {        stat_cat indestructable        localised_name ambient        level        {            min_health 1            battle_stats            item MYHOUSE.cas            physical_info info_roman_small_temple.cas        }    }
Save your “dbb_MYOWN_buildings.txt” into data\descr_building_battle\ folder and close it.

5. Now you have to put your new building in some settlement plan where you’ll see it in game. Go to
data\settlement_plans\ folder and open the settlement plan of the type where you want your building to show up.

In the *_plan.txt file are defined all the features related to that specific settlement plan type. Look for the “;AMBIENT” comment line, usually there are already some ambient buildings set there. If there’s no one, just add it at the end of the file, BUT be sure to add it INSIDE the last “}” which closes the file.
Add a line like this:
“MYHOUSE, 140, 150, 180.0, 0.0”
This string tells the game to put the model item “MYHOUSE” in that settlement map, at cords x 140 y 150, to rotate it of 180 degrees on his z axis and to have it at 0 meters altitude. You shall have a view of the settlement before deciding those parameters, otherwise your model shall be placed under a hill or collide with other buildings already present in that settlement at such position, or be put on a road and stop the passage of troops.

If you are just replacing some existing models with your one, then simply replace their names with your model’s name and use their original coordinates as they are in the settlement_plan.


Once all those tasks are done, save all, backup your descr_items.db file, rename or delete it and start the game. Game will freeze at starting screen or show errors, just ctrl-alt-canc, kill it, restart it. If you did everything correctly, You should have your buildings in the game.

评分

参与人数 1金币 +800 名望 +1 智力 +2 收起 理由
⑨道 + 800 + 1 + 2 这个是两个帖子的评分+额外奖励通行证换算.

查看全部评分

发帖求助前要善用【网站搜索】功能,那里可能会有你要找的答案

中华MOD网推荐搜索:https://kan.1mod.org/

中华MOD网新浪微博:https://weibo.com/1mod

中华MOD网推荐浏览器点击我下载

中华MOD网腾讯微信:All1mod 或首页左边

中华MOD网游戏帮助Q群:218311682

 楼主| 发表于 2011-6-7 11:37:49 | 显示全部楼层
本帖最后由 freefen 于 2011-6-8 11:04 编辑

译文:
Modding area: Buildings (strategic - battle map)
Required software: Notepad (or other text editor), 3dmax, graphic editor like photoshop or GIMP
Summary: This tutorial explains how to add totally new buildings to the gameplay, both in strategic and battle map modes
修改区域:建筑(战略—战役地图)
需要软件: Notepad (或其他文本编辑器),3dmax,图形编辑器如 photoshop 或GIMP
概要:这个教程解释了,在战略地图模式和战役地图模式中,怎样给游戏设置增加全新建筑。

PREMISE:
Just to be clear: I will NOT explain HOW to model buildings here, just how to add them to the gameplay. Specifically, I will explain step to step how to:
Add new buildings in the building tree of the game
Add their 3d models to the building DB so that they will appear in game
前提
事先说明:我不会解释怎样去弄模型建筑,我只把他们增加到游戏设置。我将会具体解释一个个步骤:
把新建筑增加到游戏的建筑树里
增加它们3D模型到建筑DB,让它们在游戏中出现


Before starting, keep in mind there are different type of buildings you can add to the game.

Ambient Buildings are the simpler ones. They need much less steps then the others. They can’t have recruiting capabilities, they can’t have bonus capabilities, they do not affect campaign game and in battles they are merely obstacles for troops or scenario decorations and they are discussed in this tutorial.


开始之前,请注意,你可以在游戏里添加不同类型的建筑。
环境建筑是其中比较简单的一种。它们比其它建筑需要的步骤相对少一些。它们不具有招兵能力和提高兵种属性能力(这句意译).它们不会影响游戏战略和战役。只是作为部队障碍物,或者是剧本的装饰。在这个教程中讨论一下环境建筑。


ADDING AMBIENT BUILDINGS TO RTW

adding ambient buildings
RTW host some buildings which are there just for decoration purposes. They shall indeed be improved to make them fully interactive with the game, host units or force passages in a city map, but those features will not be discussed here. Here I will only explain how to add or modify those models.



增加环境建筑
RTW中一些建筑只起到装饰的目的。它们被加进游戏,是为了提高和主机单位或城市地图信息之间互动的需要。
在这里,我们不讨论这些特点,我只解释怎么增加或修改这些模型。

Files involved:
data\descr_items.db
data\descr_items.txt
data\descr_items\di_*.txt
data\descr_building_battle.txt
data\descr_building_battle\dbb_*_buildings.txt
data\settlement_plans\*CITYNAME*_plan.txt


As always, remember to backup those files before changing them, so if things go wrong you can always restore original situation.
关联文件:
如上~~~~~~
和往常一样,在修改它们之前先备份,如果出现什么错误就可以恢复到原始状态。

We assume you already have the new model you want to add to the game.
Ambient buildings do not need specific text string nor they need to be added to any game related tree.
To have them in the game all you need is to have the models, register them in the game db and place them in the settlement plan where you want them to show up.
我们假定你已经有了要增加到游戏的新模型。
环境建筑不需要特别的文件信息串,它们只需要增加到跟游戏关联的信息树。准备好你需要在游戏里出现的模型,在
游戏db注册并放入你需要它们出现的协议计划里。

Lets say you want your new “MYHOUSE.cas” model in the game.
Put your "MYHOUSE.cas" model in Data\models_building and if it uses new textures put them in Data\models_building\textures.
比如说你让你的新模型“MYHOUSE.cas”加入游戏。
把你的模型“MYHOUSE.cas”放入Data\models_building ,假如它用了新贴图,那就把它们放入Data\models_building\textures

1. open data\descr_items.txt
Add a line like “include di_MYOWN_buildings.txt”
Save and close
1、打开data\descr_items.txt
加入这样一行   “include di_MYOWN_buildings.txt”
保存关闭


发帖求助前要善用【网站搜索】功能,那里可能会有你要找的答案

中华MOD网推荐搜索:https://kan.1mod.org/

中华MOD网新浪微博:https://weibo.com/1mod

中华MOD网推荐浏览器点击我下载

中华MOD网腾讯微信:All1mod 或首页左边

中华MOD网游戏帮助Q群:218311682

 楼主| 发表于 2011-6-7 11:41:13 | 显示全部楼层
本帖最后由 freefen 于 2011-6-8 11:07 编辑

2. create a file named “di_MYOWN_buildings.txt”
Type in it:
Code:
type                MYHOUSE lodmax_distance        4000.0model_rigid        MYHOUSE.cas
Save it in data\descr_items\ folder and close
2、创建一个名叫“di_MYOWN_buildings.txt”文件
输入代码:
type                MYHOUSE lodmax_distance        4000.0model_rigid        MYHOUSE.cas
把它保存data\descr_items\ folder 底下 并保存

3. open data\descr_building_battle.txt
Add a line like “include dbb_MYOWN_buildings.txt”
Save and close
3、打开data\descr_building_battle.txt
加入这样一行  “include dbb_MYOWN_buildings.txt”
保存关闭

4. create a file named “dbb_MYOWN_buildings.txt”
Type in it:
Code:
MYHOUSE    {        stat_cat large_stone        localised_name ambient        level        {            min_health 1            battle_stats            item MYHOUSE            physical_info info_roman_small_temple.cas        }        transition default_large_stone        level        {            min_health 0            battle_stats            item roman_rubble_112x64            physical_info info_roman_rubble_112x64.cas        }    }
4、创建一个名叫 “dbb_MYOWN_buildings.txt”文件
输入代码:
MYHOUSE    {        stat_cat large_stone        localised_name ambient        level        {            min_health 1            battle_stats            item MYHOUSE            physical_info info_roman_small_temple.cas        }        transition default_large_stone        level        {            min_health 0            battle_stats            item roman_rubble_112x64            physical_info info_roman_rubble_112x64.cas        }    }

Three notes here:
- the string “physical_info” tells the game which INFO file to be used to define some features of the building. In the example I put the “info_roman_small_temple.cas” but you’ll need to put there one compatible cas model with your own building.
这里做三个注释:
信息串“physical_info” 告诉游戏,哪一个“INFO”文件被用来描述建筑的一些特征。在例子中,我加入 “info_roman_small_temple.cas” ,你需要在那儿放一个与你的建筑想匹配的cas模型。

If you are not able to create your own INFO files you’ll have to add here an existing INFO file, so chose one of an item which have similar dimension of your model, or you’ll have weird results in game.
I will discuss how to create the INFO files for your buildings in another tutorial, I’ll post here a link when its ready.
假如你没有创建你自己的 INFO 文件,你将不得不在这里用一个现有的INFO文件,因此选择其中在你模型里规格比较小
的项目。否则,在游戏里将会有异常结果。
我将在另外一个教程论述如何为你的建筑创建一个INFO文件,当它准备好,我会在这里放一个链接。

- the “stat_cat” string tells the game the stats of resistance to damage of your building.
The stats I knew of are:
small_wooden
medium_wooden
small_stone
medium_stone
large_stone
信息串 “stat_cat”告诉游戏损坏你的建筑所需要阻力的统计信息。
我知道的统计信息是:
small_wooden
medium_wooden
small_stone
medium_stone
large_stone

- the “transition” paragraph tells the game what happens if your building is damaged/destroyed during battle. If you want it to be damageable/destroyable you’ll need either to create another model of your building remains when destroyed or to use in such paragraph the model of an existing building remains. If it’s the latter, pick the remains of a model with compatible dimensions. The “level” string is the level of damage of the building. You can add there more then one level of damage along with more then one model of your partially damaged building.
这个 “transition”段落告诉游戏在战斗中你的建筑被损坏/破坏。假如你想它被损坏/破坏,你需要给你的建筑创建一个当它被破坏时的残骸模型,或者用这样一段现成的残骸模型,一个与之尺寸相匹配的残骸模型。这个 “level”信息串是建筑被破坏的程度。你可以给你的建筑增加更多的不同破坏程度模型(这句纯意译,外国人废话太多)。

if you don’t want your new building to be damageable/destroyable, use such code:
Code:
MYHOUSE    {        stat_cat indestructable        localised_name ambient        level        {            min_health 1            battle_stats            item MYHOUSE.cas            physical_info info_roman_small_temple.cas        }    }
Save your “dbb_MYOWN_buildings.txt” into data\descr_building_battle\ folder and close it.
假如你不想让你的新建筑被损坏或破坏,就用这样一段代码:
MYHOUSE    {        stat_cat indestructable        localised_name ambient        level        {            min_health 1            battle_stats            item MYHOUSE.cas            physical_info info_roman_small_temple.cas        }    }
Save your “dbb_MYOWN_buildings.txt” into data\descr_building_battle\ folder and close it.

5. Now you have to put your new building in some settlement plan where you’ll see it in game. Go to
data\settlement_plans\ folder and open the settlement plan of the type where you want your building to show up.
现在,你不得不把你的新建筑放入让它游戏里出现的地方协议计划。进入data\settlement_plans\ folder
并打开解决你想让你的建筑出现在哪里的计划。

In the *_plan.txt file are defined all the features related to that specific settlement plan type. Look for the “;AMBIENT” comment line, usually there are already some ambient buildings set there. If there’s no one, just add it at the end of the file, BUT be sure to add it INSIDE the last “}” which closes the file.
在“*_plan.txt ”文件,它确定了跟特殊解决计划类型相关联的所有特征。查找“;AMBIENT”注释行,它通常已经在那儿准备好一些环境建筑。假如没有,只要文件末尾增加它,但是确信是加在“}”之后,那个关掉的文件。

Add a line like this:
“MYHOUSE, 140, 150, 180.0, 0.0”
This string tells the game to put the model item “MYHOUSE” in that settlement map, at cords x 140 y 150, to rotate it of 180 degrees on his z axis and to have it at 0 meters altitude. You shall have a view of the settlement before deciding those parameters, otherwise your model shall be placed under a hill or collide with other buildings already present in that settlement at such position, or be put on a road and stop the passage of troops.
增加像这样一行:
“MYHOUSE, 140, 150, 180.0, 0.0”
这个信息串告诉游戏在设定好的地图放入标题为“MYHOUSE”的模型,坐标为x140y150并以它的Z轴旋转180度,并处于0高度。在设定这些参数之前,你要好好观察一下,否则你的模型可能被放在小山下面或与已经设定好放置在这里的建筑冲突,
或放在路上并阻挡部队的通道。

If you are just replacing some existing models with your one, then simply replace their names with your model’s name and use their original coordinates as they are in the settlement_plan.
假如你只是替换一些现成的模型,那只要简单替换它们的名字在你的模型名字,并用它们设定好计划的原始的坐标。

Once all those tasks are done, save all, backup your descr_items.db file, rename or delete it and start the game. Game will freeze at starting screen or show errors, just ctrl-alt-canc, kill it, restart it. If you did everything correctly, You should have your buildings in the game.
到此所有的任务完成,全部保存,备份你“descr_items.db ”文件,重命名或删掉它并开始游戏。游戏将冻结开始的屏幕或
显示错误,只要按ctrl-alt-canc,关掉它,重启。假如你做地过程都是正确的,在游戏里将会出现你的建筑。

发帖求助前要善用【网站搜索】功能,那里可能会有你要找的答案

中华MOD网推荐搜索:https://kan.1mod.org/

中华MOD网新浪微博:https://weibo.com/1mod

中华MOD网推荐浏览器点击我下载

中华MOD网腾讯微信:All1mod 或首页左边

中华MOD网游戏帮助Q群:218311682

发表于 2012-6-13 15:15:03 | 显示全部楼层
有没有效果图啊?~!

发帖求助前要善用【网站搜索】功能,那里可能会有你要找的答案

中华MOD网推荐搜索:https://kan.1mod.org/

中华MOD网新浪微博:https://weibo.com/1mod

中华MOD网推荐浏览器点击我下载

中华MOD网腾讯微信:All1mod 或首页左边

中华MOD网游戏帮助Q群:218311682

回复 鲜花 砖头

使用道具 举报

您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

关闭

站长推荐上一条 /2 下一条

QQ|Archiver|手机版|手机专用客户端|中华MOD官网

GMT+8, 2024-11-21 23:26

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表