NV's Snowflake Map Script [ALPHA] 地图脚本

收藏人数:0
点赞次数:514
下载次数:2021
资源大小:14.4 KB

资源介绍


详细介绍

简单简介

在3DM Mod站下载文明6最新的NV's Snowflake Map Script [ALPHA] 地图脚本 Mod,由NycholusV制作。yang123465在我们的平台上分享了这个免费且高质量的游戏模组,让玩家们可以享受到更加丰富的游戏体验。快来3DM Mod站下载并尝试吧!

详细介绍

Mod作者: NycholusV Mod版本: 1.0 Mod大小: 14.4 KB 更新时间: 2018-10-20 15:09:30 发布时间: 2018-10-20 15:09:30

详细说明

NV's Snowflake Map Script [ALPHA] 地图脚本


安装:

将文件夹“NV_Balance_Maps”复制到您的Mods for Civilization 6,通常是:Documents»My Games»Sid Meier的Civilization VI»Mods。

开放文明6。

单击主菜单中的“其他内容”。

确保标记“NycholusV的Snowflake Map”旁边的复选框。


在过去的几周里,我每天花费数小时为Civ 6制作一个自定义地图脚本。还有很多工作要做,但我决定发布我所做的无论如何只是为了获得一些反馈。

为Civ 6发布的第一个补丁包括“Six-Arm Snowflake”地图,听起来很有希望,但我们很失望地发现它实际上是一个预定义的地图,而不是地图脚本。所以我决定自己创建一个实际的地图脚本,随机生成一个带有“雪花”模板的平衡地图。

这张地图,一旦完全,我希望在多人社区中看到一些用处。它旨在解决多人游戏中的几个问题:

由于Pangea地图几乎全部使用,因此海战在多人游戏中几乎没有用处。雪花图增加了海岸线与地区的比例,鼓励海战,并且还以这样一种方式将玩家分开,即在有效征服对手方面,海战通常更为可取。

在多人游戏中通常情况下,玩家将被隔离,使他们更有可能赢得“失控”的胜利,而其他玩家无法进行可行的干预。同样地,通常情况下,玩家将位于地图的角落并且接近其他玩家,从而减少玩家在整个游戏中从零开始保持竞争的机会。雪花地图确保玩家在与其他玩家的接近程度方面均处于平稳状态。

一旦我实现了资源平衡算法(我已经有了一个方法),该地图将解决具有不平衡起始位置的玩家的问题。虽然通过使用基础游戏地图脚本的“平衡”参数可以部分解决这个问题,但我打算这样做,以便玩家的整个起始区域都是平衡的,而不仅仅是资本。

此外,一旦我实施资源平衡算法,我打算地图的中心将比地图的其他部分更加肥沃,鼓励玩家向中心扩展并参与竞争。

您可能已经注意到,几乎每场比赛都会出现一些自然奇观,有些几乎从未出现过。这是由于应用于自然奇迹产卵的限制的变化。一些自然奇观具有非常具体的要求,因此通常在地图上的任何地方都不会有适合该奇迹的位置。这个地图脚本反向执行自然奇迹放置过程 - 它选择自然奇观开始,然后“强制”某个位置适合它。

游戏中有几种与大陆相关的游戏机制(主要是特征)。Pangea地图上的大陆分界线实际上是任意的,与地图的任何有形方面无关。这个雪花地图分为七大洲,雪花的每个“翅膀”都是自己的大陆,中心区域也是自己的大陆。因此,大陆实际上是有意义的,并且与地图的解剖结构相关,开辟了围绕基于大陆的游戏机制的策略的可能性,这通常被认为是纯粹的机会问题。

我将概述如何生成地图:

地图脚本将地图绘制在地图的中心,并将10个地块内的所有地块分配为中心大陆的一部分,我将其称为“应许之地”。所有这些地块都将落地。

然后将来自中心的11到17块瓷砖之间的地块分配到它们各自的“翼”大陆并设置为着陆。有六个翼大陆,一个在应许之地的每个边缘。形成每个翼大陆之间边界的地块被排除在外,并保留海图。

