Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MLO Instance Data #271

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kirill-mapper
Copy link
Contributor

Fixing MLO Instance Data - groupId, floorId, defaultEntitySets*, numExitPortals, MLOInstflags.
*There is a bug with defaultEntitySets - it is not possible to get and set data items, for example in vanilla files v_metro_interior_metro_station_3_seoul_milo__3.ymap, probably incorrect offset, parsing, etc, we get null:

uint[] defentsets = MetaTypes.GetUintArray(Meta, CMloInstanceDefs[i].defaultEntitySets);

Fixing MLO Instance Data - groupId, floorId, defaultEntitySets*, numExitPortals, MLOInstflags.
@dexyfex
Copy link
Owner

dexyfex commented Dec 30, 2024

mloi could be null

@kirill-mapper
Copy link
Contributor Author

I couldn't figure out how to solve this. I wanted to suggest that probably getting zero instead of data is a problem from the end. I also didn't find a version of CW where the logic you conceived with defaultEntitySets would work. Now CW can't get an array of vanilla data defaultEntitySets, but it can set data, but probably in a different place. When reading again, the data will be read from a different place.

@kirill-mapper
Copy link
Contributor Author

@dexyfex GetUintArray returns null due to StructureNameHash mismatch (expected 21/UINT, got 74) in the data block. v_metro_interior_metro_station_3_seoul_milo__3.ymap

@kirill-mapper
Copy link
Contributor Author

@dexyfex
So, I fixed defaultEntitySets, now it works.
I also noticed that CMloInstanceDefs[i].defaultEntitySets.PointerDataIndex changes after resaving, the input was 3, after 1, is this how it should be?

@kirill-mapper
Copy link
Contributor Author

All MLO Instance Data gets:
BEFORE/AFTER
изображение
And sets:
изображение

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants