骑砍战团MOD开发(29)-module_scenes.py游戏场景

骑砍1战团mod开发-场景制作方法_哔哩哔哩_bilibiliicon-default.png?t=N7T8https://www.bilibili.com/video/BV1Cw411N7G4/

一.骑砍游戏场景

     骑砍战团中进入城堡,乡村,战斗地图都被定义为场景,由module_scenes.py进行管理。

     scene(游戏场景) = 天空盒(Skyboxes.py) + 地形(terrain code) + 场景物(scene_obj) 

#  Each scene record contains the following fields:
#  1) Scene id {string}: used for referencing scenes in other files. The prefix scn_ is automatically added before each scene-id.
#  2) Scene flags {int}. See header_scenes.py for a list of available flags
#  3) Mesh name {string}: This is used for indoor scenes only. Use the keyword "none" for outdoor scenes.
#  4) Body name {string}: This is used for indoor scenes only. Use the keyword "none" for outdoor scenes.
#  5) Min-pos {(float,float)}: minimum (x,y) coordinate. Player can't move beyond this limit.
#  6) Max-pos {(float,float)}: maximum (x,y) coordinate. Player can't move beyond this limit.
#  7) Water-level {float}. 
#  8) Terrain code {string}: You can obtain the terrain code by copying it from the terrain generator screen
#  9) List of other scenes accessible from this scene {list of strings}.
#     (deprecated. This will probably be removed in future versions of the module system)
#     (In the new system passages are used to travel between scenes and
#     the passage's variation-no is used to select the game menu item that the passage leads to.)
# 10) List of chest-troops used in this scene {list of strings}. You can access chests by placing them in edit mode.
#     The chest's variation-no is used with this list for selecting which troop's inventory it will access.

     通过scene_flags标识为室内场景/室外场景,出生点随机生成等

#flags
##室内室外场景,进入城堡为室内场景,野外战斗为室外场景
sf_indoors           = 0x00000001   #The scene shouldn't have a skybox and lighting by sun.##是否加载天空盒
sf_force_skybox      = 0x00000002   #Force adding a skybox even if indoors flag is set.
sf_generate          = 0x00000100   #Generate terrain by terran-generator
sf_randomize         = 0x00000200   #Randomize terrain generator key##是否随机出生点
sf_auto_entry_points = 0x00000400   #Automatically create entry points
sf_no_horses         = 0x00000800   #Horses are not avaible
sf_muddy_water       = 0x00001000   #Changes the shader of the river mesh

二.场景天空盒

           CommonRes\skyboxes.brf 存放天空盒模型,骑砍天空盒是一个球体,材质支持RGB,HDR等天空盒纹理。

           Skyboxes.py 存放天空盒配置,高光和反射程度,实现夜晚,白天等不同时间的天空盒效果.也提供API实现天空盒的设置.

# Scene parameters handlingscene_set_day_time                           = 1266  # (scene_set_day_time, <value>),# Defines the time for the scene to force the engine to select a different skybox than the one dictated by current game time. Must be called within ti_before_mission_start trigger in module_mission_templates.py. Value should be in range 0..23.
set_rain                                     = 1797  # (set_rain, <rain-type>, <strength>),# Sets a new weather for the mission. Rain_type values: 0 = clear, 1 = rain, 2 = snow. Strength is typically used in range 0..100 but is actually unlimited. Affects number of particles and fog density.
set_fog_distance                             = 1798  # (set_fog_distance, <distance_in_meters>, [fog_color]),# Sets the density (and optionally color) of the fog for the mission.set_skybox                                   = 2389  # (set_skybox, <non_hdr_skybox_index>, <hdr_skybox_index>),# Version 1.153+. Forces the scene to be rendered with specified skybox. Index of -1 will disable.
set_startup_sun_light                        = 2390  # (set_startup_sun_light, <r>, <g>, <b>),# Version 1.153+. Defines the sunlight color for the scene.
set_startup_ambient_light                    = 2391  # (set_startup_ambient_light, <r>, <g>, <b>),# Version 1.153+. Defines the ambient light level and colour for the scene. Expects Fixed Point values between 0 and 1.
set_startup_ground_ambient_light             = 2392  # (set_startup_ground_ambient_light, <r>, <g>, <b>),# Version 1.153+. Defines the ambient light color for the ground.
get_startup_sun_light                        = 2394  # (get_startup_sun_light, <position_no>),# Version 1.165+. Returns startup sunlight color in (x, y, z) coordinates of position register.
get_startup_ambient_light                    = 2395  # (get_startup_ambient_light, <position_no>),# Version 1.165+. Returns startup ambient light color in (x, y, z) coordinates of position register.
get_startup_ground_ambient_light             = 2396  # (get_startup_ground_ambient_light, <position_no>),# Version 1.165+. Returns startup ambient ground lighting color in (x, y, z) coordinates of position register.

