创建群组



在地图中,很多物件都是通过创建群组来创建的,例如土著部落或宗教地点,弑君战开局的城墙等。在地图中放置群组比放置物件后面多了一个定义,那个就是群组名称,这个定义不是乱填的,而是根据群组文件的名称来填写,那么如何查找这些群组名称呢?打开游戏目录/RM3/groupings文件夹,里面所有xml文件都是一个独立的群组,文件名就是群组名称(不包括.xml后缀名)。我在下面已经整理了帝国3官方版本所有群组名称,如果需要就自己调用:


Araucania_HerdablePen 1 阿劳卡尼亚-骆马畜栏 1 native jesuit mission cj 01 本州岛-耶稣会1
Araucania_HerdablePen 2 阿劳卡尼亚-骆马畜栏 2 native jesuit mission cj 02 本州岛-耶稣会2
Araucania_HerdablePen 3 阿劳卡尼亚-骆马畜栏 3 native jesuit mission cj 03 本州岛-耶稣会3
Araucania_HerdablePen 4 阿劳卡尼亚-骆马畜栏 4 native jesuit mission cj 04 本州岛-耶稣会4
BerryPatch 1 浆果丛 1 native jesuit mission cj 05 本州岛-耶稣会5
BerryPatch 2 浆果丛 2 native klamath village 1 克拉马部落 1
BerryPatch 3 浆果丛 3 native klamath village 2 克拉马部落 2
BerryPatch 4 浆果丛 4 native klamath village 3 克拉马部落 3
casualties_01 伤员人员 1 native klamath village 4 克拉马部落 4
casualties_02 伤员人员 2 native klamath village 5 克拉马部落 5
casualties_03 伤员人员 3 native lakota village 1 拉科塔部落 1
casualties_04 伤员人员 4 native lakota village 2 拉科塔部落 2
casualties_05 伤员人员 5 native lakota village 3 拉科塔部落 3
casualties_06 伤员人员 6 native lakota village 4 拉科塔部落 4
casualties_07 伤员人员 7 native lakota village 5 拉科塔部落 5
casualties_08 伤员人员 8 native mapuche village 1 马普切部落 1
casualties_cart01 伤员人员推车 1 native mapuche village 2 马普切部落 2
casualties_cart02 伤员人员推车 2 native mapuche village 3 马普切部落 3
casualties_coffins_01 伤员人员棺材 1 native mapuche village 4 马普切部落 4
clifftest 悬崖测试 native mapuche village 5 马普切部落 5
clifftest2 悬崖测试2 native maya village 1 玛雅部落 1
gl_silvermine01 大湖区-银矿1 native maya village 2 玛雅部落 2
gl_silvermine_2 大湖区-银矿2 native maya village 3 玛雅部落 3
gp_bigpatch 大平原-大草地 native maya village 4 玛雅部落 4
gp_bigpatch02 大平原-大草地 2 native maya village 5 玛雅部落 5
gp_bigpatch03 大平原-大草地 3 native navajo village 1 纳瓦霍部落 1
gp_carcass_bison 大平原-野牛尸体 native navajo village 2 纳瓦霍部落 2
gp_dry_bigpatch04 大平原-干燥的大草地 4 native navajo village 3 纳瓦霍部落 3
gp_dry_bigpatch05 大平原-干燥的大草地 5 native navajo village 4 纳瓦霍部落 4
gp_dry_bigpatch06 大平原-干燥的大草地 6 native navajo village 5 纳瓦霍部落 5
gp_dry_bigpatch07 大平原-干燥的大草地 7 native nootka village 1 努特卡部落 1
gp_dry_bigpatch08 大平原-干燥的大草地 8 native nootka village 2 努特卡部落 2
gp_dry_bigpatch09 大平原-干燥的大草地 9 native nootka village 3 努特卡部落 3
gp_flower01 大平原-花朵?? 1 native nootka village 4 努特卡部落 4
gp_flower02 大平原-花朵?? 2 native nootka village 5 努特卡部落 5
gp_flower03 大平原-花朵?? 3 native seminole village 1 塞米诺尔部落 1
gp_flower04 大平原-花朵?? 4 native seminole village 2 塞米诺尔部落 2
gp_flower05 大平原-花朵?? 5 native seminole village 3 塞米诺尔部落 3
gp_flower06 大平原-花朵?? 6 native seminole village 4 塞米诺尔部落 4
gp_flower07 大平原-花朵?? 7 native seminole village 5 塞米诺尔部落 5
gp_flower08 大平原-花朵?? 8 native shaolin temple mongol 01 蒙古-少林寺 1
gp_grasspatch01 大平原-草地 1 native shaolin temple mongol 02 蒙古-少林寺 2
gp_grasspatch02 大平原-草地 2 native shaolin temple mongol 03 蒙古-少林寺 3
gp_grasspatch03 大平原-草地 3 native shaolin temple mongol 04 蒙古-少林寺 4
gp_grasspatch04 大平原-草地 4 native shaolin temple mongol 05 蒙古-少林寺 5
gp_grasspatch05 大平原-草地 5 native shaolin temple yr 01 黄河-少林寺 1
gp_grasspatch06 大平原-草地 6 native shaolin temple yr 02 黄河-少林寺 2
gp_grasspatch07 大平原-草地 7 native shaolin temple yr 03 黄河-少林寺 3
great plains native 大平原土著 native shaolin temple yr 04 黄河-少林寺 4
igc_treasure_ship 寻宝船 native shaolin temple yr 05 黄河-少林寺 5
Iroquois SPC Scenario 11 剧情-易洛魁部落 native sufi mosque borneo 1 婆罗洲-苏菲派 1
native apache village 1 阿帕切部落 1 native sufi mosque borneo 2 婆罗洲-苏菲派 2
native apache village 2 阿帕切部落 2 native sufi mosque borneo 3 婆罗洲-苏菲派 3
native apache village 3 阿帕切部落 3 native sufi mosque borneo 4 婆罗洲-苏菲派 4
native apache village 4 阿帕切部落 4 native sufi mosque borneo 5 婆罗洲-苏菲派 5
native apache village 5 阿帕切部落 5 native sufi mosque deccan 1 德干高原-苏菲派 1
native aztec village 1 阿兹特克部落 1 native sufi mosque deccan 2 德干高原-苏菲派 2
native aztec village 2 阿兹特克部落 2 native sufi mosque deccan 3 德干高原-苏菲派 3
native aztec village 3 阿兹特克部落 3 native sufi mosque deccan 4 德干高原-苏菲派 4
native aztec village 4 阿兹特克部落 4 native sufi mosque deccan 5 德干高原-苏菲派 5
native aztec village 5 阿兹特克部落 5 native sufi mosque mongol 1 蒙古-苏菲派 1
native bhakti village 1 虔诚派 1 native sufi mosque mongol 2 蒙古-苏菲派 2
Native Bhakti village 2 虔诚派 2 native sufi mosque mongol 3 蒙古-苏菲派 3
Native Bhakti Village 3 虔诚派 3 native sufi mosque mongol 4 蒙古-苏菲派 4
Native Bhakti Village 4 虔诚派 4 native sufi mosque mongol 5 蒙古-苏菲派 5
Native Bhakti Village 5 虔诚派 5 native tupi village 1 图皮部落 1
native bhakti village ceylon 1 锡兰-虔诚派 1 native tupi village 2 图皮部落 2
native bhakti village ceylon 2 锡兰-虔诚派 2 native tupi village 3 图皮部落 3
native bhakti village ceylon 3 锡兰-虔诚派 3 native tupi village 4 图皮部落 4
native bhakti village ceylon 4 锡兰-虔诚派 4 native tupi village 5 图皮部落 5
native bhakti village ceylon 5 锡兰-虔诚派 5 native udasi village 1 优陀西派 1
native bhakti village himal 1 喜马拉雅山脉-虔诚派 1 native Udasi village 2 优陀西派 2
native bhakti village himal 2 喜马拉雅山脉-虔诚派 2 native udasi village 3 优陀西派 3
native bhakti village himal 3 喜马拉雅山脉-虔诚派 3 native udasi village 4 优陀西派 4
native bhakti village himal 4 喜马拉雅山脉-虔诚派 4 native udasi village 5 优陀西派 5
native bhakti village himal 5 喜马拉雅山脉-虔诚派 5 native udasi village himal 1 喜马拉雅山脉-优陀西派 1
native carib village 01 雪地加勒比部落 1 native Udasi village himal 2 喜马拉雅山脉-优陀西派 2
native carib village 02 雪地加勒比部落 2 native udasi village himal 3 喜马拉雅山脉-优陀西派 3
native carib village 03 雪地加勒比部落 3 native udasi village himal 4 喜马拉雅山脉-优陀西派 4
native carib village 04 雪地加勒比部落 4 native udasi village himal 5 喜马拉雅山脉-优陀西派 5
native carib village 05 雪地加勒比部落 5 native zapotec village 1 萨波特克部落 1
native carib village 1 加勒比部落 1 native zapotec village 2 萨波特克部落 2
native carib village 2 加勒比部落 2 native zapotec village 3 萨波特克部落 3
native carib village 3 加勒比部落 3 native zapotec village 4 萨波特克部落 4
native carib village 4 加勒比部落 4 native zapotec village 5 萨波特克部落 5
native carib village 5 加勒比部落 5 native zen temple ceylon 01 锡兰-禅宗1
native cherokee village 1 切罗基部落 1 native zen temple ceylon 02 锡兰-禅宗2
native cherokee village 2 切罗基部落 2 native zen temple ceylon 03 锡兰-禅宗3
native cherokee village 3 切罗基部落 3 native zen temple ceylon 04 锡兰-禅宗4
native cherokee village 4 切罗基部落 4 native zen temple ceylon 05 锡兰-禅宗5
native cherokee village 5 切罗基部落 5 native zen temple cj 01 本州岛-禅宗1
native cheyenne village 1 夏延部落 1 native zen temple cj 02 本州岛-禅宗2
native cheyenne village 2 夏延部落 2 native zen temple cj 03 本州岛-禅宗3
native cheyenne village 3 夏延部落 3 native zen temple cj 04 本州岛-禅宗4
native cheyenne village 4 夏延部落 4 native zen temple cj 05 本州岛-禅宗5
native cheyenne village 5 夏延部落 5 native zen temple yr 01 黄河-禅宗1
native comanche village 1 科曼奇部落 1 native zen temple yr 02 黄河-禅宗2
native comanche village 2 科曼奇部落 2 native zen temple yr 03 黄河-禅宗3
native comanche village 3 科曼奇部落 3 native zen temple yr 04 黄河-禅宗4
native comanche village 4 科曼奇部落 4 native zen temple yr 05 黄河-禅宗5
native comanche village 5 科曼奇部落 5 native_camp01 土著营地1
native comanche village mockup 科曼奇部落模型 ne_rockwall 1 新英格兰-废墟墙 1
native cree village 1 克里部落 1 ne_rockwall 2 新英格兰-废墟墙 2
native cree village 2 克里部落 2 ne_rockwall 3 新英格兰-废墟墙 3
native cree village 3 克里部落 3 ne_rockwall 4 新英格兰-废墟墙 4
native cree village 4 克里部落 4 Nugget 1 宝藏 1
native cree village 5 克里部落 5 pampas_silermine01 潘帕斯草原-银矿 1
native huron village 1 休伦部落 1 pa_grasspatch01 潘帕斯草原-草地 1
native huron village 2 休伦部落 2 Plymouth_PilgrimGroup 1 普利茅斯-开局资源 1
native huron village 3 休伦部落 3 Plymouth_PilgrimGroup 2 普利茅斯-开局资源 2
native huron village 4 休伦部落 4 Plymouth_PilgrimGroup 3 普利茅斯-开局资源 3
native huron village 5 休伦部落 5 Plymouth_PilgrimGroup 4 普利茅斯-开局资源 4
native inca village 01 印加部落01 Plymouth_PilgrimGroup 5 普利茅斯-开局资源 5
native inca village 02 印加部落02 Plymouth_PilgrimGroup 6 普利茅斯-开局资源 6
native inca village 03 印加部落03 plymouth_pumpkinpatch 1 普利茅斯-南瓜地 1
native inca village 04 印加部落04 plymouth_pumpkinpatch 2 普利茅斯-南瓜地 2
native inca village 05 印加部落05 plymouth_pumpkinpatch 3 普利茅斯-南瓜地 3
native inca village 1 印加部落 1 plymouth_pumpkinpatch 4 普利茅斯-南瓜地 4
native inca village 2 印加部落 2 plymouth_pumpkinpatch 5 普利茅斯-南瓜地 5
native inca village 3 印加部落 3 plymouth_pumpkinpatch 6 普利茅斯-南瓜地 6
native inca village 4 印加部落 4 prop_geyser 间隙泉
native inca village 5 印加部落 5 regicide_walls 弑君战-城墙
native iroquois village 1 易洛魁部落 1 saltpeter_01 硝石场 1
native iroquois village 2 易洛魁部落 2 saltpeter_02 硝石场 2
native iroquois village 3 易洛魁部落 3 saltpeter_03 硝石场 3
native iroquois village 4 易洛魁部落 4 sonoramegamine_01 索诺拉-大型矿场 1
native iroquois village 5 易洛魁部落 5 sonoramegamine_02 索诺拉-大型矿场 2
native jesuit mission borneo 01 婆罗洲-耶稣会 1 sonoramegamine_03 索诺拉-大型矿场 3
native jesuit mission borneo 02 婆罗洲-耶稣会 2 sonora_mine01 索诺拉- 矿场 1
native jesuit mission borneo 03 婆罗洲-耶稣会 3 starforttest 星形要塞
native jesuit mission borneo 04 婆罗洲-耶稣会 4 test 测试
native jesuit mission borneo 05 婆罗洲-耶稣会 5 5star_fort 五角星要塞
Araucania_HerdablePen 1 native jesuit mission cj 01
Araucania_HerdablePen 2 native jesuit mission cj 02
Araucania_HerdablePen 3 native jesuit mission cj 03
Araucania_HerdablePen 4 native jesuit mission cj 04
BerryPatch 1 native jesuit mission cj 05
BerryPatch 2 native klamath village 1
BerryPatch 3 native klamath village 2
BerryPatch 4 native klamath village 3
casualties_01 native klamath village 4
casualties_02 native klamath village 5
casualties_03 native lakota village 1
casualties_04 native lakota village 2
casualties_05 native lakota village 3
casualties_06 native lakota village 4
casualties_07 native lakota village 5
casualties_08 native mapuche village 1
casualties_cart01 native mapuche village 2
casualties_cart02 native mapuche village 3
casualties_coffins_01 native mapuche village 4
clifftest native mapuche village 5
clifftest2 native maya village 1
gl_silvermine01 native maya village 2
gl_silvermine_2 native maya village 3
gp_bigpatch native maya village 4
gp_bigpatch02 native maya village 5
gp_bigpatch03 native navajo village 1
gp_carcass_bison native navajo village 2
gp_dry_bigpatch04 native navajo village 3
gp_dry_bigpatch05 native navajo village 4
gp_dry_bigpatch06 native navajo village 5
gp_dry_bigpatch07 native nootka village 1
gp_dry_bigpatch08 native nootka village 2
gp_dry_bigpatch09 native nootka village 3
gp_flower01 native nootka village 4
gp_flower02 native nootka village 5
gp_flower03 native seminole village 1
gp_flower04 native seminole village 2
gp_flower05 native seminole village 3
gp_flower06 native seminole village 4
gp_flower07 native seminole village 5
gp_flower08 native shaolin temple mongol 01
gp_grasspatch01 native shaolin temple mongol 02
gp_grasspatch02 native shaolin temple mongol 03
gp_grasspatch03 native shaolin temple mongol 04
gp_grasspatch04 native shaolin temple mongol 05
gp_grasspatch05 native shaolin temple yr 01
gp_grasspatch06 native shaolin temple yr 02
gp_grasspatch07 native shaolin temple yr 03
great plains native native shaolin temple yr 04
igc_treasure_ship native shaolin temple yr 05
Iroquois SPC Scenario 11 native sufi mosque borneo 1
native apache village 1 native sufi mosque borneo 2
native apache village 2 native sufi mosque borneo 3
native apache village 3 native sufi mosque borneo 4
native apache village 4 native sufi mosque borneo 5
native apache village 5 native sufi mosque deccan 1
native aztec village 1 native sufi mosque deccan 2
native aztec village 2 native sufi mosque deccan 3
native aztec village 3 native sufi mosque deccan 4
native aztec village 4 native sufi mosque deccan 5
native aztec village 5 native sufi mosque mongol 1
native bhakti village 1 native sufi mosque mongol 2
Native Bhakti village 2 native sufi mosque mongol 3
Native Bhakti Village 3 native sufi mosque mongol 4
Native Bhakti Village 4 native sufi mosque mongol 5
Native Bhakti Village 5 native tupi village 1
native bhakti village ceylon 1 native tupi village 2
native bhakti village ceylon 2 native tupi village 3
native bhakti village ceylon 3 native tupi village 4
native bhakti village ceylon 4 native tupi village 5
native bhakti village ceylon 5 native udasi village 1
native bhakti village himal 1 native Udasi village 2
native bhakti village himal 2 native udasi village 3
native bhakti village himal 3 native udasi village 4
native bhakti village himal 4 native udasi village 5
native bhakti village himal 5 native udasi village himal 1
native carib village 01 native Udasi village himal 2
native carib village 02 native udasi village himal 3
native carib village 03 native udasi village himal 4
native carib village 04 native udasi village himal 5
native carib village 05 native zapotec village 1
native carib village 1 native zapotec village 2
native carib village 2 native zapotec village 3
native carib village 3 native zapotec village 4
native carib village 4 native zapotec village 5
native carib village 5 native zen temple ceylon 01
native cherokee village 1 native zen temple ceylon 02
native cherokee village 2 native zen temple ceylon 03
native cherokee village 3 native zen temple ceylon 04
native cherokee village 4 native zen temple ceylon 05
native cherokee village 5 native zen temple cj 01
native cheyenne village 1 native zen temple cj 02
native cheyenne village 2 native zen temple cj 03
native cheyenne village 3 native zen temple cj 04
native cheyenne village 4 native zen temple cj 05
native cheyenne village 5 native zen temple yr 01
native comanche village 1 native zen temple yr 02
native comanche village 2 native zen temple yr 03
native comanche village 3 native zen temple yr 04
native comanche village 4 native zen temple yr 05
native comanche village 5 native_camp01
native comanche village mockup ne_rockwall 1
native cree village 1 ne_rockwall 2
native cree village 2 ne_rockwall 3
native cree village 3 ne_rockwall 4
native cree village 4 Nugget 1
native cree village 5 pampas_silermine01
native huron village 1 pa_grasspatch01
native huron village 2 Plymouth_PilgrimGroup 1
native huron village 3 Plymouth_PilgrimGroup 2
native huron village 4 Plymouth_PilgrimGroup 3
native huron village 5 Plymouth_PilgrimGroup 4
native inca village 01 Plymouth_PilgrimGroup 5
native inca village 02 Plymouth_PilgrimGroup 6
native inca village 03 plymouth_pumpkinpatch 1
native inca village 04 plymouth_pumpkinpatch 2
native inca village 05 plymouth_pumpkinpatch 3
native inca village 1 plymouth_pumpkinpatch 4
native inca village 2 plymouth_pumpkinpatch 5
native inca village 3 plymouth_pumpkinpatch 6
native inca village 4 prop_geyser
native inca village 5 regicide_walls
native iroquois village 1 saltpeter_01
native iroquois village 2 saltpeter_02
native iroquois village 3 saltpeter_03
native iroquois village 4 sonoramegamine_01
native iroquois village 5 sonoramegamine_02
native jesuit mission borneo 01 sonoramegamine_03
native jesuit mission borneo 02 sonora_mine01
native jesuit mission borneo 03 starforttest
native jesuit mission borneo 04 test
native jesuit mission borneo 05 5star_fort





