[Scummvm-git-logs] scummvm master -> d6e706fe563bc6dc595350e0f7a99eac8b1e96b6
mgerhardy
martin.gerhardy at gmail.com
Sun Mar 14 14:04:50 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5c7056a28d AGS: added steam achievements for Kathy Rain
a6cbe538aa DEVTOOLS: added helper script to query the steam game id by name
d6e706fe56 DEVTOOLS: added argument parser support to steam_achivements.py
Commit: 5c7056a28da283e26dd37ed63184ee80515a8628
https://github.com/scummvm/scummvm/commit/5c7056a28da283e26dd37ed63184ee80515a8628
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T14:39:56+01:00
Commit Message:
AGS: added steam achievements for Kathy Rain
Changed paths:
engines/ags/achievements_tables.h
diff --git a/engines/ags/achievements_tables.h b/engines/ags/achievements_tables.h
index 6ddab4c494..58d8fe4524 100644
--- a/engines/ags/achievements_tables.h
+++ b/engines/ags/achievements_tables.h
@@ -729,6 +729,35 @@ static const AchievementDescriptionList achievementDescriptionList[] = {
}
},
+ {
+ "kathyrain",
+ Common::STEAM_ACHIEVEMENTS,
+ "370910",
+ {
+ ACHIEVEMENT_SIMPLE_ENTRY("FinishDayOne", "Get on the Katmobile", "Finished day one"),
+ ACHIEVEMENT_SIMPLE_ENTRY("FinishDayTwo", "Wow, they're hypnotic...", "Finished day two"),
+ ACHIEVEMENT_SIMPLE_ENTRY("FinishDayThree", "We've met before, haven't we?", "Finished day three"),
+ ACHIEVEMENT_SIMPLE_ENTRY("FinishDayFour", "Down the rabbit hole", "Finished day four"),
+ ACHIEVEMENT_SIMPLE_ENTRY("FinishGame", "Been there, done that", "Finished the game"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Procrastinator", "Procrastinator"),
+ ACHIEVEMENT_HIDDEN_ENTRY("EnjoyingTheScenery", "Enjoying the scenery"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Hotwheels", "Hotwheels"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Aww", "Aaw!"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Undateable", "Undateable"),
+ ACHIEVEMENT_HIDDEN_ENTRY("MrBear", "Mr. Bear, reporting for duty!"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Nocturnal", "Nocturnal"),
+ ACHIEVEMENT_HIDDEN_ENTRY("HowYouDoing", "How YOU doing?"),
+ ACHIEVEMENT_HIDDEN_ENTRY("RestingScowlyFace", "Resting scowly face"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Pyromaniac", "Pyromaniac"),
+ ACHIEVEMENT_HIDDEN_ENTRY("PassiveSmoking", "Passive smoking"),
+ ACHIEVEMENT_HIDDEN_ENTRY("FilmBuff", "Film buff"),
+ ACHIEVEMENT_HIDDEN_ENTRY("Heretic", "Heretic"),
+ ACHIEVEMENT_HIDDEN_ENTRY("TriggerHappy", "Trigger happy"),
+ ACHIEVEMENT_HIDDEN_ENTRY("HookedOnCorleys", "Hooked on Corleys"),
+ ACHIEVEMENTS_LISTEND
+ }
+ },
+
{
"killyourself",
Common::STEAM_ACHIEVEMENTS,
Commit: a6cbe538aa287989df218036737cefe513db8b2c
https://github.com/scummvm/scummvm/commit/a6cbe538aa287989df218036737cefe513db8b2c
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T14:39:56+01:00
Commit Message:
DEVTOOLS: added helper script to query the steam game id by name
This will allow us to query the achievements per game of e.g. the detection table of AGS games
Changed paths:
A devtools/steam_gameid.py
diff --git a/devtools/steam_gameid.py b/devtools/steam_gameid.py
new file mode 100755
index 0000000000..3664540622
--- /dev/null
+++ b/devtools/steam_gameid.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python3
+
+# This script takes the game name as parameter and returns the steam game id
+# Return with exit code 127 if no game was found for the given title
+# Return with exit code 1 if there are multiple games for the given name
+# Return with exit code 0 if there is exactly one match found
+
+import requests
+import argparse
+import urllib.parse
+from requests_html import HTMLSession
+import sys
+
+parser = argparse.ArgumentParser()
+parser.add_argument('-n', '--name', required=True, help="The steam game name")
+parser.add_argument('-c', '--category', default='0', type=int, help="The category, e.g. achievements are 22")
+parser.add_argument('-a', '--all', action='store_true', help="Show all matches, not just the exact match")
+parser.add_argument('-v', '--verbose', action='store_true', help="Also print some meta information next to the steam game id")
+args = parser.parse_args()
+
+searchurl = "https://steamdb.info/search/?a=app&q={0}&type=1&category={1}".format(urllib.parse.quote_plus(args.name), args.category)
+
+try:
+ session = HTMLSession()
+ response = session.get(searchurl)
+ game_rows = response.html.xpath("//tr[@class='app']/td")
+ game_columns = 4 # id, text, type, name, last changed
+ entries = int(len(game_rows) / game_columns)
+ if args.verbose:
+ sys.stderr.write('found {0} games\n'.format(entries))
+
+ matches = 0
+ for i in range(entries):
+ idx = game_columns * i
+ game_id = game_rows[idx + 0].text.strip()
+ game_type = game_rows[idx + 1].text.strip()
+ game_name = game_rows[idx + 2].text.strip()
+ game_last_changed = game_rows[idx + 3].attrs["title"].strip()
+ if not args.all and game_name != args.name:
+ if args.verbose:
+ sys.stderr.write('found {0} - no match for {1}\n'.format(game_name, args.name))
+ continue
+ if args.verbose:
+ print("{0} {1} {2}#{3}".format(game_id, game_type, game_last_changed, game_name))
+ else:
+ print("{0}".format(game_id))
+ matches += 1
+
+ if matches == 0:
+ sys.exit(127)
+ if matches > 1:
+ sys.exit(1)
+except requests.exceptions.RequestException as e:
+ print(e)
Commit: d6e706fe563bc6dc595350e0f7a99eac8b1e96b6
https://github.com/scummvm/scummvm/commit/d6e706fe563bc6dc595350e0f7a99eac8b1e96b6
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T14:39:56+01:00
Commit Message:
DEVTOOLS: added argument parser support to steam_achivements.py
Changed paths:
devtools/steam_achivements.py
diff --git a/devtools/steam_achivements.py b/devtools/steam_achivements.py
index 514b415bfe..9c699dccbb 100755
--- a/devtools/steam_achivements.py
+++ b/devtools/steam_achivements.py
@@ -9,17 +9,19 @@
# in AGS achievements_table.h
import requests
+import argparse
from requests_html import HTMLSession
import sys
-if len(sys.argv) < 2:
- steam_game_id = 212050
- sys.stderr.write('missing steam game id as first parameter - assuming {0}\n'.format(steam_game_id))
-else:
- steam_game_id = sys.argv[1]
+parser = argparse.ArgumentParser()
+parser.add_argument('--steamid', required=True, default='212050', type=int, help="The steam game id")
+parser.add_argument('--gameid', help="The scummvm game id string")
+parser.add_argument('-v', '--verbose', action='store_true')
+args = parser.parse_args()
-
-statsurl = "https://steamdb.info/app/{0}/stats/".format(steam_game_id)
+statsurl = "https://steamdb.info/app/{0}/stats/".format(args.steamid)
+if args.verbose:
+ sys.stderr.write('query {0}\n'.format(statsurl))
try:
session = HTMLSession()
@@ -28,15 +30,19 @@ try:
game = response.html.xpath("//h1[@itemprop='name']/text()")
achievements_columns = 3 # id, text, img
entries = int(len(achievements_rows) / achievements_columns)
- sys.stderr.write('found {0} achievements\n'.format(entries))
+ if entries == 0:
+ sys.exit(127)
+
+ if args.verbose:
+ sys.stderr.write('found {0} achievements\n'.format(entries))
- if len(sys.argv) < 3:
+ scummvm_game_id = args.gameid
+ if not scummvm_game_id:
scummvm_game_id = game[0].lower().replace(' ', '').replace('-', '')
- sys.stderr.write('missing scummvm game id - assuming {0}\n'.format(scummvm_game_id))
- else:
- scummvm_game_id = sys.argv[2]
+ if args.verbose:
+ sys.stderr.write('missing scummvm game id - assuming {0}\n'.format(scummvm_game_id))
- print("\t{\n\t\t\"%s\",\n\t\tCommon::STEAM_ACHIEVEMENTS,\n\t\t\"%s\",\n\t\t{" % (scummvm_game_id, steam_game_id))
+ print("\t{\n\t\t\"%s\",\n\t\tCommon::STEAM_ACHIEVEMENTS,\n\t\t\"%s\",\n\t\t{" % (scummvm_game_id, args.steamid))
for i in range(entries):
idx = achievements_columns * i
ach_id = achievements_rows[idx + 0].text.strip()
More information about the Scummvm-git-logs
mailing list