Difference between revisions of "Sty"

From Armagetron
Line 28: Line 28:
 
<code>$ bzr branch http://code.launchpad.net/~armagetronad-ct/armagetronad/0.2.8-armagetronad-sty+ct<br />
 
<code>$ bzr branch http://code.launchpad.net/~armagetronad-ct/armagetronad/0.2.8-armagetronad-sty+ct<br />
 
$ cd 0.2.8-armagetronad-sty+ct</code>
 
$ cd 0.2.8-armagetronad-sty+ct</code>
 +
 +
Another popular option is the sty+ct+ap branch, which adds even more functionality.
 +
 +
<code>$ bzr branch lp:~armagetronad-ap/armagetronad/0.2.9-armagetronad-sty+ct+ap</code>
  
 
Optional (and risky, you may get difficult to resolve conflicts): merge in changes from the mainline with
 
Optional (and risky, you may get difficult to resolve conflicts): merge in changes from the mainline with

Revision as of 17:11, 10 September 2019

Sty is a server mod that can allow to have Shooting, Capture the Flag, Hold the Flag, Styball using some hacks here and there. Sty is also known as « the pigsty » and « the stypatches ». Sty is totally configurable and has many features.

Installing

Windows

sty+ct

Latest downloads can be found here.

Outdated builds: sty+ct server build (r700) sty+ct server build (r702)

sty+ct+ap

Latest downloads can be found here.
Outdated builds from 2012 and older are still available.

This is an add-on to sty+ct with additional commands and other features.

Linux, UNIX, BSDs, OSX, cygwin and every UNIX-compatible operating system

Downloading and unpacking

