kinnay / NintendoClients

Python package to communicate with Switch, Wii U and 3DS servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some fields are unexpectedly disabled when nex.version >= 40000

Coxxs opened this issue · comments

If I'm understanding correctly, when nex.version >= 40000, a field with nex.version >= 30800 and revision >= 3 should still be enabled.
However, in the currently generated code, some fields are unexpectedly disabled when nex.version >= 40000.

Example:
When nex.version = 41000 and revision = 0, these fields are end up being disabled: user_password, refer_gid, user_password_enabled, system_password_enabled

if stream.settings["nex.version"] >= 30700:
if version >= 2:
stream.string(self.user_password)
if stream.settings["nex.version"] >= 30800:
if version >= 3:
stream.u32(self.refer_gid)
stream.bool(self.user_password_enabled)
stream.bool(self.system_password_enabled)
if stream.settings["nex.version"] >= 40000:
if version >= 0:

Nice catch! I think the problem is that Nintendo has reset the revision number back to 0 in the 4.0.0 release... otherwise there would be no issues. Do you have an idea how we can fix this properly?

I thought about this today, but didn't come up with a good solution... Maybe it can be written like this in .proto, but I'm not sure if this can be parsed easily in generate_protocols.py

image_2024-04-12_15