Jump to content
Returning Members: Password Reset Required ×

Recommended Posts

Posted

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.

Posted (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 by cyano
Posted (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 by Mrbedo

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...