Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/misc changelog fixes #154

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions input-data/changelogs/changelog_configs.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions input-data/changelogs/raw/2024-10-24_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[ HeroLab Holliday ]
[ Holliday ]
- Hero Added to Hero Labs

[ HeroLab Calico ]
[ Calico ]
- Hero Added to Hero Labs

[ HeroLab Wrecker ]
[ Wrecker ]
- Hero Added to Hero Labs

[ HeroLab Fathom ]
[ Fathom ]
- Hero Added to Hero Labs

[ HeroLab Viper ]
[ Viper ]
- Hero Added to Hero Labs

[ HeroLab Magician ]
[ Magician ]
- Hero Added to Hero Labs
10 changes: 5 additions & 5 deletions input-data/changelogs/raw/2024-10-29_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[ HeroLab Holliday ]
[ Holliday ]
- Bounce Pad: Now properly deals damage in an area on landing

[ HeroLab Calico ]
[ Calico ]
- Gun: Decreased Reload time from 3.5 to 3
- Gun: Increased AltFire Bullet Damage from 6 to 7
- Sekhmet's Spirit: Will only pop up targets that were hit/dragged by the moving cat
- Nekomata Ward: Now has a separate 'Attack Range' of 30m
- Nekomata Ward: DPS spirit scaling from 0.4 to 0.3
- Nekomata Ward: Removed T2 Ability Charges Bonus and Added +30 Ability Duration Bonus

[ HeroLab Fathom ]
[ Fathom ]
- Gun: Damage per pellet reduced from 5 to 4.5
- Scalding Spray: Updated particle to not obstruct Fathom's vision, and added a hit effect
- Breach: Updated particle effects

[ HeroLab Viper ]
[ Viper ]
- Hook Dagger has been replaced by Screwjab Dagger
- Lethal Venom: Improve VFX
- Slither: Change T1 upgrade to be +25% Slide distance, T2 to be +2 Stamina, and T3 to be +30% Bullet/Spirit Resistance.
- Petrify: Improve VFX, SFX, and Camera Controls when Petrified
- Petrify: Can no longer be cast mid-air

[ HeroLab Magician ]
[ Magician ]
- Gun: Now properly has damage fall-off
2 changes: 1 addition & 1 deletion input-data/changelogs/raw/2024-11-01_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ HeroLab Fathom ]
[ Fathom ]
- Health per boon reduced from 41 to 36
- Shotgun falloff start reduced from 18m to 16m
- Fathom's Bloodletting updated to have the same values as the latest version of Shiv's Bloodletting
8 changes: 4 additions & 4 deletions input-data/changelogs/raw/2024-11-07_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[ HeroLab Holliday ]
[ Holliday ]
- Bounce Pad: Updated to only allow one Stomp per Bounce Pad
- Gun: Updated weapon kit VFX
- Crackshot: Reduce VFX visual obstructions for victim

[ HeroLab Wrecker ]
[ Wrecker ]
- Gun: Increase Clip Size from 10 to 15
- Gun: Reduce Bullet Damage from 25 to 21
- Wrecking Ball: Increase base Damage from 80 to 150
Expand All @@ -13,10 +13,10 @@
- Consume: Reduce the base DPS from 80 to 40
- Consume: Reduce the T2 upgrade to give +40 DPS from +80 DPS

[ HeroLab Trapper ]
[ Trapper ]
- Hero Added to Hero Labs

[ HeroLab Magician ]
[ Magician ]
- Now has an ultimate ability - Grand Finale
- Vexing Bolt: Now applies 20% Fire Rate Slow, instead of Movement Slow
- Vexing Bolt: Debuff Duration increased from 2s to 5s
Expand Down
4 changes: 2 additions & 2 deletions input-data/changelogs/raw/2024-11-08_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[ HeroLab Trapper ]
[ Trapper ]
- Silktrap: Fix an issue where the thread effect sometimes becomes invisible.

[ HeroLab Fathom ]
[ Fathom ]
- New Ability: Lurker's Ambush
- Reefdweller Harpoon: Gains 2 charges once latched to a surface
- Reefdweller Harpoon: Will now prevent casting when target surface is too far
Expand Down
10 changes: 5 additions & 5 deletions input-data/changelogs/raw/2024-11-21_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ HeroLab Wrecker ]
[ Wrecker ]
- Wrecking Ball: Can now jump at a reduced height while holding the ball
- Consume: New visual updates
- Consume: Increased cast range from 12m to 15m
Expand All @@ -8,22 +8,22 @@
- Bio Blast: Update targeting cone slightly
- Astral Walk: Removed. Updated to new ult Overload