下面是在地图创建群组的方法


这是放置群组的命令:

rmCreateGrouping(int defID, string filename): Creates a grouping.
rmSetGroupingMinDistance(int defID, float dist): Set the minimum distance for the grouping (in meters).
rmSetGroupingMaxDistance(int defID, float dist): Set the maximum distance for the grouping (in meters).
rmAddGroupingConstraint(int GroupingID, int constraintID): Add specified constraint to a grouping.
rmAddGroupingToClass(int GroupingID, int classID): Add given grouping to specified class.
rmPlaceGroupingAtLoc(int groupingID, int playerID, float xFraction, float zFraction, int placeCount): Place grouping at specified location.
不用解释了吧?在上一节放置单位那里我已经解释过了。

然而我却能感觉到此时的你看不懂这些语句有什么用。不懂的话自己回去上一节查看,除了rmCreateGrouping那里多了一个string filename,其他都是一模一样的,这个string filename就是xml群组文件的名称,官方版本的我已经整理好了,在上面的表格,你自己也看见了。例如我随便创建个群组:创建寻宝船(igc_treasure_ship),其写法是rmCreateGrouping(xxxxxx, "igc_treasure_ship")↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓传送门
  Debug.xs - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)

include "mercenaries.xs";
include "ypAsianInclude.xs";
include "ypKOTHInclude.xs";
void main(void)
{
// ---------------------------------------- Map Info -------------------------------------------
int playerTilesX=13200; //设定地图X大小
int playerTilesZ=13200; //设定地图Z大小(帝国3的Y是高度,Z才是我们平常所用到的Y)
//如果玩家大于4将playerTilesX与playerTilesZ改为11500(同一个值的int只能出现1次,当你需要修改数值的时候,不能再加入int)
if (cNumberNonGaiaPlayers >4){ playerTilesX=11500; playerTilesZ=11500;}
if (cNumberNonGaiaPlayers >6){ playerTilesX=10500; playerTilesZ=10500;} //Modify Map X&Z Size of 6,7,8 Player
int SizeX = 2*sqrt(cNumberNonGaiaPlayers*playerTilesX);
int SizeZ = 2*sqrt(cNumberNonGaiaPlayers*playerTilesZ);
string MapTerrain ="Carolinas\ground_marsh3_car"; //<-------- 地图地形,自己参照剧情编辑器 <--------
string MapLighting ="319a_Snow"; //<-------- 照明,自己参照剧情编辑器 <--------
string PlayerTerrain ="Carolinas\ground_marsh1_car"; //<--------- 玩家范围地形 <---------
//设定地图XZ大小,分别调用上面用int定义的SizeX与SizeZ,即为rmSetMapSize(13200,13200);如果玩家大于4将改为11500
rmSetMapSize(SizeX, SizeZ);
rmSetMapElevationParameters(cElevTurbulence, 0.15, 2.5, 0.35, 3.0); // type, frequency, octaves, persistence, variation
rmSetMapElevationHeightBlend(1.0);
//地形初始化,设定地图初始地形,调用上面用string定义MapTerrain,即为"Carolinas\ground_marsh3_car";
rmTerrainInitialize(MapTerrain,6);
//设定照明,调用上面用string定义MapLighting,即为"319a_Snow"
rmSetLightingSet(MapLighting);
rmSetGlobalRain(0.9); //设定下雨
chooseMercs();
rmSetMapType("yucatan");
rmSetMapType("water");
rmSetMapType("default"); //设定地图类型,地图类型影响到宝藏
rmSetMapType("land");
rmSetMapType("bayou");
rmSetSeaLevel(0); // this is height of river surface compared to surrounding land. River depth is in the river XML.
rmSetStatusText("",0.01);//读取地图进度条
rmPlacePlayersCircular(0.35, 0.35, 0.0); //圆形放置玩家
//玩家范围
float AreaSizePlayer = rmAreaTilesToFraction(700);
for(i=1; <=cNumberNonGaiaPlayers)
{
int id=rmCreateArea("Player"+i);
rmSetPlayerArea(i, id);
rmSetAreaWarnFailure(id, false);
rmSetAreaSize(id, AreaSizePlayer, AreaSizePlayer);
rmSetAreaLocPlayer(id, i);
rmSetAreaCoherence(id, 0.85);
rmSetAreaSmoothDistance(id, 2);
rmSetAreaMinBlobs(id, 1);
rmSetAreaMaxBlobs(id, 1);
rmSetAreaTerrainType(id,PlayerTerrain);
rmBuildArea(id);
}
//定义城镇中心
int TownCenterID = rmCreateObjectDef("player TC");
if (rmGetNomadStart())
{
rmAddObjectDefItem(TownCenterID, "CoveredWagon", 1, 0.0);
}
else
{
rmAddObjectDefItem(TownCenterID, "TownCenter", 1, 0);
}
rmSetObjectDefMinDistance(TownCenterID, 0.0);
rmSetObjectDefMaxDistance(TownCenterID, 20.0);
for(i=1; <=cNumberNonGaiaPlayers)
{
rmPlaceObjectDefAtLoc(TownCenterID, i, rmPlayerLocXFraction(i), rmPlayerLocZFraction(i));
}
//定义起始单位(civs.xml定义那些开局单位)
int startingUnits = rmCreateStartingUnitsObjectDef(5.0);
rmSetObjectDefMinDistance(startingUnits, 6.0);
rmSetObjectDefMaxDistance(startingUnits, 10.0);
for(i=1; <=cNumberNonGaiaPlayers)
{

vector TCLocation = rmGetUnitPosition(rmGetUnitPlacedOfPlayer(TownCenterID, i));

rmPlaceObjectDefAtLoc(startingUnits, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
}


int TreasureShipID = rmCreateGrouping("treasure shipID", "igc_treasure_ship");
rmSetGroupingMinDistance(TreasureShipID, 0.0);
rmSetGroupingMaxDistance(TreasureShipID, rmXFractionToMeters(0.0));
rmPlaceGroupingAtLoc(TreasureShipID, 0,0.50,0.50);

rmSetStatusText("",0.50);//读取地图进度条
rmSetStatusText("",1.00);//读取地图进度条
//愿神兽会保佑你不会出错。 /*----------------------------------------------------------------------------------------------*
*    ┏┓   ┏┓ *
*   ┏┛┻━━━┛┻┓ *
*   ┃       ┃ *
*   ┃   ━   ┃ *
*   ┃ ┳┛ ┗┳ ┃ *
*   ┃       ┃ *
*   ┃   ┻   ┃ *
*   ┃       ┃ *
*   ┗━┓   ┏━┛ Code is far away from bug with the animal protecting *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┗━━━┓ *
*     ┃       ┣┓ *
*     ┃       ┏┛ *
*     ┗┓┓┏━┳┓┏┛ *
*      ┃┫┫ ┃┫┫ *
*      ┗┻┛ ┗┻┛ *
*----------------------------------------------------------------------------------------------*/
} //END








换个五角星堡垒试试看:传送门
  Debug.xs - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)

