上古纪元#开发日志#6#随机图和模版
来源:Devlog #6: A sneak peek into Olden Era’s templates and the Random Map Generator
In our last devlog, we showed you the arena mode. It is only natural to continue with what is most likely the hidden gem of the Heroes of Might & Magic franchise. That is, of course, the random map generator and the templates it provides. Our approach, while very similar to what you might be used to from past Heroes games, focuses more on the quality of the maps, rather than the quantity. But fear not! There will be a very vast template pool you can choose from in Olden Era! Be advised, this is all very technical and it could change in the future!
在我们的上一篇开发日志中,我们向您展示了竞技场模式。继续开发《魔法门之英雄无敌》系列中最有可能隐藏的瑰宝是很自然的事情。当然,就是随机地图生成器及其提供的模板。我们的方法虽然与您在过去的《英雄无敌》游戏中可能习惯的方法非常相似,但更多地关注地图的质量,而不是数量。但不要害怕!上古纪元将会有一个非常庞大的模板池供你选择!请注意,这都是非常技术性的,并且将来可能会发生变化!
Keep in mind, all names are subject to change, and there will be many more templates added! We are planning to create not only very different templates, but also different sizes for each of these templates.
请记住,所有名称都可能会更改,并且还会添加更多模板!我们计划不仅创建非常不同的模板,而且还为每个模板创建不同的尺寸。
为什么我们需要一个好的地图生成器?
Why do we need a good map gen?
In essence, a good map generator is one of the primary tools used by the community to ensure replayability of the older games in the series such as Heroes 3, Heroes 5 or Heroes 7. We can see that in cases where such a tool was missing, such as Heroes 4 and 6, which are far less popular than the other three and have a much smaller following as a result. Having a well-established and well-adjusted map generator means that players can play the game over and over again without feeling like they’re continuously running into the same routine.
从本质上讲,一个好的地图生成器是社区用来确保《英雄无敌3》、《英雄无敌5》或《英雄无敌7》等系列老游戏的可重玩性的主要工具之一。我们可以看到,在缺少此类工具的情况下,比如《英雄无敌4》和《英雄无敌6》,它们的受欢迎程度远远低于其他三部,因此粉丝也少得多。拥有一个完善且经过良好调整的地图生成器意味着玩家可以一遍又一遍地玩游戏,而不会感觉自己不断陷入相同的例程。
Furthermore, out of all the feedback we received, all of the interviews we conducted, and all the talks we had, we discovered some issues with Heroes3's map generator (and all the other Heroes of Might & Magic games, not just Heroes3): Our rough estimates say about 15% of the matches played are borderline unwinnable due to the randomly generated map being too unfavorable. Some of the points here are:
此外,在我们收到的所有反馈、我们进行的所有采访以及我们进行的所有谈话中,我们发现了英雄无敌 3 的地图生成器(以及所有其他《魔法门之英雄无敌》游戏,而不仅仅是英雄无敌 3)的一些问题:粗略估计,由于随机生成的地图过于不利,大约有 15% 的比赛处于无法获胜的边缘。这里的一些要点是:
- Crossroads too far from the starting castle and with uneven distance for all players (e.g. one player has it within the reach of their town, another has to spend 2 turns to get there)
- 十字路口距离起始城堡太远,并且对所有玩家来说距离不均(例如,一个玩家在自己的城镇范围内有十字路口,另一个玩家必须花 2 回合才能到达那里)
- Impossible to form a unified strike force to eliminate guards because the spawn zone doesn't have enough external dwellings
- 由于生成区没有足够的外部兵种产地,无法形成统一的打击力量来消灭守卫
- The main hero can't be upgraded to a high enough level because not enough experience and attributes are available in the spawn zone
- 主要英雄无法升级到足够高的等级,因为初始区域没有足够的经验和属性
- Roads shifted to the edges of the zone, making significant parts of the area difficult to access due to terrain penalties
- 道路转移到该区域的边缘,由于地形影响,该地区的大部分地区难以进入
- Paths blocked by very strong neutral squads
- 道路被非常强大的中立小队封锁
那么我们做了什么来改善这一点呢?
So what did we do to improve this?
Regarding the direct comparison between Heroes 3 RMG and ours. We generally have a similar feature set (i. e. biomes), and we tried to both make it more robust and expand it. Here are a few examples:
关于英雄3 RMG和我们的直接比较。我们通常有类似的功能集(即生物群落),我们试图使其更加强大并扩展它。以下是一些示例:
Our RMG:
我们的RMG:
- Guarantees that paths won't be blocked by a random enemy.
- 确保路径不会被随机敌人阻挡。
- Provides control over ease of accessibility of different objects. E.g. one could ask for a sawmill to be placed near the starting city, for a road between two cities or for a powerful item tucked away in a corner.
- 提供对不同对象的可访问性的控制。例如,人们可以要求在起始城市附近放置一个锯木厂,在两个城市之间建立一条道路,或者在角落里放置一个强大的物品。
- Has a flexible system for mandatory content. The original has something similar for mines, and they are indeed the most obvious target for such a system — after all, the player needs a sawmill no matter what. But we can and do use it for much more — dwellings, hero stats, visibility — you name it. It is a key instrument for designing fair map templates.
- 具有灵活的强制内容系统。原作中的矿藏也有类似的东西,它们确实是这种系统最明显的目标——毕竟,无论如何,玩家都需要锯木厂。但我们可以而且确实将它用于更多用途——住宅、英雄统计数据、可见度——凡是你能想到的。它是设计公平地图模板的关键工具。
- Ensures that distance between the starting town and the higher value biomes (ex. treasure zones) is kept similar for all players.
- 确保所有玩家的起始城镇和更高价值的生物群落(例如宝藏区)之间的距离保持相似。
- Allows you to select what types of Pandora Boxes can be found in each biome.
- 允许您选择每个生物群落中可以找到的潘多拉魔盒类型。
- Allows full control over what artifacts can and cannot show up. This also includes spells, units, heroes and skills.
- 允许完全控制哪些工件可以显示和不能显示。这还包括法术、单位、英雄和技能。
- Lets you disable and enable biome types that will be generated (e.g. no lava)
- 允许您禁用和启用将生成的生物群落类型(例如没有熔岩)
- Mandatory objects will be customizable. For instance we’ll be able to set a certain amount of dwellings, or mines for a biome.
- 强制对象将是可定制的。例如,我们将能够为生物群落设置一定数量的住宅或矿藏。
RMG 的技术方面让您变得轻松!
Technical side of RMG made easy for you!
To start with we have tooling to analyze map templates. It is possible to examine a generated map in much greater detail than from a player’s perspective (for instance to see object value distribution, which objects are random and which are mandatory, exact zone boundaries etc.). More importantly we have tools to analyze the maps statistically. One could simulate a thousand generations and calculate the average number of Dragon Utopias in a specific zone. These tools offer us a much more precise generation than we were used to having in previous heroes installments, which also means that any anomalies you would normally find will be quickly dealt with (e.g. waterfall decoration spam in Conflux biomes or excess amount of singular mountain peaks).
首先,我们有分析地图模板的工具。可以比从玩家的角度更详细地检查生成的地图(例如查看对象值分布、哪些对象是随机的、哪些是强制的、精确的区域边界等)。更重要的是,我们拥有对地图进行统计分析的工具。人们可以模拟一千代并计算出特定区域中龙之国的平均数量。这些工具为我们提供了比之前的英雄分期更精确的生成,这也意味着您通常会发现的任何异常情况都将得到快速处理(例如,Conflux 生物群落中的瀑布装饰或过多的单一山峰)。
关于品种和控制
On the variety and control
Let's go with a simple example. Say you want to generate pictures of cats in funny costumes. Your artist drew a bunch of cats as well as hats, mustaches, glasses, and whatnot. You then might just throw a random number of random items on a cat. It will probably look rough — two pairs of glasses, one shoe and a wig peeking through a beret. Unless you are into that sort of look, you establish some rules: either zero or two shoes, no more than one pair of glasses, no tall wigs with berets. But then if you add too many such rules, establishing a rigid cat dress code, you will end up with just a handful of different cats.
让我们来看一个简单的例子。假设您想生成穿着滑稽服装的猫的照片。你的艺术家画了一群猫以及帽子、胡子、眼镜等等。然后你可以向猫扔随机数量的随机物品。它可能看起来很粗糙——两副眼镜、一只鞋子和一顶从贝雷帽里露出的假发。除非你喜欢那种造型,否则你会制定一些规则:要么是零双鞋,要么是两双鞋,不超过一副眼镜,不能戴带贝雷帽的高假发。但如果你添加太多这样的规则,建立严格的猫着装规范,你最终只会得到少数不同的猫。
What is the point of generating them randomly then? Generating HoMM maps is not that different from this perspective. For every big and little thing you usually have to ask yourself, how random should it be? It goes for zone borders, elevation regions, city placement, road graphs, quantities of resources and strength of the guards. This is what we believe is the key difficulty in any sort of procedural generation. You want things to be varied and diverse, but you also want them to make sense.
那么随机生成它们有什么意义呢?从这个角度来看,生成 HoMM 地图并没有什么不同。对于每一件大大小小的事情,你通常都要问自己,它应该有多随机?它适用于区域边界、海拔区域、城市布局、道路图、资源数量和守卫力量。我们认为这是任何程序生成的关键困难。你希望事物是多种多样的,但你也希望它们有意义。
These goals are somewhat contradictory, so one has to balance them.
这些目标有些矛盾,因此必须平衡它们。
Name of the templates is subject to change
模板的名称可能会更改
Mandatory content is something that has to appear in a zone no matter what. As in one of the examples above: you want the player to have access to wood early. You can then ask for a mandatory sawmill — and it will appear in the zone no matter what. Better yet, you can ask for that sawmill to be near the player’s castle spawn and the generator will try to oblige. You can also ask for a mandatory object from a list. You could ask for [sawmill, quarry, gold mine], and one of them will appear. On top of that, this list can be expanded — so for example if you want, say, four tier 6 dwellings to show up in the starting area, you can do that. Random content is the rest of the map. We have a bag of things that might appear. And the generator takes things from that bag randomly. This bag can be different for each zone and the items in it may obey certain rules. For instance a treasure zone bag can have a larger percentage of expensive items.
强制性内容是无论如何都必须出现在区域中的内容。正如上面的示例之一:您希望玩家尽早获得木材。然后你可以要求强制锯木厂——无论如何它都会出现在该区域中。更好的是,你可以要求锯木厂靠近玩家的城堡生成点,生成器会尽力满足。您还可以从列表中请求强制对象。你可以询问[锯木厂、采石场、金矿],其中之一就会出现。最重要的是,这个列表可以扩展 - 例如,如果你想要,比如说,四栋 6 级住宅出现在起始区域,你可以这样做。随机内容是地图的其余部分。我们有一袋可能会出现的东西。生成器随机从那个袋子里取出东西。每个区域的这个袋子可能不同,并且里面的物品可能遵循一定的规则。例如,宝藏区包中可能含有较大比例的昂贵物品。
An important part of the design of our generator is flexibility. Usually when we asked the game design specialists, if we want a certain thing to work in one of two ways they said: let's do a customizable switch in the config. For instance one could customize directly in a template the win conditions of the map, whether the player is allowed to hire new heroes, whether or not certain items are allowed to appear. We believe this customizability will make the RMG useful for a single player setting. On top of it all, it is possible to generate a map of any size supported by the game (and even some unsupported).
我们发电机设计的一个重要部分是灵活性。通常,当我们询问游戏设计专家时,如果我们希望某件事以两种方式之一工作,他们会说:让我们在配置中进行可定制的切换。例如,人们可以直接在模板中自定义地图的获胜条件,是否允许玩家雇用新英雄,是否允许某些物品出现。我们相信这种可定制性将使 RMG 对于单人游戏设置非常有用。最重要的是,可以生成游戏支持的任何尺寸的地图(甚至一些不支持的尺寸)。
那么你将如何玩旧时代呢?
So how will you play Olden Era?
We will provide many templates to straight up pick from, so you will always be able to discover something new. However, we have our own map editor for you to create and save your own custom maps, with your own requirements! On this though, there will be a separate devlog in the future, as it is still a work in progress, and we are trying to improve on it as much as possible before sharing it entirely!
我们将提供许多模板供您直接选择,因此您始终能够发现新的东西。但是,我们有自己的地图编辑器,供您根据自己的要求创建和保存自己的自定义地图!不过,在这方面,未来将会有一个单独的开发日志,因为它仍然是一项正在进行的工作,我们正在努力在完全共享它之前尽可能地改进它!
Speaking of singleplayer, something highly requested is the campaign, which will also have its own separate devlog. We are aiming to give you the first few missions of the campaign, as well as the map editor itself, in EA. So do expect a lot more information about these as we get closer to EA!
说到单人游戏,人们强烈要求的是战役,它也将有自己单独的开发日志。我们的目标是在 EA 中为您提供战役的前几个任务以及地图编辑器本身。因此,随着我们距离 EA 越来越近,请期待更多有关这些的信息!