当前位置: 首页 > news >正文

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

相关文章:

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

骑砍1战团mod开发-场景制作方法_哔哩哔哩_bilibilihttps://www.bilibili.com/video/BV1Cw411N7G4/ 一.骑砍游戏场景 骑砍战团中进入城堡,乡村,战斗地图都被定义为场景,由module_scenes.py进行管理。 scene(游戏场景) 天空盒(Skyboxes.py) 地形(terrain code) 场景物(scene_…...

ROS学习记录:ROS系统中的激光雷达消息包的数据格式

一、在工作空间中输入source ./devel/setup.bash 二、输入roslaunch wpr_simulation wpb_simple.launch打开机器人仿真环境 三、机器人仿真环境打开成功 四、给机器人围上一圈障碍物 五、再打开一个工作空间终端 六、输入roslaunch wpr_simulation wpb_rviz.launch打开RViz 七、…...

Vue.js和Node.js的关系--类比Java系列

首先我们看一张图 这里我们类比了Java的jvm和JavaScript的node.js。 可以看到&#xff0c;node.js是基础&#xff0c;提供了基础的编译执行的能力。vue,js是实际上定义了一种他自己的代码格式&#xff0c;以加速开发。...

我的笔记本电脑死机问题折腾记录

两年前&#xff0c;买了一台笔记本电脑。直到今年4月份&#xff0c;不到两年的时间&#xff0c;便出现了花屏的情况&#xff0c;然后就到官方售后去维修&#xff0c;换屏。然后在6月份&#xff0c;屏幕问题再次出现&#xff0c;又去售后维修。 经过两次维修&#xff0c;笔记本…...

uniApp中uView组件库的丰富布局方法

目录 基本使用 #分栏间隔 #混合布局 #分栏偏移 #对齐方式 API #Row Props #Col Props #Row Events #Col Events UniApp的uView组件库是一个丰富的UI组件库&#xff0c;提供了各种常用的UI组件和布局方法&#xff0c;帮助开发者快速构建美观、灵活的界面。下面给你写一…...

TDD-LTE 寻呼流程

目录 1. 寻呼成功流程 1.1 空闲态寻呼 1.2 连接态寻呼 2. 寻呼失败流程 2.1 Paging消息不可达 2.2 RRC建立失败 2.3 eNodeB未上发Initial UE message或达到超时 1. 寻呼成功流程 1.1 空闲态寻呼 寻呼成功&#xff1a;MME发起寻呼&#xff08;S1 接口发送Paing 消息&…...

TCP中的三次握手和四次挥手

TCP中的连接和断开可以说是在面试中经常被问到的问题之一&#xff0c;正好有空就总结一下&#xff0c;首先回顾一下TCP的相关知识点 1. TCP的基础知识 1.1 TCP的基本概念 我们知道TCP是运输层的面向连接的可靠的传输协议。面向连接的&#xff0c;指的就是在两个进程发送数据…...

NAO.99b海潮模型的详解教程

NAO.99b模型是由日本国家天文台开发的全球潮汐模式&#xff0c;基于二维非线性浅水方程。该模型具有较高的分辨率&#xff0c;网格间距为0.50.5&#xff0c;网格数为720360&#xff0c;覆盖的经度范围为0.25&#xff5e;359.75E&#xff0c;纬度范围为89.75S&#xff5e;89.75N…...

Plantuml之JSON数据语法介绍(二十五)

简介&#xff1a; CSDN博客专家&#xff0c;专注Android/Linux系统&#xff0c;分享多mic语音方案、音视频、编解码等技术&#xff0c;与大家一起成长&#xff01; 优质专栏&#xff1a;Audio工程师进阶系列【原创干货持续更新中……】&#x1f680; 优质专栏&#xff1a;多媒…...

迅为龙芯2K1000开发板虚拟机 ubuntu 更换下载源

Ubuntu 系统软件的下载安装我们通常使用命令“apt-get” &#xff0c; 该命令可以实现软件自动下载&#xff0c; 安装&#xff0c; 配置。 该命令采用客户端/服务器的模式&#xff0c; 我们的 Ubuntu 系统作为客户端&#xff0c; 当需要下载软件的时候就向服务器发起请求&#…...

