From The Mana World
(Add Fedora deps)
m (Move page script moved page Dev:How to Develop to Development:How to Develop: Rename Dev: to Development: so the miraheze import works)
 
(61 intermediate revisions by 9 users not shown)
Line 1: Line 1:
We're using Git as version control system for our source files and content. Have a look at our [[Working With Git|Tutorial]] about how to use Git.
==Developing for The Mana World==


Note: The links here are for the rEvolt Project.


=Set Up=
For TMW Classic, you should replace <code><nowiki>gitlab.com/evol</nowiki></code> with <code><nowiki>git.themanaworld.org/evolved</nowiki></code>, keeping other parts intact.
This is a how to help content development for official server (tmwAthena) using Ubuntu and the Mana+ client. Other OS and clients may differ. Following this guide, you should be able to get development testing versions of the client data (tmwa-client-data), server-data (tmwa-server-data) and participate in development by using a localhost server. After getting these, you can both test current development and begin development in the direction you find most fitting.


==Install Dependencies==
=== Quick Start for local server ===
In addition to the basic build tools (GCC, Make, headers, ...), [http://www.gnu.org/software/bison/ '''Bison'''], and [http://sourceforge.net/projects/flex/ '''Flex'''] are needed.


'''  [https://www.debian.org/ Debian] derivates (including [http://www.ubuntu.com/ Ubuntu])'''
* Open a terminal.
sudo apt-get install g++ flex bison python make realpath git


'''  [https://fedoraproject.org/ Fedora] derivates'''
==== Install Dependencies ====
* Open a terminal.
sudo yum install gcc-c++ flex bison make git


Note that you must have gcc 4.6 or later. Any modern distro will have this version, but "stable" distros with very long release cycles, such as Red Hat Enterprise Linux, might not.
Depending on what sql and OS your using install Maria or Mysql packages:
* Maria packages: mariadb-server, mariadb-client, mariadbclient-dev, libmariadbclient-dev
* Mysql packages: mysqldb-server, mysqldb-client, mysqlclient-dev, libmysqlclient-dev


==Set Up Own Server==
All these other dependencies need to be installed regardless of sql used:
'''Here are the steps to use when creating a new local testing server.'''
* zlib-dev or zlib1g-dev package, libpcre3-dev, gcc, make, automake, autoconf, libtool
* Open a terminal.
  mkdir ~/tmwAthena
  cd ~/tmwAthena/
  git clone --recursive git://github.com/themanaworld/tmwa.git
  git clone --recursive git://github.com/themanaworld/tmwa-server-data.git
  cd tmwa/
  ./configure --user # ''(Assuming ~/bin is in your PATH if not use ./configure)''
  make
  make install
  git config --global url.git@github.com:.pushInsteadOf git://github.com ''{{ref|push}} {{ref|once}}''
  cd ../tmwa-server-data
* Preferably, add the update hooks.
  ln -s ../../git/hooks/post-merge .git/hooks/
  ln -s ../../../../git/hooks/post-merge .git/modules/client-data/hooks/ # ''(git 1.7.8 or newer)''
  ln -s ../../../git/hooks/post-merge client-data/.git/hooks/ # ''(git 1.7.7 or older)''
  make conf
  cd client-data
  git checkout master
  cd music
  git checkout master


==Hosting Updates==
Some distributions also require manual installation of ssl and crypto packages:
TMW makes it easy to generate delta zips out of a repository, once it is initially set up.
* libssl-dev, libcrypto++-dev


It will put them in ~/www/updates/, which may be a symlink to wherever your web server is really serving. Setting up a webserver is not covered here.
Note: Some packages may named differently depending on your distro.<br />
You may use <code>apt-cache search libpcre</code> to check all packages which contain 'libpcre' on the name, and hopefully find the right one.
It may be named <code>libpcre0v5-dev</code> for example.
You may try with <code>libpcre++-dev</code> first.


Once everything is set up, just run 'make updates' from the server-data dir every time client-data changes. It will do nothing if appropriate, generate complete zips the first time, and incremental zips afterwards.
apt-cache is not available on non-Debian or non-Debian-based distros.<br />
You may want to use <code>apt search <package(s)></code> instead.


Some notes:
You need gcc <= 9 to compile the servers. gcc-10 and later will raise errors when compiling md5 functions. We advise to install <code>gcc-9</code> packages and pass it under CC environment variable.
* You must put news.txt and skeleton resources.xml file (and maybe an empty resources2.txt) in ~/www/updates/ first.
* Music updates are never added; they should be in the skeleton and updated manually if needed.
* You definitely want to run one of the analyzer scripts frequently, and remove the old updates.


==Updating the Server==
==== Open command line/terminal ====


==  Running and Administrating the Server ==
<code> ~$</code>


The TMWAthena is in fact 3 servers:
==== Clone repository ====
* '''tmwa-login''' which manages accounts and connection to char server.
* '''tmwa-char''' which manages  characters and connects them to the map server.
* '''tmwa-map''' which manages game content (maps, monsters, items, scripts...) and their interaction with characters


run command:


* Start the servers: Open a terminal and run all the local servers. To stop them, either close the terminal or type control-C.
<code>git clone https://git.themanaworld.org/revolt/all.git</code>
  cd ~/tmwAthena/tmwa-server-data/
  ./run-all
* In a new terminal, Launch '''tmwa-admin''' the administration tool, add yourself as an user and make yourself a GM:
cd ~/tmwAthena/tmwa-server-data/login
tmwa-admin
add <username> M <password>
gm <username> 99


You will see something like this:


'''Note''' : Be sure that you are running tmwa-admin from within the "login/" directory. Check that the config files are correct: the connection port should be 6901 for tmwa's configuration, not 6900, which is the hard-coded default.
<code><pre>$ git clone https://git.themanaworld.org/revolt/all.git
Cloning into 'evol-all'...
remote: Counting objects: 69, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 69 (delta 36), reused 0 (delta 0)
Receiving objects: 100% (69/69), 7.05 KiB | 0 bytes/s, done.
Resolving deltas: 100% (36/36), done.
Checking connectivity... done.</pre></code>


'''See also:''' [[GM Commands]]
'''Note: For TMW Classic, you should run this command instead:'''
<code>git clone https://git.themanaworld.org/evolved/all.git</code>


== Connecting ==
'''Everything else should be roughly the same afterward.'''
# Open a command line terminal and run your client pointing to your client data and your local server :
  manaplus --server localhost --port 6901 -u -d ~/tmwAthena/tmwa-server-data/client-data


If all went well, you are now ready to test new content and participate with development.
==== Init repos ====


== develop new content==
In evol-all directory run command
'''You are now free to do some changes, first close the client and your servers.'''
: <code>./init.sh all</code>


'''''Notes for client data changes: 1) commit and push them in the client-data repo 2) commit and push "client-data" when it shows "(new commits)" in your server-data 3) commit and push other server data changes.'''''
==== Build and set-up local server ====
* Make your modifications (e.g. Change a map) and save them.
* Open a terminal.
  cd ~/tmwAthena/tmwa-server-data/client-data''
  git status''
  git add [modified files]''
  git commit''
  git push'' {{note|push}}
  cd ..
  make maps ''(if you changed a map)''
  git status
  git add [modified files]
  git add client-data (if ''git status'' shows ''(new commits)''. '''Don't do this if you don't have push access to client-data!''')
  git commit
  git push {{note|push}}
* Close the terminal.


{{note|push}} : a step for those with commit access to the remote repositories.  For others, you don't need to reconfigure your clone and please make a patch on steps where ''git push'' is suggested. 
In directory '''client-data''' in evol-all run the following command:


{{note|once}} : you only need to do this once, no matter how many times you independently clone the repositories.
: <code>ln -s ../music/music music</code>


  git format-patch -M -C origin/master
If you want to be able to listen to background music.
* pastebin the patch(es) and post for review at irc.freenode.net channel: #themanaworld-dev or on our [http://forums.themanaworld.org/viewforum.php?f=18 development forums]. '''Extensive patches must be posted on the forum as a series of well-formed patches with descriptive commit messages.''' In particular, later patches should not fix errors introduced in earlier patches, and each patch should form a logically independent part.


<span style="color:#FF0000"> '''Note :''' This is kind of outdated; with github it's often easier to do patches on branches there. see: '''[[Working With Git]]''' page</span>


In directory '''server-data''' in evol-all run the following command:


'''You can also pull the data which has been modified.'''
: <code>make new</code>
* Open a terminal.
cd ~/tmwAthena/tmwa-server-data
git pull
* If you haven't installed the hook,
git submodule update --merge  ''at toplevel (for client-data) and in client-data (for music)''
* Close the terminal.


'''See Also:''' [http://wiki.themanaworld.org/images/3/33/README.mv.txt README.mv.txt] - Documentation on using git submodules, like client-data and tmw-music.
On multi-core/thread CPUs try appending -j<number of cores> to delegate a task to every core/thread like <code>make new -j4</code>


=Making Content=
(Note: Mariadb/MySQL needs to be up and running for this command to execute correctly, Debian/Ubuntu may automatically do this setup on installation. Read your distro's manuals for SQL setup and configuration.)
==Making Map Content==
 
==== Running server ====
 
You need to repeat this step every time your computer shuts down,
or every time you close your terminal.
 
First, you should be in server-data folder.
 
In three separate console windows, run the following commands:
 
: <code>./login-server</code>
: <code>./char-server</code>
: <code>./map-server</code>
 
Pay attention to any bug reported in any of them, as they often mean
something went wrong in the previous steps.
 
Keep in mind that if you close the terminal windows, you'll need to
run these commands again. You should preferably run them in this order.
 
Note: You may also use <code>screen</code>, <code>tmux</code> or <code>byobu</code>
(those are linux console/terminal programs) to make your life easier, by keeping
the servers running in background while multiplexing many terminals into a single one.
Instructions on how to use those are not provided here; Please read their manpage
instead or refer to these links:
[https://www.gnu.org/software/screen/manual/ screen] [https://github.com/tmux/tmux/wiki tmux]
[https://www.byobu.org/documentation byobu]
 
Note: MySQL/Mariadb must be running for these commands to work.
 
==== Register an Account via M+ on localserver & GM account ====
 
If everything went well, you should have your servers up and running.
To login on your localhost, you can do it two ways: By our provided tool file,
or by manually adding a new entry to ManaPlus.
 
To use the provided tool file:
 
<code><pre>cd tools/manaplus
./connect_local_server.sh</pre></code>
 
 
To set-up M+ (ManaPlus) to log into localserver:
 
Name: My Dev
 
Address: 127.0.0.1
 
Port: 6901
 
Server type: Evol2
 
Once connected select the register button & sign up for an account
 
Once registered, test by logging into the server.
 
Note: If you have not yet installed client-data you may not see any artwork after logging in.
Note: If you log in to your local server without using the script, Manaplus may use the wrong client-data.
 
Now you should be able to give that account GM by running
<code>make givegm</code>
 
You should now have a working Local server with GM 99 on your account.
 
=== Additional steps you may need for development (Advanced) ===
 
Before next steps you should open terminal in evol-all direcory.
 
You should something like this:
 
<code>$~/evol-all</code>
 
Depend what kind of development you will do, you need run of any additional steps.
 
Also you can mix any of 4.x. steps in one directory.
 
====Server code development ====
 
If you want run or develop server code or server content, you must install "server" task.
 
run command:
 
<code>./init.sh server</code>
 
and you will see repository cloning progress.
 
After will be created new directories: '''server-code''', '''server-data''', '''server-plugin'''
 
==== Run manaplus or client data / art / maps etc. development ====
 
If you want develop client side content, you must install "client" task.
 
run command:
 
<code>./init.sh client</code>
 
and you will see repository cloning progress.
 
After will be created new directories: '''client-data''', '''tools'''
 
If you want latest ManaPlus version, you also should install task "manaplus" and build it. See [[#ManaPlus|1.3.5]].
 
==== Music ====
 
If you want develop music, you must install "music" task.
 
run command:
 
<code>./init.sh music</code>
 
and you will see repository cloning progress.
 
After will be created new directories: '''music'''
 
==== Local server ====
 
run command:
 
<code>./init.sh local</code>
 
and you will see repository cloning progress.
 
After will be created new directories: '''server-local''', '''server-code''', '''server-data''', '''server-plugin'''
 
Probably you also should add task "client" for running ManaPlus. See [[#Run manaplus or client data / art / maps etc. development|1.3.2]].
 
See also [[localserver|local server]]
 
====ManaPlus ====
 
If you want develop ManaPlus or want run ManaPlus from git, you should install "manaplus" task.
 
run command:
 
<code>./init.sh manaplus</code>
 
and you will see repository cloning progress.
 
After will be created new directories: '''manaplus'''
 
====All====
 
If you want all tasks at same time, you must install task "all".
 
run command:
 
<code>./init.sh all</code>
 
and you will see repository cloning progress.
 
After will be created new directories for all possible work.
 
==== Install and configure mariadb server ====
 
For run server you need install and configure mysql or mariadb.
 
[[guidelines/installmariadb|See here]]
 
====Run client and connect to server ====
 
Before running client you must install atleast '''server''' and '''client''' task or '''all''' task.
 
If you want run ManaPlus and connect to local server, run this:
 
<code><pre>cd tools/manaplus
./connect_local_server.sh</pre></code>
 
Client will start and connect to server.
 
==Making Content==
===Making Map Content===
See [[Mapping Tutorial]].
See [[Mapping Tutorial]].
===Python Converter Tool===
====Adding Map Content to Local Server====
After editing maps for the client, you need to generate the walkmaps and imports for the server. yhis can be done either by the '''[[Tiled]]''' application or by running the python script '''tmx_converter.py''' which is located in the '''tools''' folder of the '''Server Data''' folder.
The server have its own version of the collision data of a map.
(see [[Mapping Tutorial#Creating the WLK files]])
To update it, on server-data folder, simply run:
After that, commit and push the files that the converter edited. Note that, if you do not have push access to the main repository, you should let someone else update the submodule itself.
 
: <code>make maps</code>
===Adding Art Content===
Use '''<code>dyecmd</code>''' to ensure your artwork is sane (32 bit, PNG, alpha, without any pallete and other data). This command is provided at the ManaPlus package. See the ManaPlus Website for help with XML files. (You may need to look at sitemap)
 
===Adding Music Content===
All music must be OGG Vorbis with 44100 Hz resolution.
 
===ADDING QUESTS & SCRIPTS===
Edit the txt files at "server-data/npc". Use "make maps" to generate the imports, if you added a new NPC.
 
Restart map-server when you change any script, and it'll have effect. You can also use "<code>@serverexit 101</code>" if you're using the test server wrappers; Or use "<code>@reloadnpc</code>" command if you changed a single file. Map-Server will report any errors or warnings on your code. You must not introduce any new error or warning to have your new quest/script accepted.


==Getting Art Content Into The Game==
The scripting references can be found at "doc/server/scripts", which should have been included by "init.sh all".
* Post [CPT] or [WIP] art on the [http://forums.themanaworld.org/viewforum.php?f=8 graphics development forum].
* Work with the Art Director and collaborators on getting the art consistent.
* When finished, edit topic as [FND].
* Art Director approves [FND] art and marks it [RC].  Should the art need animation or special effect, the Art Director requests xml for it.  If not, the Art Director commits it and marks as [GIT].
* XML Team reviews or drafts xml related to the art, then commits the .png and .xml.  Topic can be marked as [GIT].
::* Art content affected: client-data/graphics/sprites then related directory for .png and .xml animation addition.
* Project developer requests database entry reservations from a General Content Team developer.
::* Map entry server data affected: resnametable.txt and .wlk files in the data directory, map content files in the npc directory.
::* Map entry client data affected: .tmx files in the maps directory.
::* Map entry requires the running of the .tmx converter (aka java converter) before commits can be made.
::* Art content server data affected: entry made in the item_db.txt, mob_db.txt or mob_skills_db.txt in the db directory.
::* Art content client data affected: entry added in items.xml, monsters.xml or other identification file.


===Handling General Content Team [REQ]s===
===Bit Masking===
* General Content Team member adds a [REQ] topic to the graphics development forum.
Bit Masking helps us reduce our variable count while offering a dynamic method of script writing that is versatile and flexible to both linear and non-linear script writing.
* General Content Team member adds the [REQ] topic as a hyperlink under "Required Art" on the [[Art in Development]] page.
* Art Director attempts to network with other artists to assign the art to an artist.


==Bit Masking==
[[Dev:Bit_mask_tutorial]]
Bit Masking helps us reduce our variable count while offering a dynamic method of script writing that is versatile and flexible to both linear and non-linear script writing.


[http://dl.dropbox.com/u/6520164/tester1.txt Bit Masking Test Script]
===Generating client updates===
This is NOT necessary if you're using the connect_to_local_server wrapper.


==Generating client updates==
* Shutdown all your servers.
* Shutdown all your servers.


* First we are going to check the config files to be sure the paths are correct.
* First we are going to check the config files to be sure the paths are correct.
  cd ~/tmwAthena/tmwa-server-data/client-data/tools/
  cd /evol-all/tools/update/
  ls
  ls


  Output:
  Output:
add-git-attributes  edit-all-to-export-tilesets.sh  formatXML.sh  list-tileset-order map-db.py      minimap-render.py
addmods.sh  adler32.c      commit.txt      createnew.sh  musiccommit.txt update_music.sh
  adler32            edit-map-tileset-names.sh       indent.xsl    make-updates        map-diff.py
adler32    commit_old.txt create_music.sh files        news.txt        update.sh End of output  
End of output  


* The easiest solution is to create a symbolic link to that directory  
* The easiest solution is to create a symbolic link to that directory  
ln -s /var/www/tmwupdates ~/www/updates (your public www folder is /tmwupdates)
ln -s <Path to Public Webserver Dir> /evol-all/tools/update/upload/


* You can Edit the make-updates file with gedit or nano or vi.
example: ln -s /var/www/updates /evol-all/tools/update/upload/
Search for the folowing lines:
output=~/www/updates
And change them to:
output=/var/www/tmwupdates (your public www folder is /tmwupdates)


*Save the file and get back in the terminal.
*Save the file and get back in the terminal.
cd ~/tmwAthena/tmwa-server-data/login/conf
edit /evol-all/server-data/conf/import/login-server.conf  
ls


Output:
Change update_server to reflect the hostname & location of the server updates.
ladmin_athena.conf        lan_support.conf  login_local.conf.example
ladmin_local.conf          login_athena.conf
ladmin_local.conf.example  login_local.conf
End of output


*Edit the login_local.conf with an editor and look for the following line:
TMW's test-server example:
update_host: http://updates.themanaworld.org/
<code>update_server: "http://updates.themanaworld.org/test-updates/"</code>
*Change that line to:
update_host: http://127.0.0.1/tmwupdates/ (or use your external ip)
*Save the file and get back in the terminal.
* Open a terminal.
First we compile the adler32 tool to generate a hash.
cd ~/tmwAthena/tmwa-server-data/client-data/tools/adler32/  
make


Output must be:
* Now we can make us a update.
gcc -lz -o adler32 adler32.c
  cd /evol-all/server-data/
 
make install
 
* Now that we compiled the adler tool we can make us a update.
  cd ~/tmwAthena/tmwa-server-data/
  make updates
  make updates


* Each time you want to make new updates
* Each time you want to make new updates
  make sure you have a new commit then
  make sure you have a new commit then
  cd ~/tmwAthena/tmwa-server-data/
  cd /evol-all/server-data/
  make updates
  make updates
== Obsolete (for historical references) ==
===Getting Art Content Into The Game (obsolete)===
* Post [CPT] or [WIP] art on the [http://forums.themanaworld.org/viewforum.php?f=8 graphics development forum].
* Work with the Art Director and collaborators on getting the art consistent.
* When finished, edit topic as [FND].
* Art Director approves [FND] art and marks it [RC].  Should the art need animation or special effect, the Art Director requests xml for it.  If not, the Art Director commits it and marks as [GIT].
* XML Team reviews or drafts xml related to the art, then commits the .png and .xml.  Topic can be marked as [GIT].
::* Art content affected: client-data/graphics/sprites then related directory for .png and .xml animation addition.
* Project developer requests database entry reservations from a General Content Team developer.
::* Map entry server data affected: resnametable.txt and .wlk files in the data directory, map content files in the npc directory.
::* Map entry client data affected: .tmx files in the maps directory.
::* Map entry requires the running of the .tmx converter (aka java converter) before commits can be made.
::* Art content server data affected: entry made in the item_db.txt, mob_db.txt or mob_skills_db.txt in the db directory.
::* Art content client data affected: entry added in items.xml, monsters.xml or other identification file.
====Handling General Content Team [REQ]s (obsolete)====
* General Content Team member adds a [REQ] topic to the graphics development forum.
* General Content Team member adds the [REQ] topic as a hyperlink under "Required Art" on the [[Art in Development]] page.
* Art Director attempts to network with other artists to assign the art to an artist.
[[Category:Development]]

Latest revision as of 03:56, 27 March 2024

Developing for The Mana World

Note: The links here are for the rEvolt Project.

For TMW Classic, you should replace gitlab.com/evol with git.themanaworld.org/evolved, keeping other parts intact.

Quick Start for local server

Install Dependencies

Depending on what sql and OS your using install Maria or Mysql packages:

* Maria packages: mariadb-server, mariadb-client, mariadbclient-dev, libmariadbclient-dev
* Mysql packages: mysqldb-server, mysqldb-client, mysqlclient-dev, libmysqlclient-dev

All these other dependencies need to be installed regardless of sql used:

* zlib-dev or zlib1g-dev package, libpcre3-dev, gcc, make, automake, autoconf, libtool

Some distributions also require manual installation of ssl and crypto packages:

* libssl-dev, libcrypto++-dev

Note: Some packages may named differently depending on your distro.
You may use apt-cache search libpcre to check all packages which contain 'libpcre' on the name, and hopefully find the right one. It may be named libpcre0v5-dev for example. You may try with libpcre++-dev first.

apt-cache is not available on non-Debian or non-Debian-based distros.
You may want to use apt search <package(s)> instead.

You need gcc <= 9 to compile the servers. gcc-10 and later will raise errors when compiling md5 functions. We advise to install gcc-9 packages and pass it under CC environment variable.

Open command line/terminal

~$

Clone repository

run command:

git clone https://git.themanaworld.org/revolt/all.git

You will see something like this:

$ git clone https://git.themanaworld.org/revolt/all.git
Cloning into 'evol-all'...
remote: Counting objects: 69, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 69 (delta 36), reused 0 (delta 0)
Receiving objects: 100% (69/69), 7.05 KiB | 0 bytes/s, done.
Resolving deltas: 100% (36/36), done.
Checking connectivity... done.

Note: For TMW Classic, you should run this command instead: git clone https://git.themanaworld.org/evolved/all.git

Everything else should be roughly the same afterward.

Init repos

In evol-all directory run command

./init.sh all

Build and set-up local server

In directory client-data in evol-all run the following command:

ln -s ../music/music music

If you want to be able to listen to background music.


In directory server-data in evol-all run the following command:

make new

On multi-core/thread CPUs try appending -j<number of cores> to delegate a task to every core/thread like make new -j4

(Note: Mariadb/MySQL needs to be up and running for this command to execute correctly, Debian/Ubuntu may automatically do this setup on installation. Read your distro's manuals for SQL setup and configuration.)

Running server

You need to repeat this step every time your computer shuts down, or every time you close your terminal.

First, you should be in server-data folder.

In three separate console windows, run the following commands:

./login-server
./char-server
./map-server

Pay attention to any bug reported in any of them, as they often mean something went wrong in the previous steps.

Keep in mind that if you close the terminal windows, you'll need to run these commands again. You should preferably run them in this order.

Note: You may also use screen, tmux or byobu (those are linux console/terminal programs) to make your life easier, by keeping the servers running in background while multiplexing many terminals into a single one. Instructions on how to use those are not provided here; Please read their manpage instead or refer to these links: screen tmux byobu

Note: MySQL/Mariadb must be running for these commands to work.

Register an Account via M+ on localserver & GM account

If everything went well, you should have your servers up and running. To login on your localhost, you can do it two ways: By our provided tool file, or by manually adding a new entry to ManaPlus.

To use the provided tool file:

cd tools/manaplus
./connect_local_server.sh


To set-up M+ (ManaPlus) to log into localserver:

Name: My Dev

Address: 127.0.0.1

Port: 6901

Server type: Evol2

Once connected select the register button & sign up for an account

Once registered, test by logging into the server.

Note: If you have not yet installed client-data you may not see any artwork after logging in. Note: If you log in to your local server without using the script, Manaplus may use the wrong client-data.

Now you should be able to give that account GM by running make givegm

You should now have a working Local server with GM 99 on your account.

Additional steps you may need for development (Advanced)

Before next steps you should open terminal in evol-all direcory.

You should something like this:

$~/evol-all

Depend what kind of development you will do, you need run of any additional steps.

Also you can mix any of 4.x. steps in one directory.

Server code development

If you want run or develop server code or server content, you must install "server" task.

run command:

./init.sh server

and you will see repository cloning progress.

After will be created new directories: server-code, server-data, server-plugin

Run manaplus or client data / art / maps etc. development

If you want develop client side content, you must install "client" task.

run command:

./init.sh client

and you will see repository cloning progress.

After will be created new directories: client-data, tools

If you want latest ManaPlus version, you also should install task "manaplus" and build it. See 1.3.5.

Music

If you want develop music, you must install "music" task.

run command:

./init.sh music

and you will see repository cloning progress.

After will be created new directories: music

Local server

run command:

./init.sh local

and you will see repository cloning progress.

After will be created new directories: server-local, server-code, server-data, server-plugin

Probably you also should add task "client" for running ManaPlus. See 1.3.2.

See also local server

ManaPlus

If you want develop ManaPlus or want run ManaPlus from git, you should install "manaplus" task.

run command:

./init.sh manaplus

and you will see repository cloning progress.

After will be created new directories: manaplus

All

If you want all tasks at same time, you must install task "all".

run command:

./init.sh all

and you will see repository cloning progress.

After will be created new directories for all possible work.

Install and configure mariadb server

For run server you need install and configure mysql or mariadb.

See here

Run client and connect to server

Before running client you must install atleast server and client task or all task.

If you want run ManaPlus and connect to local server, run this:

cd tools/manaplus
./connect_local_server.sh

Client will start and connect to server.

Making Content

Making Map Content

See Mapping Tutorial.

Adding Map Content to Local Server

The server have its own version of the collision data of a map. To update it, on server-data folder, simply run:

make maps

Adding Art Content

Use dyecmd to ensure your artwork is sane (32 bit, PNG, alpha, without any pallete and other data). This command is provided at the ManaPlus package. See the ManaPlus Website for help with XML files. (You may need to look at sitemap)

Adding Music Content

All music must be OGG Vorbis with 44100 Hz resolution.

ADDING QUESTS & SCRIPTS

Edit the txt files at "server-data/npc". Use "make maps" to generate the imports, if you added a new NPC.

Restart map-server when you change any script, and it'll have effect. You can also use "@serverexit 101" if you're using the test server wrappers; Or use "@reloadnpc" command if you changed a single file. Map-Server will report any errors or warnings on your code. You must not introduce any new error or warning to have your new quest/script accepted.

The scripting references can be found at "doc/server/scripts", which should have been included by "init.sh all".

Bit Masking

Bit Masking helps us reduce our variable count while offering a dynamic method of script writing that is versatile and flexible to both linear and non-linear script writing.

Dev:Bit_mask_tutorial

Generating client updates

This is NOT necessary if you're using the connect_to_local_server wrapper.

  • Shutdown all your servers.
  • First we are going to check the config files to be sure the paths are correct.
cd /evol-all/tools/update/
ls
Output:

addmods.sh adler32.c commit.txt createnew.sh musiccommit.txt update_music.sh adler32 commit_old.txt create_music.sh files news.txt update.sh End of output

  • The easiest solution is to create a symbolic link to that directory

ln -s <Path to Public Webserver Dir> /evol-all/tools/update/upload/

example: ln -s /var/www/updates /evol-all/tools/update/upload/

  • Save the file and get back in the terminal.

edit /evol-all/server-data/conf/import/login-server.conf

Change update_server to reflect the hostname & location of the server updates.

TMW's test-server example: update_server: "http://updates.themanaworld.org/test-updates/"

  • Now we can make us a update.
cd /evol-all/server-data/
make updates
  • Each time you want to make new updates
make sure you have a new commit then
cd /evol-all/server-data/
make updates


Obsolete (for historical references)

Getting Art Content Into The Game (obsolete)

  • Post [CPT] or [WIP] art on the graphics development forum.
  • Work with the Art Director and collaborators on getting the art consistent.
  • When finished, edit topic as [FND].
  • Art Director approves [FND] art and marks it [RC]. Should the art need animation or special effect, the Art Director requests xml for it. If not, the Art Director commits it and marks as [GIT].
  • XML Team reviews or drafts xml related to the art, then commits the .png and .xml. Topic can be marked as [GIT].
  • Art content affected: client-data/graphics/sprites then related directory for .png and .xml animation addition.
  • Project developer requests database entry reservations from a General Content Team developer.
  • Map entry server data affected: resnametable.txt and .wlk files in the data directory, map content files in the npc directory.
  • Map entry client data affected: .tmx files in the maps directory.
  • Map entry requires the running of the .tmx converter (aka java converter) before commits can be made.
  • Art content server data affected: entry made in the item_db.txt, mob_db.txt or mob_skills_db.txt in the db directory.
  • Art content client data affected: entry added in items.xml, monsters.xml or other identification file.

Handling General Content Team [REQ]s (obsolete)

  • General Content Team member adds a [REQ] topic to the graphics development forum.
  • General Content Team member adds the [REQ] topic as a hyperlink under "Required Art" on the Art in Development page.
  • Art Director attempts to network with other artists to assign the art to an artist.