Jump to content
Alloder.pro  about Allods with love 😱
Search In
  • More options...
Find results that contain...
Find results in...

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

Digest April

We talk about what was done and updated in the past month. We help keep abreast of events.

Read more

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

ID


Negos
 Share

Recommended Posts

Guest Valltron

обычно идет что-то типа ....GetID(), Но ID этот не есть какойто глобальный в таблице. Он генерируется при создании строки с информацией, и именно он передается. Например при появлении предмета в сумке, создается строка в таблице, и присваивается ему ID, также при респах мобов, также и со всей другой инфой.

В какихто темах это уже обсуждалось, согласен что сейчас немного бардак на форуме

Link to comment
Share on other sites

Уже писали на форуме, но Skillcoder постоянно чистит форум от мусора, и мог нечаянно потереть лишнее. Вот что писали в форуме: не существует (или ещё не найдено?) системы уникальных ID-номеров, как в ВоВ. Известно, что в АО, предметам создаются ID-номера в момент их появления в сумке персонажа. И эти номера уникальны только в пределах коллекции предметов этого конкретного персонажа. Т.е. такой же предмет, у другого персонажа, будет иметь другой номер. Поэтому, единственным, на данный момент, приемлемым ID можно считать названия предметов.

От себя добавлю, что использовать названия немного неудобно, из-за того что сайтам вроде Allakhazam.com приходится использовать ID в URL-ах, а кириллица в URL-ах (хоть и работает во всех браузерах, но) отображается по разному. Да и произвольная длина строки тоже не очень удобно. Мой совет: из строки названия подсчитывать CRC32, и использовать его как ID. CRC32 это удобно, это "unsigned int32" (32-битное целое беззнаковое число), которое можно красиво отображать в URL-ах как 8-значное шеснадцатеричное, напр. "8EA3C8A9" - имхо, кратко, удобно, и вполне универсально.

EDIT: НЕЛЬЗЯ ИСПОЛЬЗОВАТЬ CRC32 ТАКИХ КОРОТКИХ СТРОК. См. мой коммент ниже.

Link to comment
Share on other sites

Есть пара предметов с одинаковыми названиями, но разными статами, так что только название не пойдет, надо еще приписывать левел.

Link to comment
Share on other sites

Guest Sunspots

I know it's a bit respectless to speak in English just like this on your forums but I thought I might be able to contribute.

An idea would be to get something out of the localisation files - I'm guessing that all of the localisation .txt's are called the same in every localisation, just that the content is different.

Just throwing that in there.

Link to comment
Share on other sites

Probably all game resources are absolutely identical across different locales. Except Baseloc???.pak files, which contains localized resouces (texts, textures, sounds).

All localized text strings are here: Baseloc???.pak/Bin/pack.loc

Pack.loc is database (binary file), but we made a decompiler for it :)

Link to comment
Share on other sites

Guest Sunspots

Yeah, I've browsed through the localisation files but they are rather messy...

Looking at the localised name for a character could looks something like this (decompiled from pack.loc (My theory is based on that every localisation has the same filenames but different file content)):

\Characters\Elf_female\Instances\ArchipelagoContested1\Merchant_3_Name.txt

Code:
Adelada de Grandeur 

And the title for the same character goes in:

\Characters\Elf_female\Instances\ArchipelagoContested1\Merchant_3_Title.txt

Code:
Food and Drink Vendor

But then I found this:

\Characters\Orc_male\Instances\SecretLab_Heroic\OrcMaleElite_SL.xdb22_22_Name.txt

and

\Characters\Orc_male\Instances\AstralIsle06\OrcMaleElite_SL.(MobKind)40_40_Capt_Name.txt

and

\Characters\Orc_male\Instances\InstTenzisTemple\Instances\Inst_TenzisTemple\TZ_Boss4NPCNecros34_34_Name.txt

They don't seem to have very much standards for this (except for the *_Name.txt and *_Title.txt part)...

Trying to use this as ID's won't be very convenient.

I think we should try to find some LUA function that can print out the ID's of stuff...

I'm looking through some of the scripts, maybe I'll find something.

Link to comment
Share on other sites

Hey, looks like some files (and filenames) are broken because of decompiler bugs!

For example, "OrcMaleElite_SL.xdb22_22_Name.txt" - here "xdb" is filename extension of internal game databases.

Also, I can't read contents of both files in \Characters\Orc_male\Instances\AstralIsle06 folder (OrcMaleElite_SL.(MobKind)40_40_Capt_Name.txt and OrcMaleElite_SL.(MobKind)40_40_Name.txt), there should be UTF-8 encoded string inside, BUT there is only unreadable garbage :( Also, those 2 files are identical. Looks like both files are broken. Can you see (in your english version) what is inside OrcMaleElite_SL.(MobKind)40_40_Capt_Name.txt?

P.S. I think all names inside pack.loc are identical across different locales. You can compare yourself:

http://rapidshare.com/files/327229421/pack.loc__Different_Locales_.rar.html

Link to comment
Share on other sites

Guest Sunspots

in Characters\Orc_male\Instances\AstralIsle06, both OrcMaleElite_SL.(MobKind)40_40_Capt_Name.txt and OrcMaleElite_SL.(MobKind)40_40_Name.txt contains Orc that's it...

The problem with your garbage-files might be due to some problem with Cyrillic letters.

(the files containing xdb in the name seems to work fine too btw)

Link to comment
Share on other sites

No no, it is not encoding problem, because I can read many other files, including the one containing "xdb" in the name. All those files contain perfectly readable UTF-8 encoded cyrillic text.

Only 2 files in Characters\Orc_male\Instances\AstralIsle06 are broken. Also, I think, your (english) versions of those 2 files are broken too, because both files contain suspicious names - "Orc" (I almost sure this is not a name, but race). I think there is a bug in decompiler.

EDIT: Hommit said, there are NPCs named "Orc" in Allods Online. But russian pack.loc decompiles damaged anyway. I have reported this bug in AO Tools topic.

Link to comment
Share on other sites

Guest Hommit

На острове "Каньон больших вод" есть босс-орк, который зовется просто "Орк"...

Link to comment
Share on other sites

Quote:
Да зачем? CRC32 это 2^32 = 4294967296 вариантов.


Это был БОЛЬШОЙ ЖИРНЫЙ FAIL. Только что я сделал открытие. Оказывается, например, в английском языке, очень часто бывает, что из двух разных слов получается одинаковый CRC32. Я столкнулся с этим, пока делал "AO Texture Viewer". Например, из 3000 строк (каждая из которых составлена из 1-3 английских слов) ОЧЕНЬ ЧАСТО (незнаю, как часто, но ОЧЕНЬ) случалось, что попадались строки, CRC32 которых совпадают. НИКОГДА нельзя полагаться на CRC32 из небольших строк, таких, как названия предметов в АО.

Вопрос о приемлимых ID остаётся открытым...
Link to comment
Share on other sites

Спасибо, буду знать.

Если так, то, возможно, английский pack.loc распаковывается (почти) корректно. Но русский pack.loc всёравно битый. Я уже написал об этом баге в теме AO Tools.

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use