include "mercenaries.xs";
include "ypAsianInclude.xs";
include "ypKOTHInclude.xs";
void main(void)
{
// ---------------------------------------- Map Info -------------------------------------------
int playerTilesX=13200; //设定地图X大小
int playerTilesZ=13200; //设定地图Z大小(帝国3的Y是高度,Z才是我们平常所用到的Y)
//如果玩家大于4将playerTilesX与playerTilesZ改为11500(同一个值的int只能出现1次,当你需要修改数值的时候,不能再加入int)
if (cNumberNonGaiaPlayers >4){ playerTilesX=11500; playerTilesZ=11500;}
if (cNumberNonGaiaPlayers >6){ playerTilesX=10500; playerTilesZ=10500;} //Modify Map X&Z Size of 6,7,8 Player
int SizeX = 2*sqrt(cNumberNonGaiaPlayers*playerTilesX);
int SizeZ = 2*sqrt(cNumberNonGaiaPlayers*playerTilesZ);
string MapTerrain ="Carolinas\ground_marsh3_car"; //<-------- 地图地形,自己参照剧情编辑器 <--------
string MapLighting ="319a_Snow"; //<-------- 照明,自己参照剧情编辑器 <--------
string PlayerTerrain ="Carolinas\ground_marsh1_car"; //<--------- 玩家范围地形 <---------
//设定地图XZ大小,分别调用上面用int定义的SizeX与SizeZ,即为rmSetMapSize(13200,13200);如果玩家大于4将改为11500
rmSetMapSize(SizeX, SizeZ);
rmSetMapElevationParameters(cElevTurbulence, 0.15, 2.5, 0.35, 3.0); // type, frequency, octaves, persistence, variation
rmSetMapElevationHeightBlend(1.0);
//地形初始化,设定地图初始地形,调用上面用string定义MapTerrain,即为"Carolinas\ground_marsh3_car";
rmTerrainInitialize(MapTerrain,6);
//设定照明,调用上面用string定义MapLighting,即为"319a_Snow"
rmSetLightingSet(MapLighting);
rmSetGlobalRain(0.9); //设定下雨
chooseMercs();
rmSetMapType("yucatan");
rmSetMapType("water");
rmSetMapType("default"); //设定地图类型,地图类型影响到宝藏
rmSetMapType("land");
rmSetMapType("bayou");
rmSetSeaLevel(0); // this is height of river surface compared to surrounding land. River depth is in the river XML.
rmSetStatusText("",0.01);//读取地图进度条
rmPlacePlayersCircular(0.35, 0.35, 0.0); //圆形放置玩家
//玩家范围
float AreaSizePlayer = rmAreaTilesToFraction(700);
for(i=1; <=cNumberNonGaiaPlayers)
{
int id=rmCreateArea("Player"+i);
rmSetPlayerArea(i, id);
rmSetAreaWarnFailure(id, false);
rmSetAreaSize(id, AreaSizePlayer, AreaSizePlayer);
rmSetAreaLocPlayer(id, i);
rmSetAreaCoherence(id, 0.85);
rmSetAreaSmoothDistance(id, 2);
rmSetAreaMinBlobs(id, 1);
rmSetAreaMaxBlobs(id, 1);
rmSetAreaTerrainType(id,PlayerTerrain);
rmBuildArea(id);
}
//定义城镇中心
int TownCenterID = rmCreateObjectDef("player TC");
if (rmGetNomadStart())
{
rmAddObjectDefItem(TownCenterID, "CoveredWagon", 1, 0.0);
}
else
{
rmAddObjectDefItem(TownCenterID, "TownCenter", 1, 0);
}
rmSetObjectDefMinDistance(TownCenterID, 0.0);
rmSetObjectDefMaxDistance(TownCenterID, 20.0);
for(i=1; <=cNumberNonGaiaPlayers)
{
rmPlaceObjectDefAtLoc(TownCenterID, i, rmPlayerLocXFraction(i), rmPlayerLocZFraction(i));
}
//定义起始单位(civs.xml定义那些开局单位)
int startingUnits = rmCreateStartingUnitsObjectDef(5.0);
rmSetObjectDefMinDistance(startingUnits, 6.0);
rmSetObjectDefMaxDistance(startingUnits, 10.0);
for(i=1; <=cNumberNonGaiaPlayers)
{

vector TCLocation = rmGetUnitPosition(rmGetUnitPlacedOfPlayer(TownCenterID, i));

rmPlaceObjectDefAtLoc(startingUnits, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
}


int FortID = rmCreateGrouping("Stat FortID", "5star_fort");
rmSetGroupingMinDistance(FortID, 0.0);
rmSetGroupingMaxDistance(FortID, rmXFractionToMeters(0.0));
rmPlaceGroupingAtLoc(FortID, 0,0.50,0.50);

rmSetStatusText("",0.50);//读取地图进度条
rmSetStatusText("",1.00);//读取地图进度条
//愿神兽会保佑你不会出错。 /*----------------------------------------------------------------------------------------------*
*    ┏┓   ┏┓ *
*   ┏┛┻━━━┛┻┓ *
*   ┃       ┃ *
*   ┃   ━   ┃ *
*   ┃ ┳┛ ┗┳ ┃ *
*   ┃       ┃ *
*   ┃   ┻   ┃ *
*   ┃       ┃ *
*   ┗━┓   ┏━┛ Code is far away from bug with the animal protecting *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┗━━━┓ *
*     ┃       ┣┓ *
*     ┃       ┏┛ *
*     ┗┓┓┏━┳┓┏┛ *
*      ┃┫┫ ┃┫┫ *
*      ┗┻┛ ┗┻┛ *
*----------------------------------------------------------------------------------------------*/
} //END


堡垒墙柱那些不能生成我也没办法了,不过总体上还是可以的。















接下来我们在上一节的地图放置土著部落吧:传送门
  Debug.xs - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	include "mercenaries.xs";
include "ypAsianInclude.xs";
include "ypKOTHInclude.xs";
void main(void)
{
// ---------------------------------------- Map Info -------------------------------------------
int playerTilesX=13200; //设定地图X大小
int playerTilesZ=13200; //设定地图Z大小(帝国3的Y是高度,Z才是我们平常所用到的Y)
//如果玩家大于4将playerTilesX与playerTilesZ改为11500(同一个值的int只能出现1次,当你需要修改数值的时候,不能再加入int)
if (cNumberNonGaiaPlayers >4){ playerTilesX=11500; playerTilesZ=11500;}
if (cNumberNonGaiaPlayers >6){ playerTilesX=10500; playerTilesZ=10500;} //Modify Map X&Z Size of 6,7,8 Player
int SizeX = 2*sqrt(cNumberNonGaiaPlayers*playerTilesX);
int SizeZ = 2*sqrt(cNumberNonGaiaPlayers*playerTilesZ);
string MapTerrain ="Carolinas\ground_marsh3_car"; //<-------- 地图地形,自己参照剧情编辑器 <--------
string MapLighting ="319a_Snow"; //<-------- 照明,自己参照剧情编辑器 <--------
string PlayerTerrain ="Carolinas\ground_marsh1_car"; //<--------- 玩家范围地形 <---------
//设定地图XZ大小,分别调用上面用int定义的SizeX与SizeZ,即为rmSetMapSize(13200,13200);如果玩家大于4将改为11500
rmSetMapSize(SizeX, SizeZ);
rmSetMapElevationParameters(cElevTurbulence, 0.15, 2.5, 0.35, 3.0); // type, frequency, octaves, persistence, variation
rmSetMapElevationHeightBlend(1.0);
//地形初始化,设定地图初始地形,调用上面用string定义MapTerrain,即为"Carolinas\ground_marsh3_car";
rmTerrainInitialize(MapTerrain,6);
//设定照明,调用上面用string定义MapLighting,即为"319a_Snow"
rmSetLightingSet(MapLighting);
rmSetGlobalRain(0.9); //设定下雨
chooseMercs();
rmSetMapType("yucatan");
rmSetMapType("water");
rmSetMapType("default"); //设定地图类型,地图类型影响到宝藏
rmSetMapType("land");
rmSetMapType("bayou");
rmSetSeaLevel(0); // this is height of river surface compared to surrounding land. River depth is in the river XML.
rmSetStatusText("",0.01);//读取地图进度条
//定义class
int classStartingResource = rmDefineClass("startingResource"); //这个用作开局城镇资源
int PlayerHerd2Class = rmDefineClass("PlayerHerd2C"); //这个用作玩家第二肉群
int classGold = rmDefineClass("Gold"); //这个用作矿场
//定义放置限制/规则【顺便说一句,如果存在两个相同限制/规则名称(不是说int后面那个,如果int出现两个相同你连地图都无法打开,我说的是带英文双引号那个""),只会执行第一个,另一个会失效,甚至会引发毁图效果】
int avoidGold = rmCreateClassDistanceConstraint ("avoid gold", rmClassID("Gold"), 50.0);
int avoidPlayerHerd2Far = rmCreateClassDistanceConstraint("avoid Player Herd2 far", rmClassID("PlayerHerd2C"), 52.0);
int avoidStartingResources = rmCreateClassDistanceConstraint("start resources avoid each other2", rmClassID("startingResource"), 4.0);


//与所有带有gold标签的单位最小间隔距离为45
int avoidGoldTypeFar = rmCreateTypeDistanceConstraint("coin avoids coin far ", "gold", 45.0);
//与所有带有herd标签的单位最小间隔距离为45
int avoidHerdTypeFar = rmCreateTypeDistanceConstraint("herd avoids herd far", "herd", 45.0);
//与所有带有Tree标签的单位最小间隔距离为25
int avoidTreeType = rmCreateTypeDistanceConstraint("Tree avoids Tree ", "Tree", 25.0);

rmPlacePlayersCircular(0.35, 0.35, 0.0); //圆形放置玩家
//玩家范围
float AreaSizePlayer = rmAreaTilesToFraction(700);
for(i=1; <=cNumberNonGaiaPlayers)
{
int id=rmCreateArea("Player"+i);
rmSetPlayerArea(i, id);
rmSetAreaWarnFailure(id, false);
rmSetAreaSize(id, AreaSizePlayer, AreaSizePlayer);
rmSetAreaLocPlayer(id, i);
rmSetAreaCoherence(id, 0.85);
rmSetAreaSmoothDistance(id, 2);
rmSetAreaMinBlobs(id, 1);
rmSetAreaMaxBlobs(id, 1);
rmSetAreaTerrainType(id,PlayerTerrain);
rmBuildArea(id);
}

//定义城镇中心
int TownCenterID = rmCreateObjectDef("player TC");
if (rmGetNomadStart())
{
rmAddObjectDefItem(TownCenterID, "CoveredWagon", 1, 0.0);
}
else
{
rmAddObjectDefItem(TownCenterID, "TownCenter", 1, 0);
}
rmSetObjectDefMinDistance(TownCenterID, 0.0);
rmSetObjectDefMaxDistance(TownCenterID, 20.0);
for(i=1; <=cNumberNonGaiaPlayers)
{
rmPlaceObjectDefAtLoc(TownCenterID, i, rmPlayerLocXFraction(i), rmPlayerLocZFraction(i));
}
//定义起始单位(civs.xml定义那些开局单位)
int startingUnits = rmCreateStartingUnitsObjectDef(5.0);
rmSetObjectDefMinDistance(startingUnits, 6.0);
rmSetObjectDefMaxDistance(startingUnits, 10.0);
int playerherdID = rmCreateObjectDef("starting herd");
rmAddObjectDefItem(playerherdID, "ypWildElephant", 10, 6.0);
rmSetObjectDefMinDistance(playerherdID, 8.0);
rmSetObjectDefMaxDistance(playerherdID, 12.0);
rmSetObjectDefCreateHerd(playerherdID, true);
rmAddObjectDefToClass(playerherdID, classStartingResource);
rmAddObjectDefConstraint(playerherdID, avoidStartingResources);
int playergoldID = rmCreateObjectDef("player mine");
rmAddObjectDefItem(playergoldID, "Minegold", 1, 6);
rmSetObjectDefMinDistance(playergoldID, 18.0);
rmSetObjectDefMaxDistance(playergoldID, 22.0);
rmAddObjectDefToClass(playergoldID, rmDefineClass("startingResource"));
rmAddObjectDefToClass(playergoldID, classGold);
rmAddObjectDefConstraint(playergoldID, avoidStartingResources);
string PlayerTreeType ="TreeRedwood";
int PlayerTreeCount = 8;
int playerTree1ID = rmCreateObjectDef("player trees");
rmAddObjectDefItem(playerTree1ID, PlayerTreeType, PlayerTreeCount, 8.0);
rmSetObjectDefMinDistance(playerTree1ID, 6);
rmSetObjectDefMaxDistance(playerTree1ID, 12);
rmAddObjectDefToClass(playerTree1ID, classStartingResource);
rmAddObjectDefConstraint(playerTree1ID, avoidStartingResources);
int playerBerryID=rmCreateObjectDef("player berries");
rmAddObjectDefItem(playerBerryID, "BerryBush", rmRandInt(3,4), 3.0);
rmSetObjectDefMinDistance(playerBerryID, 12);
rmSetObjectDefMaxDistance(playerBerryID, 14);
rmAddObjectDefToClass(playerBerryID, classStartingResource);
rmAddObjectDefConstraint(playerBerryID, avoidStartingResources);


int playerHerd2ID = rmCreateObjectDef("player Herd2");
rmAddObjectDefItem(playerHerd2ID, "Bison", rmRandInt(10,11), 10.0);
rmSetObjectDefMinDistance(playerHerd2ID, 36);
rmSetObjectDefMaxDistance(playerHerd2ID, 38);
rmSetObjectDefCreateHerd(playerHerd2ID, true);
rmAddObjectDefToClass(playerHerd2ID, PlayerHerd2Class);

int playerHerd3ID = rmCreateObjectDef("player Herd3");
rmAddObjectDefItem(playerHerd3ID, "Turkey", rmRandInt(8,9), 8.0);
rmSetObjectDefMinDistance(playerHerd3ID, 40);
rmSetObjectDefMaxDistance(playerHerd3ID, 42);
rmSetObjectDefCreateHerd(playerHerd3ID, true);
rmAddObjectDefConstraint(playerHerd3ID, avoidPlayerHerd2Far);
int playergold2ID = rmCreateObjectDef("player second mine");
rmAddObjectDefItem(playergold2ID, "mine", 1, 0);
rmSetObjectDefMinDistance(playergold2ID, 58.0);
rmSetObjectDefMaxDistance(playergold2ID, 62.0);
rmAddObjectDefToClass(playergold2ID, classGold);
rmAddObjectDefConstraint(playergold2ID, avoidGold);


int playergold3ID = rmCreateObjectDef("player third mine");
rmAddObjectDefItem(playergold3ID, "mine", 1, 0);
rmSetObjectDefMinDistance(playergold3ID, 68.0);
rmSetObjectDefMaxDistance(playergold3ID, 70.0);
rmAddObjectDefToClass(playergold3ID, classGold);
rmAddObjectDefConstraint(playergold3ID, avoidGold);
for(i=1; <=cNumberNonGaiaPlayers)
{
vector TCLocation = rmGetUnitPosition(rmGetUnitPlacedOfPlayer(TownCenterID, i));
rmPlaceObjectDefAtLoc(startingUnits, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerherdID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerTree1ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playergoldID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerBerryID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));

rmPlaceObjectDefAtLoc(playerHerd2ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerHerd3ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playergold2ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playergold3ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));

}

