celguar / mangosbot-bots

Bot AI Core from ike3 for cmangos/mangos classic/tbc/wotlk
https://github.com/cmangos/playerbots
84 stars 40 forks source link

Compilation of the latest branch does not pass #306

Closed alexyang-sea closed 8 months ago

alexyang-sea commented 8 months ago

I use git clone https://github.com/celguar/mangos-classic.git --recursive -b ike3-bots command git down the source code, compile will always be an error, do not know what the reason, CMAKE version is 3.28.0, VS2000. I don't know why, the CMAKE version is 3.28.0, VS2000: 10>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1024,38): error C2065: “PTRDIFF_MAX”: 未声明的标识符 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\vmap_extractor\vmapextract\dbcfile.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1024,38): error C2065: “PTRDIFF_MAX”: 未声明的标识符 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(589,13): message : 查看对正在编译的函数 模板 实例化“std::_Num_get_parse_result std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits>>::_Parse_fp_with_locale<0>(char const ,const int,_InIt &,_InIt &,const std::locale &)”的引用 11> with 11> [ 11> _InIt=std::istreambuf_iterator<wchar_t,std::char_traits> 11> ] (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(584,38): message : 在编译 类 模板 成员函数“_InIt std::num_get<wchar_t,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,double &) const”时 11> with 11> [ 11> _InIt=std::istreambuf_iterator<wchar_t,std::char_traits> 11> ] (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(615,16): message : 请参阅 "std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits>>::do_get" 中对 "std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits>>::do_get" 的第一个引用 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1641,105): message : 查看对正在编译的 类 模板 实例化“std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits>>”的引用 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1025,43): error C2065: “PTRDIFF_MAX”: 未声明的标识符 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1026,60): error C2065: “PTRDIFF_MAX”: 未声明的标识符 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1029,38): error C2065: “PTRDIFF_MAX”: 未声明的标识符 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\loadlib\loadlib.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(1024,38): error C2065: “PTRDIFF_MAX”: 未声明的标识符 (编译源文件 D:\CMaNGOS\git_Core\mangos-classic\contrib\extractor\dbcfile.cpp) 11>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xlocnum(589,13): message : 查看对正在编译的函数 模板 实例化“std::_Num_get_parse_result std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits>>::_Parse_fp_with_locale<0>(char const ,const int,_InIt &,_InIt &,const std::locale &)”的引用

alexyang-sea commented 8 months ago

I separated your playerbot mod git to https://github.com/cmangos/mangos-classic这个源码里编译 and successfully compiled it, but I don't know how to import playerbot's database, because Mango's doesn't have such tables as CHARACTER, WORLD, etc., I I can't see the playerbot after entering the game, is there a detailed instruction for installing and importing the playerbot?

celguar commented 8 months ago

use my fork of classic-db and use InstallFulldb.sh

alexyang-sea commented 8 months ago

What about the sql provided in the module "bots", only the characters are imported into classiccharacters, but all the sql in the playerbot and world files are imported into classicmangos? I tried using the database you provided a link to, using the InstallFulldb.sh's: 2) Install fresh Classic-DB only to 'classicmangos' item to do so, but it still didn't load the bots, I don't know if I'm not doing the steps correctly or if something needs to be set up. Also the quests and NPCs are in English, is there a Chineseisation file somewhere to import?

alexyang-sea commented 8 months ago

Hey, I've given up, it's been 2 or 3 days and it still won't start up, I can still get into the game normally without importing bos's sql, but no bots, and once I've imported bots's sql, the server flashes back and reports errors. I don't know if any of you who have compiled successfully can help me out.

celguar commented 8 months ago

Errors above are normal, are they the last?

celguar commented 8 months ago

you should also use sqls from custom folder

alexyang-sea commented 8 months ago

I first used the base sql in classic, then I used the BOTS sql, but after importing the BOTS sql, I got an error when I started mangos,exe, and then it flashed back!What sql in total do I need to import, and I've used the./InstallFullDB.sh的 2) Install fresh Classic-DB only to 'classicmangos' unavailable> 4) Full installation (create all DB and MySQL user, root required) Because when DeleteAll prompts> Creating mangos user in database ... FAILED!

ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation

alexyang-sea commented 8 months ago

