Jump to content

MaNGOS Components: I want to learn


Recommended Posts

Posted

OK, so I want to learn what each part of the MaNGOS server is supposed to do?

I want to know:

  • * What the MaNGOS server as cloned from the git repository does when it is compiled.
    * How does it interact with the database and who determines the standards for the database? (I guess it is the MaNGOS developers and UDB just follow these guidelines)
    * What are the purpose of scripts as in ScriptDev's scripts?
    * Why exactly the MaNGOS server does the AI scripting and world compilation when the game is supposed to contain them?

Feel free to criticise my questions or my post in general, but just remember, new contributers must learn somewhere.:cool:

Posted

To go over your questions in order:

1. Run a server. Easy as that really, once you compile Mangos it is a platform for clients to connect to on one hand and information about the world they connect to on the other hand. Without database content, clients will see an empty world (no creatures, no NPC's, no quests, etc), but it is a world they can walk around and use skills in. By hooking Mangos up to a fully stocked database you add content, by linking it up with a scripting engine like ScriptDev2 you ensure those mobs do more than just walk around and use random skills.

2. It reads information from the database. Again, this is either so obvious as to be entirely trivial or I'm missing the point of your question. If you mean who determines the database layout, it's Mangos - you will notice SQL updates in the GiT commits every now and again, these are almost always structure related (add a column, delete one, change a columns type, etc). Database structure and content are two fairly seperable things: you can have a very old content database and only apply all the SQL updates found in your mangos/sql/updates folder (from the point on where your content DB was from) and it will still more or less work.

For the characters and realmd databases this is not even a point of concern: no content for those is required, so any updates you may find for those databases in for example UDB or SD2 SQL updates will be more or less copies of the updates released by Mangos. If you look at UDB releases for example you'll see a folder /udb/trunk/updates/0.11.6_additions which contains files like 387_corepatch_mangos_8994_to_9310.sql: this is nothing more than a single file with all the updates between 8994 and 9310 (found in mangos/sql/updates) thrown together. The actual UDB content updates can be found seperately in the file 387_updatepack_mangos.sql.

3. While ScriptDev2 handles quite a lot of scripting, most of it is simply put the ability for NPC's to interact in a non-general manner. Especially in raids and heroics, most bosses don't randomly toss out a few spells - they will also want to summon adds, have specific timers when they do cast spells, they'll shout out at specific points during the fight, etcetera. Almost all of that is handled by SD2 (and to a small degree by ACID). SD2 takes care of the waves summoned during Hyjal, it takes care of the doors in Zul'Aman opening once you kill the bosses, it handles Kalecgos transporting people to another realm in Sunwell Plateau, etc etc. In a way, it provides the intelligence behind creatures and objects.

4. Why on earth would the game (I assume you mean client here) contain AI scripting and world compilation? Your client does not control the creatures (ha, that'd be fun to see), and as far as the world itself is concerned, while the client does contain all the information on how things look like and how maps stick together, it has no data on where creatures are or what they can do or how quests work for example, nor does it allow you to connect to another player in the way Warcaft III for example does - it simply lacks that ability. As for the reason behind Mangos needing client DBC and map files: simply put, client data cannot be trusted, so when you want to blink for example the client will ask the server "hey, I want to blink from this spot to that spot, can I?" whereupon the server looks at the map and says "yeah sure, there aren't any walls in the way, go right ahead". Similarly, the server will need to know at what height it can spawn monsters, and where they can walk (it'd be a bit weird to see creatures randomly walk through mountains) - for these purposes (and probably more) the clients data files are needed by the server as well.

Most of these are fairly trivial questions by the way - yes, you must learn somewhere, but that somewhere is the guides and tutorials you can find all over this forum as well as related fora.

Posted
OK, so I want to learn what each part of the MaNGOS server is supposed to do?

I want to know:

  • * What the MaNGOS server as cloned from the git repository does when it is compiled.
    * How does it interact with the database and who determines the standards for the database? (I guess it is the MaNGOS developers and UDB just follow these guidelines)
    * What are the purpose of scripts as in ScriptDev's scripts?
    * Why exactly the MaNGOS server does the AI scripting and world compilation when the game is supposed to contain them?

Feel free to criticise my questions or my post in general, but just remember, new contributers must learn somewhere.:cool:

1. What you clone from the mangos repository is the server. When you compile it it takes the source code and creates the executables (EXEs) and libraries (DLLs) that you run.

2. It interacts with the database using the MySQL library (a DLL located in the same folder as mangosd.exe, realmd.exe, etc) through networking. Basically, the mangos process connects to the MySQL server (running as a process on the same computer or a different computer) Now, the structure for the database is maintained by mangos and modified when necessary, but putting actual information in (the creature data, teleport data, etc) is up to either: database makers (in the case of the world database) or the server itself (in the case of the characters database) or you (realmd database)

3. Scripts fulfill a variety of purposes. These include AIs for bosses, gossip windows (such as guards in capitol cities), dummy spells, etc.

4. W0rld of W4rcraft is based on something called the "client-server architecture". What this means is that all the stuff that has to be available to the players (graphics, sound, controls, etc.) is put into the client. When you run W0W, you are opening up the client. When you login, you are connecting to a "server". The server handles information from many, many clients (tens of thousands) and basically provides all the functionality of the game (when you move your character, the client sends a "move character" packet to the server. The server then updates your character and sends the "move character" packets to everyone around you, and also checks nearby creature AIs for stuff like aggro.)

Although anyone can download and deconstruct the client, the actual server software that handles everything is kept a secret, locked away in a dark tower in a land far away by your favourite game company. Mangos is more or less an attempt to replicate the functionality of this secret software.

Posted

Thank you. Both of you.

@FragFrog:

I have read most of the tutorials and FAQs and they were either way to technical for someone with as little experience as me, or they did not really tell me what I wanted to know.

@Patman128:

Your 4th answer was basically an answer to most of my questions. Thanks a million! I will now go out and try and understand what is going on with the various components of the MaNGOS server and if I get stuck, I'll come and bother you people with my absolute noobish questions :P

Really, thanks both of you for putting that much effort into making me understand the basics. I appreciate it.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use