<?xml version="1.0"?>
<rss version="2.0"><channel><title>Wiki: Wiki</title><link>https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/?d=4</link><description>Wiki: Wiki</description><language>en</language><item><title>Adding Waypoints</title><link>https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/adding-waypoints-r20085/</link><description><![CDATA[<div>
	<div>
		<div dir="ltr" lang="en" xml:lang="en">
			<p>
				<big><b>HOW TO CREATE WAYPOINTS - get things moving</b></big>
			</p>

			<p>
				A short Introduction how a path is handled
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>PREREQUISITES</b></big>
			</p>

			<p>
				For every movement of a creature in the wow - world a definition has to be made. (Except the case a hungry one is looking at you for breakfast) The involved objects are: a db table called creature_movement, one with the little strange name db_script_string, one creature you want to teach a way and - last but not least you in the game with GM rights activated.
			</p>

			<p>
				A SQL interface to the database is also needed - equal which you prefer. The Information created in this process later can be &lt;recycled&gt; and used in scripts - eg some escorts type follower or the same way some boss scripts. In any case we recommend to finish the waypoints first and to deal with scripts later.
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>BASICS - what do I need to know</b></big>
			</p>

			<p>
				The route is stored in creature_movement in the following way : id = the guid of the mob and point = an autoincrement counter starting at 1. According to this waypoints always are just pointing to a single creature and - changing single waypoints later is a mess.
			</p>

			<p>
				Mostly the starting point of the route is the spawn poin. Leaving this way maybe possible but not effective. In all cases memorize the spawnpoint cause here your route starts.
			</p>

			<p>
				Also be aware of programming waypoints needs some time and maybe a lot of running work too....
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>STEP 1 - cleaning up</b></big>
			</p>

			<p>
				First find your npc. You need the id and the guid of him.
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.go creature </span><span class="tag">&lt;guid&gt;</span><span class="pln"> may be helpful.
.npc info (target the npc first) gives the needed numbers.
</span></pre>

			<p>
				If youre replacing an old way perhaps save it now. Looking at the waypoints is simply done with
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">SELECT * FROM creature_movement WHERE id = </span><span class="tag">&lt;guid&gt;</span></pre>

			<p>
				To erase former informations in the database you simply use
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">DELETE FROM creature_movement WHERE id = </span><span class="tag">&lt;guid&gt;</span></pre>

			<p>
				Now your npc has no waypoints.
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>STEP 2 - The running job</b></big>
			</p>

			<p>
				Do the following : select your npc switch off his need to visit waypoints
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">UPDATE `creature` SET `MovementType`=1 WHERE `guid`= </span><span class="tag">&lt;guid&gt;</span><span class="pln"> LIMIT 1;</span></pre>

			<p>
				select the npc then type
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.npc follow</span></pre>

			<p>
				 
			</p>

			<p>
				EXCURSION - server manners
			</p>

			<p>
				If that looks strange - lets look at the sense behind. When you visiting the wow world just a part of it is transferred to the client and also in the core just the parts are loaded where some player action occurs. The same way not used areas are taken out of memory on client and server side. You can imagine that a circle-like area around your character. When programming long ways you could get error messages cause some parts of your way are unloaded. Cause you have to select the npc to set his ways and if you are going too far away it is automatically deselected.
			</p>

			<p>
				OK now position yourself at the first spot and type with npc selected
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.wp add </span><span class="tag">&lt;guid&gt;</span></pre>

			<p>
				Congrats - The first waypoint has just been made.
			</p>

			<p>
				Between 2 waypoints the npc always takes a straight line - so to make realistic curves you have to do this by setting more waypoints to simulate it.
			</p>

			<p>
				Follow your path and set your waypoints - and dont forget less is more every waypoint is server workload so just make the neccesary.
			</p>

			<p>
				The npc is going through the waypoint list till the end. When hes at the end restarting again with the first waypoint. That means you must set the way more or less in a circle to return to starting point - else you will see a lost creature hopping through the fields searching for the first entry with odd behavior.
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>Step 3 - Nothing without verification</b></big>
			</p>

			<p>
				Switch on waypoints for your companion
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">UPDATE `creature` SET `MovementType`=2 WHERE `guid`= </span><span class="tag">&lt;guid&gt;</span><span class="pln"> LIMIT 1;</span></pre>

			<p>
				if the mob is doing nothing try typing
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.reload all</span></pre>

			<p>
				Now the creature should start moving and following your route. Watch one "round" to see if it all works correctly.
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>Step 4 - EXTRAS - cream on top</b></big>
			</p>

			<p>
				<br>
				To make additional actions for your (now running) creature you have to access a single waypoint to tell him an action.
			</p>

			<p>
				If you look into your waypoints
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">select * from creature_movement where id = </span><span class="tag">&lt;guid&gt;</span></pre>

			<p>
				You see the following data fields : 5 textid, emote, spell, waittime and a script_id. And a - empty - wpguid.
			</p>

			<p>
				 
			</p>

			<p>
				EXCURSION - searching for guids
			</p>

			<p>
				To put something into a waypoint you have to identify it. That's not that easy when you made 30 or 40. Normally waypoints just exist in the database. To work with them visually, the first step is to spawn them - yes - spawn ! Normally a waypoint has no guid.
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.wp show </span><span class="tag">&lt;guid_of_your_npc&gt;</span></pre>

			<p>
				The core generates guids for every waypoint you use atm. To optionally control it - on the right side of table
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">select * from creature_movement where id = </span><span class="tag">&lt;guid&gt;</span><span class="pln"> </span></pre>

			<p>
				Making long distance ways it can happen that not all wps are generated - then simply walk to the other part and use the command again. Now you're able to identify every single waypoint by his guid in the database.
			</p>

			<p>
				VERY IMPORTANT - clean up when your finished. Every spawned waypoint uses a guid - like you created a lot of mobs. When your finished type
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.wp show off - to delete the waypoint dummies</span></pre>

			<p>
				 
			</p>

			<p>
				<big><b>STEP 5 - WAIT - for what ?</b></big>
			</p>

			<p>
				is at it says ... just standing there around doing nothing simply set the wait time - be aware that this are milliseconds ... one minute = 60000
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>STEP 6 - TEXT - Adding Speech</b></big>
			</p>

			<p>
				There are textid1 to textid5 to be used from 1 up. if more than one is used randomly one will be chosen. To make this far from easy - there is no text field.<br>
				Its a reference into db_script_string. And to make it just more complicated entries must be between 2000000000 and 2000010000 !!!<br>
				so you have to add your text into that table and afterwards you can tell the waypoints. just use content_default for your messages - the other fields are for translations into different languages
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>STEP 7 - EMOTES - clapping npcs</b></big>
			</p>

			<p>
				Simply store an emote number here reference you'll find in the dbc emote tables
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>STEP 8 - SPELLS AND SCRIPTS</b></big>
			</p>

			<p>
				This is going too far for a introduction. You may find Information about possible spells and scripting at other tutorials.
			</p>

			<p>
				 
			</p>

			<p>
				<big><b>ADDENDUM - THE MESSY THING</b></big>
			</p>

			<p>
				<br>
				To change a single waypoint entry is a challange. Ok - a position change can be easy done by
			</p>

			<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">.npc move </span></pre>

			<p>
				When its spawned. But inserting a new point .. you first have to create that point. Than you must free the sequence number he should use - they are a unique key so no equals allowed in the database - by rising all upper waypoints one step up and after that you can give the new one the insertion number. Works with 5 waypoints but is a challange for a long route. The other way round - to swap the gps coordinates - is also not an easy task.
			</p>

			<p>
				So take care that the basic waypoints are all correct and working. In case of error often it will be faster to rebuild the path from scratch than playing around.
			</p>
		</div>
	</div>
</div>]]></description><guid isPermaLink="false">20085</guid><pubDate>Fri, 28 Jul 2017 08:43:42 +0000</pubDate></item><item><title>How to work on bugs</title><link>https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/how-to-work-on-bugs-r20003/</link><description><![CDATA[<p>
	So you've found a bug you want to fix, or a feature you want to implement, thanks! If you follow this guide it will make it much easier for the community to review your changes, and the core team to get them included in the next release. If you need an introduction to git, check out the <a href="https://www.kernel.org/pub/software/scm/git/docs/gittutorial.html" rel="external nofollow">tutorial</a> and <a href="https://www.kernel.org/pub/software/scm/git/docs/everyday.html" rel="external nofollow">Everyday GIT With 20 Commands Or So.</a>
</p>

<p>
	<u><strong>Making Your Changes</strong></u>
</p>

<p>
	The first thing you need to do is obtain a clone of the MaNGOS repository (We will assume MangosZero in these examples)
</p>

<pre class="ipsCode prettyprint lang-html">
$ git clone --recursive http://github.com/mangoszero/server.git 0server
$ cd 0server</pre>

<p>
	Then you need to create your new branch:
</p>

<pre class="ipsCode">
$ git checkout -b make_mangos_scale</pre>

<p>
	Switched to a new branch "make_mangos_scale" Now you're ready to get coding. Be sure to include tests which demonstrate the bug you're fixing, and fully exercise any new features you're adding. You should also take care to make sure the documentation is updated if you're changing the API. Once you've finished making your changes you need to commit them.
</p>

<pre class="ipsCode">
$ git commit -a -m "I made MaNGOS scale by adding quantum tunneling"
Created commit 29f8baa: I made MaNGOS scale by adding quantum tunneling
1 files changed, 0 insertions(+), 1 deletions(-)</pre>

<p>
	<u><strong>Preparing your changes for submission.</strong></u>
</p>

<p>
	Now that you've made your changes it's time to get them into a patch. We need to update rails and fix any conflicts we had.
</p>

<pre class="ipsCode">
$ git checkout master
Switched to branch "master"
$ git pull
$ git submodule init
$ git submodule update
...
$ git checkout make_mangos_scale
Switched to branch "make_mangos_scale"
$ git rebase master</pre>

<p>
	Once you've fixed any conflicts, you're ready to create a patch:
</p>

<pre class="ipsCode">
$ git format-patch master --stdout &gt; make-mangos-scale.diff</pre>

<p>
	Now you can attach that patch file to a getmangos.eu tracker ticket and add the 'patch' tag.
</p>

<p>
	<u><strong>Reviewing Changes</strong></u>
</p>

<p>
	To apply someone's changes you need to first create a branch:
</p>

<pre class="ipsCode">
$ git checkout -b koz_made_mangos_scale</pre>

<p>
	<br>
	Then you can apply their patch
</p>

<pre class="ipsCode">
$ git am &lt; their-patch-file.diff</pre>

<p>
	<br>
	Once you have a working copy, you should take note of the following kinds of things: Are you happy with the tests, can you follow what they're testing, is there anything missing Does the documentation still seem right to you Do you like the implementation, can you think of a nicer or faster way to implement a part of their change Once you're happy it's a good change, please comment on the ticket indicating your approval. Your comment should indicate that you like the change and what you like about it. Something like: I like the way you've restructured that code in Server namespace, much nicer. The tests look good too. If your comment simply says +1, then odds are other reviewers aren't going to take it too seriously. Show that you took the time to review the patch. Once three people have approved it, add the verified tag. This will bring it to the attention of a committer who'll then review the changes looking for the same kinds of things. <br>
	Congratulations and Thank You! Once your changes have been applied, you've officially become part of the large community of independent contributors working to improve MaNGOS.
</p>

<p>
	<u><strong>Important Notes</strong></u>
</p>

<p>
	The MaNGOS core team prefers that you create a github fork only for large changesets which are likely to involve a lot of code reviews/changes back and forth, or if 2 or more people are working on the same feature/bug. But of course, like all the rules, exceptions can be made for cases that demands for it.
</p>
]]></description><guid isPermaLink="false">20003</guid><pubDate>Thu, 21 Jul 2016 22:14:09 +0000</pubDate></item><item><title>Localisation / Translation of MaNGOS</title><link>https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/localisation-translation-of-mangos-r20090/</link><description><![CDATA[<p>
	For many many years, the Localisation effort for <abbr title="Massive Network Game Object Server">MaNGOS</abbr> has been almost non-existent outside of the actual core changes to allow localised text to appear.<br>
	This caused the translation effort to be organised and managed by small groups outside of <abbr title="Massive Network Game Object Server">mangos and</abbr> over time these projects lost interest and died.
</p>

<p>
	In late 2016 we decided to try and change that !!
</p>

<p>
	We created a dedicated Github Organisation and Repositories to hold all the localised data, including preparation and installation scripts.<br>
	This organisation is located <a href="https://github.com/mangosextras" rel="external nofollow">HERE</a>
</p>

<p>
	Following on from this, <a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.getmangos.eu/profile/3-antz/?do=hovercard" data-mentionid="3" href="https://www.getmangos.eu/profile/3-antz/" id="ips_uid_5139_5" rel="">@antz</a> has created a tool '<abbr title="Massive Network Game Object Server">Mangos</abbr> Online Translation Editor' or MOTE which massively simplifies the translation effort:
</p>

<p>
	More information on MOTE can be found <a href="https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/mangos-online-translation-editor-r20089/" rel="">HERE</a>
</p>

<p>
	If you can help us which translations into the following languages:<br>
	Korean, French, German, Chinese, Taiwanese, Spanish, Spanish (South American), Russian and Italian<br><br>
	We would love your help, as would the <abbr title="Massive Network Game Object Server">MaNGOs</abbr> community !!
</p>
]]></description><guid isPermaLink="false">20090</guid><pubDate>Tue, 01 Aug 2017 08:28:43 +0000</pubDate></item><item><title>Mangos Online Packet Editor (MOPE)</title><link>https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/mangos-online-packet-editor-mope-r20091/</link><description><![CDATA[<p>
	Since <abbr title="Massive Network Game Object Server">Mangos</abbr> was first devised, the knowledge behind the packets sending information to and from the server has always been kept under wraps.
</p>

<p>
	- Anyone asking about information was normally told to 'go look in the code for details'
</p>

<p>
	I have long hated this so called cloak and dagger ideal as it harms the community greatly when people who have that information move on.
</p>

<p>
	I have therefore decided to create a Central Packet Knowledge System which covers all the versions of Wow.
</p>

<p>
	On that end I have set up a central Database, along with a small application to assist in populating this DB. The eventual goal is to extract all the relevant information back out and populate the Wiki with the information.
</p>

<p>
	The project is only in it's alpha stage, so any help testing or entering information would be greatly appreciated. Please contact <a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.getmangos.eu/profile/3-antz/?do=hovercard" data-mentionid="3" href="https://www.getmangos.eu/profile/3-antz/" rel="">@antz</a> for a copy of the App plus log in credentials.
</p>

<p>
	<img alt="MOPE1.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="522" data-unique="v2x4mv1pk" src="https://www.getmangos.eu/uploads/monthly_2017_08/MOPE1.jpg.d31ec95f0e0cc3e2da3fc2f0f332110c.jpg"></p>

<p>
	This is main log in screen.
</p>

<p>
	 
</p>

<p>
	<img alt="MOPE2.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="523" data-unique="7kgwwrigk" src="https://www.getmangos.eu/uploads/monthly_2017_08/MOPE2.jpg.82302f699634136c8a1e754f5a920014.jpg"></p>

<p>
	A blank search is automatically done for you, the selected core is Classic by default.
</p>

<p>
	Click on a packet entry opens up the Edit Packet Screen
</p>

<p>
	<img alt="MOPE3.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="524" data-unique="ksv71dmau" src="https://www.getmangos.eu/uploads/monthly_2017_08/MOPE3.jpg.9067dd90f12b8b23b444ccebb6a3f6ad.jpg"></p>

<p>
	This contains various information about the packet as well as the packet field definitions.
</p>

<p>
	Double-clicking on a field will open the field definition screen.
</p>

<p>
	<img alt="MOPE4.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="525" data-unique="n12ffwaxn" src="https://www.getmangos.eu/uploads/monthly_2017_08/MOPE4.jpg.97484428efd1f65fc5617162643c4ea1.jpg"></p>

<p>
	This screen allows you to enter as much field information is you can, optionally you can also adjust which core this field is valid for (out of a maximum of the cores using this packet). This allows for different fields / field order based on the core it's used for.
</p>

<p>
	<img alt="MOPE5.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="526" data-unique="1pv5j1hz4" src="https://www.getmangos.eu/uploads/monthly_2017_08/MOPE5.jpg.25e7bd113764ee2fa36525f1220bc801.jpg"></p>

<p>
	You can also use searches to filter the main list of packets.
</p>
]]></description><guid isPermaLink="false">20091</guid><pubDate>Tue, 01 Aug 2017 10:20:53 +0000</pubDate></item><item><title>Mangos Online Translation Editor (MOTE)</title><link>https://www.getmangos.eu/wiki/tutorials/contributing-to-mangos/mangos-online-translation-editor-mote-r20089/</link><description><![CDATA[<p>
	<strong><span style="font-size:16px;">What is MOTE ?</span></strong><br><abbr title="Massive Network Game Object Server">Mangos</abbr> Online Translation Editor or MOTE for short is a word based translation editor for <abbr title="Massive Network Game Object Server">MaNGOS</abbr>, it aims to massive simplify the Adding / Editing of Translations for all the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> tables.
