
__________.__                    __                 .__          ._______   ____
\______   \  |__ _____     _____/  |______    ______|__|_____    |   \   \ /   /
 |     ___/  |  \\__  \   /    \   __\__  \  /  ___/|  |\__  \   |   |\   Y   / 
 |    |   |   Y  \/ __ \_|   |  \  |  / __ \_\___ \ |  | / __ \_ |   | \     /  
 |____|   |___|  (____  /|___|  /__| (____  /____  >|__|(____  / |___|  \___/   
               \/     \/      \/          \/     \/          \/                 
                                Installation Tutorial


First things first. Get a server with ssh access, or you can host your own version for test purposes on a Virtual Box.

You need to look for one of two things. 
If this is your own server that you personally set up OR if it is a Virtual Machine. The two primary directories that this is best in is either.

/home/username/*/ or /var/www/*


Folders located in this Phantasia installation.

- conf
- phantasia
	- bin
	- src
	- data
	- log
- public_html (If this is on a server with /var/www directories, you need to update this stuff appropriately. 
               Meaning changing the public_html folder to html or by directly modifying the httpd.conf file.(If you know how to))

-------------------------------------------------------------------------------------------------------------------------------------------------------
Files to modify to the current directory schema. 
-------------------------------------------------------------------------------------------------------------------------------------------------------

/phantasia/src/pathnames.h <-- all of these need to reflect your current filepath of the files listed, ex: /home/username/phantasia/data/wizards or 
													   /var/www/phantasia/data/wizards

/conf/rc.phant <--- This is the file used to boot phantasia, after a successful make, or make clean & make, has been executed. SO it is important
		    to have the filepaths correct. It also calls for a /tmp folder, so in the default directory, where it has the conf, phantasia
                    and src folders, "mkdir tmp" for it.

/cgi-bin <--- NOW BIG thing, if your home directory is /home/username/public_html, the cgi-bin directory will be located inside of public_html. IF
              Your home directory is in /var/www, the cgi-bin will be located at /var/www/cgi-bin, make sure you have it in the right area.

/cgi-bin/game.cgi <--- make sure you modify the location of the cookie file, it is located inside of the /conf directory, so it will either be
		       /var/www/conf/cookie or /home/username/conf/cookie. This cookie file is not vital to the game running, but if you ban someone
                       and they do not have the proper cookies, then........you ban everyone. ALSO if you do not have the correct path on this file....
                       The cgi page will result in a 500 error.


REMEMBER IF YOU MODIFY A FILE ON YOUR WINDOWS or DOS machine....be prepared for errors on your scripted files ex. rc.phant and the cgi-pages. ALWAYS
RUN A "dos2unix FILENAME" or "dos2unix *" to revert your files to the proper format. Or expect some "bad interpreter ^M" messages when you execute scripts

-------------------------------------------------------------------------------------------------------------------------------------------------------
FILES YOU NEED TO CHMOD (or for the unsavy in Linux speak....PERMISSIONS)
-------------------------------------------------------------------------------------------------------------------------------------------------------

/conf/* <---- It would be your best bet to just chmod all the files in /conf to 755, this can be done by typing, "chmod 755 *", in the linux terminal or                    putty, or by editing the permissions on FTP depending on your version.

/cgi-bin/* <---- All of the cgi-bin files NEED to have 755 permissions, so "chmod 755 *". While you are there in the cgi-bin directory, open up the
                 118_client.cgi and 102_client.cgi and modify the return address, to your website address, that way if you have friends playing they dont get
                 redirected to me.

/bin/* <--- These are for the email scripts, they are disabled in the src. BUT if you reenable them...you want your emails getting through.

-------------------------------------------------------------------------------------------------------------------------------------------------------
Things to Modify to make your copy, your own
-------------------------------------------------------------------------------------------------------------------------------------------------------
 - MISC.C <<------ This file is located in /phantasia/src/, search for the Phrase "Do_Title_Page", to modify the games title when it pops up.
 - wizards <------ This file is located in /phantasia/data/ and is your wizard file, 1= hidden, 2= apprentice, 3= wizard, mod restrictions and 4 = wizard,                     the proper format should be:
                             4 0.0.0.0 accountname charactername 1 for standard any computer wizards access OR
                             
                             4 NETWORK accountname charactername 0 for backdoor NETWORK only wizard access. 
				
                             OR You can do both. To allow you to have wizard anywhere but only backdoor at your house. To DETERMINE YOUR NETWORK address. 
                             TAKE your IP address. EX: 203.221.58.123, and MAKE IT 203.221.58.0, and there you have it.

- charstats or monsters <--- located in /phantasia/data, are the variables for monster and starting character stats.


-------------------------------------------------------------------------------------------------------------------------------------------------------
THINGS TO DO AFTER YOU HAVE MADE *YOUR* changes, OR finished uploading the folders to the proper areas.
-------------------------------------------------------------------------------------------------------------------------------------------------------

MAKE SURE YOU, "make" and "make clean" and "make" once again (I have OCD, i like to do it over and over to be sure.) your src files, SEEING that there are no
Errors in your game src, REMEMBER TO always, backup your files you edit.

Then goto your /conf folder and type "./rc.phant", it should say a message about "nohup.out" if the message is shown, then you know phantasia is booted. BUT 
Always check your processes and see if it is by typing "ps x", if its running, then congrats you have booted phantasia. IF it is not, then check your /log/errorlog and see if you have an error.


REMEMBER Have fun, play well and thank you for supporting Phantasia.

If you are still having issues OR need techical assistance. I am only an email away, you can email me anytime at link@phantasia4.net and I will help you out.