@celguar I recompiled again yesterday and still ended up flashing with an error when starting mangos.exe. The error is as follows, it should be related to the bot's account data, but the playerbot's sql I have imported successfully, only the world's sql in BOTS prompts unsuccessful when importing to classicrealmd, I wonder if I'm importing in the wrong place? I am looking for an answer to this question. The error is as follows: Loading spellIds. Creating random bot accounts... =Loading available names... = 0% Creating random bot characters... =Spell action 26972 not added into button 4 for player Aeduuin: player don't known this spell =Spell action 26972 not added into button 4 for player Jupp: player don't known this spell Spell action 26972 not added into button 4 for player Benoite: player don't known this spell Spell action 26972 not added into button 4 for player Nazubal: player don't known this spell Spell action 26972 not added into button 4 for player Peiros: player don't known this spell Spell action 26972 not added into button 4 for player Doriskos: player don't known this spell =Spell action 26972 not added into button 4 for player Liodrada: player don't known this spell Spell action 26972 not added into button 4 for player Boter: player don't known this spell =Spell action 26972 not added into button 4 for player Zohartze: player don't known this spell Spell action 26972 not added into button 4 for player Agacie: player don't known this spell Spell action 26972 not added into button 4 for player Arnulf: player don't known this spell =Spell action 26972 not added into button 4 for player Theobald: player don't known this spell =Spell action 26972 not added into button 4 for player Agathonice: player don't known this spell =Spell action 26972 not added into button 4 for player Armin: player don't known this spell Spell action 26972 not added into button 4 for player Gifford: player don't known this spell =Spell action 26972 not added into button 4 for player Aafte: player don't known this spell =Spell action 26972 not added into button 4 for player Loza: player don't known this spell =Spell action 26972 not added into button 4 for player Arnold: player don't known this spell =Spell action 26972 not added into button 4 for player Domentzia: player don't known this spell =Spell action 26972 not added into button 4 for player Lucey: player don't known this spell =Spell action 26972 not added into button 4 for player Huchon: player don't known this spell Spell action 26972 not added into button 4 for player Axylus: player don't known this spell =Spell action 26972 not added into button 4 for player Mirabelle: player don't known this spell Spell action 26972 not added into button 4 for player Menexinos: player don't known this spell =Spell action 26972 not added into button 4 for player Anne: player don't known this spell =Spell action 26972 not added into button 4 for player Marganice: player don't known this spell Spell action 26972 not added into button 4 for player Goldyeua: player don't known this spell =Spell action 26972 not added into button 4 for player Iovinus: player don't known this spell =Spell action 26972 not added into button 4 for player Anytus: player don't known this spell Spell action 26972 not added into button 4 for player Epicelena: player don't known this spell =Spell action 26972 not added into button 4 for player Homeros: player don't known this spell =Spell action 26972 not added into button 4 for player Daufari: player don't known this spell =Spell action 26972 not added into button 4 for player Hildeth: player don't known this spell =Spell action 26972 not added into button 4 for player Selinah: player don't known this spell =Spell action 26972 not added into button 4 for player Huguenin: player don't known this spell =Spell action 26972 not added into button 4 for player Nieves: player don't known this spell =Spell action 26972 not added into button 4 for player Kathrine: player don't known this spell =Spell action 26972 not added into button 4 for player Ilene: player don't known this spell =SQL: mysql_stmt_prepare() failed for 'INSERT INTO characters (guid,account,name,race,class,gender,level,xp,money,playerBytes,playerBytes2,playerFlags,map, position_x, position_y, position_z, orientation, taximask, online, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, death_expire_time, taxi_path, honor_highest_rank, honor_standing, stored_honor_rating , stored_dishonorable_kills, stored_honorable_kills, watchedFaction, drunk, health, power1, power2, power3, power4, power5, exploredZones, equipmentCache, ammoId, actionBars, specCount, activeSpec, fishingSteps) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ' SQL ERROR: Unknown column 'specCount' in 'field list' Critical Error: A condition which must never be false was found to be false. Server was shut down to protect data integrity. If this error is occurring frequently, please recompile the software in debug mode to get more details.

celguar commented 8 months ago

Hello, did you apply these custom sql to your characters database

alexyang-sea commented 8 months ago

After I created the empty database, I imported the corresponding sql into the corresponding database, the sql of the three folders in BOTS, I imported the one from characters into classiccharacters, the one from playerbot into classicplayerbots, and the one from world into classicmangos, but there is an error when importing 21:02:18 delete FROM gossip_menu_option where option_id = 99 Error Code 1175. I imported from classicmangos, but there is an error 21:02:18 delete FROM gossip_menu_option where option_id = 99 Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.000 sec . After doing the above steps, I have also passed the . /InstallFullDB.sh to install it. Then when I start the server, I get the above error and then mangos.exe flashes.

celguar commented 8 months ago

Sorry for got to add a url. Anyway it's in sql/custom/characters

celguar commented 8 months ago

You need to apply all custom sql from custom folder to corresponding databases

celguar commented 8 months ago

You can skip mangos ones if you don't need, but character is necessary since it changes character database

celguar commented 8 months ago

I'm sorry for the inconveniences

alexyang-sea commented 8 months ago