地图中心和每个翼大陆中心之间的地块被分配到我称之为“红地毯”的地方,禁止这些地块成为海洋,湖泊或山脉。这确保了翼大陆与承诺的土地正确连接,并且它们之间没有太多的阻塞点。

自然奇观被分配到应许之地。一个在中心,另外三个是从西北,东,西南中心的六个瓷砖。中心的自然奇观不能是沿海或海洋,但其他人可以。

采取适当措施确保分配自然奇观的地块适合他们。这包括强制要求某些地块成为沿海和海洋奇观的海洋,以及类似于红地毯的其他保护措施。

每个大陆的海岸线都被“侵蚀”。所有沿海瓷砖都会进入抽奖式抽奖活动,每个地块都会添加到每个相邻海岸瓷砖的抽奖中。然后,地图脚本从绘图中随机选择一个图并将其转换为海图。请注意,此过程始终检查所选绘图是否为地峡,并且不会将此类切片转换为海洋(如果没有此预防措施,可以形成岛屿)。在标准海平面上,40%的翼大陆地块受到侵蚀。应许之地也受到侵蚀,但这一比例始终是翼大陆的三分之一。如果要求海洋或沿海自然奇观,这个过程也将适应这一点。红地毯的两块瓷砖内的地块可以防止侵蚀。

使用基础游戏的分形生成器为每个绘图分配“高度”值。对于每个大陆,创建该大陆的地块列表并按高度排序。在标准世界时代,符合条件的地块中最高的5%被转换为山脉。资格标准是:a)地块不是红地毯上的一块瓷砖,b)地块不是沿海地区,c)由于自然奇观,地块没有被标记为不合格的山脉,d)放置一座山那个地块不会包围一部分土地。

在标准世界时代,下一个最高的40%的地块(包括那些不适合山脉的地块)被改造成山丘。

使用基本游戏算法生成地形(即草地,平原,沙漠等)。我一直在考虑编写自己的脚本来做这件事,但我不确定我是否应该这样做,以及我的目标是实现这一目标。我想听听你对此的看法。

自然奇观被添加。自然奇观附近的地块的地形“被同化”,以便对自然奇观有效,但尽可能保持与附近地形相似。(当Eyjafjallajokull产生时,这确实有点尴尬。)

使用基本游戏算法添加河流。我在RiversLakes.lua文件中做了一个非常小的调整,以确保河流不会经历自然奇观。(在基础游戏地图脚本中,这不是一个考虑因素,因为自然奇观被放置在河流之后。)

使用先前生成的高度排名,每个大陆上符合条件的最低3%的地块将转换为湖泊。资格标准是:a)地块距离红地毯不止一个地块,b)地块不是沿海地区,c)地块不是自然奇观或与自然奇观相邻,d)情节不是沿着河流,e)在该地块上放置一个湖泊不会包围一部分土地。

七大洲正式加盖'盖章',随机选择大陆名称。只有土地或湖泊的地块都会被盖章,就像基础游戏地图脚本中的情况一样。

通常使用基本游戏脚本生成地图的其余部分。这包括悬崖,特色,资源,起点和部落村庄。与地形类型一样,我一直在考虑为功能编写自己的脚本,但我不确定。

在'待办事项'清单上:

重写地图脚本以使其成为面向对象的。

实现资源分配算法。

将主要的civ产卵地点分配到每个翼大陆的中心。(我还没有这样做,主要是因为资源分配不均衡。)

分配城邦生产地点,使每个翼大陆上有一个城邦,在应许之地有三个。

我可能包括的其他想法:

实现地形和特征生成算法。我已经想到让地图成为一种“倾斜的轴”,其中气候梯度(温度和降雨量)是径向的而不是线性的。

我将简要讨论我对资源分配的看法:

每个大陆都有一个食品和生产配额,对于所有的大陆都是相同的,但对应许之地要大得多。

