Note: This forum is merely an archive. It is no longer possible to register or post. - StackOverflow
New Ace of Spades Forums: http://buildandshoot.com/

[HOW TO] Set spawns with VOXEL[?]

Having problems creating a map? Ask around in here.

[HOW TO] Set spawns with VOXEL[?]

Postby PumpSkin » Thu Apr 19, 2012 5:29 pm

Hey guys!
I decided to make my own map. But now I got a little "problem". I joined to my server which hast hosted the map, but then I saw that the spawns were randomly sprayed over the map. Now I want to know if I have to set the spawns (intel, cp, player) with voxel or at the server and how to do this.
User avatar
PumpSkin
Member
 
Posts: 168
Joined: Mon Apr 02, 2012 3:04 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby BuffetOfLies » Fri Apr 20, 2012 11:51 am

This seems to be this week's popular question. http://code.google.com/p/pyspades/wiki/MapScripting
User avatar
BuffetOfLies
Moderator
 
Posts: 213
Joined: Tue Jan 17, 2012 3:40 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby Ki11aWi11 » Sun Apr 22, 2012 8:49 am

I would absolutely love if someone could make a step by step process to this, with just how to set capture, base and spawn points. That way I could chuck TC points in Capitol to interesting places like the top of buildings, or inside the town hall.
Image
Image
User avatar
Ki11aWi11
Member
 
Posts: 296
Joined: Wed Mar 21, 2012 12:07 pm
Location: Inside a bunker in Trenches.

Re: [HOW TO] Set spawns with VOXEL[?]

Postby PumpSkin » Sun Apr 22, 2012 12:49 pm

Ki11aWi11 wrote:I would absolutely love if someone could make a step by step process to this, with just how to set capture, base and spawn points. That way I could chuck TC points in Capitol to interesting places like the top of buildings, or inside the town hall.



Yes, someone should do this.
User avatar
PumpSkin
Member
 
Posts: 168
Joined: Mon Apr 02, 2012 3:04 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby Ki11aWi11 » Mon Apr 23, 2012 9:19 am

Is Dany0 out there, he is probably the best cartographer out there, he would probably be able to do this.
Image
Image
User avatar
Ki11aWi11
Member
 
Posts: 296
Joined: Wed Mar 21, 2012 12:07 pm
Location: Inside a bunker in Trenches.

Re: [HOW TO] Set spawns with VOXEL[?]

Postby PumpSkin » Mon Apr 23, 2012 5:44 pm

Ki11aWi11 wrote:Is Dany0 out there, he is probably the best cartographer out there, he would probably be able to do this.


I don´t know this guy :D
User avatar
PumpSkin
Member
 
Posts: 168
Joined: Mon Apr 02, 2012 3:04 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby BuffetOfLies » Tue Apr 24, 2012 12:06 pm

You simply add the necessary lines with notepad. You might need to get some coordinate info via voxed but it's not really very difficult. Let's take a peek at my Black Widow map's config text:
Code: Select all
name = 'Black Widow'
version = '1.0'
author = 'Buffet of Lies'
description = 'Map by Buffet_of_Lies for AoS'
extensions = { 'water_damage' : 5 }
# scripting

from pyspades.constants import *
from pyspades.server import ServerConnection

def get_entity_location(team, entity_id):
    if entity_id == BLUE_FLAG:
        # puts only the blue flag in the corner
        # you can also use GREEN_FLAG, BLUE_BASE, and GREEN_BASE as entity locations
        z = team.protocol.map.get_z(0, 0)
        return (0, 0, z)

def get_spawn_location(connection):
    if connection.name == 'Buffet_of_Lies':
        # put players with the name "Buffet_of_Lies"
        # into the sky
        x, y, z = ServerConnection.get_spawn_location(connection)
        return (x, y, 30)
    #to set spawn for a specific team, do the following:
    if connection.team is connection.protocol.blue_team:
        #sets a static spawn for just the blue team, but you could use "green_team" too.
        #set_location_safe tries to keep the player outside of walls.
        x, y, z = ServerConnection.get_spawn_location(connection)
        return ServerConnection.set_location_safe(connection, (110, 110, 50))


See where it says "entity design == BLUE_FLAG" or GREEN_BASE? You can just change and add lines to those. You seem to be able to just tack it onto the end of map's config file. See where it says "get_spawn_location"? See how it says it is spawning the blue team at coordinates 110, 110, 50? If you were to add another line that said "if connection.team is connection.protocol.green_team:" then you could dpecify a new set of coords for the green team!
User avatar
BuffetOfLies
Moderator
 
Posts: 213
Joined: Tue Jan 17, 2012 3:40 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby PumpSkin » Tue Apr 24, 2012 1:50 pm

BuffetOfLies wrote:You simply add the necessary lines with notepad. You might need to get some coordinate info via voxed but it's not really very difficult. Let's take a peek at my Black Widow map's config text:
Code: Select all
name = 'Black Widow'
version = '1.0'
author = 'Buffet of Lies'
description = 'Map by Buffet_of_Lies for AoS'
extensions = { 'water_damage' : 5 }
# scripting

from pyspades.constants import *
from pyspades.server import ServerConnection

def get_entity_location(team, entity_id):
    if entity_id == BLUE_FLAG:
        # puts only the blue flag in the corner
        # you can also use GREEN_FLAG, BLUE_BASE, and GREEN_BASE as entity locations
        z = team.protocol.map.get_z(0, 0)
        return (0, 0, z)