[ HeroLab Trapper ]
[ Trapper ]
- Bottled Phantasmicide: Reduce initial radius from 5m to 3m
- Bottled Phantasmicide: Increase base cooldown from 20s to 25s
- Bottled Phantasmicide: Change T2 upgrade to be +4 Durations
- Silktrap: Fixed an issue where the trap would deal damage from the other side of a wall

[ HeroLab Fathom ]
[ Fathom ]
- Weapon: Bullet damage per boon reduced from 0.57 to 0.35

[ HeroLab Viper ]
[ Viper ]
- Petrify has been replaced by Petrifying Bola
- Screwjab Dagger: No longer interrupts sliding
- Lethal Venom: Now applies a screen effect
- Gun: Tracer revisions to improve visibility due to the high fire rate

[ HeroLab Magician ]
[ Magician ]
- Vexing Bolt: Now always casts alongside your Assistant, at reduced damage
- Vexing Bol: Reduce Spirit Scaling from 1.4 to 1.2
- Rabbit Hex: Can no longer be cast on yourself
Expand Down
2 changes: 1 addition & 1 deletion input-data/changelogs/raw/2024-11-24_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ HeroLab Trapper ]
[ Trapper ]
- Bottled Phantasmicide: Change growth calculation to be a fixed radius increase per second, scaling with ability range
- Silktrap: Fixed an issue where the trap would sometimes fail to spawn
- Silktrap: T3 Upgrade now Silences for 2.5s, rather than Disarm for 4s
2 changes: 1 addition & 1 deletion input-data/changelogs/raw/2024-11-26_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ HeroLab Viper ]
[ Viper ]
- Gun: Reduce damage from 11 to 9
- Gun: Increase clip size from 18 to 24
- Reduce health per boon from 35 to 30
10 changes: 5 additions & 5 deletions input-data/changelogs/raw/2024-12-06_HeroLab.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[ HeroLab Wrecker ]
[ Wrecker ]
- Wrecking Ball: Rework ability behavior
- Overload: Increased camera zoom out
- Overload: Now includes movespeed slow in the description and UI

[ HeroLab Trapper ]
[ Trapper ]
- Bottled Phantasmicide: Increase initial radius from 3m to 4.5m

[ HeroLab Fathom ]
[ Fathom ]
- Scalding Spray: Updated particles
- Lurker's Ambush: The active's projectile now has a 2.5m radius

[ HeroLab Viper ]
[ Viper ]
- Increase model size by +15%

[ HeroLab Raven ]
[ Raven ]
- Hero Added to Hero Labs
42 changes: 33 additions & 9 deletions src/changelogs/fetch_changelogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def get_gamefile_changelogs(self):
# Citadel_PatchNotes_HeroLabs_hero_astro_1 ->
# hero_astro ->
# Holliday ->
# [ HeroLab Holliday ]
# [ Holliday ]
hero_key = key.split('Citadel_PatchNotes_HeroLabs_')[1][:-2]
hero_name_en = self._localize(hero_key)
header = f'[ HeroLab {hero_name_en} ]'
header = f'[ {hero_name_en} ]'

# Initialize the changelog entry if its the first line for this hero's patch (version)
if raw_changelog_id not in gamefile_changelogs:
Expand Down Expand Up @@ -182,12 +182,16 @@ def get_gamefile_changelogs(self):
gamefile_changelogs[raw_changelog_id] += f'- {description}\n'

# Add the config entry if it doesn't exist
sequence_id = 0
is_hero_lab = True
if raw_changelog_id not in self.changelog_configs:
self.changelog_configs[raw_changelog_id] = {
'forum_id': None,
'date': date,
'sequence_id': sequence_id,
'frontfacing_date_id': frontfacing_date_id(date, sequence_id, is_hero_lab),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think label is a simpler name for this

'link': None,
'is_hero_lab': True,
'is_hero_lab': is_hero_lab,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_hero_lab is always true, does it need to be a variable?

}
self.changelogs.update(gamefile_changelogs)

Expand Down Expand Up @@ -264,13 +268,17 @@ def fetch_forum_changelogs(self):
except Exception:
logger.error(f'Issue with parsing RSS feed item {entry.link}')