三.场景地形

    骑砍引擎中地形不采用静态模型进行实现,为了管理不同的情况下的地形,通过地形代码terrain code进行控制,地形代码包含地形长宽,地形植被茂密程度,高低起伏比例等特征,在大地图左下角的地形tab页进行编辑生成.

四.场景物

    骑砍引擎将定义的场景名添加scn前缀实现场景物的管理.场景物不仅包含静态的模型如门,城墙等,还包含地形增量,出生点,通道,AI网格等信息.

    场景物(scene_obj) = 静态模型房子/门(scene_prop) + 出生点(entry_point) + AI网格(控制AI自动游荡) + 通道(Passage).

    例如城堡town1的对应的scene_obj为scn_town1.sco,存放在SceneObj\scn_town1.sco中

    sco文件暂无编辑工具进行编辑,需调整骑砍战团为编辑作弊模式,进入场景后Ctrl + E进行编辑.

骑砍引擎场景编辑操作指导如下,例如:C/E/WASD 上下左右前后移动摄像机 

Left Mouse Button: While pressed, mouse movements rotate
the camera.
H: Hides/unhides the highlights and user interface objects
(Good for taking a screenshot).
CTRL + Any movement key: Speeds up the camera
movements, slows down the object movements.Edit Objects Mode
----------------------
Right Mouse Button: Selects objects.
CTRL + Right Mouse Button: Selects multiple objects.
Double Click on Scene Objects list: Selects the clicked
object and moves the camera towards it.
A,S,D,W: Moves the camera.
C,E: Increases/decreases the height of the camera.
G: While pressed, mouse movements move the selected
object(s) parallel to the ground.
T: While pressed, mouse movements increase/decrease the
height of the selected object(s).
X,Y,Z: While pressed, mouse movements rotate the selected
object(s) with respect to the object's X, Y and Z axis.
U: While pressed, mouse movements rotate the selected
object(s) with respect to the "Up" axis of the world.
R: Resets the selected object's rotation.
B: Scale selected object.
B + X: Scale selected object along X axis.
B + Y: Scale selected object along Y axis.
B + Z: Scale selected object along Z axis.
Alt + B: Resets the selected object's scale.
Delete: Deletes selected object(s).
Space: Enables add object mode.Add Object Mode
-------------------
Right Mouse Button: Adds current object to scene.
Space: Disables add object mode.
T, U, X, Y, Z, R and B can also be used in this mode.Ground Elevate and Ground Paint Mode
-----------------------------------------------
Right Mouse Button: Elevates the ground up or down in
"Ground Elevate" mode and paints the ground in "Ground
Paint" mode.
Midle Mouse Button: Clears the elevation in "Ground Elevate"
mode and clears the paints in "Ground Paint" mode.Edit AI Mesh Mode
---------------------
Right Mouse Button: Selects AI mesh objects.
CTRL + Right Mouse Button: Selects multiple AI mesh objects.
1: Activates Vertex Editing Mode
2: Activates Edge Editing Mode
3: Activates Face Editing Mode
G, T, X, Y, Z, B and Delete can also be used in this mode.Additional Help
------------------
- You can save your changes only when you leave the edit
mode.- You can not undo your works, you can only discard changes
while leaving the edit mode. So you should save your work
occasionally by leaving the edit mode and re-entering it.- Scene files are located under [Current Module]\SceneObj
foler. When you save your changes, the related scene file
under this folder will be updated.- Create AI Mesh button works only on outdoor scenes

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/586985.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【华为数据之道学习笔记】8-2 数据质量规则

