骑砍战团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 handling

scene_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

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

WorkPlus私有化即时通讯的标杆,助力企业实现信息管控与保障

在信息时代&#xff0c;保护企业的信息安全至关重要。而私有化即时通讯成为了企业提升信息安全的重要手段。作为私有化即时通讯的领先选择&#xff0c;WorkPlus以其卓越的性能和领先的技术&#xff0c;为企业提供了安全可靠的通信解决方案。 私有化即时通讯是企业保护信息安全的…

新手快速上手掌握基础排序<二>快速排序快速入门

目录 引言 一&#xff1a;快速排序qsort的简介 1.qsort是一个库函数 2.库函数的查询了解方法 3.qsort的具体使用方法 4.qsort函数使用的一些注意点 5.qsort函数的特点 6.代码实现 (1)整数数组的快速排序 &#xff08;2&#xff09;结构体的快速排序&#xff08;学…

在Go中使用Goroutines和Channels发送电子邮件

学习如何使用Goroutines和Channels在Go中发送电子邮件 在现代软件开发的世界中&#xff0c;通信是一个关键元素。发送电子邮件是各种目的的常见实践&#xff0c;例如用户通知、报告等。Go是一种静态类型和编译语言&#xff0c;为处理此类任务提供了高效和并发的方式。在本文中&…

论文阅读: AAAI 2022行人重识别方向论文-PFD_Net

本篇博客用于记录一篇行人重识别方向的论文所提出的优化方法《Pose-Guided Feature Disentangling for Occluded Person Re-identification Based on Transformer》&#xff0c;论文中提出的PDF_Net模型的backbone是采用《TransReID: Transformer-based Object Re-Identificati…

numpy数组04-数组的轴和读取数据

一、数组的轴 在numpy中数组的轴可以理解为方向&#xff0c;使用0&#xff0c;1&#xff0c;2...数字表示。 对于一个一维数组&#xff0c;只有一个0轴&#xff0c;对于2维数组&#xff08;如shape&#xff08;2&#xff0c;2&#xff09;&#xff09;&#xff0c;有0轴和1轴…

计算机操作系统(OS)——P3内存管理

1、内存的基础知识 学习目标&#xff1a; 什么是内存&#xff1f;有何作用&#xff1f; 内存可存放数据。程序执行前__需要先放内存中才能被CPU处理__——缓和CPU与硬盘之间的速度矛盾。 【思考】在多道程序程序下&#xff0c;系统会有多个进程并发执行&#xff0c;也就是说…

「GPT」G、P、T分别是啥意思?

G意为Generative &#xff1a;生成式 比如&#xff0c;生成式的分类器&#xff08;模型&#xff09;包括---- generative classifiers: naive Bayes classifier and linear discriminant analysis 与之对应的为判别式----- discriminative model: logistic regression P意为…

Java项目:102SSM汽车租赁系统

博主主页&#xff1a;Java旅途 简介&#xff1a;分享计算机知识、学习路线、系统源码及教程 文末获取源码 一、项目介绍 汽车租赁系统基于SpringSpringMVCMybatis开发&#xff0c;系统使用shiro框架做权限安全控制&#xff0c;超级管理员登录系统后可根据自己的实际需求配角色…

2024年原创深度学习算法项目分享

原创深度学习算法项目分享&#xff0c;包括以下领域&#xff1a; 图像视频、文本分析、知识图谱、推荐系统、问答系统、强化学习、机器学习、多模态、系统界面、爬虫、增量学习等领域… 有需要的话&#xff0c;评论区私聊

Cookie、Session

一、会话管理 1、什么是会话&#xff1f; 会话是客户端和服务端之间进行多次的请求和响应。 相当于两个人聊天&#xff0c;进行了多次的问答。 对多次问答的管理叫做会话管理&#xff0c;管理的东西是通信状态。 2、什么是状态&#xff1f; 举例&#xff1a; 小明去校园食堂…

QT上位机开发(抽奖软件)