int FixedGunID = rmCreateObjectDef("FixedGun");
rmAddObjectDefItem(FixedGunID, "SPCFixedGun",1,5.0);
rmSetObjectDefMinDistance(FixedGunID,0.0);
rmSetObjectDefMaxDistance(FixedGunID,30.0);
rmPlaceObjectDefAtLoc(FixedGunID,0,0.50,0.50,1);
for(i=0; <= cNumberNonGaiaPlayers*3)
{
int goldID = rmCreateObjectDef("gold"+i);
rmAddObjectDefItem(goldID, "mine", 1, 0.0);
rmSetObjectDefMinDistance(goldID, rmXFractionToMeters(0.0));
rmSetObjectDefMaxDistance(goldID, rmXFractionToMeters(0.5));
rmAddObjectDefToClass(goldID, classGold);
rmAddObjectDefConstraint(goldID, avoidGoldTypeFar);
rmPlaceObjectDefAtLoc(goldID, 0, 0.50, 0.50);
}
int CenterHerdID = rmCreateObjectDef("Center Herd2");
rmAddObjectDefItem(CenterHerdID, "BighornSheep",10, 8.0);
rmSetObjectDefMinDistance(CenterHerdID, rmXFractionToMeters(0.0));
rmSetObjectDefMaxDistance(CenterHerdID, rmXFractionToMeters(0.45));
rmSetObjectDefCreateHerd(CenterHerdID, true);
rmAddObjectDefConstraint(CenterHerdID, avoidHerdTypeFar);
for(i=1; <= cNumberNonGaiaPlayers*3)
{
rmPlaceObjectDefAtLoc(CenterHerdID, 0, 0.50, 0.50);
}
int GreenForestTreeObjectID = rmCreateObjectDef("Object Green forest trees");
rmAddObjectDefItem(GreenForestTreeObjectID, "TreeRedwood", 8, 15);
rmAddObjectDefItem(GreenForestTreeObjectID, "TreeRedwood", 3, 5);
rmAddObjectDefItem(GreenForestTreeObjectID, "UnderbrushCalifornia", 3, 10);
rmSetObjectDefMinDistance(GreenForestTreeObjectID, rmXFractionToMeters(0.0));
rmSetObjectDefMaxDistance(GreenForestTreeObjectID, rmXFractionToMeters(0.47));
rmAddObjectDefConstraint(GreenForestTreeObjectID, avoidTreeType);
rmPlaceObjectDefAtLoc(GreenForestTreeObjectID, 0, 0.50, 0.50, cNumberNonGaiaPlayers*20);
rmSetStatusText("",0.50);//读取地图进度条