changelog_id = self._create_changelog_id(date, version)
sequence_id = self._create_sequence_id(date, version)
is_hero_lab = False
changelog_id = date if sequence_id == 0 else f'{date}-{sequence_id}'
self.changelogs[changelog_id] = full_text
self.changelog_configs[changelog_id] = {
'forum_id': version,
'date': date,
'sequence_id': sequence_id,
'frontfacing_date_id': frontfacing_date_id(date, sequence_id, is_hero_lab),
'link': entry.link,
'is_hero_lab': False,
'is_hero_lab': is_hero_lab,
Comment on lines +278 to +281
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with changes to the shape of the config, we also need to change the type definition. Ideally this should throw an error on runtime? But I'm not that experienced with python types

}

if skip_num > 0:
Expand All @@ -293,7 +301,7 @@ def _process_local_changelogs(self, changelog_path):
except Exception:
logger.warning(f'Issue with {file}, skipping')

def _create_changelog_id(self, date, forum_id, i=0):
def _create_sequence_id(self, date, forum_id, i=0):
"""
Creating a custom id based on the date by appending _<i>
if its another patch for the same day, i.e.:
Expand All @@ -311,17 +319,17 @@ def _create_changelog_id(self, date, forum_id, i=0):

# If this id doesn't yet exist, use it
if existing_config is None:
return id
return i
# Else same date already exists

# If the forum id is the same, use the same changelog id
# which will update the existing record
if existing_config['forum_id'] == forum_id:
return id
return i
# Else forum id's are different, so different patches on the same day

# Recursively check if the next id is available
return self._create_changelog_id(date, forum_id, i + 1)
return self._create_sequence_id(date, forum_id, i + 1)


def format_date(date):
Expand All @@ -345,3 +353,19 @@ def format_date(date):
# Reformat to yyyy-mm-dd
date = f'{date[2]}-{date[0]}-{date[1]}'
return date

def frontfacing_date_id(date, sequence_id, is_hero_lab):
"""
Reformat yyyy-mm-dd to May 10, 2024
"""
date = date.split('-')
month = int(date[1])
day = int(date[2])
year = date[0]
month_name = [
'January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December'
]
sequence_str = '' if sequence_id == 0 else f'-{sequence_id}'
herolab_str = ' HeroLab' if is_hero_lab else ''
return f'{month_name[month - 1]} {day}, {year}{sequence_str}{herolab_str}'
17 changes: 9 additions & 8 deletions src/changelogs/parse_changelogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def run(self, version, logs):
changelog_out = []

for line in changelog_lines:
if line is None or line == '':
if line is None or line == '==':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the changelog json files were to just cover specific changelog pages, such as for individual Heroes, Items etc. I think trying to have it also handle full patch notes is going to become difficult.

We are probably better off leaving those pages to be manual, as they also use extra bits of formatting, such as headings, nested bullets, etc.

continue

# parse heading: if heading is found, update current heading
Expand All @@ -52,7 +52,10 @@ def run(self, version, logs):
# replace -> with →
line = line.replace('->', '→')

tags = self._parse_tags(current_heading, line)
if line != '':
tags = self._parse_tags(current_heading, line)
else:
tags = [self.default_tag]

changelog_out.append({'Description': line, 'Tags': tags})

Expand Down Expand Up @@ -117,12 +120,7 @@ def _parse_tags(self, current_heading, line):
if heading_tag is not None:
tags = self._register_tag(tags, tag=heading_tag)

# If the heading is a "HeroLab <hero>", register <hero> as well
if current_heading.startswith('HeroLab '):
hero = current_heading[len('HeroLab ') :]
if self.is_hero(hero):
tags = self._register_tag(tags, hero)
tags = self._register_tag(tags, 'Hero')


# if no tag is found, assign to default tag
if len(tags) == 0:
Expand Down Expand Up @@ -216,6 +214,9 @@ def _embed_icons(self, changelog):
# {{PageRef|tag|alt_name=remappable_text}}
for remappable_text in self.tags.remap:
tag = self.tags.remap[remappable_text]
if tag == self.default_tag: # skip default tag
continue

if remappable_text in remaining_description and tag in tags:
icon = '{{' + template + '|' + tag + '|alt_name=' + remappable_text + '}}'
description = description.replace(remappable_text, icon)
Expand Down
Loading
Loading