你好!Apache Seata

北京时间 2023 年 10 月 29 日&#xff0c;分布式事务开源项目 Seata 正式通过 Apache 基金会的投票决议&#xff0c;以全票通过的优秀表现正式成为 Apache 孵化器项目&#xff01; 根据 Apache 基金会邮件列表显示&#xff0c;在包含 13 个约束性投票 (binding votes) 和 6 个…...

RFC6749-OAuth2.0

前言 最近在项目中需要实现SSO(单点登录)功能,以实现一处注册,即可在任何平台之间登录的功能。我们项目中并没有直接对接第三方认证系统而是通过集成keycloak 完成一系类安全协议的对接工作。如果我们在代码级别自己完成各种安全协议的对接是一项十分大的工程。不仅要走统一的…...

【代码解析】代码解析之生成token(1)

本篇文章主要解析上一篇&#xff1a;代码解析之登录&#xff08;1&#xff09;里的第8行代码调用 TokenUtils 类里的genToken 方法 https://blog.csdn.net/m0_67930426/article/details/135327553?spm1001.2014.3001.5501 genToken方法代码如下&#xff1a; public static S…...

牛客网SQL训练5—SQL大厂面试真题

文章目录 一、某音短视频1.各个视频的平均完播率2.平均播放进度大于60%的视频类别3.每类视频近一个月的转发量/率4.每个创作者每月的涨粉率及截止当前的总粉丝量5.国庆期间每类视频点赞量和转发量6.近一个月发布的视频中热度最高的top3视频 二、用户增长场景&#xff08;某度信…...

kubeadm来搭建k8s集群。

我们采用了二进制包搭建出的k8s集群&#xff0c;本次我们采用更为简单的kubeadm的方式来搭建k8s集群。 二进制的搭建更适合50台主机以上的大集群&#xff0c;kubeadm更适合中小型企业的集群搭建 主机配置建议&#xff1a;2c 4G 主机节点 IP …...

【java爬虫】使用element-plus进行个股详细数据分页展示

前言 前面的文章我们讲述了获取详细个股数据的方法&#xff0c;并且使用echarts对个股的价格走势图进行了展示&#xff0c;本文将编写一个页面&#xff0c;对个股详细数据进行展示。别问涉及到了element-plus中分页的写法&#xff0c;对于这部分知识将会做重点讲解。 首先看一…...

Python使用余弦相似度比较两个图片

为了使用余弦相似度来找到与样例图片相似的图片&#xff0c;我们需要先进行一些预处理&#xff0c;然后计算每两张图片之间的余弦相似度。以下是一个简单的实现&#xff1a; 读取样例图片和目标文件夹中的所有图片。对每张图片进行预处理&#xff0c;例如灰度化、降噪等。计算…...

树莓派4B-Python使用PyCharm的SSH协议在电脑上远程编辑程序

目录 前言一、pycharm的选择二、添加SSH的解释器使用总结 前言 树莓派的性能始终有限&#xff0c;不好安装与使用高级一点的程序编辑器&#xff0c;如果只用thonny的话&#xff0c;本人用得不习惯&#xff0c;还不如PyCharm&#xff0c;所以想着能不能用电脑中的pycharm来编写…...

Servlet的自动加载、ServletConfig对象、ServletContext对象

一、 Servlet的自动加载 默认情况下&#xff0c;第一次访问servlet的时候&#xff0c;创建servlet对象。如果servlet构造函数里面的代码或者init方法里面的代码比较多&#xff0c;就会导致用户第一次访问servlet的时候比较慢。这个时候&#xff0c;我们可以改变servlet对象的创…...

Vue - Class和Style绑定详解

1. 模板部分 <template><div><!-- Class 绑定示例 --><div :class"{ active: isActive, text-danger: hasError }">Hello, Vue!</div><!-- Class 绑定数组示例 --><div :class"[activeClass, errorClass]">Cla…...

Redis相关知识总结(缓存雪崩,缓存穿透,缓存击穿,Redis实现分布式锁,如何保持数据库和缓存一致)

文章目录 1.什么是Redis&#xff1f;2.为什么要使用redis作为mysql的缓存&#xff1f;3.什么是缓存雪崩、缓存穿透、缓存击穿&#xff1f;3.1缓存雪崩3.1.1 大量缓存同时过期3.1.2 Redis宕机 3.2 缓存击穿3.3 缓存穿透3.4 总结 4. 数据库和缓存如何保持一致性5. Redis实现分布式…...

Java - Mysql数据类型对应

Mysql数据类型java数据类型备注整型INT/INTEGERint / java.lang.Integer–BIGINTlong/java.lang.Long–––浮点型FLOATfloat/java.lang.FloatDOUBLEdouble/java.lang.Double–DECIMAL/NUMERICjava.math.BigDecimal字符串型CHARjava.lang.String固定长度字符串VARCHARjava.lang…...

AI,如何重构理解、匹配与决策?

AI 时代&#xff0c;我们如何理解消费&#xff1f; 作者&#xff5c;王彬 封面&#xff5c;Unplash 人们通过信息理解世界。 曾几何时&#xff0c;PC 与移动互联网重塑了人们的购物路径&#xff1a;信息变得唾手可得&#xff0c;商品决策变得高度依赖内容。 但 AI 时代的来…...

在QWebEngineView上实现鼠标、触摸等事件捕获的解决方案

这个问题我看其他博主也写了&#xff0c;要么要会员、要么写的乱七八糟。这里我整理一下&#xff0c;把问题说清楚并且给出代码&#xff0c;拿去用就行&#xff0c;照着葫芦画瓢。 问题 在继承QWebEngineView后&#xff0c;重写mousePressEvent或event函数无法捕获鼠标按下事…...

JS设计模式(4):观察者模式

JS设计模式(4):观察者模式 一、引入 在开发中&#xff0c;我们经常会遇到这样的场景&#xff1a;一个对象的状态变化需要自动通知其他对象&#xff0c;比如&#xff1a; 电商平台中&#xff0c;商品库存变化时需要通知所有订阅该商品的用户&#xff1b;新闻网站中&#xff0…...

安宝特案例丨Vuzix AR智能眼镜集成专业软件,助力卢森堡医院药房转型,赢得辉瑞创新奖

在Vuzix M400 AR智能眼镜的助力下&#xff0c;卢森堡罗伯特舒曼医院&#xff08;the Robert Schuman Hospitals, HRS&#xff09;凭借在无菌制剂生产流程中引入增强现实技术&#xff08;AR&#xff09;创新项目&#xff0c;荣获了2024年6月7日由卢森堡医院药剂师协会&#xff0…...

排序算法总结(C++)

目录 一、稳定性二、排序算法选择、冒泡、插入排序归并排序随机快速排序堆排序基数排序计数排序 三、总结 一、稳定性 排序算法的稳定性是指&#xff1a;同样大小的样本 **&#xff08;同样大小的数据&#xff09;**在排序之后不会改变原始的相对次序。 稳定性对基础类型对象…...

【C++进阶篇】智能指针

C内存管理终极指南&#xff1a;智能指针从入门到源码剖析 一. 智能指针1.1 auto_ptr1.2 unique_ptr1.3 shared_ptr1.4 make_shared 二. 原理三. shared_ptr循环引用问题三. 线程安全问题四. 内存泄漏4.1 什么是内存泄漏4.2 危害4.3 避免内存泄漏 五. 最后 一. 智能指针 智能指…...

比较数据迁移后MySQL数据库和OceanBase数据仓库中的表

设计一个MySQL数据库和OceanBase数据仓库的表数据比较的详细程序流程,两张表是相同的结构,都有整型主键id字段,需要每次从数据库分批取得2000条数据,用于比较,比较操作的同时可以再取2000条数据,等上一次比较完成之后,开始比较,直到比较完所有的数据。比较操作需要比较…...

【 java 虚拟机知识 第一篇 】

目录 1.内存模型 1.1.JVM内存模型的介绍 1.2.堆和栈的区别 1.3.栈的存储细节 1.4.堆的部分 1.5.程序计数器的作用 1.6.方法区的内容 1.7.字符串池 1.8.引用类型 1.9.内存泄漏与内存溢出 1.10.会出现内存溢出的结构 1.内存模型 1.1.JVM内存模型的介绍 内存模型主要分…...