piqueserver.game_modes package

Submodules

piqueserver.game_modes.arena module

exception piqueserver.game_modes.arena.ArenaException[source]

Bases: Exception

class piqueserver.game_modes.arena.Gate(x, y, z, protocol_obj)[source]

Bases: object

build_gate()[source]
destroy_gate()[source]
record_gate(x, y, z)[source]
piqueserver.game_modes.arena.apply_script(protocol, connection, config)[source]
piqueserver.game_modes.arena.coord(connection)[source]
piqueserver.game_modes.arena.get_team_alive_count(team)[source]
piqueserver.game_modes.arena.get_team_dead(team)[source]
piqueserver.game_modes.arena.make_color(r, g, b, a=255)[source]
piqueserver.game_modes.arena.minimize_block_line(points)[source]
piqueserver.game_modes.arena.partition(points, d, c1, c2)[source]

piqueserver.game_modes.babel module

babel.py last modified 2014-04-04 22:12:44 Originally onectf.py by Yourself Modified to complement babel_script.py: http://aloha.pk/files/aos/pyspades/feature_server/scripts/babel_script.py

Release thread: http://www.buildandshoot.com/viewtopic.php?t=2586

piqueserver.game_modes.babel.apply_script(protocol, connection, config)[source]

piqueserver.game_modes.babel_script module

piqueserver.game_modes.freeforall module

piqueserver.game_modes.freeforall.apply_script(protocol, connection, config)[source]

piqueserver.game_modes.infiltration module

piqueserver.game_modes.onectf module

piqueserver.game_modes.onectf.apply_script(protocol, connection, config)[source]

piqueserver.game_modes.push module

push.py last modified 2019-03-06 Contributors: danhezee, StackOverflow, izzy, Danke, noway421, IAmYourFriend

The concept:
Each team spawns at a set location with the enemy intel. They must “push” the intel towards their control point, which is also at a set location. The only way to arrive there is by building bridges over the deadly water. Further introduction to the game mode: https://youtu.be/DdisPY6vDD0
How to setup new maps:
Spawn and CP locations must be configured via extensions in the map’s map_name.txt metadata. Example:
>>> extensions = {
...     'push': True,
...     'push_spawn_range' : 5,
...     'push_blue_spawn' : (91, 276, 59),
...     'push_blue_cp' : (91, 276, 59),
...     'push_green_spawn' : (78, 86, 59),
...     'push_green_cp' : (78, 86, 59),
...     'water_damage' : 100
... }

Additional (but optional) extensions, to mark each teams build area and prevent the enemy from building there (and thereby helping the enemy). The build area is defined by x and y of upper left corner, followed by x and y of bottom right corner on the map. Example:

‘push_blue_build_area’ : (64, 100, 243, 500), ‘push_green_build_area’ : (268, 100, 447, 500),

Options

piqueserver.game_modes.push.apply_script(protocol, connection, config)[source]
piqueserver.game_modes.push.byte_hls_to_rgb(hls)[source]
piqueserver.game_modes.push.byte_middle_range(byte)[source]
piqueserver.game_modes.push.byte_rgb_to_hls(rgb)[source]
piqueserver.game_modes.push.compare_hs(block_hls, team_hls)[source]
piqueserver.game_modes.push.create_area(x, y, block_range)[source]
piqueserver.game_modes.push.get_entity_location(connection, entity_id)[source]
piqueserver.game_modes.push.get_now_in_secs()[source]
piqueserver.game_modes.push.get_spawn_location(connection)[source]
piqueserver.game_modes.push.has_flag(connection)[source]
piqueserver.game_modes.push.is_in_area(x, y, top_x, top_y, bottom_x, bottom_y)[source]
piqueserver.game_modes.push.reset_intel_position(protocol, team)[source]
piqueserver.game_modes.push.resetintel(connection, value)[source]
piqueserver.game_modes.push.respawn(connection)[source]

piqueserver.game_modes.tdm module

Team Deathmatch game mode.

Maintainer: Triplefox

piqueserver.game_modes.tdm.apply_script(protocol, connection, config)[source]
piqueserver.game_modes.tdm.score(connection)[source]

piqueserver.game_modes.tow module

Tug of War game mode, where you must progressively capture the enemy CPs in a straight line to win.

Maintainer: mat^2

class piqueserver.game_modes.tow.TugTerritory(*arg, **kw)[source]

Bases: pyspades.entities.Territory

add_player(player)[source]
disable()[source]
disabled = True
enable()[source]
piqueserver.game_modes.tow.apply_script(protocol, connection, config)[source]
piqueserver.game_modes.tow.get_index(value)[source]
piqueserver.game_modes.tow.get_point(x, y, magnitude, angle)[source]
piqueserver.game_modes.tow.limit_angle(value)[source]
piqueserver.game_modes.tow.limit_dimension(value)[source]
piqueserver.game_modes.tow.random_up_down(value)[source]

Module contents