From: greyhelm@cis.ksu.edu (Karl S. Hagen)
Newsgroups: rec.games.empire
Subject: Some general hints on Set-Up for Empire
Date: 12 Dec 1992 11:10:37 GMT
Organization: Kansas State University, Dept. of Computing and Information Sciences
Distribution: world
NNTP-Posting-Host: cygnus.cis.ksu.edu

    I am posting this in hopes that it will solve some of the problems
   that NEW deities are having setting-up empire.  Sometime this break
   I will write an install script for empire to get around most of it.
   I am not sure if Tom is getting the same number of New Deity
   requests I am getting but this should help."

***IMPORTANT*** : ENSURE THAT YOU HAVE THE SYSADMIN's permission to
		  run a game ... you will get lots of heat from players
		  and school officials if they don't know or don't
		  like.

      1)  Before you start anything of this type .... decide on the 
         conditions and rules.  Also realize that being a deity is a
         full-time job.  It is nothing like being a player were you 
         login and play for a bit talk and do some economics.  Look
         at it this way.... for every player in the game figure that
         you will field or receive 1 question/bug report  per day.
	 This is being light ... I'm sure.  That means if you host a
    	 32 player game figure on having 32 different requests or 
         responses or problems.... IF YOU DO NOT HAVE THE TIME OR 
         PATIENCE TO HANDLE THIS STOP AT THIS POINT.

	 Write down somewhere these things:
		a) World Size 32x32  <- makes a small but friendly game
		    Must be factors of 2 ie.  32x64 64x32 128x64
					      96x192 
		b) Number of nations <- Depends on how big a world.
		c) # of Updates per day 
		d) # of ETU's per day
		e) Times of play - any restrictions
		f) % Water % Land % Mountains.  
		g) # of starting sectors
		h) Any Special features <- Slow war/Dr. Nuke/. etc.


      2)  You must have a reasonable knowledge of C, gnumake, shell
         environment, and UNIX in general.  I am not talking about 
         I can send mail and read news and ftp .... I am talking
         you can apply a patch... fix a minor bug and know to read 
         the docs provided.  You also must have at least 5Meg of free
	 disk space ... if not more for larger games.  You also want
	 someplace to store back-ups.

      3)  Now you can begin... by ftp'ing to ftp.cis.ksu.edu
	 login as user  anonymous 
	 password is your email address  ex. greyhelm@cis.ksu.edu

		you should get the following files:
			/pub/Games/Empire/source/<gametype>.tar.Z
			/pub/Games/Empire/tools/Deity/xland-2.0.tar.Z
			/pub/Games/Empire/tools/Deity/emptools.tar.Z

      4)  First check the files integrety and information by doing 
	 'zcat <filename.tar.Z> | tar -tvf -'  this command will list
	 the files contained in it ... and where those files will be
	 put in the directory you are.  ex.

	[4:05am,12]cygnus% zcat chainsaw-2.2.tar.Z | tar -tvf -
	rwxr-x---8555/1      0 Nov  7 06:16 1992 EMP/
	rwxrwx---8555/1      0 Dec  7 02:58 1991 EMP/make/
	rwxrwx---8555/1      0 Nov 27 13:57 1991 EMP/make/Systems/
	rw-------8555/1     93 Jun  7 14:38 1990 EMP/make/Systems/profiled
	rw-------8555/1    400 Oct 25 01:55 1990 EMP/make/Systems/sequent
	rw-------8555/1    244 Jun  7 14:38 1990 EMP/make/Systems/Template
	rw-------8555/1    163 Jun  7 14:38 1990 EMP/make/Systems/sun3
	rw-------8555/1     59 Jan 21 21:25 1991 EMP/make/Systems/sun4
	rw-------8555/1     64 Jun  7 14:38 1990 EMP/make/Systems/vax-ultrix
	rw-------8555/1    175 Jun  7 14:38 1990 EMP/make/Systems/isi
	rw-------8555/1     95 Jun  7 14:38 1990 EMP/make/Systems/mips-43

	This file will create a directory name EMP with the other
        directories in it.  If a directory EMP exsists it will overwrite
	matching files with the new stuff.

	If this is not where you want it .. then you should extract
	the files in a temp directory and then move them where you
	want them.

	To extract the files type 'zcat <filename>.tar.Z |tar -xovf -'
	this will extract them and leave the tar file.  It saves space.
	
      5)  Now that you have something to work on .... you can remove
	the *.tar.Z file and save some space for you backup.tar.Z later
	
      6)  First setup you Shell Environment with the following info.
	ARCH type - How you prefer files to be kept... ex.  bin
		   This means all *.o files and executables will be
		   put in a seperate bin directory ... very handy.
	SYSTYPE type - Machine type - ex.  sun4, sun3, hp, vax, etc.
		   This is used to grab the appropriate makefile

		To set these .. type    set ARCH=bin 
				    or  setenv ARCH bin

					setenv SYSTYPE sun4

      7)  Now assuming you have gnumake and mkmf on your system
	already.  You must edit the following files and set them 
	with the information you wrote down in #1.

		EMP/h/gamesdef.h
		EMP/h/misc.h
		EMP/h/options.h
		EMP/lib/global/constants.c

	  In these files are the main setup information for Empire.
	If you cannot get these setup then just write it off. 

      8)  Now in the EMP directory .... you can type  
		gnumake dependall

	  ex.
		[4:20am,16]cygnus% gnumake dependall
		gnumake COMMAND=depend recursive
		mkmf -df make/GenMakefile SRCDIR=`pwd`
		Making depend in lib..
		Making depend in client..
		gnumake[3]: fopen: bin/GNUdepend: No such file or directory
		Updating bin/GNUdepend...
		Making depend.  The errors can be ignored.
		done with client.
		Making depend in common..
		gnumake[3]: fopen: bin/GNUdepend: No such file or directory
		Updating bin/GNUdepend...

	  As it says IGNORE the errors ... those are just standard
	  complaints.

      9) When done .. check things by going into the 'make' directory
	and ensure that GenMakefile contains the appropriate path
	for the EMP directory where it says SRCDIR.
	If not then you should check the GNUdepend files very carefully
	and also correct the SRCDIR in GenMakefile to be the right place
	Next.. go into the Systems directory and edit the file that
 	matches your SYSTYPE that you set in #6 above.  These are
	basically any system FLAGS or extras that your particular 
	machine or OS needs to compile.

     10)  Now you can go back to the EMP directory where you typed
	gnumake dependall .... except this time you type

		nohup gnumake >& note &

	This will start to make your Empire game for you ... and put
	all output from the make in a file called note or whatever
	you choose... some prefer ERR.  The nohup tells your shell
	not to kill that program while its compiling if you happen
	to decide to logoff or something ... very handy .. I often
	do this just before I go home ... and when I get home 15 mins
	later it is all done... and I didn't have to stay logged in
	for it.

     11)  Now you can install the game... the easiest way about this
	is to create a   'bin' , 'data' and info.nr directories
	in your EMP directory...  then type 'gnumake installall'.
	This should copy all the executables to your EMP/bin 
	directory .... Now go into the info directory and type 
	'gnumake' to make the info files.

	*NOTE* depending on space you may want to just move the
		executables rather than copying.  I do.

     12)  Now you are ready to create a world.  The easiest way to 
	do this is to use xland.  Which will allow you to draw land
	and mountains and so forth.  the Land program is a very if'y
	program to use that most experienced diety's will even groan
	at using.  After compiling xland using the misc.h, options.h
	file.h, and sect.h from YOUR games h directory.... you can 
	type  'xland <worldsize>'  ex.  xland 64x64
	Draw your map ... and then 'Make Sector map'
	When this completes you should see a xland.sector.dat in the
	directory that you started xland.  Copy or move this to 
	EMP/data/sector     <-- sector is the sector database file.

     13)  Now you can run ore, newore, or what ever you choose.
	Unfortunately this is the one program that has not been given
	an easy fix to ... maybe someday ....

     14)  Now you need to put in a 'hours' file.  This contains info
	on the # of updates and there frequency.  As well as any
	restrictions.

		 This file goes in the data directory ..
	ex.
		etu_per_update: 45
		update_policy: 1
		update_times: 21:00
		update_wantmin: 25
		update_abswantmin: 25
		update_demandpolicy: 2
		hours: 00:00-07:00 19:00-24:00

	Read EMP/h/wantupd.h   for more info.

     15)  *IF YOU ARE USING CHAINSAW CODE*
	  You will need to put in a 'auth' and 'ban' file if you
	defined them in the options.h file.

		The auth file determines what userid is allowed
	to login and use the deity country ... the game does not
	care if someone has your deity password ... if there userid
	and log host does not match the auth file they will be kicked
	out.

	     The ban file is a list of userids and hosts that are 
	forbidden from playing at all.

     16)  Once you have this done ... you can finally start the Game
	itself.  

	     Go into the EMP/bin directory and type 

		nohup emp_tm &
		nohup emp_login &

	  This will ensure that these programs do not get kill'd by
	repant shells.  I have seen a few.  If you look at your 
	processes that are running you should see .... emp_tm and
	emp_login .. if not ... then something was done wrong during
	steps 3-13.

     17)  The very first country is POGO  with the rep. of peter
	You can chagne this in the game so don't fret.  To get your
	client to work... you can do several things.  But remember 
	the environment variables   EMPIREPORT and EMPIREHOST must
	be set properly .. ex.   setenv EMPIREHOST localhost
			setenv EMPIREPORT 1617  <-- port # found in 
						    EMP/h/gamesdef.h

     18)  Now, in empire, set your dieties realm ... to the limits
	of your	world size.   ex. 64x64 world  I would do ...
	'realm 0 -32:31,-32:31'   <-- note the IMPORTANT.

     19)  To edit a country ... ie. change country 0 ...
	type  'edit country 0'  ex.

	[8:512] Command : edit country 0
	Country #:  0
	Name <n>: POGO                  Login: 0
	Representative <r>: peter               
	BTUs <b>: 502                   Reserves <m>:     0
	Capital <c>: 0,0                Origin <o>: 0,0
	Status 