</p>

<p>
	<span style="font-size:16px;"><strong>Why is it MOTE different to other translation projects ?</strong></span><br>
	- It has been designed to be multi-core compatible, therefore sharing the translations of matching text between the cores.<br>
	- By being word based, rather than entry based, the translation of a word needs only be done once and it becomes available anywhere the English word is used.<br>
	- A simple user interface makes changing text very easy.
</p>

<p>
	The Initial login screen: (guest as the username and password will grant you read only access)
</p>

<p>
	<img alt="motelogin.png.d62db452c5d1bcc8e616690eade43bf3.png" class="ipsImage ipsImage_thumbnailed" data-fileid="500" src="https://www.getmangos.eu/uploads/monthly_2017_07/motelogin.png.d62db452c5d1bcc8e616690eade43bf3.png"></p>

<p>
	The default main screen:
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileid="496" href="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE2.png.fed38f2a171e6b906a9c6887417777e2.png" rel=""><img alt="MOTE2.png" class="ipsImage ipsImage_thumbnailed" data-fileid="496" src="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE2.png.fed38f2a171e6b906a9c6887417777e2.png"></a>
</p>

<p>
	 
</p>

<p>
	Searching for bread* with German translations:
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileid="495" href="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE3.png.30205baef9551268e49c0ace9d1af33c.png" rel=""><img alt="MOTE3.png" class="ipsImage ipsImage_thumbnailed" data-fileid="495" src="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE3.png.30205baef9551268e49c0ace9d1af33c.png"></a>
</p>

