Mrbedo Posted June 6 Posted June 6 Hi guys, I wanted to ask about the difference between these two files in the client: ItemType ItemTypeSub What exactly is the purpose of each one? Also, which client version was the first to include them? Are these files available in older client versions as well, or would older clients be unable to read/use them? Just a technical question out of curiosity. Thanks in advance. Quote
cyano Posted June 7 Posted June 7 (edited) I added some documentation on itemtype.dat to the wiki a few weeks ago: https://conquer-online.github.io/wiki/files/content/itemtype.dat.html that you might find useful You can decrypt both files using https://conquer-online.github.io/wiki/security/tqfile.html (seed: 9527). Also relevant to this is the item id: https://conquer-online.github.io/wiki/constants/itemid.html ItemTypeSub.dat wasn't shipped with 5517/1029 (the client I analyzed for the wiki) - but the code to read it is all still in that client version. ItemTypeSub.dat did ship with 6090 (maybe even before then (not got previous versions downloaded/extracted to check) A brief look at the code for it in 5517/1029: It is read immediately after itemtype.dat with the same parser function & tq file cipher seed. Both files load into the same map, keyed by item id. Because ItemtypeSub.dat is read second, it overrides any matching ids from itemtype.dat & adds any new ones. Its essentially a patch/override on top of itemtype.dat. Although I'm not sure the exact rationale behind why they added it. > Are these files available in older client versions as well, or would older clients be unable to read/use them? From a few clients I have, sometimes the amount or order of fields for each item in itemtype.dat would change in later versions. So if you copied an newer itemtypesub/itemtype.dat to an older client, it'll probably still read it (there's no checks) - but would probably cause odd behavior (like wrong attributes/stats in tooltips or missing attributes/actions etc.). You can see the previous wiki link, for the order and fields of itemtype.dat in 5517. Edited June 7 by cyano Quote
Mrbedo Posted June 7 Author Posted June 7 (edited) 6 hours ago, cyano said: I added some documentation on itemtype.dat to the wiki a few weeks ago: https://conquer-online.github.io/wiki/files/content/itemtype.dat.html that you might find useful You can decrypt both files using https://conquer-online.github.io/wiki/security/tqfile.html (seed: 9527). Also relevant to this is the item id: https://conquer-online.github.io/wiki/constants/itemid.html ItemTypeSub.dat wasn't shipped with 5517/1029 (the client I analyzed for the wiki) - but the code to read it is all still in that client version. ItemTypeSub.dat did ship with 6090 (maybe even before then (not got previous versions downloaded/extracted to check) A brief look at the code for it in 5517/1029: It is read immediately after itemtype.dat with the same parser function & tq file cipher seed. Both files load into the same map, keyed by item id. Because ItemtypeSub.dat is read second, it overrides any matching ids from itemtype.dat & adds any new ones. Its essentially a patch/override on top of itemtype.dat. Although I'm not sure the exact rationale behind why they added it. > Are these files available in older client versions as well, or would older clients be unable to read/use them? From a few clients I have, sometimes the amount or order of fields for each item in itemtype.dat would change in later versions. So if you copied an newer itemtypesub/itemtype.dat to an older client, it'll probably still read it (there's no checks) - but would probably cause odd behavior (like wrong attributes/stats in tooltips or missing attributes/actions etc.). You can see the previous wiki link, for the order and fields of itemtype.dat in 5517. Thanks a lot for the detailed answer and the wiki references! This was exactly the kind of information I was looking for. The explanation about ItemTypeSub.dat overriding ItemType.dat was particularly useful. Really appreciate you taking the time to explain it. Edited June 7 by Mrbedo Quote
Konichu Posted June 7 Posted June 7 (edited) After some point TQ started to add consumables and cosmetics on ItemTypeSub, maybe just to avoid a really long file? idk Edited June 7 by Konichu Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.