每个地块都分配了一个生育率配额。图的生育力是食物和生产的算术平均值的几何平均值,从该图中的三个图块(我正在考虑将其减少到两个)中的可行图表。通过可行,我的意思是在地块的三个瓦片内的情节。

随着距地图中心的距离增加,地图生育率配额在翼大陆上减少。然而,在起始地点附近的地块可以提高其生育率配额。应许之地附近的地块生育率配额要高得多。

对于每个大陆,都会创建一个非洲大陆地块的链表,按地块的生育率配额减去地块的当前生育率进行排序。随着资源的增加,附近的地块会被更新和使用。

每个大陆都分配着奢侈资源。每个翼大陆将有两个独特的奢侈品,一个与翼大陆顺时针方向共享的奢侈品,以及一个与翼大陆立即逆时针共享的奢侈品。应许之地被赋予六个独特的奢侈品。

提供战略资源,使所有翼洲拥有相同数量的每种战略资源(可能是固定价值)。所有主要文明都保证在其起始位置的某个半径范围内的每个战略资源的一个来源。

对于每个大陆,分配给该大陆的两种不同的豪华资源被放置在主要文明的起始位置范围内。

图表的链接列表还存储了图表符合条件的资源,其中考虑了每个大陆的奢侈品分配。

'算法适当':对于每个大陆,确定没有资源的最低配额图(即在链表中排名最低的图)。识别并放置该图的适当资源。此过程用于放置奢侈资源,然后用于奖励资源,直到达到非洲大陆的食品和生产配额。

我正在考虑将生育率测量值分为食品和生产,并将两者分开处理。我也想知道是否应根据改进的收益率调整资源价值。但这可能有点过分。此外,是否应考虑食品和生产以外的产量?这将如何适应生育指数?

让我知道你的想法。我会说实话; 我已经非常接近放弃这个,这就是我现在的感受。不太确定从哪里开始。我真的需要重写整个事情来使代码更清晰(目前它非常混乱)并使其更加面向对象,然后专注于资源生成器。但当然需要花费很多时间。我今天尝试将其重写为面向对象,我不喜欢它的方式。我承认,这是我第一次使用Lua。




https://nycholusv.com/map-scripts/

Installation:

Copy the folder "NV_Balance_Maps" to your Mods for Civilization 6, usually: Documents » My Games » Sid Meier's Civilization VI » Mods.

Open Civilization 6.

Click "Additional Content" in the Main Menu.

Ensure the checkbox beside "NycholusV's Snowflake Map" is marked.


For the past few weeks, I have been spending hours per day working on a custom map script for Civ 6. There is still a lot that needs to be done, but I've decided to release what I've done anyway just to get some feedback.

The first patch that came out for Civ 6 included the 'Six-Arm Snowflake' map, which sounded promising, but we were disappointed to discover that it is actually a predefined map, not a map script. So I decided to take it upon myself to create an actual map script that randomly generates a balanced map with a 'snowflake' template.

This map, once completely, I hope will see some use in the multiplayer community. It aims to address several issues in multiplayer:

Naval warfare sees very little use in multiplayer due to the fact that Pangaea maps are almost exclusively used. A snowflake map increases the coastline-to-area ratio, encouraging naval warfare, and also separates players in such a way that naval warfare will often be preferable in terms of efficiently conquering an opponent.

It is often the case in multiplayer games that a player will be isolated, making them more likely to win a 'runaway' victory where no other players can feasibly intervene. Likewise, it is often the case that a player will be in the corner of a map and proximal to other players, diminishing that player's chance of remaining competitive throughout the game from turn zero. The snowflake map ensures that players are all on even footing in terms of their proximity to other players.

Once I implement a resource balancing algorithm (I already have a method in mind), the map will address the issue of players having unbalanced starting locations. Although this is partly addressed by using the 'Balanced' parameter for base game map scripts, I intend to make it so that players' entire starting regions are balanced, not just their capital.

Also once I implement the resource balancing algorithm, I intend that the center of the map will be far more fertile than the rest of the map, encouraging players to expand towards the center and compete for it.

