Merge pull request #117 from imayushsaini/api9

fixed default settings and config.json
This commit is contained in:
Ayush Saini 2025-05-04 21:58:41 +05:30 committed by GitHub
commit 56d0aa7ab4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 227 additions and 141 deletions

View file

@ -548,12 +548,14 @@ class ServerManagerApp:
)
return
except Exception as exc:
json_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), 'config.json')
)
print(f'{Clr.RED}Error loading config file:\n{exc}.{Clr.RST}',
flush=True)
with open(self._ba_root_path + "/mods/defaults/config.toml", "r") as infile:
with open(self._ba_root_path + "/mods/defaults/config.json", "r") as infile:
default_file = infile.read()
with open(self._config_path, "w") as outfile:
with open(json_path, "w") as outfile:
outfile.write(default_file)
print("config reset done")

44
dist/ba_root/mods/defaults/config.json vendored Normal file
View file

@ -0,0 +1,44 @@
{
"party_name":"BombSquad Community Server",
"party_is_public":true,
"authenticate_clients":true,
"admins":[
"pb-yOuRAccOuNtIdHErE",
"pb-aNdMayBeAnotherHeRE"
],
"enable_default_kick_voting":true,
"port":43210,
"max_party_size":6,
"session_max_players_override":8,
"session_type":"ffa",
"playlist_code":12345,
"playlist_shuffle":true,
"auto_balance_teams":true,
"enable_telnet":false,
"teams_series_length":7,
"ffa_series_length":24,
"stats_url":"https://discord.gg/ucyaesh",
"clean_exit_minutes":60,
"unclean_exit_minutes":90,
"idle_exit_minutes":20,
"show_tutorial":false,
"team_names":[
"ladoo",
"barfi"
],
"team_colors":[
[
0.8,
0.0,
0.6
],
[
0,
1,
0.8
]
],
"enable_queue":true,
"protocol_version":35,
"player_rejoin_cooldown":10.0
}

View file