异常数据是不满足数据标准、不符合业务实质的客观存在的数据&#xff0c;如某位员工的国籍信息错误、某位客户的客户名称信息错误等。 数据在底层数据库多数是以二维表格的形式存储&#xff0c;每个数据格存储一个数据值。若想从众多数据中识别出异常数据&#xff0c;就需要通过…

【滑动窗口】C++算法:可见点的最大数目

作者推荐 动态规划 多源路径 字典树 LeetCode2977:转换字符串的最小成本 本题涉及知识点 滑动窗口 LeetCode 1610可见点的最大数目 给你一个点数组 points 和一个表示角度的整数 angle &#xff0c;你的位置是 location &#xff0c;其中 location [posx, posy] 且 point…

C#语言发展历程(1-7)

一、类型发展 C#1中是没有泛型的 在C#2中在逐渐推出泛型。C#2还引入了可空类型。 示例&#xff1a;C#泛型&#xff08;详解&#xff09;-CSDN博客 1 C#3&#xff1a;引入了匿名类型、和隐式的局部变量&#xff08;var&#xff09; 匿名类型&#xff1a;我们主要是使用在LIN…

openGauss学习笔记-179 openGauss 数据库运维-逻辑复制-发布订阅

文章目录 openGauss学习笔记-179 openGauss 数据库运维-逻辑复制-发布订阅179.1 发布179.2 订阅179.3 冲突处理179.4 限制179.5 架构179.6 监控179.7 安全性179.8 配置设置179.9 快速设置 openGauss学习笔记-179 openGauss 数据库运维-逻辑复制-发布订阅 发布和订阅基于逻辑复…

大模型推理部署:LLM 七种推理服务框架总结

自从ChatGPT发布以来&#xff0c;国内外的开源大模型如雨后春笋般成长&#xff0c;但是对于很多企业和个人从头训练预训练模型不太现实&#xff0c;即使微调开源大模型也捉襟见肘&#xff0c;那么直接部署这些开源大模型服务于企业业务将会有很大的前景。 本文将介绍七中主流的…

【eclipse】eclipse开发springboot项目使用入门

下载eclipse Eclipse downloads - Select a mirror | The Eclipse Foundation 安装eclipse 其他一步一步即可 我们是开发java web选择如下 界面修改 Window->Preferences-> 修改eclipse风格主题 Window->Preferences->General->Appearance 修改字体和大小…

基于 CefSharp 实现一个文件小工具

I’m not saying you can’t be financially successful I’m saying have a greater purpose in life well beyond the pursuit of financial success Your soul is screaming for you to answer your true calling You can change today if you redefine what success is to …

深度强化学习DQN训练避障

目录 一.前言 二.代码 2.1完整代码 2.2运行环境 2.3动作空间 2.4奖励函数 2.5状态输入 2.6实验结果 一.前言 深度Q网络&#xff08;DQN&#xff09;是深度强化学习领域的一项革命性技术&#xff0c;它成功地将深度学习的强大感知能力与强化学习的决策能力相结合。在过…

Kafka集群详解

Kafka介绍Kafka集群介绍Kafka集群特点Kafka集群搭建在这里插入图片描述Kafka集群如何进行故障切换Kafka集群Leader的选举Kafka集群如何快速横向拓展Kafka集群搭建最佳实践Kafka集群可以使用单节点Zookeeper吗Kafka集群的消费者信息保存在那里Kafka集群的Topic的分区数的设置规则…

YOLOv8改进 添加可变形注意力机制DAttention

