Skip to content

Commit

Permalink
updating robot costs
Browse files Browse the repository at this point in the history
  • Loading branch information
higps committed Feb 18, 2024
1 parent 157798e commit 8d50a56
Show file tree
Hide file tree
Showing 27 changed files with 329 additions and 25 deletions.
2 changes: 1 addition & 1 deletion boss_saxtron_h4l3.sp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public OnPluginStart()
restrictions.TeamCoins = new RobotCoinRestrictionDefinition();
restrictions.TeamCoins.Overall = 1;
restrictions.RobotCoins = new RobotCoinRestrictionDefinition();
restrictions.RobotCoins.PerRobot = 30.0;
restrictions.RobotCoins.PerRobot = 35.0;

AddRobot(robot, MakeGiantSoldier, PLUGIN_VERSION, restrictions, 2);

Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_flames_pyro_aero.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"health" "4000"
"scale" "1.75"
"difficulty" "2"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_flames_pyro_heatsink.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"health" "3000"
"health_bonus_per_player" "175"
"difficulty" "1"
"rc_cost" "6.5"
"rc_cost" "10"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_grenades_demoman_stickler.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "75% larger explosion radius and projectile speed"
"health" "3500"
"difficulty" "3"
"rc_cost" "10.0"
"rc_cost" "12"
//"scale" "1.75"
"sounds"
{
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_grenades_demoman_zipbomb.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Caber refills on hit"
"health" "3500"
"difficulty" "3"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_melee_demoman_archibolt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Use shadow leap to get close to enemies"
"health" "3500"
"health_bonus_per_player" "175"
"rc_cost" "10.0"
"rc_cost" "12"
"difficulty" "3"
"sounds"
{
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_melee_heavy_mafia.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"health" "3500"
"health_bonus_per_player" "50"
"difficulty" "1"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_melee_pyro_blackknight.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"health_bonus_per_player" "175"
"scale" "1.75"
"difficulty" "2"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_rockets_soldier_gunslinger.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Mash weapon switch for max DPS"
"health" "3800"
"difficulty" "3"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/giant_soldier/giant_soldier_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_damage_rockets_soldier_kappy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"health" "3800"
"health_bonus_per_player" "75"
"difficulty" "3"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/giant_soldier/giant_soldier_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_disruptor_pyro_astrobot.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "25%%%% Faster Airblast\nAirblasts propel you backwards while airborne\nHeal 175 on extinguish"
"health" "3000"
"difficulty" "3"
"rc_cost" "6.0"
"rc_cost" "10"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_disruptor_scout_bonkscout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"subclass" "Disruptor"
"health" "1250"
"difficulty" "3"
"rc_cost" "6.0"
"rc_cost" "10"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_disruptor_scout_fanscout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"subclass" "Disruptor"
"health" "2150"
"difficulty" "2"
"rc_cost" "6.0"
"rc_cost" "10"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_disruptor_scout_hypescout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Use the boost you gain on hit to close the gap to get in enemies face"
"health" "2150"
"difficulty" "2"
"rc_cost" "6.0"
"rc_cost" "10"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_disruptor_soldier_blastinator.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Shoot at crowds to break them up"
"health" "4200"
"difficulty" "1"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/giant_soldier/giant_soldier_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_disruptor_soldier_lazy_purple.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Direct Hit deals normal damage to buildings"
"health" "2500"
"difficulty" "2"
"rc_cost" "10.0"
"rc_cost" "12"
"scale" "1.65"
"sounds"
{
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_engineer_gnome.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Reload to throw buildings\nBuild teamporters to easily teleport your team to the front lines"
"health" "2000"
"difficulty" "3"
"rc_cost" "10.0"
"rc_cost" "12"
"scale" "1.65"
"sounds"
{
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_healer_robovich.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Throw sandwiches to teammates and punch stuff"
"health" "2000"
"difficulty" "1"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_sentry_buster_jetpack_pyro.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Infiltrate engi nests with the Thruster\nYour Homewrecker pierces resistances!"
"health" "4500"
"difficulty" "3"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_sentry_buster_rockets_soldier_bursty.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"subclass" "Sentry Buster"
"health" "3800"
"difficulty" "2"
"rc_cost" "25.0"
"rc_cost" "22.0"
"sounds"
{
"death" "mvm/giant_soldier/giant_soldier_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_sentrybuster_demoman_larry.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"subclass" "Sentry Buster"
"health" "3000"
"difficulty" "3"
"rc_cost" "40.0"
"rc_cost" "20.0"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_spy_blackshiv.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Sharp Dresser\nDead Ringer\nUse grappling hook with reload or specialattack!"
"health" "2250"
"difficulty" "2"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_spy_warper.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tips" "Infinite cloak\nStore the location of a stabbed enemy to warp there later\nWarp with Special Attack key"
"health" "2000"
"difficulty" "2"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_tank_demoman_hacked_slasher.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"health" "5000"
"health_bonus_per_player" "350"
"difficulty" "2"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/paid_tank_heavy_chief.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"health" "5000"
"health_bonus_per_player" "350"
"difficulty" "1"
"rc_cost" "10.0"
"rc_cost" "12"
"sounds"
{
"death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
Expand Down
267 changes: 267 additions & 0 deletions python_stuff/get_rc_df.ipynb

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions python_stuff/modify_rc_cost_2_inputs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
import re

def modify_cfg_file(file_path, original_value, new_value):
with open(file_path, 'r') as file:
lines = file.readlines()

modified_lines = []
for line in lines:
if 'rc_cost' in line:
# Extracting the current rc_cost value
current_value = re.search(r'"rc_cost"\s+"(\d+(\.\d+)?)\s*"', line)
if current_value and float(current_value.group(1)) == original_value:
# Replacing the current value with the new value
modified_line = re.sub(r'"rc_cost"\s+"(\d+(\.\d+)?)\s*"', r'"rc_cost" "{}"'.format(new_value), line)
modified_lines.append(modified_line)
else:
modified_lines.append(line)
else:
modified_lines.append(line)

with open(file_path, 'w') as file:
file.writelines(modified_lines)

def modify_directory(directory_path, original_value, new_value):
for root, dirs, files in os.walk(directory_path):
for file in files:
if file.endswith('.cfg'):
file_path = os.path.join(root, file)
modify_cfg_file(file_path, original_value, new_value)

if __name__ == "__main__":
directory_path = r'D:\Github\robogithub\cfg\robots' # Change this to your desired directory
original_value = 6.5 # Change this to the original value to be replaced
new_value = 10 # Change this to the new value to replace the original value with
modify_directory(directory_path, original_value, new_value)
print("Processing complete.")

0 comments on commit 8d50a56

Please sign in to comment.