sunwave Posted Tuesday at 11:54 PM Posted Tuesday at 11:54 PM (edited) From what I know, for showing the bonuses you get from composed (+) equipment, the game looks at the ItemAdd.ini file. But I have noticed that the ItemAdd.ini file seems to be missing quite a lot of equipment pieces. Does anyone know if the "bonus stats" logic, formulas, or data lives elsewhere? Edited Wednesday at 12:57 AM by sunwave Added the question tag Quote
kennylovecode Posted Wednesday at 01:53 AM Posted Wednesday at 01:53 AM It is not lacking, as weapon attributes are shared. For example, one-handed weapons start with 444 Quote
kennylovecode Posted Wednesday at 01:54 AM Posted Wednesday at 01:54 AM It is not lacking, as weapon attributes are shared. For example, one-handed weapons start with 444 Quote
kennylovecode Posted Wednesday at 01:54 AM Posted Wednesday at 01:54 AM It is not lacking, as weapon attributes are shared. For example, one-handed weapons start with 444 Quote
sunwave Posted Wednesday at 02:40 AM Author Posted Wednesday at 02:40 AM 45 minutes ago, kennylovecode said: It is not lacking, as weapon attributes are shared. For example, one-handed weapons start with 444 That makes sense! I wonder if someone here can share the exact logic for which ones are shared, and which numbers are associated. Quote
kennylovecode Posted Wednesday at 03:34 AM Posted Wednesday at 03:34 AM 52 minutes ago, sunwave said: That makes sense! I wonder if someone here can share the exact logic for which ones are shared, and which numbers are associated. As long as you look at the document in detail, you can get a general understanding. As far as I know, it should be that one-handed weapons and two-handed weapons are shared, and others are independent. Quote
Emre Posted Wednesday at 08:34 AM Posted Wednesday at 08:34 AM 111000 1 0 0 0 2 0 0 0 0 111000 2 0 0 0 4 0 0 0 0 ... 111000 12 0 0 0 40 0 0 0 0 line[0] = id line[1] = plus line[5] = defense 444330 9 0 1800 1800 0 0 0 14 0 line[3] = minatk line[4] = maxatk line[8] = accuracy 111 = Helmet 444 = 1-Hand Weapons 555 = 2-Hand Weapons 111000 represents IDs from 111000 to 111009. 444330 represents level 130 1-hand weapons (example: 480330–480339 = Club, 410330–410339 = Blade). Quote
kennylovecode Posted Wednesday at 10:04 AM Posted Wednesday at 10:04 AM 1 hour ago, Emre said: 111000 1 0 0 0 2 0 0 0 0 111000 2 0 0 0 4 0 0 0 0 ... 111000 12 0 0 0 40 0 0 0 0 line[0] = id line[1] = plus line[5] = defense 444330 9 0 1800 1800 0 0 0 14 0 line[3] = minatk line[4] = maxatk line[8] = accuracy 111 = Helmet 444 = 1-Hand Weapons 555 = 2-Hand Weapons 111000 represents IDs from 111000 to 111009. 444330 represents level 130 1-hand weapons (example: 480330–480339 = Club, 410330–410339 = Blade). You gave a perfect answer. Quote
Konichu Posted Wednesday at 12:19 PM Posted Wednesday at 12:19 PM Its basically like this, you're looking for the key value. uint64_t ItemManager_::AdditionKey(uint32_t type, uint8_t level) { const uint32_t subType = type / 1000; const ITEMSORT sort = Item::GetItemSort(type); uint32_t key; if (sort == ITEMSORT_WEAPON_SINGLE && subType != 421 && subType < 601) { // Single-hand weapons (non-special): normalize within 100k block + 44xxx slot key = type / 100000 * 100000 + type % 1000 + 44000 - type % 10; } else if (sort == ITEMSORT_WEAPON_DOUBLE && !Item::IsBow(type)) { // Double-hand non-bow weapons: normalize within 100k block + 55xxx slot key = type / 100000 * 100000 + type % 1000 + 55000 - type % 10; } else { // All other items: strip quality/plus digits, keep base + grade key = type / 1000 * 1000 + (type % 1000 - type % 10); } return static_cast<uint64_t>(key) | (static_cast<uint64_t>(level) << 32); } Quote
kennylovecode Posted Wednesday at 01:15 PM Posted Wednesday at 01:15 PM 55 minutes ago, Konichu said: Its basically like this, you're looking for the key value. uint64_t ItemManager_::AdditionKey(uint32_t type, uint8_t level) { const uint32_t subType = type / 1000; const ITEMSORT sort = Item::GetItemSort(type); uint32_t key; if (sort == ITEMSORT_WEAPON_SINGLE && subType != 421 && subType < 601) { // Single-hand weapons (non-special): normalize within 100k block + 44xxx slot key = type / 100000 * 100000 + type % 1000 + 44000 - type % 10; } else if (sort == ITEMSORT_WEAPON_DOUBLE && !Item::IsBow(type)) { // Double-hand non-bow weapons: normalize within 100k block + 55xxx slot key = type / 100000 * 100000 + type % 1000 + 55000 - type % 10; } else { // All other items: strip quality/plus digits, keep base + grade key = type / 1000 * 1000 + (type % 1000 - type % 10); } return static_cast<uint64_t>(key) | (static_cast<uint64_t>(level) << 32); } woo, you working C++ server source? 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.