biell / alti-server

Altitude game server wrapper
The Unlicense
13 stars 3 forks source link

alti+server

Altitude game server wrapper to enable enhanced modes of game play.

Files

Alti+ game types

Normal Games

All normal game types will run just as normal on alti+server systems. They can be run with all default values, or spiced up by changing camera or plane scale, gravity, etc. It is up to the server admins.

Capture the Flag

There are number of options for game types which are different from what you would normally see. Capture the flag games have a powerup which is located in an area heavlily protected by one team. The power should only be accessible to the other team. The server game mode must be "Ball", as each capture increases the goal count. One variety of Flag capture is a 1-life version, where teams go head-to-head and is very similar to 1dm. Another allows re-spawns and is timed. This mode type should favor the defensive team, and a single capture (goal) should be sufficient for winning. Capture the flag games can also be configured to allow both teams to score. Hear, the game would be similar to tbd, but withou a bomb to pickup. This would hopefully get teams to work together better, instead of people grabbing the bomb and flying off by themselves without support.

Races

Races use specially assigned powerups to act as checkpoints. Each time the first player on a team crosses a checkpoint, a goal is scored. For this reason, the map must be configured for game type ball. Most servers are setup to have 6 goal win. Races are best accomplished with 2 laps and 3 checkpoints, with players starting so that they cannot easilly access the winning (6th) checkpoint until the end of their first lap (starting in a pit row might work). Checkpoints must be crossed in alphabetical order, all powerups are sorted, and the sort order is used to ensure players cross checkpoints in the correct order. Keep this in mind when creating checkpoint names.

A to B races would also be easy, with checkpoints along the way, and the 6th checkpoint at the end. If a final (winning) checkpoint is all that is desired in an A to B, then setting /set score -1 -1 would also help accomplish this game type.

Records will be kept for races. For races where each team has a single spawn point, the nickname of the player who crosses the finish line first will be stored with the record. If teams have multiple spawn points, then a record will only be saved if the number of players is at least equal to the number of spawn points, and then the name of the team will be stored with the record.

Ruin maps

If TBD is good, then total annihilation is even better. Ruin game types require the player to destroy every structure not owned by them. There are two types of Ruin maps, team-style and coop-style. alti+server tells the difference based on if the assignTeam value is set. Set it for coop style, and don't for team style.

Ruin maps which are team-style will only count structures which are of a team color. Neutral turrets and bases will not count towards the final score.

Large Map Coops

Many new spawn options are available with the alti+server. Players can be configured to spawn where they last died, to make continuation easier. If that is too immidiate, players can spawn at the place of their last pickup, or health. Coops can also be made more exciting by the use of devices like portals, to teleport players from one area to another.

Most Dangerous Game

Asymmetrical game mode mdg plays like Counter Strike. The map is configured to assign players to either the left or right team, just like in coop. However, one player (the first one to join a team) is placed by themself to fight an entire team of enemy planes. In this mode, you can specify alternate zones to spawn into. The server will randomly spawn the single player in one of these. This allows the standard spawn zone for that team to be boxed up like a coop game. Here, any Bots can be seperated from the rest of the game. In 1-life games, this box should have a turret to clean up the Bots, or ensure they quickly run into an instant-kill wall.

If everyone agrees that a specific player should be the prey, a vote can be called against the /prey command. This can be used to override the default behavior of first to join a team is the prey.

Tag

This game type only really works well on ffa maps. In this type, it is the expectation of the Alti+ server that, similar to MDG, it is everyone against one player. That player is "it". The difference is that the one player who is it changes each time they are killed. By killing the player who is it, you become it. The game continues this way until the timer runs out. At the end of the round, players are ranked by how long they were it. When a player is it, a counter is running until they die, this counter continues to accumulate throughout the game, with 1st place going to the most elusive (longest running as "it") player.

The server will periodically (~10 seconds) remind the players who is it. If a player has been it for more than 60 seconds, the server will give hints to that player's location on the map.

1-Life Hit

This game type, created by Stam, forces players into the same plane (by default Biplane with Heavy Cannon) with only a primary weapon, and in a configuration where 1 shot kills. This game type works for TDM, 1DM, and FFA game modes. Maps which start with either tdm_1lf_, 1dm_1lf_, ffa_1lf_, or simply 1lf_ will be automatically configured for this type.

Making Alti+ Maps

Alti+ maps are basically the same as any other map. The important part is placing things like powerup in the correct location, so you can attach Alti+ functionality to them later, in your plus.txt file.

When creating maps with paralax views and setting the cameraScale parameter, remember that you need to recalculate your geometry based on a screen size different from 1280x720.

If you are planning on using spawnMode map, you will need to create a view in your map named exactly Spawn. This name, including the capitalization must be kept exactly, as this the only view name that the alti+server looks at for spawn placements. You can use any layer inside that view to place your spawn lines. This is done by creating a new hull. Each data point of the hull will be a spawn point, and the spawn angle will be directly pointed at the next data point. If a player dies, the server will find the closest data point and spawn the player there. Any data points off the visible map boundary will not count, and will be automatically removed for you as possible spawn points. You can add weight to a spawn point by changing the alpha portion of its color specification. It doesn't matter what color a point is, but the alpha can be used to de-prioritize spawn points around curves, or for a variety of reasons. If the alpha specification for a point is 0, then this point is not a valid spawn point, and will not be used. Using this method, or moving location points off of the viewable map are the two methods you can easilly use to complete a hull on a course which is not a circuit. Under most circumstances it is best to set these hulls to be not-visible.

Map Integration