def get_spawn_location(connection):
    if connection.name == 'Buffet_of_Lies':
        # put players with the name "Buffet_of_Lies"
        # into the sky
        x, y, z = ServerConnection.get_spawn_location(connection)
        return (x, y, 30)
    #to set spawn for a specific team, do the following:
    if connection.team is connection.protocol.blue_team:
        #sets a static spawn for just the blue team, but you could use "green_team" too.
        #set_location_safe tries to keep the player outside of walls.
        x, y, z = ServerConnection.get_spawn_location(connection)
        return ServerConnection.set_location_safe(connection, (110, 110, 50))


See where it says "entity design == BLUE_FLAG" or GREEN_BASE? You can just change and add lines to those. You seem to be able to just tack it onto the end of map's config file. See where it says "get_spawn_location"? See how it says it is spawning the blue team at coordinates 110, 110, 50? If you were to add another line that said "if connection.team is connection.protocol.green_team:" then you could dpecify a new set of coords for the green team!



Uhm... I understand this. But how should I call this file and where to save it?
User avatar
PumpSkin
Member
 
Posts: 168
Joined: Mon Apr 02, 2012 3:04 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby BuffetOfLies » Tue Apr 24, 2012 5:47 pm

You'd save it with the same filename as your map you wanted to customize. Like, Blackwidow.vxl would have a Blackwidow.txt to go with it. It would all wind up going into the pyspades map folder eventually to get loaded up by the server.
User avatar
BuffetOfLies
Moderator
 
Posts: 213
Joined: Tue Jan 17, 2012 3:40 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby PumpSkin » Wed Apr 25, 2012 1:00 pm

BuffetOfLies wrote:You'd save it with the same filename as your map you wanted to customize. Like, Blackwidow.vxl would have a Blackwidow.txt to go with it. It would all wind up going into the pyspades map folder eventually to get loaded up by the server.


Okay. So I must thank you one time again! :D

Thanks.
User avatar
PumpSkin
Member
 
Posts: 168
Joined: Mon Apr 02, 2012 3:04 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby Ki11aWi11 » Sat May 05, 2012 8:59 am

In regards to Tug Of War, how would I go about setting capture points 1 through to 5?
Image
Image
User avatar
Ki11aWi11
Member
 
Posts: 296
Joined: Wed Mar 21, 2012 12:07 pm
Location: Inside a bunker in Trenches.

Re: [HOW TO] Set spawns with VOXEL[?]

Postby LASTofS » Mon May 07, 2012 5:27 am

Damn, I was thought this would actually be a how-to guide. :(
ImageImageImage
Join the [LoS] (last of spades) clan here | my greatest contribution: Image icon on openGL client
User avatar
LASTofS
News Reporter
 
Posts: 852
Joined: Sat Jan 21, 2012 6:34 pm
Location: pls there are kids in here

Re: [HOW TO] Set spawns with VOXEL[?]

Postby PumpSkin » Mon May 07, 2012 1:03 pm

LASTofS wrote:Damn, I was thought this would actually be a how-to guide. :(


Not really... :D

But BuffetofLies has already told us how to:

BuffetOfLies wrote:You simply add the necessary lines with notepad. You might need to get some coordinate info via voxed but it's not really very difficult. Let's take a peek at my Black Widow map's config text:
Code: Select all
name = 'Black Widow'
version = '1.0'
author = 'Buffet of Lies'
description = 'Map by Buffet_of_Lies for AoS'
extensions = { 'water_damage' : 5 }
# scripting

from pyspades.constants import *
from pyspades.server import ServerConnection

def get_entity_location(team, entity_id):
    if entity_id == BLUE_FLAG:
        # puts only the blue flag in the corner
        # you can also use GREEN_FLAG, BLUE_BASE, and GREEN_BASE as entity locations
        z = team.protocol.map.get_z(0, 0)
        return (0, 0, z)

def get_spawn_location(connection):
    if connection.name == 'Buffet_of_Lies':
        # put players with the name "Buffet_of_Lies"
        # into the sky
        x, y, z = ServerConnection.get_spawn_location(connection)
        return (x, y, 30)
    #to set spawn for a specific team, do the following:
    if connection.team is connection.protocol.blue_team:
        #sets a static spawn for just the blue team, but you could use "green_team" too.
        #set_location_safe tries to keep the player outside of walls.
        x, y, z = ServerConnection.get_spawn_location(connection)
        return ServerConnection.set_location_safe(connection, (110, 110, 50))


See where it says "entity design == BLUE_FLAG" or GREEN_BASE? You can just change and add lines to those. You seem to be able to just tack it onto the end of map's config file. See where it says "get_spawn_location"? See how it says it is spawning the blue team at coordinates 110, 110, 50? If you were to add another line that said "if connection.team is connection.protocol.green_team:" then you could dpecify a new set of coords for the green team!
User avatar
PumpSkin
Member
 
Posts: 168
Joined: Mon Apr 02, 2012 3:04 pm

Re: [HOW TO] Set spawns with VOXEL[?]

Postby Enari » Tue May 08, 2012 11:40 am

I will write an idiot-proof-guide on this if i get the time
Image
User avatar
Enari
Moderator
 
Posts: 595
Joined: Sun Dec 11, 2011 1:15 pm


Return to Mapping Help



Who is online

Users browsing this forum: No registered users and 3 guests

cron