@ -1,141 +1,181 @@
{
"whitelist": false,
"useV2Account": false,
"Anti-IdRevealer": false,
"ChatCommands": {
"BrodcastCommand": true
"Anti-IdRevealer": false,
"ChatCommands": {
"BrodcastCommand": true
},
"HostDeviceName": "v1.4",
"HostName": "BCSv2",
"KickVoteMsgType": "chat",
"ScoreScreenAnnouncement": {
"enable": true,
"msg": [
"click stats button to join discord",
"watch hey smoothy youtube channel",
"downlaod new mods from discord"
]
},
"ShowKickVoteStarterName": true,
"StumbledScoreScreen": true,
"WarnCooldownMinutes": 30,
"afk_remover": {
"enable": false,
"ingame_idle_time_in_secs": 60,
"kick_idle_from_lobby": true,
"lobby_idle_time_in_secs": 10
},
"afterWarnKickMsg": "Enough warnings, Goodbye have a nice day :)",
"allowInGameChat": true,
"allowTeamChat": true,
"allowVotes": true,
"autoNightMode": {
"enable": true,
"endTime": "06:00",
"fireflies": true,
"fireflies_random_color": false,
"startTime": "18:30"
},
"autoTeamBalance": true,
"ballistica_web": {
"enable": true,
"server_password": "my_secerT_password_very_hard",
"discord_link": "https://discord.gg/ucyaesh"
},
"character_chooser": {
"enable": true
},
"colorful_explosions": {
"enable": true
},
"colorfullMap": true,
"contributeData": true,
"coopModeWithLessPlayers": {
"enable": false,
"minPlayerToExitCoop": 3
},
"custom_characters": {
"enable": true
},
"discordWebHook": {
"enable": false,
"webhookURL": "https://discord.com/api/webhooks/82649239/e7s0zyBJIuczXL7_CGSO5WM"
},
"discordbot": {
"enable": false,
"liveChat": true,
"liveStatsChannelID": 925440043672285200,
"logsChannelID": 925440079843958800,
"token": "<secret-token-here>"
},
"elPatronPowerups": {
"Quantity": {
"Curse": 1,
"Fire Bombs": 3,
"Fly Bombs": 3,
"Goodbye": 2,
"Healing Damage": 1,
"Health": 1,
"Ice Bombs": 3,
"Ice Man": 1,
"Impact Bombs": 3,
"Impairment Bombs": 2,
"Mine Bombs": 2,
"Punch": 3,
"Shield": 2,
"Speed": 2,
"Sticky Bombs": 3,
"Tank Shield": 1,
"Triple": 3
},
"textonmap": {
"top watermark": "Welcome to server \nIP @IP PORT @PORT",
"bottom left watermark": "Owner : <owner-name> \nEditor : <bablu>\nScripts : BCS1.7.13",
"center highlights":{
"color":[1,0,0],
"randomColor":true,
"msg":[
"type end to start end vote",
"start msg with prefix .(dot) to send in game popup msg",
"start msg with prefix ,(comma) to send msg to teammates",
"BombSquad Community Server - BCS"
]
}
"enable": false,
"settings": {
"Healing Damage PTG": 72,
"Powers Gravity": true,
"Powerup Name": true,
"Powerup Scale": 1,
"Powerup Style": "Auto",
"Powerup Time": false,
"Powerup With Shield": true,
"Powerups": {
"Curse": 1,
"Fire Bombs": 3,
"Fly Bombs": 3,
"Goodbye": 2,
"Healing Damage": 1,
"Health": 1,
"Ice Bombs": 3,
"Ice Man": 1,
"Impact Bombs": 3,
"Impairment Bombs": 2,
"Mine Bombs": 2,
"Punch": 3,
"Shield": 2,
"Speed": 2,
"Sticky Bombs": 3,
"Tank Shield": 1,
"Triple": 3
},
"Tank Shield PTG": 96
}
},
"enableHitTexts": true,
"enableTagAnimation": true,
"enableTop5effects": true,
"enableeffects": true,
"enablehptag": true,
"enablerank": true,
"enablestats": true,
"enabletags": true,
"firstTimeJoinMsg": "Welcome to the server,we r saving all your account details and chats",
"leaderboard": {
"barsBehindName": true,
"enable": true
},
"maxAccountPerIP": 3,
"maxPlayersPerDevice": 2,
"maxWarnCount": 2,
"mikirogQuickTurn": {
"enable": false
},
"minAgeToChatInHours": 78,
"minAgeToJoinInHours": 24,
"newResultBoard": true,
"playermod": {
"default_bomb": "normal",
"default_bomb_count": 1,
"default_boxing_gloves": true,
"default_shield": false
},
"playlists": {
"elim": 412172,
"epic": 412173,
"ffa": 412175,
"ffasmash": 412179,
"smash": 412151,
"soccer": 412160,
"team": 12345
},
"regularWelcomeMsg": "Welcome Back",
"sameCharacterForTeam": false,
"statsResetAfterDays": 31,
"textonmap": {
"bottom left watermark": "Owner : <owner-name> \nEditor : <bablu>\nScripts : BCS1.7.39",
"center highlights": {
"color": [
1,
0,
0
],
"msg": [
"type end to start end vote",
"start msg with prefix .(dot) to send in game popup msg",
"start msg with prefix ,(comma) to send msg to teammates",
"BombSquad Community Server - BCS"
],
"randomColor": true
},
"ScoreScreenAnnouncement":{
"enable": true,
"msg": ["click stats button to join discord", "watch hey smoothy youtube channel","download new mods from discord", "use /ping all to check others ping.",
"start msg with prefix ,(comma) to send msg to teammates", "start msg with prefix .(dot) to send in game popup msg","click stats button for leaderboard","get notification when friends join this server, checkout leaderboard",
"abusers, spammers will get auto ban", "doesnt matter who starts fight, if you abuse- you will get ban too."]
},
"statsResetAfterDays":31,
"leaderboard":{
"enable":true,
"barsBehindName":true
},
"autoNightMode":{
"enable":true,
"startTime":"18:30",
"endTime":"06:00",
"fireflies":true,
"fireflies_random_color":false
},
"colorfullMap":true,
"playlists":{
"team":12345,
"ffa":412175,
"elim":412172,
"soccer":412160,
"smash":412151,
"ffasmash":412179,
"epic":412173
},
"coopModeWithLessPlayers":{
"enable":false,
"minPlayerToExitCoop":0
},
"mikirogQuickTurn":{
"enable":false
},
"colorful_explosions":{
"enable":true
},
"ballistica_web": {
"enable":true,
"server_password":"dfgeh54rhbrthsdfhfdh"
},
"character_chooser":{
"enable":true
},
"custom_characters": {
"enable":true
},
"StumbledScoreScreen":true,
"elPatronPowerups":{
"enable":true,
"settings":{"Powers Gravity": true,
"Tank Shield PTG": 96,
"Healing Damage PTG": 72,
"Powerup Style": "Auto",
"Powerup Scale": 1.0,
"Powerup Name": true,
"Powerup With Shield": true,
"Powerup Time": false},
"Quantity":{ "Shield": 2,
"Punch": 3, "Mine Bombs": 2,
"Impact Bombs": 3, "Ice Bombs": 3, "Triple": 3,
"Sticky Bombs": 3, "Curse": 1, "Health": 1,
"Speed": 2, "Healing Damage": 1, "Goodbye": 2,
"Ice Man": 1,"Tank Shield": 1, "Impairment Bombs": 2,
"Fire Bombs": 3, "Fly Bombs": 3}
},
"discordbot":{
"enable":false,
"token":"<secret-token-here>",
"liveChat":true,
"liveStatsChannelID":925440043672285205,
"logsChannelID":925440079843958834
},
"discordWebHook": {
"enable": false,
"webhookURL": "https://discord.com/api/webhooks/82649239/e7s0zyBJIuczXL7_CGSO5WM"
},
"afk_remover":{
"enable":true,
"ingame_idle_time_in_secs":60,
"kick_idle_from_lobby":true,
"lobby_idle_time_in_secs":10
},
"playermod": {
"default_boxing_gloves": true,
"default_shield" : false,
"default_bomb" : "normal",
"default_bomb_count" : 1
},
"allowTeamChat":true,
"allowVotes":true,
"allowInGameChat":true,
"sameCharacterForTeam":false,
"newResultBoard":true,
"HostDeviceName":"v1.4",
"HostName":"BCS",
"ShowKickVoteStarterName":true,
"autoTeamBalance": true,
"KickVoteMsgType":"chat",
"minAgeToChatInHours":78,
"minAgeToJoinInHours":24,
"maxWarnCount":2,
"WarnCooldownMinutes":30,
"maxAccountPerIP":1,
"maxPlayersPerDevice":1,
"warnMsg":"WARNING !!!",
"afterWarnKickMsg":"Enough warnings, Goodbye have a nice day :)",
"firstTimeJoinMsg":"Welcome to the server,we r saving all your account details and chats",
"regularWelcomeMsg":"Welcome Back",
"contributeData": true,
"enabletags": true,
"enablehptag": true,
"enablerank": true,
"enablestats": true,
"enableHitTexts": true,
"enableeffects": true,
"enableTop5effects": true,
"enableTagAnimation":true
"top watermark": "Welcome to server \nIP @IP PORT @PORT"
},
"useV2Account": false,
"warnMsg": "WARNING !!!",
"whitelist": false
}

View file

@ -100,7 +100,7 @@ class BsDataThread(object):
teams = session.sessionteams
for team in teams:
data[str(team.id)] = {'name': team.name if isinstance(team.name,
str) else team.name,
str) else team.name.evaluate(),
'color': list(team.color),
'score': team.customdata['score'],
'players': []