//所有土著部落不是给了1、2、3、4、5合计5个群组吗,所以我们可以在string名称后面加上那个数字,再搞个随机数,那么就不会一成不变了,另外注意一下群组名称的空格,必须100%对应,你少一个空格都创建不了(village后面、英文双引号前面有个空格,看见没?)。
int NativeCenterID = rmCreateGrouping("Native Center ID", "native aztec village "+rmRandInt(rmRandInt(1,2),rmRandInt(3,rmRandInt(4,5))));
rmSetGroupingMinDistance(NativeCenterID, 0.0);
rmSetGroupingMaxDistance(NativeCenterID, rmXFractionToMeters(0.0));
rmAddGroupingToClass(NativeCenterID, rmDefineClass("natives"));
rmPlaceGroupingAtLoc(NativeCenterID, 0,0.50,0.50);

rmSetStatusText("",1.00);//读取地图进度条
//愿神兽会保佑你不会出错。 /*----------------------------------------------------------------------------------------------*
*    ┏┓   ┏┓ *
*   ┏┛┻━━━┛┻┓ *
*   ┃       ┃ *
*   ┃   ━   ┃ *
*   ┃ ┳┛ ┗┳ ┃ *
*   ┃       ┃ *
*   ┃   ┻   ┃ *
*   ┃       ┃ *
*   ┗━┓   ┏━┛ Code is far away from bug with the animal protecting *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┗━━━┓ *
*     ┃       ┣┓ *
*     ┃       ┏┛ *
*     ┗┓┓┏━┳┓┏┛ *
*      ┃┫┫ ┃┫┫ *
*      ┗┻┛ ┗┻┛ *
*----------------------------------------------------------------------------------------------*/
} //END