: 0x1d                        Min Used <u>:   8
	Technology <T>: 85.03           Research <R>: 26.39
	Education <E>: 0.00             Happiness <H>: 0.00
	Money <M>: $123455729
	Updates missed <U>: 46
	%c xxxxx -- thing value : n Shadow 
	Country name changed from POGO to Shadow 
	%c xxxxx -- thing value : r whatever
	Country representative changed from peter to whatever
	%c xxxxx -- thing value :       		<-- press RETURN
	Country #:  0
	Name <n>: Shadow                Login: 0
	Representative <r>: peter               
	BTUs <b>: 502                   Reserves <m>:     0
	Capital <c>: 0,0                Origin <o>: 0,0
	Status 
: 0x1d                        Min Used <u>:   8
	Technology <T>: 85.03           Research <R>: 26.39
	Education <E>: 0.00             Happiness <H>: 0.00
	Money <M>: $123455729
	Updates missed <U>: 46

	[8:512] Command : 

    now that you are set... check your map and version report and
    ensure that everything is correct.

    20)  Now you can 'add' countries if everything is ok land wise
        ex.

		add 1 Greyhelm myrep new c    <-- 'c' stands for check
						  sectors but dont touch

 	 This will add a NEW entry but not give him a capitol or land
	or anything of that nature.  Another diety or visitor could be
	done this way.

		add 2 Visitor visrep visitor i   <-- 'i' ignore any sect.

	        add 3 ExtraGod godrep god w     <--- 'w' wipes any owned
						   sectors. *DANGEROUS*
						   when done on a god
						   country.

    21)  Now to give them a capitol.  This is *NOT* done for god/visitor
	because they do not require it.

		newcap 1

	 Review the info returned ... if you think that is a fair
	start for that country ... then type 'y'  otherwise type 'n'
	it will keep going give you alternatives till you say 'y'

    22)  You are now pretty much ready .... you should do a 

		news      and power new
	as the deity before anyone gets on.  This will ensure that
	a news file and power report are there ...otherwise you could
	get some funny (non-harmfull) errors to start.

    23)  Now back in the UNIX shell ... you should go thru and
	set-up some maintenance scripts that will backup the game 
	at least # of updates +1 times per day.  If there is ever
	a problem you can go back to a backup.

    24)  Now that things are pretty much set and you are happy with
	things ... you can clean up a bit .... the following insured
	in your EMP directory should do a good job.

	find . -name \*.o -print -exec rm {} \;
	find . -name \*.a -print -exec rm {} \;

    25)  Now you should make a backup of the INITIAL setup before
	anyone gets on.  a good way is

	tar -cf backup.tar EMP      then   compress backup.tar

	Then put this file somewhere where it wont get removed


   WOW ... That was alot I hope this helps some.... As you get more
   experienced at being a Deity ... you will be able to do alot more
   and you will become alot more confident with what you are doing.
   I myself have several personalized set-up scripts that allow
   me to set the world info and ... run ... all in about 15 minutes.
   I don't give them out .. due to their very un-user-friendly style.

   If anyone has any commebts or additions on this ... email me
   at one of the addresses below.

*******************************************************************************
****     Karl S. Hagen          Student - Kansas State University          ****
****     greyhelm@cygnus.cis.ksu.edu      greyhelm@matt.ksu.ksu.edu        ****
****     Moria Archive Manager            Empire Archive Manager           ****
*******************************************************************************
Newsgroups: rec.games.empire