【 声明&#xff1a;版权所有&#xff0c;欢迎转载&#xff0c;请勿用于商业用途。 联系信箱&#xff1a;feixiaoxing 163.com】 用抽奖软件抽奖&#xff0c;是一种很常见的抽奖方式。特别是写这篇文章的时候&#xff0c;正好处于2023年12月31日&#xff0c;也是一年中最后一天…

用html,js和layui写一个简单的点击打怪小游戏

介绍&#xff1a; 一个简单的打怪小游戏&#xff0c;点击开始游戏后&#xff0c;出现攻击按钮&#xff0c;击败怪物后可以选择继续下一关和结束游戏。 继续下一个怪兽的血量会增加5点&#xff0c;攻击按钮会随机变色。 效果图&#xff1a; html代码&#xff1a; <!DOCTYPE…

react + redux 之 美团案例

1.案例展示 2.环境搭建 克隆项目到本地&#xff08;内置了基础静态组件和模版&#xff09; git clone http://git.itcast.cn/heimaqianduan/redux-meituan.git 安装所有依赖 npm i 启动mock服务&#xff08;内置了json-server&#xff09; npm run serve 启动前端服务 npm…

Python入门学习篇(十四)——模块文件操作

1 模块 1.1 理解 包: python中带有__init__.py文件的文件夹 模块: 文件名(不包含.py后缀),如python官方的time.py中time就是模块1.2 示例代码 import datetime# 调用datetime模块中的datetime类的now()方法 t datetime.datetime.now() # 格式化输出日期和时间 strftime(&qu…

【AI】人类视觉感知特性与深度学习模型(1/2)

目录 一、关于人类视觉感知 1.1 视觉关注 1.自上而下&#xff08;Top-down&#xff09;的视觉关注 ​编辑 2.自下而上&#xff08;Bottom-up&#xff09;的视觉关注 3.区别和记忆点 1.2 视觉掩盖 1.常见的视觉掩盖效应 2.恰可识别失真&#xff08;Just Noticeable Dif…

CentOS:docker同一容器间通信

docker同一容器中不同服务以别名访问 1、创建bridge网络 docker network create testnet 2、查看Docker网络 docker network ls 3、运行容器连接到testnet网络 使用方法&#xff1a;docker run -it --name <容器名> —network --network-alias <网络别名> <…

SpringBoot 一个注解实现数据脱敏

什么是数据脱敏 数据脱敏是指对某些敏感信息&#xff0c;例如姓名、身份证号码、手机号、固定电话、银行卡号、邮箱等个人信息&#xff0c;通过脱敏算法进行数据变形&#xff0c;以保护敏感隐私数据。 数据脱敏通常涉及以下几种主要方法&#xff1a; 替换&#xff1a; 将原始…

table表格中使用el-popover 无效问题解决

实例只针对单个的按钮管用在表格里每一列都有el-popover相当于是v-for遍历了 所以我们在触发按钮的时候并不是单个的触发某一个 主要执行 代码 <el-popover placement"left" :ref"popover-${scope.$index}"> 动态绑定了ref 关闭弹窗 执行deltask…

两种方法求解平方根 -- 牛顿法、二分法

Leetcode相关题目&#xff1a; 69. x 的平方根 牛顿法 迭代公式&#xff1a; 以求解 a a a 的平方根为例&#xff0c;可转换为求解方程 f ( x ) f(x) f(x)的根。 f ( x ) x 2 − a f(x)x^2-a f(x)x2−a 迭代公式如下&#xff1a; x n 1 x n − f ( x n ) f ′ ( x n )…

独立站的个性化定制:提升用户体验的关键

随着电子商务的竞争加剧&#xff0c;用户体验成为了企业赢得市场的关键因素之一。独立站作为企业品牌形象和产品展示的重要平台&#xff0c;其个性化定制的程度直接影响着用户体验。本文将探讨独立站的个性化定制如何提升用户体验&#xff0c;并通过代码示例说明实现个性化定制…