能生成纯属运气好,退出地图,重新打开看看。


不能生成就对了,这是因为位置不够,然而位置不够是无法生成,其实放置单位也是一样,为什么单位位置足够而群组位置不够呢?很简单,像土著这些群组不是一个单位而是几十个单位合成,比单个单位占用的位置要大几十倍,所以无法生成。还有一点,你留意到rmSetGroupingMaxDistance(NativeCenterID, rmXFractionToMeters(0.0));最大变动距离语句没?0.0表示这个群组只能在坐标原点,不能偏移到其他地方,当出现位置不够自然就无法偏移位置,无法生成了。 解决方法有:1.优先放置本群组;2.更改最大变动范围,写上放置限制,避开一些单位。 如下:1.优先放置传送门      2.更改变动范围传送门
  Debug.xs - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	include "mercenaries.xs";
include "ypAsianInclude.xs";
include "ypKOTHInclude.xs";
void main(void)
{
// ---------------------------------------- Map Info -------------------------------------------
int playerTilesX=13200; //设定地图X大小
int playerTilesZ=13200; //设定地图Z大小(帝国3的Y是高度,Z才是我们平常所用到的Y)
//如果玩家大于4将playerTilesX与playerTilesZ改为11500(同一个值的int只能出现1次,当你需要修改数值的时候,不能再加入int)
if (cNumberNonGaiaPlayers >4){ playerTilesX=11500; playerTilesZ=11500;}
if (cNumberNonGaiaPlayers >6){ playerTilesX=10500; playerTilesZ=10500;} //Modify Map X&Z Size of 6,7,8 Player
int SizeX = 2*sqrt(cNumberNonGaiaPlayers*playerTilesX);
int SizeZ = 2*sqrt(cNumberNonGaiaPlayers*playerTilesZ);
string MapTerrain ="Carolinas\ground_marsh3_car"; //<-------- 地图地形,自己参照剧情编辑器 <--------
string MapLighting ="319a_Snow"; //<-------- 照明,自己参照剧情编辑器 <--------
string PlayerTerrain ="Carolinas\ground_marsh1_car"; //<--------- 玩家范围地形 <---------
//设定地图XZ大小,分别调用上面用int定义的SizeX与SizeZ,即为rmSetMapSize(13200,13200);如果玩家大于4将改为11500
rmSetMapSize(SizeX, SizeZ);
rmSetMapElevationParameters(cElevTurbulence, 0.15, 2.5, 0.35, 3.0); // type, frequency, octaves, persistence, variation
rmSetMapElevationHeightBlend(1.0);
//地形初始化,设定地图初始地形,调用上面用string定义MapTerrain,即为"Carolinas\ground_marsh3_car";
rmTerrainInitialize(MapTerrain,6);
//设定照明,调用上面用string定义MapLighting,即为"319a_Snow"
rmSetLightingSet(MapLighting);
rmSetGlobalRain(0.9); //设定下雨
chooseMercs();
rmSetMapType("yucatan");
rmSetMapType("water");
rmSetMapType("default"); //设定地图类型,地图类型影响到宝藏
rmSetMapType("land");
rmSetMapType("bayou");
rmSetSeaLevel(0); // this is height of river surface compared to surrounding land. River depth is in the river XML.
rmSetStatusText("",0.01);//读取地图进度条
//定义class
int classStartingResource = rmDefineClass("startingResource"); //这个用作开局城镇资源
int PlayerHerd2Class = rmDefineClass("PlayerHerd2C"); //这个用作玩家第二肉群
int classGold = rmDefineClass("Gold"); //这个用作矿场
//定义放置限制/规则【顺便说一句,如果存在两个相同限制/规则名称(不是说int后面那个,如果int出现两个相同你连地图都无法打开,我说的是带英文双引号那个""),只会执行第一个,另一个会失效,甚至会引发毁图效果】
int avoidGold = rmCreateClassDistanceConstraint ("avoid gold", rmClassID("Gold"), 50.0);
int avoidPlayerHerd2Far = rmCreateClassDistanceConstraint("avoid Player Herd2 far", rmClassID("PlayerHerd2C"), 52.0);
int avoidStartingResources = rmCreateClassDistanceConstraint("start resources avoid each other2", rmClassID("startingResource"), 4.0);


//与所有带有gold标签的单位最小间隔距离为45
int avoidGoldTypeFar = rmCreateTypeDistanceConstraint("coin avoids coin far ", "gold", 45.0);
//与所有带有herd标签的单位最小间隔距离为45
int avoidHerdTypeFar = rmCreateTypeDistanceConstraint("herd avoids herd far", "herd", 45.0);
//与所有带有Tree标签的单位最小间隔距离为25
int avoidTreeType = rmCreateTypeDistanceConstraint("Tree avoids Tree ", "Tree", 25.0);

rmPlacePlayersCircular(0.35, 0.35, 0.0); //圆形放置玩家
//玩家范围
float AreaSizePlayer = rmAreaTilesToFraction(700);
for(i=1; <=cNumberNonGaiaPlayers)
{
int id=rmCreateArea("Player"+i);
rmSetPlayerArea(i, id);
rmSetAreaWarnFailure(id, false);
rmSetAreaSize(id, AreaSizePlayer, AreaSizePlayer);
rmSetAreaLocPlayer(id, i);
rmSetAreaCoherence(id, 0.85);
rmSetAreaSmoothDistance(id, 2);
rmSetAreaMinBlobs(id, 1);
rmSetAreaMaxBlobs(id, 1);
rmSetAreaTerrainType(id,PlayerTerrain);
rmBuildArea(id);
}

//定义城镇中心
int TownCenterID = rmCreateObjectDef("player TC");
if (rmGetNomadStart())
{
rmAddObjectDefItem(TownCenterID, "CoveredWagon", 1, 0.0);
}
else
{
rmAddObjectDefItem(TownCenterID, "TownCenter", 1, 0);
}
rmSetObjectDefMinDistance(TownCenterID, 0.0);
rmSetObjectDefMaxDistance(TownCenterID, 20.0);
for(i=1; <=cNumberNonGaiaPlayers)
{
rmPlaceObjectDefAtLoc(TownCenterID, i, rmPlayerLocXFraction(i), rmPlayerLocZFraction(i));
}
//定义起始单位(civs.xml定义那些开局单位)
int startingUnits = rmCreateStartingUnitsObjectDef(5.0);
rmSetObjectDefMinDistance(startingUnits, 6.0);
rmSetObjectDefMaxDistance(startingUnits, 10.0);
int playerherdID = rmCreateObjectDef("starting herd");
rmAddObjectDefItem(playerherdID, "ypWildElephant", 10, 6.0);
rmSetObjectDefMinDistance(playerherdID, 8.0);
rmSetObjectDefMaxDistance(playerherdID, 12.0);
rmSetObjectDefCreateHerd(playerherdID, true);
rmAddObjectDefToClass(playerherdID, classStartingResource);
rmAddObjectDefConstraint(playerherdID, avoidStartingResources);
int playergoldID = rmCreateObjectDef("player mine");
rmAddObjectDefItem(playergoldID, "Minegold", 1, 6);
rmSetObjectDefMinDistance(playergoldID, 18.0);
rmSetObjectDefMaxDistance(playergoldID, 22.0);
rmAddObjectDefToClass(playergoldID, rmDefineClass("startingResource"));
rmAddObjectDefToClass(playergoldID, classGold);
rmAddObjectDefConstraint(playergoldID, avoidStartingResources);
string PlayerTreeType ="TreeRedwood";
int PlayerTreeCount = 8;
int playerTree1ID = rmCreateObjectDef("player trees");
rmAddObjectDefItem(playerTree1ID, PlayerTreeType, PlayerTreeCount, 8.0);
rmSetObjectDefMinDistance(playerTree1ID, 6);
rmSetObjectDefMaxDistance(playerTree1ID, 12);
rmAddObjectDefToClass(playerTree1ID, classStartingResource);
rmAddObjectDefConstraint(playerTree1ID, avoidStartingResources);
int playerBerryID=rmCreateObjectDef("player berries");
rmAddObjectDefItem(playerBerryID, "BerryBush", rmRandInt(3,4), 3.0);
rmSetObjectDefMinDistance(playerBerryID, 12);
rmSetObjectDefMaxDistance(playerBerryID, 14);
rmAddObjectDefToClass(playerBerryID, classStartingResource);
rmAddObjectDefConstraint(playerBerryID, avoidStartingResources);


int playerHerd2ID = rmCreateObjectDef("player Herd2");
rmAddObjectDefItem(playerHerd2ID, "Bison", rmRandInt(10,11), 10.0);
rmSetObjectDefMinDistance(playerHerd2ID, 36);
rmSetObjectDefMaxDistance(playerHerd2ID, 38);
rmSetObjectDefCreateHerd(playerHerd2ID, true);
rmAddObjectDefToClass(playerHerd2ID, PlayerHerd2Class);

int playerHerd3ID = rmCreateObjectDef("player Herd3");
rmAddObjectDefItem(playerHerd3ID, "Turkey", rmRandInt(8,9), 8.0);
rmSetObjectDefMinDistance(playerHerd3ID, 40);
rmSetObjectDefMaxDistance(playerHerd3ID, 42);
rmSetObjectDefCreateHerd(playerHerd3ID, true);
rmAddObjectDefConstraint(playerHerd3ID, avoidPlayerHerd2Far);
int playergold2ID = rmCreateObjectDef("player second mine");
rmAddObjectDefItem(playergold2ID, "mine", 1, 0);
rmSetObjectDefMinDistance(playergold2ID, 58.0);
rmSetObjectDefMaxDistance(playergold2ID, 62.0);
rmAddObjectDefToClass(playergold2ID, classGold);
rmAddObjectDefConstraint(playergold2ID, avoidGold);


int playergold3ID = rmCreateObjectDef("player third mine");
rmAddObjectDefItem(playergold3ID, "mine", 1, 0);
rmSetObjectDefMinDistance(playergold3ID, 68.0);
rmSetObjectDefMaxDistance(playergold3ID, 70.0);
rmAddObjectDefToClass(playergold3ID, classGold);
rmAddObjectDefConstraint(playergold3ID, avoidGold);
for(i=1; <=cNumberNonGaiaPlayers)
{
vector TCLocation = rmGetUnitPosition(rmGetUnitPlacedOfPlayer(TownCenterID, i));
rmPlaceObjectDefAtLoc(startingUnits, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerherdID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerTree1ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playergoldID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerBerryID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));

rmPlaceObjectDefAtLoc(playerHerd2ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playerHerd3ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playergold2ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));
rmPlaceObjectDefAtLoc(playergold3ID, i, rmXMetersToFraction(xsVectorGetX(TCLocation)), rmZMetersToFraction(xsVectorGetZ(TCLocation)));

}


