diff --git a/docs/content/english/Authoring Mission Scenes/villages.md b/docs/content/english/Authoring Mission Scenes/villages.md new file mode 100644 index 0000000..fe40029 --- /dev/null +++ b/docs/content/english/Authoring Mission Scenes/villages.md @@ -0,0 +1,202 @@ ++++ +title = "What Makes a Village Scene" +description = "" +weight = 1 ++++ + +#### Navigation Mesh + +* Navigation mesh consists of triangles and quads. It is used by the AI for pathfinding. The global illumination system also uses it to find the visible locations of the scene. +* Keep in mind that the navigation mesh faces should not be too far away from the physics below it. The distance should at 1.5m maximum. +* The faces can be labeled to give cues to the agent spawning and the navigation inside the scene. +* In order to make the agents follow roads, we label the faces on top of the roads with the ID 2. +* Note that all of the agent spawnpoints should be connected by navigation mesh faces with ID 2. +* For the animals, navigation mesh ID 3 can be used. Typically, these faces are keep within seperate islands in structures like ditches. The animals will roam inside those islands. +* All other faces should have the ID 0. +* Recall that the agents should use the navigation mesh ID's 1 in order to create a realistic pathing (on roads), scene designer should put an entity with the Navigation Mesh Deactivator (prefab name is Navigation_Mesh_Deactivator). It can be placed anywhere in the scene. Its purpose is to disable the ID 0 faces in civilian modes. The DisableFaceWithID variable of the script should be 1. +* For the animals, the variable "DisableFaceWithIDForAnimals" within the same script should be 3. +* Make sure the faces are fairly equal in size outside of the village area / where troops will maneuver. +* Make sure there is no disconnected navmeshes. +* The better the navmesh, the better will AI perform on it. Always think about that there might be big field battle inside the village. So try to avoid having many enclosed areas like a pig farm with only 1 entrance (for example: throw over some fences to create more entries) +* Avoid having big areas accessible to the player but not AI. Player will be able to shoot AI from places without nav mesh. +* Use “_barrier_ai_x” to prevent AI from falling off from cliffs or getting stuck in tight areas (like a market booth) off the navmesh. + +![](/img/village_scenes/navmesh.png) + +#### Spawn Points + +As noted before, all spawn points needs to be placed on top of navmesh (ID 2) and inside the soft borders. Remember that some prefabs (like chairs and benches) come with spawn points attached to them. If the spawn points are incompatible with the village mission, they will most likely crash the game or cause errors. One example is "sp_blacksmith_with_smithing_machine". The most important thing about the entry points are their tags. They decide what type of NPC will spawn there. For your own sake, don't play around with those tags too much and keep them as they are from the prefabs. + +![](/img/village_scenes/3. Entry Points.png) + +##### Player Spawnpoint + +* Prefab is called "sp_player". +* Make sure its placed in a location where it can be seen from or at least a clear path leading towards it. Do not place it too far away. +* There should be a navigation mesh under the spawnpoint. + +##### Battle Spawnpoints + +* The main battle spawnpoint is "Sp_battle_set". Make sure the attacker and defender spawn are not too close or at least don't have direct line of sight to each other. +* Make sure to move the reinforcement point as best out of sight as possible while still not being to far from the front lines. +* Make sure all spawnpoints have some empty space around for troops to properly spawn in. + +##### Conversation Spawnpoints (civilian) + +* Conversation points defines where the agent and the conversation partner spawns when the player enters the village via the "Talk to Notable" button from the World Map. +* Prefab is "sp_player_conversation". +* Make sure they have a nice vista but keep them relatively close to the village center. + +##### Animation Points (civilian) + +* Prefabs are named as “sp_npc_x”. +* These are used for normal villagers. You can use around 40 positions. +* They define the positions in the scenes where the villagers will spawn and walk to. +* Make sure they are nicely spaced throughout the village and close surroundings. +* Villagers will wonder along paths to get to them. +* If the way is too long you might find your village all wondering around and no one actually doing anything. So try to avoid long distances and place points close to main paths +* Placing more or less spawnpoints does not influence how many villagers will populate the scene. + +##### Rural Noteable Spawnpoints + +* Prefabs are named as “sp_notable_x”. +* The number should be around 6. +* These are the spawnpoints for the notables of the village (quest givers) and lords. +* Make sure they are in prominent location of the village or generally places where village elder / lords would hang around. +* You can check the Debug Window (documentation will cover that) to make sure you have placed the correct notable positions. +* Go to the “Scene Entity Check Tab”. +* Tick the “NPCs” Box and count + +##### Patrol Spawnpoints + +* Prefabs are "sp_guard_patrol_simple, sp_guard_patrol". +* Use the same spawns as for normal villagers. Try not to have them do chores like farming. +* For the patrol spawnpoints, you can use the prefabs "sp_guard_patrol_simple" and "sp_guard_patrol”. + +##### Bandit Camps +* Each village scene has 3 Bandit Camps out of side of the village, used for scene quests. +* Place the three “common_area_x” prefabs. +* All spawn points in the radius will spawn bandits instead of villagers. +* You can increase the radius by scaling the common area prefab. +* Use Civilian animation points as spawn points for bandits. +* Some suggestions: “sp_npc_wait_wall, lookout, sp_npc_argue_set, sp_npc_wait”. +* Make sure there is some indication to where they could be so the player has a chance of finding them (especially at night). +* Don't place them to close to each other. + +![](/img/village_scenes/4. Bandit Camps.png) + +##### Animal Spawnpoints + +* Use “DisableWandering” in the AnimalSpawnSettings script, to stop animals from walking around your scene. +* Overall its best to put it on all bigger animals like cows and pigs if you don't have them to wonder around + +##### Tactical Region + +* Used to tell the AI where there are relevant grander regions (forests, hills etc.). +* AI will position themselves inside the radius or avoid. +* Dont over overuse it, stick to ~5 (make sure there is some variety). +* Prefab: “TacticalRegion”. + +##### Tactical Positions + +* Used to tell AI where there are relevant smaller positions (like choke points between buildings, cliffs for archer and so on). +* Ai will position themselves according to the rotation of the Prefab and in regards to the width given by the script. +* You can use them quite often. +* The higher the slope the “better” is the position. +* Prefab: “TacticalPosition”. + +![](/img/village_scenes/5. Tactical Positions.png) + +##### Flee Positions + +* Positions to which fleeing troops and also horses will run away too. +* Make sure they are inside the Soft Border and there is nav mesh below them. + +![](/img/village_scenes/7. Flee Positions.png) + +#### Debug Window +* There is a built in dbeug tool which can be enabled by adding a certain prefab to the scene. +* Prefab name is “SpawnPointDebugView”. +* This prefabs opens a little debug window in the editor, that helps you make sure you meet the requirements for the mission (like spawn points, navmesh). +* In the “Scene Entity Check Tab” you can count your Entry Points and make sure you placed enough of them (or too many). +* In the “Navigation Mesh Check Tab” you can make sure all your Entry Points are connected to the navmesh properly. +* Place the prefab anywhere in the scene and activate the window with the check box in its script. + +#### Soft Border + +* They define the red borders of the scene. +* Prefab: “border_soft”. +* When placed they form a polygon, where the edges are connecting themselves the closests two border entities but never more than 2. +* To check the current borders, go into the "Visibility Window" → "Visibility Masks" and enable "Borders". +* After crossing them the player has a few seconds to return inside the map borders, make sure this can't be abused somehow. + +![](/img/village_scenes/6. Borders.png) + +#### Sounds + +#### Master Ambient Sound + +* Choose a mandatory master ambient sound. +* You can place the prefab for the mandatory ambient (“x_ambient_sound”) anywhere. +* Make sure it has the “Is Master Sound” enabled. +* Make sure it doesn't have the “Is Triggered” enabled. + +##### Additional Ambient sounds + +* Used for bigger areas (like forests). +* Needs to have the “Is Triggered” bool. +* To see their reaches, from the "Visibility Window" enable "Sound Entities" under the ""Visibility Masks" group. +* To change their reach, you can scale them like you would do with other editor entities (using the “b” key or the gizmo). + +![](/img/village_scenes/8. Sounds.png) + +##### Reverb + +* Adds reverb effect to any sound spawned inside its boundary. +* They are generaly used for tight or underground areas. +* You can place these in tight alleys between taller buildings, cliffs or in caves or dense forests. +* There is different prefabs for each use case: “reverb_x”. +* Needs to have the “Is Triggered” enabled. + +##### Detail + +* Used for small details. +* Keep “Is Triggered” disabled. +* Place them where ever you want them to play. + +##### Moving sounds on paths (for rivers and such) + +Sometimes it's useful to move sounds along a coast line or a river. Using the below technique is more performant and more precise than placing multiple sound entities along your river for example. + +* Place a path on the river. For more information, see [Path Editing]({{< ref "path_editing.md" >}}). +* Add the sound to the scene. +* Place any additional Ambient sound as explained above. +* Add the “path_converger” script to your ambient sound's entity. +* Enter the name of your path to the "path_converger". +* The sound will now follow the path according to the camera position. + +##### Sounds in the Engine + +You can check the "MODDING_TOOLS_DIRECTORY/Sounds/GUIDs.txt" file for the list of the sounds in the game. These names can be used inside the script of the sound entities. + +#### Lights + +* Have at least one “envmap_prop” in your scene. +* For darker areas like caves use “local_envmap_prop”. +* It will affect the lighting in an area depending on the values of its “ReflectionCapturer” script. +* Make sure the village and Bandit camps are nicely lit. +* Take extra care for the conversation points. +* Use torches and other entities. +* Make sure torches inside buildings and other dark areas have “alwaysBurn” enabled in the LightCycle script. +* Try to avoid placing “artificial lights” without an actual source. +* You can bake the ambient lighting in your scene with the GI system. This will make the ambient lighting much more realistic. For more information, see [GI System]({{< ref "prt.md" >}}). + +![](/img/village_scenes/9. Lights.png) + +#### Atmosphere + +* Make sure your scene works and looks fine with all of the “TOD_x” atmospheres and in all seasons! (since it will be tested with those). +* Choose a “Color Grade” that fits your scene (we suggest using the ones for the faction your scene is for like: “color_grade_empire_soft”). + +![](/img/village_scenes/10. Atmosphere.png) + diff --git a/docs/content/english/_header.md b/docs/content/english/_header.md index bb2d7eb..76438f6 100644 --- a/docs/content/english/_header.md +++ b/docs/content/english/_header.md @@ -1,3 +1,3 @@ +++ +++ -![](/img/twlogo_s.png) \ No newline at end of file + \ No newline at end of file diff --git a/docs/content/schinese/Asset Management/Asset Types/bodies.md b/docs/content/schinese/Asset Management/Asset Types/bodies.md index 3b7a1ed..6b06544 100644 --- a/docs/content/schinese/Asset Management/Asset Types/bodies.md +++ b/docs/content/schinese/Asset Management/Asset Types/bodies.md @@ -1,35 +1,35 @@ +++ -title = "Bodies" +title = "物体" description = "" weight = 1 +++ -Bodies define the physics boundaries of objects. They can be assigned to entities in scenes or prefabs. Users can edit the Body Flags to change their behaviour. +物体定义了物体的物理边界,它们可以被分配给场景或者预制物件的实体。用户可以编辑“物体标识”(Body Flag) 来改变其行为。 -##### Body Flags +##### 物体标识(Body Flags) -* Two Sided: Forces the physics engine to use both sides of the polygons for this body. -* AI Limiter: Used to tag bodies which will only used against AI agents, excluding the player. -* Destructible Door: Used by the automatic navigation mesh generator to not put nav mesh under destructable doors. -* Disabled: Disables the physics for this prefab or entity instance. -* Barrier: Enables smooth exit for agents exiting the interior of the body. -* Exclude Path Snap: Path points does not snap to these bodies. -* Don't Collide With Camera: Camera for the player does not collide with these bodies. -* Dynamic: Physics engine simulates the movement of this entity. -* Moveable: This flag indicates that this body and its owner entity can move. -* Ladder: Should be given to the ladder meshes so that they function properly. -* Has Steps: Should be given to the bodies of the staircases so that the agent can climb them correctly. (The body of the stairs should be seperated from the other parts of the entity). +* 双面(Two Sided):让物理引擎可以使用多边形的两面。 +* Ai限制器(AI Limiter):用来标记只针对AI使用的物体,不包括玩家。 +* 可破坏的门(Destructible Door): 通过自动导航网格生成器来使用,而非将导航网格直接置于可破坏的门之下。 +* 禁用(Disabled):禁用预制物体,或者实体实例的物理特性。 +* 边界(Barrier):使对象可以顺利移出物体内部 +* 排除路径对齐(Exclude Path Snap):适用于路径点无法对齐物体的情况 +* 避免镜头碰撞(Don’t Collide With Camera):玩家的镜头不会和对应物品产生碰撞。 +* 动态化(Dynamic):可以让物理引擎会模拟实体的运动 +* 可移动化(Moveable):该标识标志该物品及其所有的实体可以移动 +* 梯形化(Ladder):赋予梯形网格,从而使其正常运行。 +* 台阶化(Has Steps):决定是否将实体物品楼梯化,使得对象能够正确地攀爬楼梯。(楼梯的物体应与实体的其他部分分开)。 -Agent physics require smooth and low poly physics objects for performance. Missile ones require more precision so that the stuck missiles are simulated better. The below flags can be used to have two different bodies per object which is the best of both worlds. If none of the flags are given, both missiles and agents react to the bodies. +自主体的物理引擎要求平滑和低多边形的物理对象来保证性能。投射物则要求更高的精度,以达到能更好的模拟投射物卡顿效果。以下的标识可以用于让每个物体拥有两个不同的机体,以适应两种不同的情况。若两者均未被标记,投射物和自主体都会对该物体做出反应。 -* Agent Only: Only the agents react into these bodies. -* Missile Only: Only the missiles react into these bodies. +* 仅限自主体(Agent Only): 只有自主体会对该物体做出反应。 +* 仅限投射物(Missile Only): 只有投射物会对该物体做出反应。 -##### Occluders +##### 遮蔽器(Occluders) -Occluders are bodies which are placed at mesh surfaces to tell the rendering system to not render the contents on the other side of that surface. They do not contribute to the physics simulation. Big towns and villages benefit largely from carefully placed occluders. User can place occluders directly to the scene or attach them to entities & prefabs. +遮蔽器被用于网格模型表面,从而让渲染系统不会去渲染物体的另一面。通常来说,它们对物理模拟过程通常作用不大。但对于大城镇和村庄来说,精心布置的遮蔽器将会非常有用。用户可以直接在场景中放置遮蔽器,也可以将其附加到到实体物品和预制件上。 {{% notice info %}} -The imported occluder bodies names should start with "occ_" phrase. -{{% /notice %}} \ No newline at end of file +导入的遮蔽器名称一般应该以" occ_"开头。 +{{% /notice %}} diff --git a/docs/content/schinese/Asset Management/Asset Types/overriding_assets.md b/docs/content/schinese/Asset Management/Asset Types/overriding_assets.md index b47a090..73507b4 100644 --- a/docs/content/schinese/Asset Management/Asset Types/overriding_assets.md +++ b/docs/content/schinese/Asset Management/Asset Types/overriding_assets.md @@ -1,20 +1,20 @@ +++ -title = "Adding & Overriding Assets" +title = "添加与覆盖资产" description = "" weight = 1 +++ -In RGL you can easily override existing assets or create new ones within the editor for your custom mode. Override mechanism works by replacing existing assets with the one you supplied in your module's assets directory. It tries to match your custom assets with the ones previously registered by other modules by their names. This happens with respect to loading order of the modules. +在 RGL 中,您可以轻松地覆盖现有资产或在编辑器中为自定义模组创建新资产。覆盖机制的生效方式是将现有资产替换为你的模组资产目录中提供的对应资产。 它会尝试匹配您的自定义资产与其他模块先前通过其名称注册的资产。模块的加载顺序会影响这一过程。 -If **Module A** and **Module B** are loaded in addition to the **Native** module respectively, list of final assets and their sources will be as follow : +如果除了 **Native** 模块之外还分别加载了 **模组 A** 和 **模组 B** ,则最终资产及其来源列表如下: @@ -27,43 +27,43 @@ If **Module A** and **Module B** are loaded in addition to the **Native** module
Native - Module A - Module B - Result + 模组 A + 模组 B + 结果
-Currently moddable asset types are: +当前可在自定义模组中替换的资产类型为: -- [Material](#overriding-materials) -- [Mesh](#overriding-meshes) -- [Texture](#overriding-textures) -- [Physics Shape](#overriding-physics-shapes) +- [材质(Material)](#材质覆盖) +- [网格模型(Mesh)](#网格模型覆盖) +- [纹理(Texture)](#纹理覆盖) +- [物理形状(Physics Shape)](#物理形状覆盖) -### Folder Hierarchy +### 文件夹结构 -Asset system treats some folders in module directory specially according to their names. Here is the list of these folders and their uesages : +资产系统会根据模块目录中的某些文件夹名称进行处理。这是这些文件夹及其用法的列表: -- **Assets** : Includes editable *.tpac files which stores meta data of each asset. -- **AssetSources** : Includes source files of imported assets(.psd, .fbx). -- **AssetPackages** : Includes read-only *.tpac files. It is generated when a module is packed for client builds. -- **EmAssetPackages** : Includes read-only *.tpac files. It is generated when a module is packed for editor builds. -- **DsAssetPackages** : Includes read-only *.tpac files. It is generated when a module is packed for server builds. -- **RuntimeDataCache** : Includes auto-generated data required by engine for each asset. Can be deleted but it might take time to generate from scratch during startup. +- **Assets** : 包括可编辑的 *.tpac 文件,该文件存储每个资产的元数据。 +- **AssetSources** : 包括导入资产(.psd,.fbx)的源文件。 +- **AssetPackages** : 包括只读* .tpac 文件。当一个模组被打包用于客户端构建时,将生成该文件。 +- **EmAssetPackages** : 包括只读 *.tpac 文件。当一个模组被打包用于编辑器构建时,将生成该文件。 +- **DsAssetPackages** : 包括只读 *.tpac 文件。当一个模组被打包用于服务器构建时,将生成该文件。 +- **RuntimeDataCache** : 包括引擎所需的对每个资产自动生成的数据。可以删除,但在启动过程中从头开始生成可能会花费时间。 ### Modding Permissions -Asset system looks for different folders according to the version of game's running executable. According to presence of these folders it decides whether a module can be modified or it can be used only in read-only mode. If you want to distribute your module you can pack your assets and share packed folders without distributing thousands of files and their sources. You have three options to pack your assets : +资产系统会根据游戏运行的可执行文件的版本寻找不同的文件夹。根据这些文件夹的存在与否,它判定一个模块是否可以被修改,或只能在只读模式下使用。如果您想发布您的模块,您可以打包您的资产并共享打包后的文件夹,而不需要发布成千上万的文件及其源文件。您有三个选项来打包您的资产。 -- **Client** : Others can activate your module to play. You must distribute **AssetPackages** folder. -- **Editor** : Others can use your module in editor but can not modify it. Used if you want others to derive modules from your module. You must distribute **EmAssetPackages** folder. -- **Server** : Used for server builds. All data which is not related to server is stripped out. You must distribute **DsAssetPackages** folder. +- **Client** : 其他人可以激活您的模组并运行。您必须分发 **AssetPackages** 文件夹。 +- **Editor** : 其他人可以在编辑器中使用您的模组,但不能修改它。如果您希望其他人从您的模组派生模组,则使用它。您必须分发 **EmAssetPackages** 文件夹。 +- **Server** : 用于服务器构建。需要剥离与服务器无关的所有数据。您必须分发 **DsAssetPackages** 文件夹。 -You can also share your module just like you are using it to allow others to modify it. In this case you must distribute **Assets**, **AssetSources** and optionally **RuntimeDataCache** folders. +您也可以像使用您的模组一样共享您的模组,以允许其他人修改它。在这种情况下,你必须分发 **Assets**、**AssetSources** 和可选的 **RuntimeDataCache** 文件夹。 -### Overriding Materials -Overriding materials can be done by creating a new material with the same name of the material you want to override. -Navigate to assets directory of your module and right click on an empty place in the browser pane. Create a new material and rename it to the same name with the material you want to override. +### 材质覆盖 +覆盖材料可以通过创建一个新的材质来完成,其名称与您要覆盖的材质相同。 +导航到您的模块的assets目录,并在浏览器窗格中的空白处右击。创建一个新的材质,并将其重命名为与您要覆盖的材质相同的名称。 -{{% panel footer="Material of an existing mesh overriden by ModuleA" %}}![](/img/modding/assets/material_override.png){{% /panel %}} -At this point all material references in the system will be redirected to your custom material. +{{% panel footer="被模组 A 覆盖的现有网格模型的材质" %}}![](/img/modding/assets/material_override.png){{% /panel %}} +此时,系统中所有的材质引用将被重定向到您的自定义材质。

-### Overriding Meshes -Models can be imported from several file formats(e.g. Trf, Fbx). Resources imported from a single file are grouped by their names according to <>asset naming convetions<>. Imagine an fbx file as follow : +### 网格模型覆盖 +模型可以从多种文件格式(如Trf、Fbx)导入。从单个文件导入的资源根据 <>资产命名规则<> 按其名称进行分组。想象如下一个fbx文件: - Model.fbx - wall(Mesh) @@ -71,18 +71,18 @@ Models can be imported from several file formats(e.g. Trf, Fbx). Resources impor - wall.lod3(Mesh) - bo_wall(Physics Shape) -According to asset naming conventions, first three resources will be grouped into a single mesh which has three submeshes belong to different LODs. At the end two asset will be imported from Model.fbx : wall(Mesh) and bo_wall(Physics shape). +根据资产命名的惯例,前三个资源将被归入一个网格,其中有三个子网格属于不同的 LOD,最后从 Model.fbx 导入两个资产:wall (Mesh)和 bo_wall (Physics shape)。最后将从 Model.fbx 中导入两个资产:wall (Mesh) 和 bo_wall (Physics shape)。 -By following these rules you can export a new geometry file(e.g. fbx) which contains a group of meshes with their names begin with **wall**. In this case a new **wall** mesh will be created from these submeshes and existing mesh will be replaced completely with the one you supplied. Name of the geometry file is not taken into account. It is worth to mention that mesh overrides occur on mesh level. It is not possible to override single submesh via module override. +按照这些规则,您可以导出一个新的几何文件(例如 fbx),其中包含一组名称以 **wall** 开头的网格。在这种情况下,一个新的 **wall** 网格将从这些子网格中创建,而现有的网格将被您提供的网格完全替换。几何图形文件的名称不在考虑之列。值得一提的是,网格覆盖是在网格层面进行的。不能通过模组覆盖来覆盖单个子网格。 -{{% panel footer="Existing cube mesh with name **testbox** overriden by ModuleA with a teapot" %}}![](/img/modding/assets/metamesh_override.png){{% /panel %}} +{{% panel footer="现有的带有名称 **testbox** 的立方体网格被模组 A 用茶壶覆盖" %}}![](/img/modding/assets/metamesh_override.png){{% /panel %}}

-### Overriding Textures -Overriding textures is very similar to materials. You need to import a new texture with the same name of the texture you want to override. You can also rename any texture already imported to something that matches with the name of the texture to override. +### 纹理覆盖 +纹理的覆盖与材质非常相似。你需要导入一个新的纹理,其名称与你要覆盖的纹理相同。你也可以将任何已经导入的纹理重命名为与要覆盖的纹理名称相匹配的字符。 -{{% panel footer="Existing albedo texture with name **roman_ground_d** overriden by ModuleA with a white texture" %}}![](/img/modding/assets/texture_override.png){{% /panel %}} +{{% panel footer="现有的名为 **roman_ground_d** 的 albedo 纹理被模组 A 用白色纹理覆盖" %}}![](/img/modding/assets/texture_override.png){{% /panel %}}

-### Overriding Physics Shapes -Overriding physics shapes requires you to import a physics shape with the same name of asset you want to replace. Check <>Asset naming conventions<> to see hot to import physics shapes +### 物理形状覆盖 +覆盖物理形状需要你导入一个与你要替换的资产名称相同的物理形状。检查 <>资产命名规则<> 以了解如何导入物理形状。 -{{% panel footer="Existing torus shape overriden by ModuleA with a custom aquila shape" %}}![](/img/modding/assets/physics_shape_override.png){{% /panel %}} \ No newline at end of file +{{% panel footer="现有的圆环形状被模组 A 用一个自定义的水蓝色形状覆盖" %}}![](/img/modding/assets/physics_shape_override.png){{% /panel %}} diff --git a/docs/content/schinese/Authoring Mission Scenes/villages.md b/docs/content/schinese/Authoring Mission Scenes/villages.md new file mode 100644 index 0000000..fe40029 --- /dev/null +++ b/docs/content/schinese/Authoring Mission Scenes/villages.md @@ -0,0 +1,202 @@ ++++ +title = "What Makes a Village Scene" +description = "" +weight = 1 ++++ + +#### Navigation Mesh + +* Navigation mesh consists of triangles and quads. It is used by the AI for pathfinding. The global illumination system also uses it to find the visible locations of the scene. +* Keep in mind that the navigation mesh faces should not be too far away from the physics below it. The distance should at 1.5m maximum. +* The faces can be labeled to give cues to the agent spawning and the navigation inside the scene. +* In order to make the agents follow roads, we label the faces on top of the roads with the ID 2. +* Note that all of the agent spawnpoints should be connected by navigation mesh faces with ID 2. +* For the animals, navigation mesh ID 3 can be used. Typically, these faces are keep within seperate islands in structures like ditches. The animals will roam inside those islands. +* All other faces should have the ID 0. +* Recall that the agents should use the navigation mesh ID's 1 in order to create a realistic pathing (on roads), scene designer should put an entity with the Navigation Mesh Deactivator (prefab name is Navigation_Mesh_Deactivator). It can be placed anywhere in the scene. Its purpose is to disable the ID 0 faces in civilian modes. The DisableFaceWithID variable of the script should be 1. +* For the animals, the variable "DisableFaceWithIDForAnimals" within the same script should be 3. +* Make sure the faces are fairly equal in size outside of the village area / where troops will maneuver. +* Make sure there is no disconnected navmeshes. +* The better the navmesh, the better will AI perform on it. Always think about that there might be big field battle inside the village. So try to avoid having many enclosed areas like a pig farm with only 1 entrance (for example: throw over some fences to create more entries) +* Avoid having big areas accessible to the player but not AI. Player will be able to shoot AI from places without nav mesh. +* Use “_barrier_ai_x” to prevent AI from falling off from cliffs or getting stuck in tight areas (like a market booth) off the navmesh. + +![](/img/village_scenes/navmesh.png) + +#### Spawn Points + +As noted before, all spawn points needs to be placed on top of navmesh (ID 2) and inside the soft borders. Remember that some prefabs (like chairs and benches) come with spawn points attached to them. If the spawn points are incompatible with the village mission, they will most likely crash the game or cause errors. One example is "sp_blacksmith_with_smithing_machine". The most important thing about the entry points are their tags. They decide what type of NPC will spawn there. For your own sake, don't play around with those tags too much and keep them as they are from the prefabs. + +![](/img/village_scenes/3. Entry Points.png) + +##### Player Spawnpoint + +* Prefab is called "sp_player". +* Make sure its placed in a location where it can be seen from or at least a clear path leading towards it. Do not place it too far away. +* There should be a navigation mesh under the spawnpoint. + +##### Battle Spawnpoints + +* The main battle spawnpoint is "Sp_battle_set". Make sure the attacker and defender spawn are not too close or at least don't have direct line of sight to each other. +* Make sure to move the reinforcement point as best out of sight as possible while still not being to far from the front lines. +* Make sure all spawnpoints have some empty space around for troops to properly spawn in. + +##### Conversation Spawnpoints (civilian) + +* Conversation points defines where the agent and the conversation partner spawns when the player enters the village via the "Talk to Notable" button from the World Map. +* Prefab is "sp_player_conversation". +* Make sure they have a nice vista but keep them relatively close to the village center. + +##### Animation Points (civilian) + +* Prefabs are named as “sp_npc_x”. +* These are used for normal villagers. You can use around 40 positions. +* They define the positions in the scenes where the villagers will spawn and walk to. +* Make sure they are nicely spaced throughout the village and close surroundings. +* Villagers will wonder along paths to get to them. +* If the way is too long you might find your village all wondering around and no one actually doing anything. So try to avoid long distances and place points close to main paths +* Placing more or less spawnpoints does not influence how many villagers will populate the scene. + +##### Rural Noteable Spawnpoints + +* Prefabs are named as “sp_notable_x”. +* The number should be around 6. +* These are the spawnpoints for the notables of the village (quest givers) and lords. +* Make sure they are in prominent location of the village or generally places where village elder / lords would hang around. +* You can check the Debug Window (documentation will cover that) to make sure you have placed the correct notable positions. +* Go to the “Scene Entity Check Tab”. +* Tick the “NPCs” Box and count + +##### Patrol Spawnpoints + +* Prefabs are "sp_guard_patrol_simple, sp_guard_patrol". +* Use the same spawns as for normal villagers. Try not to have them do chores like farming. +* For the patrol spawnpoints, you can use the prefabs "sp_guard_patrol_simple" and "sp_guard_patrol”. + +##### Bandit Camps +* Each village scene has 3 Bandit Camps out of side of the village, used for scene quests. +* Place the three “common_area_x” prefabs. +* All spawn points in the radius will spawn bandits instead of villagers. +* You can increase the radius by scaling the common area prefab. +* Use Civilian animation points as spawn points for bandits. +* Some suggestions: “sp_npc_wait_wall, lookout, sp_npc_argue_set, sp_npc_wait”. +* Make sure there is some indication to where they could be so the player has a chance of finding them (especially at night). +* Don't place them to close to each other. + +![](/img/village_scenes/4. Bandit Camps.png) + +##### Animal Spawnpoints + +* Use “DisableWandering” in the AnimalSpawnSettings script, to stop animals from walking around your scene. +* Overall its best to put it on all bigger animals like cows and pigs if you don't have them to wonder around + +##### Tactical Region + +* Used to tell the AI where there are relevant grander regions (forests, hills etc.). +* AI will position themselves inside the radius or avoid. +* Dont over overuse it, stick to ~5 (make sure there is some variety). +* Prefab: “TacticalRegion”. + +##### Tactical Positions + +* Used to tell AI where there are relevant smaller positions (like choke points between buildings, cliffs for archer and so on). +* Ai will position themselves according to the rotation of the Prefab and in regards to the width given by the script. +* You can use them quite often. +* The higher the slope the “better” is the position. +* Prefab: “TacticalPosition”. + +![](/img/village_scenes/5. Tactical Positions.png) + +##### Flee Positions + +* Positions to which fleeing troops and also horses will run away too. +* Make sure they are inside the Soft Border and there is nav mesh below them. + +![](/img/village_scenes/7. Flee Positions.png) + +#### Debug Window +* There is a built in dbeug tool which can be enabled by adding a certain prefab to the scene. +* Prefab name is “SpawnPointDebugView”. +* This prefabs opens a little debug window in the editor, that helps you make sure you meet the requirements for the mission (like spawn points, navmesh). +* In the “Scene Entity Check Tab” you can count your Entry Points and make sure you placed enough of them (or too many). +* In the “Navigation Mesh Check Tab” you can make sure all your Entry Points are connected to the navmesh properly. +* Place the prefab anywhere in the scene and activate the window with the check box in its script. + +#### Soft Border + +* They define the red borders of the scene. +* Prefab: “border_soft”. +* When placed they form a polygon, where the edges are connecting themselves the closests two border entities but never more than 2. +* To check the current borders, go into the "Visibility Window" → "Visibility Masks" and enable "Borders". +* After crossing them the player has a few seconds to return inside the map borders, make sure this can't be abused somehow. + +![](/img/village_scenes/6. Borders.png) + +#### Sounds + +#### Master Ambient Sound + +* Choose a mandatory master ambient sound. +* You can place the prefab for the mandatory ambient (“x_ambient_sound”) anywhere. +* Make sure it has the “Is Master Sound” enabled. +* Make sure it doesn't have the “Is Triggered” enabled. + +##### Additional Ambient sounds + +* Used for bigger areas (like forests). +* Needs to have the “Is Triggered” bool. +* To see their reaches, from the "Visibility Window" enable "Sound Entities" under the ""Visibility Masks" group. +* To change their reach, you can scale them like you would do with other editor entities (using the “b” key or the gizmo). + +![](/img/village_scenes/8. Sounds.png) + +##### Reverb + +* Adds reverb effect to any sound spawned inside its boundary. +* They are generaly used for tight or underground areas. +* You can place these in tight alleys between taller buildings, cliffs or in caves or dense forests. +* There is different prefabs for each use case: “reverb_x”. +* Needs to have the “Is Triggered” enabled. + +##### Detail + +* Used for small details. +* Keep “Is Triggered” disabled. +* Place them where ever you want them to play. + +##### Moving sounds on paths (for rivers and such) + +Sometimes it's useful to move sounds along a coast line or a river. Using the below technique is more performant and more precise than placing multiple sound entities along your river for example. + +* Place a path on the river. For more information, see [Path Editing]({{< ref "path_editing.md" >}}). +* Add the sound to the scene. +* Place any additional Ambient sound as explained above. +* Add the “path_converger” script to your ambient sound's entity. +* Enter the name of your path to the "path_converger". +* The sound will now follow the path according to the camera position. + +##### Sounds in the Engine + +You can check the "MODDING_TOOLS_DIRECTORY/Sounds/GUIDs.txt" file for the list of the sounds in the game. These names can be used inside the script of the sound entities. + +#### Lights + +* Have at least one “envmap_prop” in your scene. +* For darker areas like caves use “local_envmap_prop”. +* It will affect the lighting in an area depending on the values of its “ReflectionCapturer” script. +* Make sure the village and Bandit camps are nicely lit. +* Take extra care for the conversation points. +* Use torches and other entities. +* Make sure torches inside buildings and other dark areas have “alwaysBurn” enabled in the LightCycle script. +* Try to avoid placing “artificial lights” without an actual source. +* You can bake the ambient lighting in your scene with the GI system. This will make the ambient lighting much more realistic. For more information, see [GI System]({{< ref "prt.md" >}}). + +![](/img/village_scenes/9. Lights.png) + +#### Atmosphere + +* Make sure your scene works and looks fine with all of the “TOD_x” atmospheres and in all seasons! (since it will be tested with those). +* Choose a “Color Grade” that fits your scene (we suggest using the ones for the faction your scene is for like: “color_grade_empire_soft”). + +![](/img/village_scenes/10. Atmosphere.png) + diff --git a/docs/content/schinese/_header.md b/docs/content/schinese/_header.md index bb2d7eb..57b567d 100644 --- a/docs/content/schinese/_header.md +++ b/docs/content/schinese/_header.md @@ -1,3 +1,3 @@ +++ +++ -![](/img/twlogo_s.png) \ No newline at end of file + diff --git a/docs/static/img/village_scenes/10. Atmosphere.png b/docs/static/img/village_scenes/10. Atmosphere.png new file mode 100644 index 0000000..e082658 Binary files /dev/null and b/docs/static/img/village_scenes/10. Atmosphere.png differ diff --git a/docs/static/img/village_scenes/2. Debug Window.png b/docs/static/img/village_scenes/2. Debug Window.png new file mode 100644 index 0000000..7da721b Binary files /dev/null and b/docs/static/img/village_scenes/2. Debug Window.png differ diff --git a/docs/static/img/village_scenes/3. Entry Points.png b/docs/static/img/village_scenes/3. Entry Points.png new file mode 100644 index 0000000..0e37f77 Binary files /dev/null and b/docs/static/img/village_scenes/3. Entry Points.png differ diff --git a/docs/static/img/village_scenes/4. Bandit Camps.png b/docs/static/img/village_scenes/4. Bandit Camps.png new file mode 100644 index 0000000..ede442e Binary files /dev/null and b/docs/static/img/village_scenes/4. Bandit Camps.png differ diff --git a/docs/static/img/village_scenes/5. Tactical Positions.png b/docs/static/img/village_scenes/5. Tactical Positions.png new file mode 100644 index 0000000..d89caa7 Binary files /dev/null and b/docs/static/img/village_scenes/5. Tactical Positions.png differ diff --git a/docs/static/img/village_scenes/6. Borders.png b/docs/static/img/village_scenes/6. Borders.png new file mode 100644 index 0000000..5cf54a6 Binary files /dev/null and b/docs/static/img/village_scenes/6. Borders.png differ diff --git a/docs/static/img/village_scenes/7. Flee Positions.png b/docs/static/img/village_scenes/7. Flee Positions.png new file mode 100644 index 0000000..130e3bd Binary files /dev/null and b/docs/static/img/village_scenes/7. Flee Positions.png differ diff --git a/docs/static/img/village_scenes/8. Sounds.png b/docs/static/img/village_scenes/8. Sounds.png new file mode 100644 index 0000000..2b519ae Binary files /dev/null and b/docs/static/img/village_scenes/8. Sounds.png differ diff --git a/docs/static/img/village_scenes/9. Lights.png b/docs/static/img/village_scenes/9. Lights.png new file mode 100644 index 0000000..9fbd105 Binary files /dev/null and b/docs/static/img/village_scenes/9. Lights.png differ diff --git a/docs/static/img/village_scenes/navmesh.png b/docs/static/img/village_scenes/navmesh.png new file mode 100644 index 0000000..9a79e83 Binary files /dev/null and b/docs/static/img/village_scenes/navmesh.png differ