TrinityCore / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
https://www.trinitycore.org/
31 stars 18 forks source link

More detailed example of MPQExtractor #11

Closed idl0r closed 6 years ago

idl0r commented 7 years ago

Hi,

could you please provide an example on how to use MPQExtractor or even the editor? I am actually not dumb but this is really confusing as multiple MPQ Files (not the patches) contain specific files/directories. Also, in the Wiki it says "/Sounds/" but you actually mean "Sound", don't you? "Data/interface.MPQ" seems to be broken, at least in my case it cannot be opened by the MPQEditor. Extracting MPQ's using the extractor + applying patches with it seems to generate broken files. I used the editor for now and applied the patches in the patch list but the armory seems incomplete, missing item, icons etc. What about the MPQ files outside of the locale dir, so e.g. Data/common.MPQ?

Sarjuuk commented 7 years ago

MPQs from the WotLK client aren't patchable, that hassle was added with Cata. They just override each other along the patch chain (content of \.MPQ is overridden by \-patch.MPQ is overridden by \-patch-2.MPQ ad infinitum) So yes, if you find a duplicate file in one of the patches, you just overwrite the older version with it.

No idea what system you are using, but maybe this helps: https://gist.github.com/Sarjuuk/e171bf5e7e9f7503a779

Also, in the Wiki it says "/Sounds/" but you actually mean "Sound", don't you?

whoops

idl0r commented 7 years ago

Ah, thanks! That looks much better know, using your script but still get some errors: https://gist.github.com/idl0r/42cb9e6ac57159f1d1de4b33a0896d27

idl0r commented 7 years ago

Full log: https://gist.github.com/idl0r/02202b5f8fc58f9c0382c6dd7c1127c9

Sarjuuk commented 7 years ago

i have a feeling your TDB is incompatible with 6168937901554f00e1b0a71fb97f9a141d876b49 and its parents. to be sure enable debug in the config and rerun --firstrun

idl0r commented 7 years ago

Yup, looks like that's it:

DB ERROR:

Array
(
    [code] => 1146
    [message] => Table 'idl0r_tdb.item_template_locale' doesn't exist
    [query] => 
        SELECT
            it.entry AS ARRAY_KEY,
            it.name AS name_loc0, IFNULL(itl2.Name, "") AS name_loc2, IFNULL(itl3.Name, "") AS name_loc3, IFNULL(itl6.Name, "") AS name_loc6, IFNULL(itl8.Name, "") AS name_loc8,
            it.maxCount AS cap
        FROM
            item_template it
        LEFT JOIN
            item_template_locale itl2 ON it.entry = itl2.ID AND itl2.locale = "frFR"
        LEFT JOIN
            item_template_locale itl3 ON it.entry = itl3.ID AND itl3.locale = "deDE"
        LEFT JOIN
            item_template_locale itl6 ON it.entry = itl6.ID AND itl6.locale = "esES"
        LEFT JOIN
            item_template_locale itl8 ON it.entry = itl8.ID AND itl8.locale = "ruRU"
        WHERE
            it.entry IN ('37711', '37742', '29434', '41596', '43016', '44990', '43307', '43308', '20560', '20559', '29024', '42425', '20558', '43589', '43228', '44209', '37836', '47395', '38644', '40752', '40753', '45624', '47241', '49426', '41749', '43949')
    [context] => /home/wow/htdocs/aowow/setup/tools/sqlgen/currencies.func.php line 52
)
Aokromes commented 7 years ago

you need to update your core, a lot of changes are made around locales.

idl0r commented 7 years ago

I've installed TDB_full_world_335.63_2017_04_18.sql. It's just the DB, I don't have any server running. Applying updates_tdb_33562_to_33563_only/world_2016_10_17_2017_04_18.sql aborts due to an error:

ERROR 1054 (42S22) at line 45688: Unknown column 'entry' in 'spell_enchant_proc_data'
Aokromes commented 7 years ago

if you install TDB 63, why you try to import update from tdb 62 to 63? you must import TDB 63 then the updates on sql/updates/3.3.5/world/

idl0r commented 7 years ago

Hm, I actually thought "full" means full. I'll clone TrinityCore, apply the updates and try again.

Sarjuuk commented 7 years ago

if you manage to contain yourself for 20-some minutes, i'll have today's changes also implemented.

idl0r commented 7 years ago

Thanks! But no rush. I'll try the Updates. I just didn't expect it to depend heavily on TrinityCore. TrinityCore (and even WotLK) is completely new for me. I had some experiences with (c)mangos in the past years but that's it. I'll report back in a bit whether it's working or not :)

idl0r commented 7 years ago

Hm, it looked much better but it didn't finish. I've dropped the DB and started from scratch, importing TDB full (mentioned version) and applying all updates on the world db of the 3.3.5 branch.

21:28:28           - reading and merging chartitles.dbc for locales 0
DB ERROR:

Array
(
    [code] => 1054
    [message] => Unknown column 'title_A' in 'field list'
    [query] => SELECT IF (title_A, title_A, title_H) AS ARRAY_KEY, BIT_OR(IF(title_A, 1, 2)) AS side FROM achievement_reward WHERE (title_A  0 AND title_H = 0) OR (title_H  0 AND title_A = 0) GROUP BY ARRAY_KEY HAVING side  3
    [context] => /home/wow/htdocs/aowow/setup/tools/sqlgen/titles.func.php line 77
)