//其实就是在放置金矿、树木、猎物之前先把群组放置了



//所有土著部落不是给了1、2、3、4、5合计5个群组吗,所以我们可以在string名称后面加上那个数字,再搞个随机数,那么就不会一成不变了,另外注意一下群组名称的空格,必须100%对应,你少一个空格都创建不了(village后面、英文双引号前面有个空格,看见没?)。
int NativeCenterID = rmCreateGrouping("Native Center ID", "native aztec village "+rmRandInt(rmRandInt(1,2),rmRandInt(3,rmRandInt(4,5))));
rmSetGroupingMinDistance(NativeCenterID, 0.0);
rmSetGroupingMaxDistance(NativeCenterID, rmXFractionToMeters(0.0));
rmAddGroupingToClass(NativeCenterID, rmDefineClass("natives"));
rmPlaceGroupingAtLoc(NativeCenterID, 0,0.50,0.50);

int FixedGunID = rmCreateObjectDef("FixedGun");
rmAddObjectDefItem(FixedGunID, "SPCFixedGun",1,5.0);
rmSetObjectDefMinDistance(FixedGunID,0.0);
rmSetObjectDefMaxDistance(FixedGunID,30.0);
rmPlaceObjectDefAtLoc(FixedGunID,0,0.50,0.50,1);
for(i=0; <= cNumberNonGaiaPlayers*3)
{
int goldID = rmCreateObjectDef("gold"+i);
rmAddObjectDefItem(goldID, "mine", 1, 0.0);
rmSetObjectDefMinDistance(goldID, rmXFractionToMeters(0.0));
rmSetObjectDefMaxDistance(goldID, rmXFractionToMeters(0.5));
rmAddObjectDefToClass(goldID, classGold);
rmAddObjectDefConstraint(goldID, avoidGoldTypeFar);
rmPlaceObjectDefAtLoc(goldID, 0, 0.50, 0.50);
}
int CenterHerdID = rmCreateObjectDef("Center Herd2");
rmAddObjectDefItem(CenterHerdID, "BighornSheep",10, 8.0);
rmSetObjectDefMinDistance(CenterHerdID, rmXFractionToMeters(0.0));
rmSetObjectDefMaxDistance(CenterHerdID, rmXFractionToMeters(0.45));
rmSetObjectDefCreateHerd(CenterHerdID, true);
rmAddObjectDefConstraint(CenterHerdID, avoidHerdTypeFar);
for(i=1; <= cNumberNonGaiaPlayers*3)
{
rmPlaceObjectDefAtLoc(CenterHerdID, 0, 0.50, 0.50);
}
int GreenForestTreeObjectID = rmCreateObjectDef("Object Green forest trees");
rmAddObjectDefItem(GreenForestTreeObjectID, "TreeRedwood", 8, 15);
rmAddObjectDefItem(GreenForestTreeObjectID, "TreeRedwood", 3, 5);
rmAddObjectDefItem(GreenForestTreeObjectID, "UnderbrushCalifornia", 3, 10);
rmSetObjectDefMinDistance(GreenForestTreeObjectID, rmXFractionToMeters(0.0));
rmSetObjectDefMaxDistance(GreenForestTreeObjectID, rmXFractionToMeters(0.47));
rmAddObjectDefConstraint(GreenForestTreeObjectID, avoidTreeType);
rmPlaceObjectDefAtLoc(GreenForestTreeObjectID, 0, 0.50, 0.50, cNumberNonGaiaPlayers*20);
rmSetStatusText("",0.50);//读取地图进度条

//这几个土著在最后面放置:但是设定最大距离为rmXFractionToMeters(0.5),即为全图,变成从中心点开始,然后根据放置限制的设定随机放置土著,跟随机放置资源是一样的


//将土著加入Class就能让土著避开土著了,设定必须距离Class“natives”最小间隔52。
int avoidNative = rmCreateClassDistanceConstraint("avoid Native", rmClassID("natives"), 52.0);
//再重新设定与矿场、树木的最小间隔距离
int avoidGoldTypeMin = rmCreateTypeDistanceConstraint("coin avoids coin Min", "gold", 15.0);
int avoidTreeTypeMin = rmCreateTypeDistanceConstraint("Tree avoids Min", "Tree", 15.0);
int NativeCenter2ID = rmCreateGrouping("Native Center ID", "native aztec village "+rmRandInt(rmRandInt(1,2),rmRandInt(3,rmRandInt(4,5))));
rmSetGroupingMinDistance(NativeCenter2ID, 0.0);
rmSetGroupingMaxDistance(NativeCenter2ID, rmXFractionToMeters(0.5)); //从中心点算起,rmXFractionToMeters(0.5)为全图范围
//加入到Class“natives”,你回去上面看一下,第一个土著也加入natives这个class。
rmAddGroupingToClass(NativeCenter2ID, rmDefineClass("natives"));
rmAddGroupingConstraint(NativeCenter2ID, avoidNative);
rmAddGroupingConstraint(NativeCenter2ID, avoidGoldTypeMin);
rmAddGroupingConstraint(NativeCenter2ID, avoidTreeTypeMin);
rmPlaceGroupingAtLoc(NativeCenter2ID, 0,0.50,0.50,3); //放置3个土著
rmSetStatusText("",1.00);//读取地图进度条
//愿神兽会保佑你不会出错。 /*----------------------------------------------------------------------------------------------*
*    ┏┓   ┏┓ *
*   ┏┛┻━━━┛┻┓ *
*   ┃       ┃ *
*   ┃   ━   ┃ *
*   ┃ ┳┛ ┗┳ ┃ *
*   ┃       ┃ *
*   ┃   ┻   ┃ *
*   ┃       ┃ *
*   ┗━┓   ┏━┛ Code is far away from bug with the animal protecting *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┃ *
*     ┃   ┗━━━┓ *
*     ┃       ┣┓ *
*     ┃       ┏┛ *
*     ┗┓┓┏━┳┓┏┛ *
*      ┃┫┫ ┃┫┫ *
*      ┗┻┛ ┗┻┛ *
*----------------------------------------------------------------------------------------------*/
} //END