Thank you for your patience, but I still have a question for you: when you say customized sql, do you mean the sql in BOTS or include the base in the sql folder of classicmangos? Because I have manually imported the 4 sql of the base in the sql folder of classicmangs, and I manually imported the sql in BOTS. but the error is still the same

celguar commented 8 months ago

I mean cmangos classic/sql/custom/characters/

celguar commented 8 months ago

I've added dual spec and transmog and armory feed (for my spp repack website armory) so server expects that db structure. I'm sorry I didn't modify stock .sh to installed them automatically

alexyang-sea commented 8 months ago

After following your tips, I imported the sql for custo/characters and started mangos.exe without flashing back, I opened the client to log in full of joy and disconnected even more by entering my account password. I found a hint on mangos.exe about the map was created by V8, but expected V6. so I re-cmake again and ticked BUILD_EXTRACTORS, and then there were a lot of errors when compiling. I have made a document with the compile errors, when you have time can you help me to see where the problem is, sorry for the inconvenience. compile error.txt

Is it because I'm using Cmake 3.28 and VS2022 and the version is too new to be supported? But I can compile it through with cmangos / mangos-classic tick tool, and the map data extracted with his compiler is put into your server, and there will be a prompt like the one below at startup: =SQL: select map, position_x, position_y, position_z from (select map, position_x, position_y, position_z, avg(t.maxlevel), avg(t.minlevel), 57 - (avg(t.maxlevel) + avg(t.minlevel)) / 2 delta from creature c inner join creature_template t on c.id = t.entry where t.NpcFlags = 0 and NOT (extraFlags & 1024 OR extraflags & 64 OR unitFlags & 256 OR unitFlags & 512) and t.lootid != 0 group by t.entry having count() > 1) q where delta >= 0 and delta <= 5 and map in (0,1,530,571) and not exists ( select map, position_x, position_y, position_z from (select map, c.position_x, c.position_y, c.position_z, avg(t.maxlevel), avg(t.minlevel), 57 - (avg(t.maxlevel) + avg(t.minlevel)) / 2 delta from creature c inner join creature_template t on c.id = t.entry where t.NpcFlags = 0 and NOT (extraFlags & 1024 OR extraflags & 64 OR unitFlags & 256 OR unitFlags & 512) and t.lootid != 0 group by t.entry ) q1 where abs(delta) > 5 and q1.map = q.map and sqrt((q1.position_x - q.position_x)(q1.position_x - q.position_x) +(q1.position_y - q.position_y)(q1.position_y - q.position_y) +(q1.position_z - q.position_z)(q1.position_z - q.position_z)) < 60) query ERROR: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'classicmangos.c.map' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

celguar commented 8 months ago

that sql error happens on mysql8.0, due to old sql code for bots to generate grind spawn points. I use mysql 5.7 so it works for me. You can take them from SPP Classics repack if you want. We have a modified mmap extractor, and as our core is from July 2023 our mmaps are V6, not v8. So you need to use extractor from my fork of cmangos, not official one.

celguar commented 8 months ago

ah well, repack doesn't have it in repo, here you go https://mega.nz/file/qdFigCIZ#FkvaFGWYZ13OGYJu_DDAY3z_8PtrQ0f3nAoMwmwcfzk

alexyang-sea commented 8 months ago

I also tried to compile the extractor from your mangos branch, but it never worked, I've changed VS2022 to 2017, Cmake to 3.12, and BOOST to 1.75, but it still fails to compile with many errors, I'm not sure which version of software I'm using is wrong!And I tried to go to sppclassic to find the extractor and I didn't find it.

celguar commented 8 months ago

vs 2017 wont work with cmangos, I only use vs2022

celguar commented 8 months ago

they changed some stuff in visual studio 2022 that requires a fix for extractors. I won't bother with it right now as I'm updating my classic core to latest cmangos soon. You can just grab mmaps from repack files https://mega.nz/file/aMN2WBBJ#pL4GT3ib57TP-ftuiVj-VvWtkwchpZtFGUpCcbgZTLs

alexyang-sea commented 8 months ago

Yay, very much looking forward to your latest cmangos. additionally, is there no local sql,?I go into the game now and what the bots are saying and the quest descriptions are in English, no Chineseisation has been done right?

celguar commented 8 months ago

Hey feel free to join our discord, link is in description 😃 cmangos classic default doesn't have quest locales I think. In repack we use mangos localized files for locales of items quests etc. I also have vmangos quest locales as one .sql that should be accurate for vanilla. Bots phrases are in bots db, texts table. And ye it was not translated to Chinese I believe

alexyang-sea commented 8 months ago

Thank you for your patience, so that I can compile and play on such a good Vanilla Era, I hope that this simulators optimization is getting better and better, to give the single player a no longer lonely, like with real players in the world of warcraft. I'll still ask questions in discord, I'll close this topic first. I'll close this topic now!