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

MSFS2024: events.txt not loaded completely if filesize exceeds the size stated in layout.json #1859

Open
felixc7 opened this issue Nov 21, 2024 · 4 comments

Comments

@felixc7
Copy link
Contributor

felixc7 commented Nov 21, 2024

Describe the bug
The events.txt file, when generated from MF connector (as of 21 Nov 2024) is 1,336 KB. In MSFS2024, the MF event module will only load 353 KB of the file, since this file size is specified in layout.json. Any event definition after the first 353 KB of the file will not be loaded. MSFS2020 did not seem to process the file size stated in layout.json in the same way, making the file size statement in the .json file irrelevant and preventing any issues.

To fix this bug, I can see a few options:

  • The layout.json could be updated whenever events.txt changes in size. This seems a little cumbersome..
  • The stated file size of events.txt in layout.json can be set to a higher number (e.g. 10,000 KB). This seems like a bit of a botch.. Does not work!
  • Specify a larger file size (e.g. 10,000 KB), fill up file with some form of padding. This seems like even more of a botch.

Steps To Reproduce
Steps to reproduce the behavior:
Debug-compile the WASM module and scroll down the MobiFlight messages in the MSFS2024 console. It will load about 3800 Event definitions. The last definition is truncated.
Alternatively: Try using one of the AS530_xxx events that appear late in the events.txt, they will not work. Move it to an earlier position in the file and it will work.

@DocMoebiuz
Copy link
Collaborator

Thanks for this feedback. Since MobiFlight connector is not using events.txt anymore and doesn't ship one either, this behavior was not surfaced so far.

  • In what context is the events.txt relevant to you? I guess something related to Octavi?
  • Can you explain why you would want 10MB presets in the events.txt?

@vanderhaas
Copy link

I'll chime in.
The events (and events.user) files are useful to trigger mobiflight events from Flight Tracker Stream Deck plugin. Very useful tool for those with compact setups.
Both events and events.user files will not work properly in MSFS2024 if they don't have exact size set in layout.json

For me it's not a huge issue. I can edit it myself with every change.

@DocMoebiuz
Copy link
Collaborator

@vanderhaas so you are saying that it works for you OK as long as the file size matches the file size of events.txt? Because the solution could be then to update the json file automatically after downloading the events.txt through MobiFlight.

@vanderhaas
Copy link

@DocMoebiuz yes. I sometimes have a slight issue with the last event on the list not working, but it might be due to the wrong size being reported by windows or something like that. Other than that it works fine when json matches the actual file size.

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

No branches or pull requests

3 participants