骑砍战团MOD开发(27)-module_tableau_materials.py材质

news/2024/5/18 16:10:47 标签: 游戏程序, 材质

一.配置材质资源

    OpenBrf寻找对应材质资源.

    tableau配置材质资源

  ("round_shield_1", 0, "sample_shield_round_1", 512, 256, 0, 0, 0, 0,[
       (store_script_param, ":banner_mesh", 1),

       (set_fixed_point_multiplier, 100),

       (init_position, pos1),
       (position_set_x, pos1, -50),
       (position_set_y, pos1, 125),
       (cur_tableau_add_mesh, ":banner_mesh", pos1, 120, 0),
       (init_position, pos1),
       (position_set_z, pos1, 10),
       (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_1", pos1, 0, 0),
       (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000),
  ]),

二.使用材质资源

     骑砍引擎支持少量的动态切换材质的场景,例如不同势力的盔甲颜色,军旗.不同势力衣服的纹章.

cur_item_set_tableau_material                    = 1981  # (cur_item_set_tableu_material, <tableau_material_id>, <instance_code>),
                                                         # Can only be used inside ti_on_init_item trigger in module_items.py. Assigns tableau to the item instance. Value of <instance_code> will be passed to tableau code. Commonly used for heraldic armors and shields.
cur_scene_prop_set_tableau_material              = 1982  # (cur_scene_prop_set_tableau_material, <tableau_material_id>, <instance_code>),
                                                         # Can only be used inside ti_on_init_scene_prop trigger in module_scene_props.py. Assigns tableau to the scene prop instance. Value of <instance_code> will be passed to tableau code. Commonly used for static banners.
cur_map_icon_set_tableau_material                = 1983  # (cur_map_icon_set_tableau_material, <tableau_material_id>, <instance_code>),
                                                         # Can only be used inside ti_on_init_map_icon trigger in module_map_icons.py. Assigns tableau to the icon prop instance. Value of <instance_code> will be passed to tableau code. Commonly used for player/lord party banners.
cur_agent_set_banner_tableau_material            = 1986  # (cur_agent_set_banner_tableau_material, <tableau_material_id>),
                                                         # Can only be used inside ti_on_agent_spawn trigger in module_mission_templates. Assigns heraldry.

三.动态更新着色器算法

     可通过提供函数调整高光alpha,环境等相关着色器参数.

# Operations used in module_tableau_materials.py module

cur_tableau_add_tableau_mesh  = 1980  # (cur_tableau_add_tableau_mesh,<tableau_material_id>, <value>, <position_register_no>),
                                                        
cur_tableau_render_as_alpha_mask  = 1984  # (cur_tableau_render_as_alpha_mask)
                                                   
cur_tableau_set_background_color  = 1985  # (cur_tableau_set_background_color, <value>),

cur_tableau_set_ambient_light  = 1987  # (cur_tableau_set_ambient_light, <red_fixed_point>, <green_fixed_point>, <blue_fixed_point>),

cur_tableau_set_camera_position  = 1988  # (cur_tableau_set_camera_position, <position>),

cur_tableau_set_camera_parameters = 1989  # (cur_tableau_set_camera_parameters, <is_perspective>, <camera_width_times_1000>, <camera_height_times_1000>, <camera_near_times_1000>, <camera_far_times_1000>),

cur_tableau_add_point_light  = 1990  # (cur_tableau_add_point_light, <position>, <red_fixed_point>, <green_fixed_point>, <blue_fixed_point>),

cur_tableau_add_sun_light = 1991  # (cur_tableau_add_sun_light, <position>, <red_fixed_point>, <green_fixed_point>, <blue_fixed_point>),

cur_tableau_add_mesh   = 1992  # (cur_tableau_add_mesh, <mesh_id>, <position>, <value_fixed_point>, <value_fixed_point>),

cur_tableau_add_mesh_with_vertex_color  = 1993  # (cur_tableau_add_mesh_with_vertex_color, <mesh_id>, <position>, <value_fixed_point>, <value_fixed_point>, <value>),

cur_tableau_add_mesh_with_scale_and_vertex_color = 2000  # (cur_tableau_add_mesh_with_scale_and_vertex_color, <mesh_id>, <position>, <scale_position>, <value_fixed_point>, <value>),
                                                         
cur_tableau_add_map_icon  = 1994  # (cur_tableau_add_map_icon, <map_icon_id>, <position>, <value_fixed_point>),

cur_tableau_add_troop  = 1995  # (cur_tableau_add_troop, <troop_id>, <position>, <animation_id>, <instance_no>),

cur_tableau_add_horse = 1996  # (cur_tableau_add_horse, <item_id>, <position>, <animation_id>),

cur_tableau_set_override_flags  = 1997  # (cur_tableau_set_override_flags, <value>),

cur_tableau_clear_override_items  = 1998  # (cur_tableau_clear_override_items),

cur_tableau_add_override_item  = 1999  # (cur_tableau_add_override_item, <item_kind_id>),

四.系统内置材质

#游戏窗口
tab_game_profile_window
#军旗
tab_game_troop_label_banner
#部队详情页
tab_game_party_window
#个人仓库页
tab_game_inventory_window
#角色详情页
tab_game_character_sheet    

http://www.niftyadmin.cn/n/5294001.html

相关文章

可执行文件压缩 (Executable compression)+UPX

UPX介绍 UPX&#xff08;Ultimate Packer for eXecutables&#xff09;是一个流行的可执行文件压缩工具&#xff0c;专门用于减小可执行文件的大小&#xff0c;从而减少磁盘占用空间和加快文件传输速度。UPX支持多种平台&#xff0c;包括Windows、Linux、macOS等。 UPX使用一系…

启动springboot时报错 APPLICATION FAILED TO START 包冲突

启动springboot时报错 APPLICATION FAILED TO START 包冲突 problem 具体日志如下 *************************** APPLICATION FAILED TO START ***************************Description:An attempt was made to call a method that does not exist. The attempt was made fr…

在pytorch中,读取GPU上张量的数值 (数据从GPU到CPU) 的几种常用方法

1、.cpu() 方法&#xff1a; 使用 .cpu() 方法可以将张量从 GPU 移动到 CPU。这是一种简便的方法&#xff0c;常用于在进行 CPU 上的操作之前将数据从 GPU 取回 import torch# 在 GPU 上创建一个张量 gpu_tensor torch.tensor([1, 2, 3], devicecuda)# 将 GPU 上的张…

经典文献阅读之--OccNeRF(基于神经辐射场的自监督多相机占用预测)

0. 简介 作为基于视觉感知的基本任务&#xff0c;3D占据预测重建了周围环境的3D结构。它为自动驾驶规划和导航提供了详细信息。然而&#xff0c;大多数现有方法严重依赖于激光雷达点云来生成占据地面真实性&#xff0c;而这在基于视觉的系统中是不可用的。之前我们介绍了《经典…

螺旋数字阵(100%用例)C卷 (JavaPythonNode.jsC语言C++)

疫情期间,小明隔离在家,百无聊赖,在纸上写数字玩。他发明了一种写法: 给出数字个数n和行数m (0 < n <= 999,0 < m <= 999) ,从左上角的1开始,按照顺时针螺旋向内写方式,依次写出2,3...n,最终形成一个m行矩阵 小明对这个矩阵有些要求 1.每行数字的个数一样多…

白话机器学习的数学-2-分类

1、设置问题 图片分类&#xff1a;只根据尺寸把它分类为 纵向图像和横向图像。 如果只用一条线将图中白色的点和黑色的点分开&#xff1a; 这次分类的目的就是找到这条线。 2、内积 找到一条线&#xff0c;这是否意味着我们要像学习回归时那样&#xff0c;求出一次函数的斜率…

我的机器学习起步如何Getting Started

学习技巧和原则 先通过经典书籍进行科普知名机器学习网站根据书籍或网站的目录&#xff0c;先泛读、再选择有兴趣的部分重点精读、后至于反复读知行合一 起步Getting Started 周志华版《机器学习》&#xff0c;又名西瓜书 可以作为科普书籍&#xff0c;需要主动略过对于理论…

自然语言处理1——探索自然语言处理的基础 - Python入门篇

目录 写在开头1. 介绍自然语言处理的基本概念1.1 NLP的核心目标1.2 常见的NLP任务1.3 应用场景详细介绍1.3.1 医疗保健1.3.2 金融领域1.3.3 教育领域1.3.4 社交媒体分析2. Python中常用的自然语言处理库简介2.1 NLTK (Natural Language Toolkit)2.2 Spacy2.3 Transformers2.4 T…