*edit Ok, it might be too new/recently updated. I'll wait for your bump then I guess. Or up to what patch should I upgrade?

Nevermind, README has been updated already.

TDB 335.63 - including world updates up to 24.04.2017

Aokromes commented 7 years ago

he told you to wait 20m.

Sarjuuk commented 7 years ago

e7623409533041663c395ced88d164602be18ac2 so there is that..

idl0r commented 7 years ago

Ok, I don't seem to get it done successfully. I've a fresh clone of aowow(7986156), MPQExtractor(bdab761) and the mentioned TDB version (335.63 + world updates up to 04.05.2017 using trinitycore branch 3.3.5 rev 9ae53d2) and two empty databases, one for aowow and one for TDB. I've had to fix some things first: https://gist.github.com/idl0r/a35f20fc52debdd32e116f66902affdd

  1. .htaccess for Apache 2.4
  2. no mod_php but FPM, so PHP options via .htaccess won't work
  3. I had some weird issues with the input capute while using mintty on my Windows machine
  4. generation of glyphs/files took longer than 30s so I had to increase it. 60s or so might be enough, just wanted to get it done successfully, finally

Setup:

  1. Databases: % mysql -u idl0r_aowow -p idl0r_aowow < ~/htdocs/aowow/setup/db_structure.sql % mysql -u idl0r_aowow -p idl0r_tdb < ~/TDB_full_335.63_2017_04_18/TDB_full_world_335.63_2017_04_18.sql Applying patches from TrinityCore/sql/updates/world/3.3.5/ up to 04.05.2017: % mysql -u idl0r_aowow -p idl0r_tdb < {TrinityCore/sql/updates/world/3.3.5/2017_04,TrinityCore/sql/updates/world/3.3.5/2017_05_0{1,2,3,4}}

  2. Extracting MPQ files using your extractor: cd MPQExtractor/build/bin/ bash ~/extract.sh do you also want to extract the optional goodies? (loadingscreens & credits): y You can also get the log if you want. Finally creating .wav/.mp3 files using your snippets

Now that anything is prepared: php aowow --firstrun Here's the log, unfortunately I forgot to enable debug mode: http://qasl.de/~idl0r/tmp/aowow-1.log I'll run it again using debug and attach the log soon

Are you (guys) able to successfully setup aowow from scratch using this/the documented steps?

idl0r commented 7 years ago

With debugging: http://qasl.de/~idl0r/tmp/aowow-2.log

Sarjuuk commented 7 years ago

https://gist.github.com/idl0r/a35f20fc52debdd32e116f66902affdd

http://qasl.de/~idl0r/tmp/aowow-2.log

I assume these are available and readable for php somewhere? The talentIcons script fails, because simpleImg failed to generate the required icons. The rest of the log is fine. You'd get a heck of a lot less warnings on spawns, if you'd let TC generate the zoneInfo though.

/e: on second thought .. i believe you are using locale enGB and are missing only these two

but the setup gets bitchy and discards everything else it had already found.

idl0r commented 7 years ago

why on earth is your terminal using \r as line terminator, when you are using windows. Well, mintty on Windows/cygwin is broken in combination with tmux since some releases, could be the reason but dunno. I actually just play on Windows so it's not that important to me.

glyphs: https://gist.github.com/Sarjuuk/ecf274088e8a9df712240c3aff9fc795 .. took one whole second. If you need the 5 minutes you edited in, then there is something terribly amiss. That change was from when I tried to extract the MPQ files with patching etc. so that might be the reason why it took longer there. It didn't take 5 minutes, I was just to lazy to figure out the exact value so I simply did *10.

on second thought .. i believe you are using locale enGB and are missing only these two

setup/mpqdata/enGB/Interface/Calendar/Holidays/ setup/mpqdata/enGB/Interface/GLUES/LOADINGSCREENS/ but the setup gets bitchy and discards everything else it had already found.

Yup, they're missing. I figured that Calendar/Holidays is in Data/enGB/patch-enGB.MPQ instead of locale-enGB.MPQ

./MPQExtractor -e interface\calendar\holidays\*.blp -f -c -o /home/wow/public_html/aowow/setup/mpqdata/enGB/ /home/wow/WoW/WoW-Mania-2.0.6b/Data/enGB/locale-enGB.MPQ                                              
Opening '/home/wow/WoW/WoW-Mania-2.0.6b/Data/enGB/locale-enGB.MPQ'...                                                                                                                                              

Searching for 'interface\calendar\holidays\*.blp'...                                                                                                                                                               
No file found!                                                                                                                                                                                                     
[^[[0;32mOK^[[0m]  successfully extracted ^[[01;37m/home/wow/WoW/WoW-Mania-2.0.6b/Data/enGB/locale-enGB.MPQ^[[0m 

So the other ones have been skipped. Goodies also have not been extracted. I'll do that by hand for now and try go get that fixed in the extract script later.

idl0r commented 7 years ago

DONE_ONCE is broken there.I've removed that part for now, since I don't have multiple locales anyway. Will do the setup again and report back.

Sarjuuk commented 7 years ago

are you affiliated with wow-mania or did you just get the client from them.

idl0r commented 7 years ago

I play there and I might help them to get their aowow updated/fixed.

Sarjuuk commented 7 years ago

Hm, i wouldn't, seeing how they disregard common attribution customs.