editor: LOD_MAP table is missing some LOD models

未关闭
#555 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

  • #556 来自 @Fernando-A-Rocha —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
36/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
lua, python
领域
game-dev

调研方向

Start with [editor]/editor_main/server/mapEditorScriptingExtension_s.lua at the linked LOD_MAP table, then review client/main.lua’s processCursorLineOfSight() use of processLineOfSight and how it obtains buildingId and buildingLOD. The issue cites model 3589 mapping to LOD 3592 and a Python script that parsed IPL files; use those as starting points to identify missing associations. Done means LOD_MAP includes the missing GTA:SA object-to-LOD mappings.

由索引模型根据 Issue 内容生成。

描述

enhancement

Which resource(s) have this problem?
editor_main => server => mapEditorScriptingExtension_s.lua

https://github.com/multitheftauto/mtasa-resources/blob/d4c04db009cdd68913fdb47bbc73acd91e63f981/%5Beditor%5D/editor_main/server/mapEditorScriptingExtension_s.lua#L78

Describe the bug
This table is missing certain object model ID => LOD model ID associations.

e.g. ID 3589 (compfukhouse3)'s LOD model is 3592 (LODpfukhouse3)

To Reproduce
The correct LOD model of a world object / building is actually provided in processLineOfSight ("This function casts a ray between two points in the world, and tells you information about the point that was hit, if any."), which is used by the Map Editor in editor_main => client => main.lua @ processCursorLineOfSight() obtaining buildingId and buildingLOD.

Expected behavior
LOD_MAP should include all Object=>LOD model IDs in GTA:SA.

Screenshots

Version
MTA LOD Table [object] = [lodmodel]

Version of Apr 11, 2023 (last change as of submitting this issue)

Additional context
I created a Python script to parse all of the game's IPL files (including the binary IPLs converted to text), and create a dictionary of object model ID => LOD object model ID according to the info in https://gtamods.com/wiki/LOD#GTA_San_Andreas_.26_GTA_IV . I obtained the same LOD_MAP table in this experiment.

I noticed that some LOD Models like LODpfukhouse3 (3592) aren't actually linked by index by any object model in the same IPL file, which is why the script did not find them... Hmm...

EDIT: I understand now, Rockstar separated some LODs into separate binary IPL files :D

主要语言
Lua
星标
185
派生
180
平均合并
5 天 13 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

multitheftauto/mtasa-resources 的其他 Issue

查看 multitheftauto/mtasa-resources 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。