mirror of
https://github.com/komiko44240BB/BattleBay_tool_v1.0.git
synced 2026-01-18 16:27:29 +01:00
perks, getting there
This commit is contained in:
@@ -5,7 +5,7 @@ from tkinter import filedialog
|
||||
|
||||
|
||||
header = ["LEVEL", "BOOST_VALUE", "BOOST_TYPE"]
|
||||
item_name = ['standard_cannon','blast_cannon','sniper_cannon','explosive_canon','galting_gun','carronade','grenade_launcher',
|
||||
item_name = ['standard_cannon','blast_cannon','sniper_cannon','explosive_cannon','galting_gun','carronade','grenade_launcher',
|
||||
'standard_mortar','long_range_mortar','ballpark_mortar','big_berta','standard_torpedo','big_torpedo','swift_torpedo',
|
||||
'triple_torpedo','railgun','missile_launcher','multi_missile','mine','flare_gun','napalm_launcher','fire_bomb',
|
||||
'standard_shield','big_shield','turbo','bandage','big_bandage','overboost','nitro','tesla_bolt','tesla_shield',
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
If you are not able to edit the excels int the drive, just donload them and send them to me directly (@komiko44240 on the officila Batlle Bay discord server)
|
||||
@@ -1,9 +0,0 @@
|
||||
RARITY;1STBONUS_VALUE;1STBONUS_NAME;2NDBONUS_VALUE;2NDBONUS_NAME;PERK_NAME;COMPATIBLE_ITEMS
|
||||
Legendary;7.5%;HEALING;8%;COOL_DOWN;Rapid_Healing_Boost;All_Repair_Items
|
||||
Legendary;10%;PROJECTILE_SPEED;25%;INVULNERABILITY;Cover_Repair_Bolt_Speed;Repair_Bolt
|
||||
Legendary;4%;COOL_DOWN;10%;CRITICAL_HIT_CHANCE;Surge_Repairing_Cooldown;Repair_Box
|
||||
Legendary;7.5%;HEALING;12%;RANGE;Reach_Healing_Boost;Repair_Box
|
||||
Legendary;7.5%;HEALING;12%;RANGE;Reach_Healing_Boost;Repair_Plasma
|
||||
Legendary;7.5%;HEALING;160;HIT_POINT;Vigor_Repairing_Boost;Duct_Tape
|
||||
Legendary;6%;COOL_DOWN;160;HIT_POINT;Vigor_Area_Heal_Cooldown;Repair_Pulse
|
||||
Legendary;4%;COOL_DOWN;13%;PROJECTILE_SPEED;Speedy_Repairing_Cooldown;Repair_Bolt
|
||||
|
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
RARITY;1STBONUS_VALUE;1STBONUS_NAME;2NDBONUS_VALUE;2NDBONUS_NAME;PERK_NAME;COMPATIBLE_ITEMS
|
||||
Legendary;150;HIT_POINT;12;DEFENCE;Armor_Shield_Hitpoints;All_Shields
|
||||
Legendary;150;HIT_POINT;2%;DAMAGE;Brutal_Shield_Hitpoints;All_Shields
|
||||
Legendary;20%;SPEED;2%;DAMAGE;Brutal_Turbo_Effect;Turbo
|
||||
Legendary;6%;HEALINGs;160;HIT_POINT;Vigor_Repairing_Boost;Big_Bandage
|
||||
Legendary;20%;SPEED;160;HIT_POINT;Vigor_Turbo_Effect;Turbo
|
||||
|
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
RARITY;1STBONUS_VALUE;1STBONUS_NAME;2NDBONUS_VALUE;2NDBONUS_NAME;PERK_NAME;COMPATIBLE_ITEMS
|
||||
Legendary;6%;COOL_DOWN;13%;PROJECTILE_SPEED;Speedy_Frost_Blaster_Cooldown;Frost_Blaster
|
||||
Legendary;0.6s;DURATION;75;Shield HIT_POINT;Vigor_Shield_Duration;Tesla_Shield
|
||||
Legendary;0.8s;Stun DURATION;13%;PROJECTILE_SPEED;Speedy_Stun_Duration;Tesla_Bolt
|
||||
Legendary;1s;DURATION;8%;COOL_DOWN;Quickshot_Freeze_Duration;Freeze_Items
|
||||
Legendary;0.6s;DURATION;75;Shield HIT_POINT;Vigor_Shield_Duration;Tesla_Shield
|
||||
|
Binary file not shown.
@@ -1,57 +0,0 @@
|
||||
RARITY;1STBONUS_VALUE;1STBONUS_NAME;2NDBONUS_VALUE;2NDBONUS_NAME;PERK_NAME;COMPATIBLE_ITEMS
|
||||
Legendary;7.5%;DAMAGE;12%;RANGE;Reach_Mortar_Damage;All_Mortars
|
||||
Legendary;10%;RANGE;8%;COOL_DOWN;Quickshot_Mortar_Range;All_Mortars
|
||||
Legendary;12%;FROST_DAMAGE;7.5%;DAMAGE;Strike_Damage_Frozen;All_Mortars
|
||||
Legendary;12%;FROST_DAMAGE;8%;COOL_DOWN;Quickshot_Damage_Frozen;Big_Berta
|
||||
Legendary;12%;FROST_DAMAGE;12%;RANGE;Reach_Damage_Frozen;Big_Berta
|
||||
Legendary;12%;FROST_DAMAGE;8%;COOL_DOWN;Quickshot_Damage_Frozen;Standard_Mortar
|
||||
Legendary;10%;RANGE;8%;COOL_DOWN;Quickshot_L.R.Mortar_Range;Long_Range_Mortar
|
||||
Legendary;1.5s;DURATION;8%;COOL_DOWN;Quickshot_Fire_Duration;All_Incendiary_Items
|
||||
Legendary;8%;DAMAGE;8%;COOL_DOWN;Quickshot_Fire_Damage;All_Incendiary_Items
|
||||
Legendary;1.5s;DURATION;13%;PROJECTILE_SPEED;Speedy_Flare_Gun_Duration;Flare_Gun
|
||||
Legendary;7.5%;DAMAGE;10%;PROJECTILE_SPEED;Speedy_Torpedo_Damage;Swift_Torpedo
|
||||
Legendary;12%;FROST_DAMAGE;8%;COOL_DOWN;Quickshot_Damage_to_Frozen_Targets;Triple_Torpedo
|
||||
Legendary;6%;DAMAGE;8%;COOL_DOWN;Quickshot_Damage;Triple_Torpedo
|
||||
Legendary;7.5%;DAMAGE;10%;PROJECTILE_SPEED;Speedy_Torpedo_Damage;Triple_Torpedo
|
||||
Legendary;8%;PROJECTILE_SPEED;8%;COOL_DOWN;Quickshot_Torpedo_Speed;All_Torpedoes
|
||||
Legendary;7.5%;DAMAGE;10%;PROJECTILE_SPEED;Speedy_Torpedo_Damage;Big_Torpedo
|
||||
Legendary;12%;FIRE_DAMAGE;12%;RANGE;Reach_Fire_Damage;Blast_Cannon
|
||||
Legendary;4%;COOL_DOWN;12%;RANGE;Reach_Missile_Cooldown;Missiles
|
||||
Legendary;6%;DAMAGE;8%;COOL_DOWN;Quickshot_Sniper_Damage;Sniper_Cannon
|
||||
Legendary;12%;FIRE_DAMAGE;8%;COOL_DOWN;Quickshot_Fire_Damage;Sniper_Cannon
|
||||
Legendary;8%;DAMAGE;13%;PROJECTILE_SPEED;Speedy_Cannon_Damage;All_Cannons
|
||||
Legendary;4.5%;CRITICAL_HIT_CHANCE;8%;DAMAGE;Strike_Cannon_Critical_Hit;All_Cannons
|
||||
Legendary;8%;DAMAGE;12%;RANGE;Reach_Cannon_Damage;All_Cannons
|
||||
Legendary;8%;DAMAGE;12%;RANGE;Reach_Gatling_Gun_Damage;Gatling_Gun
|
||||
Legendary;8%;DAMAGE;25%;STUN_CHANCE;Shock_Railgun_Damage;Railguns
|
||||
Legendary;8%;COOL_DOWN;25%;STUN_CHANCE;Shock_Railgun_Cooldown;Railguns
|
||||
Legendary;8%;COOL_DOWN;10%;FROST_DAMAGE;Frost_Railgun_Cooldown;Railguns
|
||||
Legendary;12%;FROST_DAMAGE;10%;PROJECTILE_SPEED;Speedy_Damage_to_Frozen_Targets;Standard_Torpedo
|
||||
Legendary;12%;FIRE_DAMAGE;12%;RANGE;Reach_Fire_Damage;Explosive_Cannon
|
||||
Legendary;7.5%;DAMAGE;13%;PROJECTILE_SPEED;Speedy_Napalm_Damage;Napalm
|
||||
Legendary;1.5s;DURATION;13%;PROJECTILE_SPEED;Speedy_Napalm_Duration;Napalm
|
||||
Legendary;8%;DAMAGE;12%;RANGE;Reach_Fire_Damage;Fire_Bomb
|
||||
Legendary;6%;COOL_DOWN;13%;PROJECTILE_SPEED;Speedy_Fire_bomb_Cooldown;Fire_Bomb
|
||||
Legendary;8%;DAMAGE;12%;RANGE;Reach_Missile_Damage;All_Missiles
|
||||
Legendary;7.5%;DAMAGE;20%;CRITICAL_HIT_CHANCE;Wildfire_Torpedo_Damage;All_Torpedoes
|
||||
Legendary;12%;FIRE_DAMAGE;12%;RANGE;Reach_Fire_Damage;Cannon
|
||||
Legendary;10%;DAMAGE;12%;RANGE;Reach_Mine_Damage;Mines
|
||||
Legendary;10%;RANGE;8%;COOL_DOWN;Quickshot_Mine_Damage;Mines
|
||||
Legendary;6%;COOL_DOWN;12%;RANGE;Reach_Mine_Cooldown;Mines
|
||||
Legendary;12%;FROST_DAMAGE;8%;COOL_DOWN;Quickshot_Damage_Frozen;Swift_Torpedo
|
||||
Legendary;12%;CRITICAL_HIT_CHANCE;12%;RANGE;Reach_Fire_Grenades;Grenades
|
||||
Legendary;8%;COOL_DOWN;12%;RANGE;Reach_Grenade_Cooldown;Grenades
|
||||
Legendary;10%;DAMAGE;12%;RANGE;Reach_Grenade_Damage;Grenades
|
||||
Legendary;12%;CRITICAL_HIT_CHANCE;10%;DAMAGE;Strike_Fire_Grenade;Grenades
|
||||
Legendary;8%;DAMAGE;13%;PROJECTILE_SPEED;Speedy_Gat_Damage;Gatling_Gun
|
||||
Legendary;8%;DAMAGE;13%;PROJECTILE_SPEED;Speedy_Flare_Gun_Damage;Flare_Gun
|
||||
Legendary;10%;FIRE_DAMAGE;8%;COOL_DOWN;Scorch_Cannon_Cooldown;All_Cannons
|
||||
Legendary;8%;DAMAGE;5%;COOL_DOWN;Quickshot_Missile_Damage;All_Missiles
|
||||
Legendary;12%;FROST_DAMAGE;8%;COOL_DOWN;Quickshot_Damage_to_Frozen_Targets;Ballpark_Mortar
|
||||
Legendary;6%;COOL_DOWN;12%;RANGE;Reach_Item_Cooldown;Carronade
|
||||
Legendary;9;DAMAGE;8%;COOL_DOWN;Quickshot_Carronade_Damage;Carronade
|
||||
Legendary;9;DAMAGE;12%;RANGE;Reach_Carronade_Damage;Carronade
|
||||
Legendary;8%;DAMAGE;13%;PROJECTILE_SPEED;Speedy_Missile_Damage;All_Missiles
|
||||
Legendary;12%;FROST_DAMAGE;8%;COOL_DOWN;Quickshot_Damage_to_Frozen_Targets;Big_Torpedo
|
||||
Legendary;6%;COOL_DOWN;13%;PROJECTILE_SPEED;Speedy_Flare_Gun_Cooldown;Flare_Gun
|
||||
Legendary;12%;FIRE_DAMAGE;13%;PROJECTILE_SPEED;Speedy_Gatling_Gun_Fire_Damage;Gatling_Gun
|
||||
|
Binary file not shown.
69
scriptspy/perk2.py
Normal file
69
scriptspy/perk2.py
Normal file
@@ -0,0 +1,69 @@
|
||||
import os
|
||||
import pandas as pd
|
||||
import tkinter as tk
|
||||
from tkinter import filedialog
|
||||
import re
|
||||
|
||||
def select_output_folder():
|
||||
"""Open a dialog to select the output folder."""
|
||||
root = tk.Tk()
|
||||
root.withdraw() # Hide the root window
|
||||
folder_selected = filedialog.askdirectory(title="Select Output Folder")
|
||||
return folder_selected
|
||||
|
||||
def process_bonus(bonus):
|
||||
"""Split bonus into value and type and convert percentage to decimal where applicable."""
|
||||
if pd.isna(bonus):
|
||||
return None, None # Return None for empty cells
|
||||
parts = bonus.split(' ', 1)
|
||||
if len(parts) == 2:
|
||||
value, boost_type = parts
|
||||
# Convert percentage to decimal
|
||||
if '%' in value:
|
||||
value = str(float(value.strip('%')) / 100)
|
||||
return value, boost_type
|
||||
return None, None # If not properly split
|
||||
|
||||
def process_xlsx_file(file_path, output_folder):
|
||||
"""Process a single xlsx file and create csv files based on Rarity and Item."""
|
||||
df = pd.read_excel(file_path, engine='openpyxl')
|
||||
|
||||
# Process each row to split the 1st and 2nd bonus into value and type
|
||||
df['1st Boost Value'], df['1st Boost Type'] = zip(*df['1st Bonus'].apply(process_bonus))
|
||||
df['2nd Boost Value'], df['2nd Boost Type'] = zip(*df['2nd Bonus'].apply(process_bonus))
|
||||
|
||||
# For each unique combination of Rarity and Item, create a new csv file
|
||||
for (rarity, item), group in df.groupby(['Rarity', 'Item']):
|
||||
# Define the output CSV filename
|
||||
output_filename = f"event_{rarity}_{item}.csv"
|
||||
output_filepath = os.path.join(output_folder, output_filename)
|
||||
|
||||
# Select and reorder the columns for the CSV
|
||||
group_csv = group[['1st Boost Value', '1st Boost Type', '2nd Boost Value', '2nd Boost Type']]
|
||||
|
||||
# Save to CSV without index
|
||||
group_csv.to_csv(output_filepath, index=False)
|
||||
|
||||
def process_all_files(input_folder, output_folder):
|
||||
"""Process all xlsx files in the input folder."""
|
||||
for filename in os.listdir(input_folder):
|
||||
if filename.endswith('.xlsx'):
|
||||
file_path = os.path.join(input_folder, filename)
|
||||
print(f"Processing file: {filename}")
|
||||
process_xlsx_file(file_path, output_folder)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Prompt the user to select the input folder
|
||||
input_folder = filedialog.askdirectory(title="Select Input Folder Containing Excel Files")
|
||||
|
||||
if input_folder:
|
||||
# Prompt the user to select the output folder
|
||||
output_folder = select_output_folder()
|
||||
if output_folder:
|
||||
# Process all xlsx files in the input folder
|
||||
process_all_files(input_folder, output_folder)
|
||||
print("Processing complete.")
|
||||
else:
|
||||
print("No output folder selected. Exiting.")
|
||||
else:
|
||||
print("No input folder selected. Exiting.")
|
||||
@@ -1,10 +1,11 @@
|
||||
import pandas as pd
|
||||
import csv
|
||||
import re
|
||||
|
||||
# Load the Excel file
|
||||
file_name = 'healing_perks'
|
||||
file_path = 'C:/Users/Pierre-Luc/BattleBay_tool/scriptspy/data/'+ file_name +'.xlsx'
|
||||
df = pd.read_excel(file_path, sheet_name='Sheet1')
|
||||
file_path = 'C:/Users/Pierre-Luc/Documents/GitHub/BattleBay_tool/scriptspy/data/' + file_name + '.xlsx'
|
||||
df = pd.read_excel(file_path, sheet_name='Sheet1', engine='openpyxl')
|
||||
|
||||
# Function to split bonus into value and name
|
||||
def split_bonus(bonus):
|
||||
@@ -13,6 +14,16 @@ def split_bonus(bonus):
|
||||
return parts[0], parts[1]
|
||||
return None, None
|
||||
|
||||
# Function to clean text by removing non-printable characters
|
||||
def clean_text(text):
|
||||
if isinstance(text, str):
|
||||
# Remove non-printable characters
|
||||
return re.sub(r'[^\x20-\x7E]+', '', text)
|
||||
return text
|
||||
|
||||
# Clean the DataFrame by applying the clean_text function to all cells
|
||||
df = df.applymap(clean_text)
|
||||
|
||||
# Create new columns for 1st bonus and 2nd bonus values and names
|
||||
df['1STBONUS_VALUE'], df['1STBONUS_NAME'] = zip(*df['1st Bonus'].map(split_bonus))
|
||||
df['2NDBONUS_VALUE'], df['2NDBONUS_NAME'] = zip(*df['2nd Bonus'].map(split_bonus))
|
||||
@@ -24,14 +35,12 @@ df.rename(columns={
|
||||
'Item': 'COMPATIBLE_ITEMS'
|
||||
}, inplace=True)
|
||||
|
||||
|
||||
|
||||
|
||||
# Select and reorder columns
|
||||
output_df = df[['RARITY', '1STBONUS_VALUE', '1STBONUS_NAME', '2NDBONUS_VALUE', '2NDBONUS_NAME', 'PERK_NAME', 'COMPATIBLE_ITEMS']]
|
||||
|
||||
# Save the dataframe to a CSV file
|
||||
output_file_path = 'C:/Users/Pierre-Luc/BattleBay_tool/scriptspy/data/'+ file_name +'.csv'
|
||||
output_df.to_csv(output_file_path, index=False, sep=';', quoting=csv.QUOTE_NONE)
|
||||
# Save the DataFrame to a CSV file with proper quoting and escape characters
|
||||
output_file_path = 'C:/Users/Pierre-Luc/Documents/GitHub/BattleBay_tool/scriptspy/data/' + file_name + '.csv'
|
||||
output_df.to_csv(output_file_path, index=False, sep=',', quoting=csv.QUOTE_MINIMAL, escapechar='\\', encoding='utf-8')
|
||||
|
||||
output_file_path
|
||||
# Output the path of the saved CSV file
|
||||
print(f"CSV file saved to: {output_file_path}")
|
||||
|
||||
Reference in New Issue
Block a user