Developing for The Mana World
Note: The links here are for the rEvolt Project.
For TMW Legacy/Evolved, you should replace gitlab.com/evol
with git.themanaworld.org/evolved
, keeping other parts intact.
Quick Start for local server
Create ssh key and upload it
create ssh key and upload it to gitlab.com
https://about.gitlab.com/2014/03/04/add-ssh-key-screencast/
Note: Even if discouraged, you can skip this section by replacing every instance of https://git.themanaworld.org/
with https://gitlab.com/
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.
Open command line/terminal
~$
Clone repository
run command:
git clone https://git.themanaworld.org/evol/all.git
You will see something like this:
$ git clone https://git.themanaworld.org/evol/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 Legacy/Evolved, 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.
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.
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.