Babel Gamemode Update

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.

1 Like

I have’t played a lot of babel lately but do we still have those maps that the tents spawn in the trees?

I think that’s the (new) classic gen maps script. I don’t think it’s in rotation anymore.

great update :smiley:
maybe an optional map extension to create a nobuild/nodestroy area of lets say 5 blocks around the tent would be a good idea for some maps like waterfront where griefers like to dig down the tent.

Edit: It’s quite easy to cap the intel through the platform from underneath by building straight up from the ground, especially on maps like octopus or maze mountain if you know how to do it right.
I’m not sure if that would even be possible to fix though.

I don’t see that too often, but if it can be fixed it probably should be.

Just played tortuga on babel.

I really hate spawning in the tall tree. also the tent spawns in the tree too.

If you want to write a mapname.txt and alter the rectangle I can upload it. Otherwise it’ll probably be Tuesday before I get back to anything AoS related. You can add in the spawn thing like in the ellipsis example, and tweak the bounds of the triangle so that people spawn where they should.

Current mapname.txt:

name = 'Tortuga'
version = '1.0'
author = 'Lostmotel'
extensions = { 'boundary_damage' : {'left' : 1,'right' : 512, 'top' : 94, 'bottom' : 418, 'damage': 5 },
               'babel' : True }


Okay i’ll take a look at it.

okay this should cover the tents not spawning the the trees. Not sure how to control the spawn area. Still a little confuse on what the numbers really do, but I think I understood them enough to get the tent out of the tree.

[details=Click for details]name = ‘Tortuga’
version = ‘1.0’
author = ‘Lostmotel’
extensions = { ‘boundary_damage’ : {‘left’ : 1,‘right’ : 512, ‘top’ : 94, ‘bottom’ : 418, ‘damage’: 5 },
‘babel’ : True }

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 (254+145, 252, team.protocol.map.get_z(256+138, 256))
if entity_id == BLUE_BASE:
return (254-126, 256, team.protocol.map.get_z(256-138, 256)) [/details]

ughh totally forgot that I already requested a script like this [script] omgnograbbingthroughwallsanymore - Build and Shoot

I’m going to look into the issue with the tortuga map .txt file