help with arena script

Installation support, coding tips, and general tutorials.
3 posts Page 1 of 1 First unread post
Buffet_of_Lies
Mapper
Mapper
Posts: 402
Joined: Tue Nov 20, 2012 11:25 am


Today I've been trying to help a user get arena mode working with pysnip. I had it working on pyspades a year ago but now I am finding that I can't get the damn thing to work.

This config.txt...
Code: Select all
{
    "name" : "All You Can Eat Buffet of Lies",
    "motd" : [
        "Welcome to %(server_name)s",
        "Map: %(map_name)s by %(map_author)s",
        "Game mode: Capture The Flag",
        "Server powered by PySnip and BuildAndShoot.com"
    ],
    "help" : [
        "Server name: %(server_name)s",
        "Map: %(map_name)s by %(map_author)s",
        "Game mode: Capture The Flag",
        "/STREAK    Shows how many kills in a row you got without dying",
        "/INTEL     Tells you who's got the enemy intel",
        "/VOTEKICK  Start a vote to temporarily ban a disruptive player",
        "/TIME      Remaining time until forced map reset"
    ],
    "tips" : [
        "You are playing Capture The Flag on %(server_name)s",
        "Type /help for info & commands"
    ],
    "tip_frequency" : 5,
    "rules" : [
        "Cheating isn't welcome. Griefing is frowned upon. Have fun!"
    ],
    "master" : true,
    "max_players" : 24,
    "max_connections_per_ip" : 3,
    "port" : 32887,
    "network_interface" : "",

    "game_mode" : "arena",
    "cap_limit" : 10,
    "default_time_limit" : 120,
    "advance_on_win" : true,
    "maps" : ["titanicarena"],
    "random_rotation" : false,

    "respawn_time" : 16,
    "respawn_waves" : true,
    "friendly_fire" : "on_grief",
    "grief_friendly_fire_time" : 5,
    "spade_teamkills_on_grief" : false,
    "balanced_teams" : 2,
    "teamswitch_interval" : 0,

    "speedhack_detect" : false,
    "votekick_percentage" : 35,
    "votekick_ban_duration" : 30,
    "votekick_public_votes" : true,
    "votemap_public_votes" : true,
    "votemap_extension_time" : 15,
    "votemap_player_driven" : false,
    "votemap_autoschedule" : false,
    "votemap_time" : 120,
    "votemap_percentage" : 80,

    "melee_damage" : 80,
    "fall_damage" : true,
    "user_blocks_only" : false,
    "set_god_build" : false,
    "server_prefix" : "",
    "time_announcements" : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 30, 60, 120, 180,
                            240, 300, 600, 900, 1200, 1800, 2400, 3000],
    "login_retries" : 3,
    "default_ban_duration" : 1440,

    "logfile" : "./logs/log.txt",
    "rotate_daily" : true,
    "debug_log" : false,
    "profile" : false,

    "team1" : {
        "name" : "Blue",
        "color" : [0, 0, 255]
    },
    "team2" : {
        "name" : "Green",
        "color" : [0, 255, 0]
    },
   "passwords" : {
        "admin" : ["nunyabizniz"],
        "moderator" : ["nunyabizniz"],
        "guard" : ["nunyabizniz"],
        "trusted" : ["nunyabizniz"]
    },
    "rights" : {
        "moderator" : ["advance", "cancel", "dban", "fog", "from", "goto", "hackinfo", "hban", "invisible", "ip", "kick", "kickafk", "kill", "map", "master", "move", "mute", "resetgame", "switch", "teleport", "teleport_other", "tpsilent", "togglebuild", "togglekill", "togglevotekick", "trust", "undoban", "unmute", "unstick", "where", "whowas"],
        "guard" : ["cancel", "fog", "from", "goto", "hackinfo", "hban", "ip", "kick", "kickafk", "kill", "move", "mute", "switch", "teleport", "teleport_other", "togglebuild", "togglekill", "togglevotekick", "trust", "unmute", "unstick", "where", "whowas"]
    },
    "ssh" : {
        "enabled" : false,
        "port" : 32887,
        "users" : {
            "user" : "ssh_pass_change_this"
        }
    },
    "status_server" : {
        "enabled" : false,
        "port" : 32886
    },
    "ban_publish" : {
        "enabled" : false,
        "port" : 32885
    },
    "ban_subscribe" : {
        "enabled" : true,
        "urls" : [
            ["http://www.blacklist.spadille.net/subscribe.json", []]
        ]
    },
    "irc" : {
        "enabled" : false,
        "nickname" : "PySnip",
        "username" : "PySnip",
        "realname" : "PySnip",
        "server" : "irc.quakenet.org",
        "port" : 6667,
        "channel" : "#MyServerChannel",
        "password" : "",
        "commandprefix" : "!",
        "chatprefix" : "."
    },
    "scripts" : [
        "rollback",
        "protect",
        "map_extensions",
        "votekick",
        "trusted",
        "ratio",
        "passreload",
        "blockinfo",
        "afk",
		"blood",
		"mortar",
		"bighead"
    ],

    "squad_respawn_time" : 32,
    "squad_size" : 4,
    "auto_squad" : false,
    "load_saved_map" : false,
    "rollback_on_game_end" : false,
    "afk_time_limit" : 30
}
Results in this error message...
Code: Select all
C:\Ace of Spades075\pysnip>run.exe
('from' command disabled - missing data/GeoLiteCity.dat)
Traceback (most recent call last):
  File "run.py", line 1030, in <module>
  File "run.py", line 570, in __init__
NotImplementedError: invalid game mode: arena

C:\Ace of Spades075\pysnip>pause
Press any key to continue . . .
Did something change in the past year? I have the arena.py script in the scripts folder and proper arena mode map and map text config. Yet I am baffled.
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


There seems to be two versions of the script; the older one, which you seem to have, and the newer one, found here.

The older one would work perfectly well if you simply added it to the scripts in the config, although the game mode would need to be CTF and would show as that in the server list. The new one requires you to change the game mode to Arena, which is what you've tried to do.

The new one works by telling the game to use the CTF game mode inside the script, rather than explicitly state it in the config. The game can only handle two modes, CTF and TC. All custom game modes are some variant of them.
Buffet_of_Lies
Mapper
Mapper
Posts: 402
Joined: Tue Nov 20, 2012 11:25 am


Thank you, Influx! That seems to have done the trick. You have just improved relations with NorthSouth Korea ten-fold!
3 posts Page 1 of 1 First unread post
Return to “Help!”

Who is online

Users browsing this forum: No registered users and 3 guests