一、Deformable Attention Transformer论文 论文地址&#xff1a;arxiv.org/pdf/2201.00520.pdf 二、Deformable Attention Transformer注意力结构 Deformable Attention Transformer包含可变形注意力机制&#xff0c;允许模型根据输入的内容动态调整注意力权重。在传统的Tra…

鸿蒙 Window 环境的搭建

鸿蒙操作系统是国内自研的新一代的智能终端操作系统&#xff0c;支持多种终端设备部署&#xff0c;能够适配不同类别的硬件资源和功能需求。是一款面向万物互联的全场景分布式操作系统。 下载、安装与配置 DevEco Studio支持Windows系统和macOS系统 Windows系统配置华为官方推…

小程序面试题 | 17.精选小程序面试题

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…

Nmap使用

Nmap 文章目录 Nmap端口扫描及其原理端口扫描用法Zenmap配置说明 Nmap 是一款开源免费的网络发现&#xff08;Network Discovery&#xff09;和安全审计&#xff08;Security Auditing&#xff09;工具官网为&#xff1a;www.nmap.org。 一般情况下&#xff0c;Nmap用于列举网…

从0开始界面设计师 Qt Designer

QT程序界面的 一个个窗口、控件&#xff0c;就是像上面那样用相应的代码创建出来的。 但是&#xff0c;把你的脑海里的界面&#xff0c;用代码直接写出来&#xff0c;是有些困难的。 很多时候&#xff0c;运行时呈现的样子&#xff0c;不是我们要的。我们经常还要修改代码调整界…

day12--java高级编程:网络通讯

5 Day19–网络通信(Socket通信) 说明&#xff1a; io流是跟本地的文件进行数据的传输&#xff0c;读或者写。网络通信&#xff1a;数据在网络中进行的传输。 本章专题与脉络 1. 网络编程概述 Java是 Internet 上的语言&#xff0c;它从语言级上提供了对网络应用程序的支持&…

Maven项目提示Ignored pom.xml问题

1 环境 &#xff08;1&#xff09;IDEA开发工具&#xff1a;2022.2.1 &#xff08;2&#xff09;JDK&#xff1a;Java17&#xff08;Spring6要求JDK最低版本是Java17&#xff09; &#xff08;3&#xff09;Spring&#xff1a;6.1.2 &#xff08;4&#xff09;Maven 3.8.8 2 …

react+redux+antd-mobile 之 记账本案例

1.环境搭建 //使用CRA创建项目&#xff0c;并安装必要依赖&#xff0c;包括下列基础包 //1. Redux状态管理 - reduxjs/toolkit 、 react-redux //2. 路由 - react-router-dom //3. 时间处理 - dayjs //4. class类名处理 - classnames //5. 移动端组件库 - antd-mobile //6. 请…

linux常见基础指令

入门常见基础指令 ls、stat、 pwd 、cd、tree、 whoami、 touch、 mkdir、 rm 、 man、 cp、mv、cat、tac、echo、>、 >>、 < 、more、 less、 head、 tail、date、 cal、 find、 which、alias、whereis、grep、zip与unzip、 tar、bc、uname、xargs... 热键Tab、…

【信息安全原理】——期末复习(冲刺篇)

&#x1f4d6; 前言&#xff1a;快考试了&#xff0c;做篇期末总结&#xff0c;都是重点与必考点。 题型&#xff1a;简答题&#xff08;45分&#xff09;、协议分析题&#xff08;210分&#xff09;&#xff08;给一个报文或工作流程&#xff0c;分析存在的问题&#xff09;、…

操作系统:linux(在虚拟机上详细步骤安装)Centos

文章目录 前言&#xff1a;一、如何在自己的电脑上安装centos?二、在虚拟机上安装centos2.1安装步骤&#xff1a; 前言&#xff1a; 操作系统有&#xff1a;windows server 不开源的收费的、linux 开源的免费的&#xff0c;精简安装&#xff08;没有UI)。国产的操作系统有&am…