loldevs / leaguespec

community crafted knowledge base around Riot Games observer system
Other
149 stars 18 forks source link

Block decoding organization #31

Closed shalzuth closed 5 years ago

shalzuth commented 10 years ago

Would like if someone helped with presenting block info in a better way. We are currently throwing stuff in here : https://github.com/loldevs/leaguespec/wiki/Chunk-Specification satan06 added a table here : https://github.com/loldevs/leaguespec/wiki/List-of-blocktypes I'm not in love with either way. Any good suggestion? Things are going to to get bloated if we continue this route.

honux commented 10 years ago

I believe that the way I store the data locally is the best approach on this subject. Since every data struct contains:

And the only valuable information are the Data Type + Data Owner (at least for decoding), I store it this way:

Data Type Data Owner Definition Packet Structure Notes
0x61 00 Movement Pack [ukn-4][Count.-1][ukn-1]{0x61 Move Structure}
Move Structure [Flag-1][Entity ID-4][Movement Data]
0x6F Entity ID Item Purchase [Item.ID-4][Slot.ID-1][Item.Count-1][ukn-2] Still need to find the meaning of the last 2 bytes.

On Packet Structure, I'm using the following style: [Definition - Size in bytes] If the structure contains data of more than one entity information, I'm using: { Struct Name } Then define it somewhere.

At least with 30~40 types of data it still legible, understandable and with the possibility to expand.

shalzuth commented 10 years ago

What about for dynamic/complex packets like 0x61, to actually decode the move structure? See https://github.com/loldevs/leaguespec/wiki/Chunk-Specification#movement-commands-waypoints for the general decoding, or the unit update one?

sathorn6 commented 10 years ago

Well, if something really gets too complicated you could always just link it to its own section. I think honux's format is good, only thing it's lacking is type information, like if something is a float or int.

sathorn6 commented 10 years ago

I tried something here. Not sure about putting structure in the table though, especially since the table gets really small in the wiki.

strangeglyph commented 10 years ago

The table is getting very small, especially with long names (PKT_SynchVersionS2C_s & co). I moved some structure definitions further down the page, which looks better, but is a lot more scrolling work (Ideally we would have something like a small js app where one could look up packet data by id)

sathorn6 commented 10 years ago

As i understand it now, the packets are the same as the S2C ones in the normal game protocol. So we should probably join our efforts somehow with these IntWars guys. They already have a lot more/better understanding of the packets.