You may have noticed that there are some natural wonders that appear almost every game, and some that almost never appear. This is due to the variations in restrictions applied to natural wonder spawning. Some natural wonders have very specific requirements, such that it is quite often that there will be no plot anywhere on a map that is a suitable location for that wonder. This map script does the natural wonder placement process in reverse - it selects the natural wonders to begin with, and then 'forces' a certain location to be appropriate for it.

The game has several game mechanics (mostly traits) that relate to continents. The continental dividing lines on Pangaea maps are effectively arbitrary, bearing no relation to any tangible aspect of the map. This snowflake map is divided into seven continents, where each 'wing' of the snowflake is its own continent and the center region is also its own continent. Consequently, continents are actually meaningful and relevant to the anatomy of the map, opening up the possibility of strategies around continent-based game mechanics, which are usually considered a matter of pure chance.

I will outline how the map is generated:

The map script takes the plot in the center of the map and assigns all plots within 10 tiles to be part of the center continent, which I refer to as the 'Promised Land'. All of these plots are set to land.

Plots between 11 and 17 tiles from the center are then assigned to their respective 'wing' continent and set to land. There are six wing continents, one on each edge of the Promised Land. The plots that form the boundaries between each wing continent are excluded, and remain sea plots.

Plots between the center of the map and the center of each wing continent are assigned to what I refer to as the 'Red Carpet', which prohibits these plots from becoming sea, lakes, or mountains. This ensures that the wing continents are properly connected to the promised land and that there isn't too much of a choke point between them.

Natural wonders are assigned to the Promised Land. One is at the center, and the other three are six tiles from the center northwest, east, and southwest. The natural wonder at the center cannot be coastal or marine, but the others can.

Appropriate measures are taken to ensure that the plots where the natural wonders are assigned will be appropriate for them. This includes mandating that certain plots become sea for coastal and marine wonders, and other protections similar to the Red Carpet.

Each continent has its coastline 'eroded'. All coastal tiles go into a lottery-like draw, where each plot is added to the draw for every adjacent coastal tile it has. The map script then randomly selects a plot from the draw and converts it to a sea tile. Note that this process always checks if the selected plot is an isthmus, and will not convert such tiles to sea (without this precaution, islands can form). On standard sea level, 40% of a wing continent's plots are eroded. The Promised Land is also eroded, but the proportion is always one-third that of the wing continents. If a marine or coastal natural wonder has been mandated, this process will also accommodate for that. Plots within two tiles of the Red Carpet are protected from erosion.

Each plot is assigned a 'height' value using the base game's fractal generator. For each continent, a list of land plots in that continent is created and sorted by height. On standard world age, the highest 5% of eligible plots are converted to mountains. The eligibility criteria are: a) the plot is more than one tile from the Red Carpet, b) the plot is not coastal, c) the plot has not been marked as ineligible for mountains due to a natural wonder, d) placing a mountain at that plot will not encircle a portion of land.

On standard world age, the next highest 40% of plots (including those that were ineligible for mountains) are converted to hills.

The terrain (i.e. grasslands, plains, deserts, etc.) is generated using the base game algorithm. I have been considering writing my own script to do this, but I am unsure of if I should and what I would be aiming to achieve in doing so. I would like to hear your thoughts on this.

Natural wonders are added. The plots near the natural wonders have their terrain 'assimilated' so as to be valid for the natural wonder but remain as similar as possible to nearby terrain. (This does become a bit awkward when Eyjafjallajokull spawns.)

Rivers are added using the base game algorithm. I have made a very minor tweak in the RiversLakes.lua file to ensure that rivers do not run through natural wonders. (In the base game map scripts, this is not a consideration because natural wonders are placed after rivers.)

Using the height rankings generated earlier, the lowest eligible 3% of plots on each continent are converted to lakes. The eligibility criteria are: a) The plot is more than one tiles away from the Red Carpet, b) the plot is not coastal, c) the plot is not a natural wonder or adjacent to a natural wonder, d) the plot is not along a river, e) placing a lake at that plot will not encircle a portion of land.