Altitude maps end with a .altx extension. These are simple archive files which contain all the necessary information for game play. A tool is included with alti+server called altx-tool. This tool allows you to list, extract, update, and create .altx archive files (i.e. map files). It has a special -p option which allows users to edit a special file in the root of the archive called plus.txt. This file may contain directives to any alti+server to configure the map per the authors defaults.

This tool is increadibly useful. If the author designs a coop map where users should be defaulted to a specific side, gravity should be disabled, initial goal scores should be set, map introductions are necessary, or any other settable Alti+ attribute; those can be put here. Only the commands set, unset, add, and del are allowed in this file. Any line containing anything else will be ignored. Use this file to set new attributes, or unset old ones which are no longer valid.

See Extended Commands for Admins and Map Makers for more information.

Additional Commands

The below list of commands are available to players to interface with and manage Alti+ game maps.

Extended Commands for Players

Extended Commands for Admins and Map makers

Extended Commands for Race Tournaments

Race tournaments all the server to be configured for a special tournament mode designed to manage and log race results. Race results are stored in dated files in the directory specified by the config raceData.

Extended Commands for Super Admins

Super admin functionality is set in the alti+server code itself. The superAdmin setting can be set to either admin (all admins can perform super admin functionality), console (super admin functionality is limited to the console), and list (where an option array superAdmins contains a list of vaporIds which are allowed to execute super admin functionality. The purpose of the distinction between normal Altitude admin functionality and Super Admin functionality is that super admins can change the maps on a server and restart it. There may be users who are admins to set ban and kick, and can also set assignTeam to keep the game going, but should have access to restart the server. If this option is set to console, then the upload and removeMap commands will not be included in the custom_json_commands.txt file to save space for more maps.

Console only commands

Server Options

Use the console-only /server list, /server set, /server unset, /server add, and /server del commands to modify the below values.

Server Extensions

alti+server also has support for patched altitude servers for extending the game capabilities. These are non-official changes to game.jar which alter the behavior of the server.

xx

x.x (aka xal, xalri, LewisH) has added a number of functions to altitude which are supported by alti+server. When using these patches, you should manage the server patch configuration files through alti+server. Whenever possible, support for these features is directly integrated and used automatically. Manually overriding this behaviour is also possible.

If you do not wish to have alti+server manage the server extensions, and you would prefer to manage them by hand, you can set the global config option xxEnabled to a false value.

Use the console-only /xx list, /xx set, /xx unset, /xx add, and /xx del commands to modify the below values.

Console Interface

Beyond the numerous additional game play extensions and settings, there is an enhanced altitude server console built into alti+server. Any of the above Server Options only or xx commands may only be executed on the console. This interface alone may be the reason some people wish to use alti+server to wrap around the Altitude game engine.

The console interface consists of 3 sections:

  1. On top is the standard output of the Altitude game engine,
  2. just below that is a chat window showing the player chat interaction, and
  3. on bottom is an input window for chatting or running commands.

Any line starting with a slash / character will be interpreted as a command, anything else will be interpreted as a message for the server to chat to all players.

Each of the three sections has their own scroll back. In the input window, you can use arrow keys to look through your history and modify the commands in it for new execution. To scroll through the chat window, use PageUp and PageDown; to jump to the oldest and newest chat messages, use the Home and End keys respectively. If you want to scroll back through the server's standard output, you can use F11 to go up, F12 for down, F9 to skip to the oldest message, and F10 to scroll all the way to the most recent.

In case you get lost, if at any time you press enter in the input window, all windows will scroll to their most up-to-date section.

Angles

Various interfaces in alti+server allow you to specify angles for spawning. When specifying angles, the following table lists the allowed values:

Custom Awards

At the end of a game, give out additional awards. Awards are only given if there are enough human players to make them not pointless, and only if a human player is deserving of the award. Providing custom awards can be disabled with the awards server option. They are on by default, and are defined as such:

Scripting Interface

If you are OK writing perl, there is a scripting interface for alti+server. It isn't anything fancy, you have to write exactly the same code as you would to directly add your code to the base server code. But, it allows for easy loading and unloading of script modules. And, it is an easy way to change the behaviour of the server. This is helpful for setting up league events and could be used for a map which required tight integration with the server code. See the example_scripts directory on github for examples.

A directory will be created under your altitude/servers directory called alti+scripts. Place scripts into this directory and they will be read when the alti+server process starts. If scripts are added or changed during a running server, the /script reload command can be used to re-read all scripts, including new ones.

A special command /vote modify is available to tune scripts

Snarky Server

The server can be configured to emit snarky comments from time to time by setting the code OPTION snarkChance to a positive value. Setting this value to 20 (for example) should give each player a 1 in 20 chance for receiving a snarky comment for things for which a comment like this may occur. The most commong snarky comments are for plane configuraion choices and occur when a plan spawns. So, if a snarkChance is set to 20 and a player dies 20 times in one game, it is likely that they will receive a snarky comment (if their plane choices have a preconfigured comment).

Setting snarkChance to 0 disables this feature, and no snarky comments will be emitted by the server.

Minimum Level Requirements

If the requireLevel OPTION is set, then the server will not allow players to spawn who don't meet the minimum requirements.

New players (Ace 0) must unlock all their planes (level 21) to join a game.

Recently aced players (Ace 1 - Ace 10) must unlock all their first loopy blue perk (level 8).

Managing Aggressive Behaviour

The server can be configured with the bullyKick OPTION to warn, then eventually kick players who behave in overly aggressive ways towards other players. Language which is often used in offensive statements is looked for, and after 10 utterances, the aggressive player is kicked.

More information

See the Altitude+ wiki for more information on using the server: http://altiplus.glaciated.org/