The babel gamemode on Aloha has recently been updated.
- Fog now properly loads on a new map (and doesn’t affect the intel grab/drop flash).
The green/red team can now build 1 block below and adjacent to heavens like the blue team can (this is actually re-adding a fix that was written over accidentally)
Map makers can use the mapname.txt file to change player and tent spawns.
Map makers can define the heavens color.
Both new features are completely backwards compatible with mapname.txt files that exist now (or don’t exist at all). The game uses the original defaults if not explicitly defined in mapname.txt. The convention used for spawn locations and fog color in all other mapname.txt files is still used here, and most of these should be compatible with the new script without modification.
An example of what a mapname.txt file looks like with these features is the latest update to ellipsis (which is currently on the server):
ellipsis.txt
name = ‘Ellipsis’
version = ‘1.3’
author = ‘ei8htx’
description = (‘Now with more scripting!’)
extensions = {
‘water_damage’ : 8,
‘babel’ : True,
‘heavens_color’ : (250, 130, 40, 255)
}
fog = (150, 255, 255)
AREA = (98, 236, 374, 276,) #blue x1, both y1, green x1, both y2
WIDTH = 40
BLUE_RECT = (AREA[0], AREA[1], AREA[0]+WIDTH, AREA[3]) #x1, y1, x2, y2
GREEN_RECT = (AREA[2], AREA[1], AREA[2]+WIDTH, AREA[3])
from pyspades.constants import *
from pyspades.server import ServerConnection
def get_spawn_location(connection):
if connection.team is connection.protocol.blue_team:
return connection.protocol.get_random_location(True, BLUE_RECT)
elif connection.team is connection.protocol.green_team:
return connection.protocol.get_random_location(True, GREEN_RECT)
def get_entity_location(team, entity_id):
if entity_id == GREEN_BASE:
return (256+138, 256, team.protocol.map.get_z(256+138, 256))
if entity_id == BLUE_BASE:
return (256-138, 256, team.protocol.map.get_z(256-138, 256))
It’s important to note that usually not including all 4 entity IDs in get_entity_location() is a bad idea. However the intel is fixed in babel, and should not be defined in the mapname.txt (if it is it’ll be ignored anyway). The script defines get_entity_location() for the intel first, then passes on to the mapname.txt for the tent locations. Mapname.txt files that incorporate all 4 can still be used; just the intel spawn locations will be ignored (tent locations will be used).
Also, if anyone has any ideas/suggestions on stuff that should be incorporated into current maps (fog, heavens color, spawns), reply here! I’m 90% certain drift ice should not be spawning the players in the water now, and I moved the tents up by about 5 blocks so they spawn on top of the plateau.
The updated babel_script.py is here: babel_script.py (also wow, mediafire formats code now!)
You’ll still need an original babel.py file (that is the companion file that comes with babel_script.py). For more info check out the BnS thread.