<p>
	Green means it has a translation, Red means is doesn't<br>
	Clicking on an entry highlights it, and also updates the 'context bar' below the search results
</p>

<p>
	<img alt="MOTE4.png.bd23431362795b76677983191e1abeb1.png" class="ipsImage ipsImage_thumbnailed" data-fileid="492" src="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE4.png.bd23431362795b76677983191e1abeb1.png"></p>

<p>
	The 0123 shows which core it's for. in this example there are two entries, one which is present in all 4, and the other only present in M1,2,3<br>
	 
</p>

<p>
	Double-clicking on an entry opens the translation edit screen:
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileid="493" href="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE5.png.7697dd60b6f5b987ad09fd7385e3c2a0.png" rel=""><img alt="MOTE5.png" class="ipsImage ipsImage_thumbnailed" data-fileid="493" src="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE5.png.7697dd60b6f5b987ad09fd7385e3c2a0.png"></a>
</p>

<p>
	 
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileid="491" href="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE6.png.a41f070fe5f0422d1ca484f7eeb79113.png" rel=""><img alt="MOTE6.png" class="ipsImage ipsImage_thumbnailed" data-fileid="491" src="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE6.png.a41f070fe5f0422d1ca484f7eeb79113.png"></a>
</p>

<p>
	Double-clicking on an entry in the 'context bar' opens a screen to show how it's used:
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileid="497" href="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE7.png.468064681e406d47aee0169708ff7299.png" rel=""><img alt="MOTE7.png" class="ipsImage ipsImage_thumbnailed" data-fileid="497" src="https://www.getmangos.eu/uploads/monthly_2017_07/MOTE7.png.468064681e406d47aee0169708ff7299.png"></a>
</p>

<p>
	Clicking on either of the EDIT buttons will open the translation edit screen.
</p>

<p>
	If you would like to help contribute to the localisation effort, please contact <a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.getmangos.eu/profile/3-antz/?do=hovercard" data-mentionid="3" href="https://www.getmangos.eu/profile/3-antz/" rel="">@antz</a> and he will provide you with the app and login credentials.
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">20089</guid><pubDate>Tue, 01 Aug 2017 08:04:52 +0000</pubDate></item></channel></rss>