The seven continents are formally 'stamped', with continent names randomly chosen. Only plots that are land or a lake are stamped, as is the case in the base game map scripts.

The rest of the map is generated as per usual with base game scripts. This includes cliffs, features, resources, start locations, and tribal villages. As with terrain types, I have been considering writing my own script for features but am unsure.

On the 'to-do' list:

Rewrite the map script to be object-oriented.

Implement a resource distribution algorithm.

Assign major civ spawn locations to the center of each wing continent. (I haven't done this yet mostly due to resource distribution not being balanced.)

Assign city-state spawn locations such that there is one city-state on each wing continent and three on the Promised Land.

Other ideas I might include:

Implement a terrain and feature generation algorithm. I've had the idea of having the map be a sort of 'tilted axis', where the climatic gradients (for temperature and rainfall) are radial instead of linear.

I'll briefly discuss my ideas for resource distribution:

Each continent is assigned a Food and Production quota, which is the same for all wing continents but substantially higher for the Promised Land.

Each plot is assigned a fertility quota. The fertility of a plot is the geometric mean of the arithmetic means of Food and Production from workable plots within three tiles (I am considering reducing this to two) of that plot. By workable, I mean plots that are within three tiles from a land plot.

The plot fertility quota decreases on wing continents as distance from the center of the map increases. Plots near starting locations however, receive a boost to their fertility quota. Plot fertility quotas near the Promised Land are substantially higher.

For each continent, a linked list of the continent's plots is created, sorted by the plot's fertility quota minus the present fertility of the plot. As resources are added, nearby plots are updated and resorted.

Each continent is assigned luxury resources. Each wing continent will have two unique luxuries, one luxury shared with the wing continent immediately clockwise, and one luxury shared with the wing continent immediately counterclockwise. The Promised Land is assigned six unique luxuries.

Strategic resources are placed such that all wing continents have the same quantity of each strategic resource (will likely be a fixed value). All major civs are guaranteed one source of each strategic resource within a certain radius of their starting location.

For each continent, two different luxury resources assigned to that continent are placed in range of the major civ's starting location.

The linked lists of plots also store what resources a plot is eligible for, which takes into consideration the assignment of luxuries to each continent.

The 'algorithm-proper': For each continent, the most below-quota plot (i.e. the plot ranked lowest in the linked list) without a resource is identified. An appropriate resource for that plot is identified, and is placed. This process is used to place luxury resources, and then for bonus resources until the continent's Food and Production quotas are reached.

I am considering changing the fertility measurements to be separated into Food and Production, and for the two to be handled separately. I am also wondering if the values of resources should be adjusted according to the yields from their improvements. But that might be a bit excessive. Also, should yields other than Food and Production be considered? And how would this fit in with the fertility indices?

Let me know your thoughts. I'll be honest; I've come pretty close to just giving up on this, and that's kind of how I feel now. Not too sure where to go from here. I really need to just rewrite the whole thing to make the code cleaner (it's very messy at the moment) and make it more object-oriented, and then focus on the resource generator. But of course that takes a lot of time. I tried rewriting it as object-oriented today, and I didn't like the way it was going. I'll admit, this is kind of the first time I've used Lua.


文件说明

Mod截图

相关作品

欧洲卡车模拟2 v1.27堵车MOD | 我的世界 1.8.9调皮萌兔MOD | 魔兽争霸3 守护宿舍316v1.1B地图 | 减少魔术物品销售和现实水平减少的商品库存-西班牙语 | 我的世界 v1.12工具腰带MOD | 欧洲卡车模拟2 车辆运输半挂车MOD |

yang123465的其他作品

  • 欧洲卡车模拟2 v1.27堵车MOD
  • 我的世界 1.8.9调皮萌兔MOD
  • 魔兽争霸3 守护宿舍316v1.1B地图
  • 减少魔术物品销售和现实水平减少的商品库存-西班牙语
  • 我的世界 v1.12工具腰带MOD
  • 欧洲卡车模拟2 车辆运输半挂车MOD