效果图(为什么有一张图有雾,另一张图没有?着色器最高设定都是有雾的,不过只能在高视角看见。所以请无视掉吧,我截图的时候忘记去除了。):



中间那个贸易站是rmXFractionToMeters(0.0),所以永远不会偏移,全图三个是全图范围加放置限制,所以完全是随机的。对于土著贸易站这些,个人不推荐随机放置,而是采用rmXFractionToMeters(0.0)固定放置。例如假设玩家在6点钟与12点钟方向,可以设定多个ID,0.5,0.5放置一个土著,0.3,0.8放置一个土著,0.8,0.3放置一个土著,0.85,0.65放置一个,0.15,0.35放置一个,这样才能保持地图平衡性(土著距离两个玩家距离基本上相同),不然随机放置的效果图你也看见了,非常不平衡。




以上就是放置群组教程的全部内容了,你学会了吗?
不过本教程还没结束:










放置群组已经是学会了,但是我想自己创建群组一个怎样搞?
很简单,在游戏目录/RM3/groupings里面复制一个xml文件改名,再就行修改。
  NewGroupings.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
<?xml version="1.0"?>
<grouping>
<width>9</width>
<height>8</height>
<ignorePlacementRules>0</ignorePlacementRules>
<selectAsSingleUnit>1</selectAsSingleUnit>
<units>
<unit Variation ="7" posX ="-2.0308" posZ ="-4.8055" orientX ="0.7071" orientY ="0.0000" orientZ ="-0.7071">UnderbrushGreatPlains</unit>
<unit Variation ="81" posX ="-4.4838" posZ ="-3.8961" orientX ="-0.7071" orientY ="0.0000" orientZ ="0.7071">UnderbrushGreatPlains</unit>
<unit Variation ="61" posX ="0.8400" posZ ="-3.9970" orientX ="0.0000" orientY ="0.0000" orientZ ="-1.0000">UnderbrushGreatPlains</unit>
<unit Variation ="118" posX ="3.5370" posZ ="-1.3643" orientX ="1.0000" orientY ="0.0000" orientZ ="0.0000">UnderbrushGreatPlains</unit>
<unit Variation ="145" posX ="0.7168" posZ ="-0.2756" orientX ="0.7071" orientY ="0.0000" orientZ ="-0.7071">UnderbrushGreatPlains</unit>
<unit Variation ="72" posX ="4.5175" posZ ="1.3137" orientX ="-0.7071" orientY ="0.0000" orientZ ="-0.7071">UnderbrushGreatPlains</unit>
<unit Variation ="205" posX ="-2.1759" posZ ="0.0845" orientX ="0.9239" orientY ="0.0000" orientZ ="0.3827">UnderbrushGreatPlains</unit>
<unit Variation ="103" posX ="-0.1403" posZ ="3.3580" orientX ="0.0000" orientY ="0.0000" orientZ ="-1.0000">UnderbrushGreatPlains</unit>
</units>
<tiles></tiles>
</grouping>


修改这个文件是不是很简单?










上面是开玩笑的,我除了调用名外什么都看不懂,这个坐标太变态。

其实可以在剧情编辑器制作群组的:


先在地图放置单位或地形,选择编辑-->定义群组-->鼠标框选群组范围-->Ctrl+C保存群组



按OK后输入保存名称,然后按保存



最后会保存在我的文档\My Games\Age of Empires 3\RM3\groupings文件夹里面,找到那个xml复制到游戏目录/RM3/groupings里面就行了。


  CustomGroup.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
<?xml version="1.0"?>
<grouping>
<width>17</width>
<height>13</height>
<ignoreplacementrules>1</ignoreplacementrules>
<selectassingleunit>1</selectassingleunit>
<units>
<unit variation ="41" posx ="1.8137" posz ="0.3776" orientx ="0.0000" orienty ="0.0000" orientz ="-1.0000">TownCenter</unit>
<unit variation ="154" posx ="-5.9928" posz ="-8.5195" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">CoveredWagon</unit>
<unit variation ="96" posx ="1.4700" posz ="-8.0329" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">ypFlameThrower</unit>
<unit variation ="194" posx ="-7.1993" posz ="-1.3182" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">ypFlameThrower</unit>
<unit variation ="35" posx ="-11.9210" posz ="2.0071" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">CoveredWagon</unit>
<unit variation ="217" posx ="11.8388" posz ="-0.1482" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">ypFlameThrower</unit>
<unit variation ="154" posx ="-5.6974" posz ="9.2583" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">ypFlameThrower</unit>
<unit variation ="217" posx ="5.4147" posz ="10.3408" orientx ="0.0000" orienty ="0.0039" orientz ="-1.0000">ypFlameThrower</unit>
</units>
<tiles>
<tilegroup type ="PassableLand" subtype ="terrain\great_plains\default">
<block startx ="-8" startz ="-5" endx ="-8" endz ="2"></block>
<block startx ="-7" startz ="-5" endx ="-7" endz ="2"></block>
<block startx ="-6" startz ="-5" endx ="-6" endz ="2"></block>
<block startx ="-5" startz ="-5" endx ="-5" endz ="2"></block>
<block startx ="-4" startz ="-5" endx ="-4" endz ="2"></block>
<block startx ="-3" startz ="-5" endx ="-3" endz ="2"></block>
<block startx ="-2" startz ="-5" endx ="-2" endz ="2"></block>
<block startx ="-8" startz ="-6" endx ="-8" endz ="-6"></block>
<block startx ="-7" startz ="-6" endx ="-7" endz ="-6"></block>
<block startx ="-6" startz ="-6" endx ="-6" endz ="-6"></block>
<block startx ="-5" startz ="-6" endx ="-5" endz ="-6"></block>
<block startx ="-4" startz ="-6" endx ="-4" endz ="-6"></block>
<block startx ="-3" startz ="-6" endx ="-3" endz ="-6"></block>
<block startx ="-2" startz ="-6" endx ="-2" endz ="-6"></block>
<block startx ="-8" startz ="3" endx ="-8" endz ="6"></block>
<block startx ="-7" startz ="3" endx ="-7" endz ="6"></block>
<block startx ="-6" startz ="3" endx ="-6" endz ="6"></block>
<block startx ="-5" startz ="3" endx ="-5" endz ="6"></block>
<block startx ="-4" startz ="3" endx ="-4" endz ="6"></block>
<block startx ="-3" startz ="3" endx ="-3" endz ="6"></block>
<block startx ="-2" startz ="3" endx ="-2" endz ="6"></block>
<block startx ="-1" startz ="3" endx ="-1" endz ="6"></block>
<block startx ="0" startz ="3" endx ="0" endz ="6"></block>
<block startx ="1" startz ="3" endx ="1" endz ="6"></block>
<block startx ="2" startz ="3" endx ="2" endz ="6"></block>
<block startx ="3" startz ="3" endx ="3" endz ="6"></block>
<block startx ="4" startz ="3" endx ="4" endz ="6"></block>
<block startx ="5" startz ="3" endx ="5" endz ="6"></block>
<block startx ="6" startz ="3" endx ="6" endz ="6"></block>
<block startx ="7" startz ="3" endx ="7" endz ="6"></block>
<block startx ="8" startz ="3" endx ="8" endz ="6"></block>
<block startx ="-1" startz ="-6" endx ="-1" endz ="-6"></block>
<block startx ="0" startz ="-6" endx ="0" endz ="-6"></block>
<block startx ="1" startz ="-6" endx ="1" endz ="-6"></block>
<block startx ="2" startz ="-6" endx ="2" endz ="-6"></block>
<block startx ="3" startz ="-6" endx ="3" endz ="-6"></block>
<block startx ="4" startz ="-6" endx ="4" endz ="-6"></block>
<block startx ="5" startz ="-6" endx ="5" endz ="-6"></block>
<block startx ="6" startz ="-6" endx ="6" endz ="-6"></block>
<block startx ="-1" startz ="-5" endx ="6" endz ="2"></block>
<block startx ="7" startz ="-5" endx ="7" endz ="2"></block>
<block startx ="8" startz ="-5" endx ="8" endz ="2"></block>
<block startx ="7" startz ="-6" endx ="7" endz ="-6"></block>
<block startx ="8" startz ="-6" endx ="8" endz ="-6"></block>
</tilegroup>
<heights>
<tiles x ="-8" z ="-6">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="-5">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="-4">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="-3">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="-2">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="-1">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="0">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="1">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="2">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="3">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="4">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="5">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
<tiles x ="-8" z ="6">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 </tiles>
</heights>
</tiles>
</grouping>


这样是不是不用我们去自己编写xml文件了?


路径只是按照官方版本去编写教程的,有的MOD可能会把路径改掉,例如我的测试文件就是把RM3文件夹改成RMA文件夹;如果别人MOD修改了路径,自己看情况变通吧。


本教程结束。