We maintain (don't confuse this with "we support", this is still unsupported third party code) a reasonably up to date version of the code in a bzr branch here. To fetch it, you'll need Bazaar. Type into your console

$ bzr branch http://bazaar.launchpad.net/~armagetronad-dev/armagetronad/0.2.8-armagetronad-sty
$ cd 0.2.8-armagetronad-sty

This would give you the vanilla sty branch. Most people nowadays prefer the sty+ct branch instead, it adds still more features. For that, you use:

$ bzr branch http://code.launchpad.net/~armagetronad-ct/armagetronad/0.2.8-armagetronad-sty+ct
$ cd 0.2.8-armagetronad-sty+ct

Another popular option is the sty+ct+ap branch, which adds even more functionality.

$ bzr branch lp:~armagetronad-ap/armagetronad/0.2.9-armagetronad-sty+ct+ap

Optional (and risky, you may get difficult to resolve conflicts): merge in changes from the mainline with

$ bzr merge lp:armagetronad/0.2.8
$ bzr commit -m "Merging changes from the mainline"

If you really want to use SVN, scroll down!

Building and installing

Now that we have patched our code, we can begin the build process which will process the source and output the binaries which will be ready for use. First, we will generate a configure script using bootstrap.sh. On FreeBSD, you may need to modify the bootstrap.sh http://wiki.armagetronad.net/index.php/Help:Editingscript to point to the location of the automake tools since they may not be in your path, but in /usr/local/libexec/automakeXX and /usr/local/libexec/autoconfXX.

$ ./bootstrap.sh

You may receive an error, and have to install the autoconf package for your system. Once we are notified that we have a working configure script, we can configure. The code given would install in the user's home directory.

$ ./configure --prefix=${HOME} --enable-dedicated --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts

Finally, the standard make and make install. You will obviously want to su to root if you are installing outside your home folder.

$ make
$ make install

On FreeBSD, you may need to run as:

$ gmake
$ gmake install

Next, copy the Your_mom directory from the SOURCE_DIR/resources to your new resource folder in $PREFIX/share/games/armagetronad-dedicated/resource. You can now modify the sample config files given in the SOURCE_DIR/config/examples. Now you should have a functional CTF server. All that's left is tweaking settings!

Map Settings

###############################################
#Zone Types                                   #
###############################################
 flag      # The flag in CTF
 ball      # The ball in StyBall
 fortress  #The flag base or ball goal.
 death     # Death zones
 win       # Win zone 

Gameplay Settings

sty+ct

 ############################################################################################
 #
 # Shooting / Self Destruct / Zombies
 #
 ############################################################################################
 
 # The braking reservoir used for shooting goes from 1.0 (Full) to 0.0 (Empty)
 # All of the shot thresholds are calculated from the amount of reservoir used
 # To disable shooting, set SHOT_THRESH to 1.0
 
 SHOT_THRESH 2              # Amount of brake reservoir that will make a shot, > 1.0 to disable shooting, 0.001 will enable shooting
 SHOT_DISCARD_TIME 0.3      # Time in seconds to hold off shooting between shots
 SHOT_START_DIST 1.0        # Starting distance of a shot from the cycle
 SHOT_VELOCITY_MULT 1.8     # Cycle velocity is multiplied by this to calculate shot velocity
 SHOT_RADIUS_MIN 0.7        # Minimum radius for a shot (As if minimum reservoir was used)
 SHOT_RADIUS_MAX 5.0        # Maximum radius for a shot (Full reservoir used)
 SHOT_ROT_MIN 2.0           # Minimum rotation for a shot (As if minimum reservoir was used)
 SHOT_ROT_MAX 10.0          # Maximum rotation for a shot (Full reservoir used)
 SHOT_EXPLOSION 0           # 0 for no explosion, 1 for explosion centered at cycle, 2 for explosion centered on shot
 
 MEGA_SHOT_THRESH 2         # Amount of brake reservoir that will make a megashot, > 1.0 to disable, 0.98 is normal to enable this
 MEGA_SHOT_MULT 0.3         # Radius and rotation calculated for a normal shot, then multipled by this for mega
 MEGA_SHOT_DIR 3            # Number of directions to shoot around cycle, 0 to disable the shots (cycle explosion still works)
 MEGA_SHOT_EXPLOSION 1      # 0 for no explosion, 1 for explosion centered at cycle, 2 for explosion centered on each shot, 3 for both
 
 SHOT_KILL_SELF 0           # (0,1) if set to 1, your own shot kills you or your team
 SHOT_KILL_VANISH 1         # (0,1) if set to 1, shot vanishes after killing someone
 DEATH_SHOT 1               # (0,1) if set to 1 and you were in the middle of a shot, releases it after you die
 SHOT_COLLISION 0           # (0,1) if set to 1, shots collide with each other - WARNING, this is very buggy
 
 SELF_DESTRUCT 0            # (0,1) if set to 1, creates a blast zone when you die
 SELF_DESTRUCT_RADIUS 18    # Radius of the self destruct zone at the largest
 SELF_DESTRUCT_ROT 7        # Rotation of the self destruct zone
 SELF_DESTRUCT_RISE 5       # Rise speed of the self destruct zone - 0 to start at largest
 SELF_DESTRUCT_FALL 2       # Fall speed of the self destruct zone - 0 to leave there
 SELF_DESTRUCT_VANISH 1     # (0,1) if set to 1, self destruct zone vanishes quickly after a kill
 
 SHOT_SEEK_UPDATE_TIME 0.5  # The time in seconds that seeking shot directions are updated (zombies)
 
 ZOMBIE_ZONE 0              # (0,1) if set to 1, killed players create a zombie zone
 ZOMBIE_ZONE_RADIUS 6       # Final radius of the zombie zone
 ZOMBIE_ZONE_ROT 2          # Speed of rotation
 ZOMBIE_ZONE_RISE 0.4       # Rise speed of the zombie zone
 ZOMBIE_ZONE_FALL 0         # Fall speed of the zombie zone, 0 for zombies that don't diminish
 ZOMBIE_ZONE_VANISH 0       # (0,1) If 1, zombie will vanish after killing someone other than his killer
 ZOMBIE_ZONE_SPEED 12       # Speed of the zombie zone
 ZOMBIE_ZONE_SHOOT 1.0      # If > 0, shots will kill of zombies, 1 to decrease zombie size by shot size, > 1 to decrease zombie faster
 
 SCORE_SHOT 1               # points you gain for shooting someone
 SCORE_SHOT_SUICIDE 0       # points you gain for shooting yourself
 SCORE_DEATH_SHOT 1         # points you gain for shooting someone with your death shot
 SCORE_SELF_DESTRUCT 1      # points you gain for blasting someone with your self destruct blast
 SCORE_ZOMBIE_ZONE_REVENGE 1 # points you gain for getting your killer with your zombie zone
 SCORE_ZOMBIE_ZONE 0        # points you gain for getting anyone but your killer with your zombie zone
 
  ############################################################################################
 #
 # Capture the Flag / Ball / Goal
 #
 ############################################################################################
 
 BASE_RESPAWN 0             # (0,1) if set to 1, any fortress / goal / flag base will respawn the team that owns it if a team player enters it
 BASE_ENEMY_RESPAWN 0       # (0,1) if set to 1, any fortress / goal / flag base will respawn the team that owns it if an enemy player enters it
 
 BASE_ENEMY_KILL 0          # (0,1) if set to 1, any fortress / goal / flag base will kill the enemy if they enter it, usually set to 1 for ball games
 
 SCORE_FLAG 3               # points you gain for capturing a flag and returning it to your base
 SCORE_GOAL 1               # points you gain for shooting a goal
 
 FLAG_CHAT_BLINK_TIME -1    # time in seconds that the chat triangle above a player with a flag will blink, -1 to disable
 
 FLAG_BLINK_TIME 2          # time in seconds between flag blinking over player with the flag, -1 to disable
 FLAG_BLINK_START 0.2       # percentage of the flag radius to start the flag blink at
 FLAG_BLINK_END 1.0         # percentage of the flag radius to end the flag blink at
 FLAG_BLINK_SPEED 8         # speed at which the flag blink radius increases
 FLAG_BLINK_START 0.1       # percentage of the flag radius to start the flag blink at
 FLAG_BLINK_ESTIMATE_POSITION 0.6 # 0 to start the flag blink at the current player position, 1 to start the flag blink where the player would be at the end of the blink at current speed and direction

sty+ct+ap

Additionally there are extra features you want to look at, such as

SHOT_BASE_ENEMY_RESPAWN     # (0, 1) if set to 1, when your snot enters enemy's base, they will respawn!
SHOT_BASE_RESPAWN           # (0, 1) if set to 1, when your shot enters your base, your allies respawn!

SVN way of downloading and applying patch

WARNING: This method is now basically obsolete. Please use bazaar if at all possible (and I can't think of a good reason why not). It is already pre-patched and up to date.


The following is the traditional old way of getting the patch. It causes lots of conflicts you will need to resolve if followed to the letter.

So, here do we start, we need lastet SVN(=the lastet development revision) and the pigsty patch in order to install sty.

(Note: you will need to download subversion software from http://subversion.tigris.org/ and install it for your specific OS)

(You'll enter these codes in your SSH connection to your dedicated server, or in your terminal at home if you use your computer to host the server. Note that you wont enter the $ at each line, this character is generally used to indicate it's in a shell.)

We'ill create a working directory and enter in it to let the patches and the source here.

$ mkdir armagetronad+sty
$ cd !^

Then we download the source of armagetronad.

$ svn co https://armagetronad.svn.sourceforge.net/svnroot/armagetronad/armagetronad/branches/0.2.8.0/armagetronad .

And the pig sty patch.

$ wget -O stypatch.zip http://forums.armagetronad.net/download.php?id=5691

Once the download is finished, we unpackthe zip file we downloaded:

$ unzip stypatch.zip

Now that all the resources and the patch have been unzipped, we will patch our code.

$ patch -p0 < pigsty-061021.patch