How to make my server upload map file in Manaserv

The 2009 Mana project went dormant around 2014 and was revived in 2023; it currently develops a client implementation for TMW and potentially other games.


Post Reply
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

How to make my server upload map file in Manaserv

Post by fatalfeel »

as follows

1.have any update in Sourceoftales zip

2.and how to do in Manasource?


/////////////////////
I was afraid of that, because I've never done this myself. Maybe someone else can help you better in this regard. But what you have to do to my knowledge is:

-Put all game data used by your server (graphics, maps, sounds etc.) in zip files
-use a tool to calcutate the adler32 checksums of the zip files
-create a resource2.txt (or is this an xml by now?) which lists all the updates with their checksums
-upload the zip files and the resource file to your website
-change some conf settings of the server to point the clients to your website

You can open http://updates.themanaworld.org with a common webbrowser for an example.
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: How to make my server upload map file in Manaserv

Post by Ablu »

If I understand this right you want to make clients connecting to your server automatically downloading the game content?

Note: If you only need this for local testing it is usually a lot easier to simply run the client with the -u -d path/to/world-data-directory (in your case the sourceoftales repo).

However if you want to allow autodownloading you need a few more steps.

First you need to zip the game data (one big zip is fine). The zip must not have any prefix (meaning that all the files are not inside a folder, but directly in the zip root.
Then you need to generate a adler32 hash of this. A small program which implements this hash algorithm is located in tools/adler32.c in the mana client repository. Note that this program is console only. If you are on windows it might be worth to try out this: http://hash.online-convert.com/adler32-generator
I did not test it, but it looks like a viable solution.

After you got your zip(s) and their hashs you create a resources.xml. See here for how to do it: http://doc.manasource.org/update_system
As a last step you need to make a news.txt. It does not matter what you put in there. It only has to exist (the client will display it in the update / download window.

Then you put the resources.xml, the zip(s) and the news.txt somewhere on a webserver / hosting (even stuff like dropbox works, it only needs to keep the names and the path prefix to all files must be identical). Then you must configure your server to tell the client to use that update host. You do that by setting the "net_defaultUpdateHost" setting in your manaserv.xml.

Then connecting clients should query the resources.xml, check if they need to download stuff, and download the missing zips.

NOTE: We have a script which makes creating the update zips and the resources.xml really easy. It is located here: https://github.com/tales/tales-tools/bl ... pdates.lua
However this script (without modifications), only will work for linux (except you have "git" and "adler32" available in $PATH on windows (though i think you would need to append .exe there? (I might be wrong here, I do not use windows))).

Regards,
Ablu
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

Re: How to make my server upload map file in Manaserv

Post by fatalfeel »

What a great answer like god's give!

you are my suinshine~~~~ thanks
http://www.youtube.com/watch?v=EZr2lYMI8q8
Ablu wrote:If I understand this right you want to make clients connecting to your server automatically downloading the game content?

Note: If you only need this for local testing it is usually a lot easier to simply run the client with the -u -d path/to/world-data-directory (in your case the sourceoftales repo).

However if you want to allow autodownloading you need a few more steps.

First you need to zip the game data (one big zip is fine). The zip must not have any prefix (meaning that all the files are not inside a folder, but directly in the zip root.
Then you need to generate a adler32 hash of this. A small program which implements this hash algorithm is located in tools/adler32.c in the mana client repository. Note that this program is console only. If you are on windows it might be worth to try out this: http://hash.online-convert.com/adler32-generator
I did not test it, but it looks like a viable solution.

After you got your zip(s) and their hashs you create a resources.xml. See here for how to do it: http://doc.manasource.org/update_system
As a last step you need to make a news.txt. It does not matter what you put in there. It only has to exist (the client will display it in the update / download window.

Then you put the resources.xml, the zip(s) and the news.txt somewhere on a webserver / hosting (even stuff like dropbox works, it only needs to keep the names and the path prefix to all files must be identical). Then you must configure your server to tell the client to use that update host. You do that by setting the "net_defaultUpdateHost" setting in your manaserv.xml.

Then connecting clients should query the resources.xml, check if they need to download stuff, and download the missing zips.

NOTE: We have a script which makes creating the update zips and the resources.xml really easy. It is located here: https://github.com/tales/tales-tools/bl ... pdates.lua
However this script (without modifications), only will work for linux (except you have "git" and "adler32" available in $PATH on windows (though i think you would need to append .exe there? (I might be wrong here, I do not use windows))).

Regards,
Ablu
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

Re: How to make my server upload map file in Manaserv

Post by fatalfeel »

Another Question

If I make a webserver in ubuntu

1. have any speciall spec? apache2 or some else

2. does tales have site like "http://updates.themanaworld.org" can be download
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: How to make my server upload map file in Manaserv

Post by Ablu »

fatalfeel wrote: 1. have any speciall spec? apache2 or some else
It does not matter. apache / httpd / any webserver works.
fatalfeel wrote: 2. does tales have site like "http://updates.themanaworld.org" can be download
Yes of course. You download the data from there if you connect to our test server. The location is updates.manasource.org/
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

Re: How to make my server upload map file in Manaserv

Post by fatalfeel »

tks.

by the way~~ why client not update from account server

Account server also can support data and zip

1.why update from website?

2. http://updates.manasource.org/
You don't have permission to access
any way get it?


Ablu wrote:
fatalfeel wrote: 1. have any speciall spec? apache2 or some else
It does not matter. apache / httpd / any webserver works.
fatalfeel wrote: 2. does tales have site like "http://updates.themanaworld.org" can be download
Yes of course. You download the data from there if you connect to our test server. The location is updates.manasource.org/
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: How to make my server upload map file in Manaserv

Post by Ablu »

fatalfeel wrote: by the way~~ why client not update from account server

Account server also can support data and zip

why update from website?
The updates are usually really big and downloads could take multiple minutes. The account server is not really designed to transfer that much data for that long.
Especially since the account-server is the entry point to the game we should try to keep its traffic as low as possible.

The way we currently do it we rely on existing and easy solutions and keep all flexibility (you could host your data in a super fast content delivery network optimised for static files for example).

Regards,
Ablu
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: How to make my server upload map file in Manaserv

Post by Jaxad0127 »

Pointing the client at a URL to get the data from means you can use more appropriate software to distribute the data (web or general file servers). You can also point the client at a CDN (content delivery network), which handles the details of getting the data to the clients efficiently.

The amount of data for a good sized world can get quite large. Letting a dedicated system handle that keeps everything fast and easy.
Image
User avatar
Bjørn
Manasource
Manasource
Posts: 1482
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Re: How to make my server upload map file in Manaserv

Post by Bjørn »

fatalfeel wrote:2. http://updates.manasource.org/
You don't have permission to access
any way get it?
It just doesn't allow listing the files. You can access the files just like that client can, starting at http://updates.manasource.org/resources.xml
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

Re: How to make my server upload map file in Manaserv

Post by fatalfeel »

tks all above answer...ablu jax bj
Bjørn wrote:
fatalfeel wrote:2. http://updates.manasource.org/
You don't have permission to access
any way get it?
It just doesn't allow listing the files. You can access the files just like that client can, starting at http://updates.manasource.org/resources.xml
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

here i support a simple httpd server mongoose for manaserv

Post by fatalfeel »

ref http://code.google.com/p/mongoose/downloads/list

1. search all download find mongoose-2.8

2. here I build all sample in vs2008, download it
http://www.mediafire.com/?0k3vrk6tvz104v9

3.modify mongoose .conf port 8080 to 80
Attachments
222.PNG
222.PNG (104.17 KiB) Viewed 2713 times
111.PNG
111.PNG (152.47 KiB) Viewed 2713 times
Last edited by fatalfeel on 18 Jul 2013, 06:28, edited 1 time in total.
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: How to make my server upload map file in Manaserv

Post by Ablu »

This looks a lot like you try to use the TMW client data for manaserv?

I mean generally this is fine, the data itself would work. But there is no server which is compatible with this data and runs on manaserv. You mentioned Source of Tales a couple of times. If you run Source of Tales on your server you of course need to use a Source of Tales update for the client.

I am also not sure whether you hit a problem or simply wanted to tell us that it worked?

Regards,
Ablu
fatalfeel
Peon
Peon
Posts: 21
Joined: 27 Mar 2012, 13:44

Re: How to make my server upload map file in Manaserv

Post by fatalfeel »

just a test see if it works~~~
Ablu wrote:This looks a lot like you try to use the TMW client data for manaserv?

I mean generally this is fine, the data itself would work. But there is no server which is compatible with this data and runs on manaserv. You mentioned Source of Tales a couple of times. If you run Source of Tales on your server you of course need to use a Source of Tales update for the client.

I am also not sure whether you hit a problem or simply wanted to tell us that it worked?

Regards,
Ablu
Post Reply