From 5f9def59459ea5209cbf7ac8c8bc00123840bbb7 Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Tue, 14 Mar 2023 15:16:33 +0100 Subject: [PATCH] cm: card maker 1.35 support added --- docs/game_specific_info.md | 12 +++++------- readme.md | 2 +- titles/chuni/newplus.py | 4 +--- titles/cm/{cm136.py => cm135.py} | 8 ++++---- titles/cm/const.py | 4 ++-- titles/cm/index.py | 8 ++++---- titles/mai2/universeplus.py | 4 +--- titles/ongeki/brightmemory.py | 6 +++--- 8 files changed, 21 insertions(+), 27 deletions(-) rename titles/cm/{cm136.py => cm135.py} (89%) diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index 867c3bc..8af5541 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -215,7 +215,7 @@ Config file is located in `config/ongeki.yaml`. |------------------|----------------------------------------------------------------------------------------------------------------| | `enabled_gachas` | Enter all gacha IDs for Card Maker to work, other than default may not work due to missing cards added to them | -Note: 1149 and higher are only for Card Maker 1.36 and higher and will be ignored on lower versions. +Note: 1149 and higher are only for Card Maker 1.35 and higher and will be ignored on lower versions. ### Database upgrade @@ -236,7 +236,7 @@ python dbutils.py --game SDDT --version 4 upgrade | Version ID | Version Name | |------------|-----------------| | 0 | Card Maker 1.34 | -| 1 | Card Maker 1.36 | +| 1 | Card Maker 1.35 | ### Support status @@ -246,13 +246,11 @@ python dbutils.py --game SDDT --version 4 upgrade * maimai DX Universe: Yes * O.N.G.E.K.I. Bright: Yes -* Card Maker 1.36: +* Card Maker 1.35: * Chunithm New!!+: Yes * maimai DX Universe PLUS: Yes * O.N.G.E.K.I. Bright Memory: Yes -Card Maker 1.35 is not actively supported, but may work. - ### Importer @@ -301,10 +299,10 @@ from a given gacha but made sure you cannot pull the same card twice in the same ### Notes -Card Maker 1.34 will only load an O.N.G.E.K.I. Bright profile (1.30). Card Maker 1.36 will only load an O.N.G.E.K.I. +Card Maker 1.34 will only load an O.N.G.E.K.I. Bright profile (1.30). Card Maker 1.35 will only load an O.N.G.E.K.I. Bright Memory profile (1.35). The gachas inside the `ongeki.yaml` will make sure only the right gacha ids for the right CM version will be loaded. -Gacha IDs up to 1140 will be loaded for CM 1.34 and all gachas will be loaded for CM 1.36. +Gacha IDs up to 1140 will be loaded for CM 1.34 and all gachas will be loaded for CM 1.35. **NOTE: There is currently no way to load/use the (printed) maimai DX cards!** diff --git a/readme.md b/readme.md index 01386d2..4afc225 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ Games listed below have been tested and confirmed working. Only game versions ol + Card Maker + 1.34.xx - + 1.36.xx + + 1.35.xx + Ongeki + All versions up to Bright Memory diff --git a/titles/chuni/newplus.py b/titles/chuni/newplus.py index f46bb82..9dec9aa 100644 --- a/titles/chuni/newplus.py +++ b/titles/chuni/newplus.py @@ -35,7 +35,5 @@ class ChuniNewPlus(ChuniNew): user_data = super().handle_cm_get_user_preview_api_request(data) # hardcode lastDataVersion for CardMaker 1.35 - # user_data["lastDataVersion"] = "2.05.00" - # hardcode lastDataVersion for CardMaker 1.36 - user_data["lastDataVersion"] = "2.10.00" + user_data["lastDataVersion"] = "2.05.00" return user_data diff --git a/titles/cm/cm136.py b/titles/cm/cm135.py similarity index 89% rename from titles/cm/cm136.py rename to titles/cm/cm135.py index fb5b6b5..782f07a 100644 --- a/titles/cm/cm136.py +++ b/titles/cm/cm135.py @@ -11,10 +11,10 @@ from titles.cm.const import CardMakerConstants from titles.cm.config import CardMakerConfig -class CardMaker136(CardMakerBase): +class CardMaker135(CardMakerBase): def __init__(self, core_cfg: CoreConfig, game_cfg: CardMakerConfig) -> None: super().__init__(core_cfg, game_cfg) - self.version = CardMakerConstants.VER_CARD_MAKER_136 + self.version = CardMakerConstants.VER_CARD_MAKER_135 def handle_get_game_connect_api_request(self, data: Dict) -> Dict: ret = super().handle_get_game_connect_api_request(data) @@ -26,13 +26,13 @@ class CardMaker136(CardMakerBase): ret["gameConnectList"][0]["titleUri"] = f"{uri}/SDHD/205/" ret["gameConnectList"][1]["titleUri"] = f"{uri}/SDEZ/125/" ret["gameConnectList"][2]["titleUri"] = f"{uri}/SDDT/135/" - + return ret def handle_get_game_setting_api_request(self, data: Dict) -> Dict: ret = super().handle_get_game_setting_api_request(data) ret["gameSetting"]["dataVersion"] = "1.35.00" - ret["gameSetting"]["ongekiCmVersion"] = "1.35.04" + ret["gameSetting"]["ongekiCmVersion"] = "1.35.03" ret["gameSetting"]["chuniCmVersion"] = "2.05.00" ret["gameSetting"]["maimaiCmVersion"] = "1.25.00" return ret diff --git a/titles/cm/const.py b/titles/cm/const.py index c5627ee..09f289e 100644 --- a/titles/cm/const.py +++ b/titles/cm/const.py @@ -4,9 +4,9 @@ class CardMakerConstants: CONFIG_NAME = "cardmaker.yaml" VER_CARD_MAKER = 0 - VER_CARD_MAKER_136 = 1 + VER_CARD_MAKER_135 = 1 - VERSION_NAMES = ("Card Maker 1.34", "Card Maker 1.36") + VERSION_NAMES = ("Card Maker 1.34", "Card Maker 1.35") @classmethod def game_ver_to_string(cls, ver: int): diff --git a/titles/cm/index.py b/titles/cm/index.py index d082aad..d544e59 100644 --- a/titles/cm/index.py +++ b/titles/cm/index.py @@ -15,7 +15,7 @@ from core.config import CoreConfig from titles.cm.config import CardMakerConfig from titles.cm.const import CardMakerConstants from titles.cm.base import CardMakerBase -from titles.cm.cm136 import CardMaker136 +from titles.cm.cm135 import CardMaker135 class CardMakerServlet: @@ -29,7 +29,7 @@ class CardMakerServlet: self.versions = [ CardMakerBase(core_cfg, self.game_cfg), - CardMaker136(core_cfg, self.game_cfg), + CardMaker135(core_cfg, self.game_cfg), ] self.logger = logging.getLogger("cardmaker") @@ -87,8 +87,8 @@ class CardMakerServlet: if version >= 130 and version < 135: # Card Maker internal_ver = CardMakerConstants.VER_CARD_MAKER - elif version >= 135 and version < 140: # Card Maker - internal_ver = CardMakerConstants.VER_CARD_MAKER_136 + elif version >= 135 and version < 136: # Card Maker 1.35 + internal_ver = CardMakerConstants.VER_CARD_MAKER_135 if all(c in string.hexdigits for c in endpoint) and len(endpoint) == 32: # If we get a 32 character long hex string, it's a hash and we're diff --git a/titles/mai2/universeplus.py b/titles/mai2/universeplus.py index 4e6c410..54fe896 100644 --- a/titles/mai2/universeplus.py +++ b/titles/mai2/universeplus.py @@ -18,7 +18,5 @@ class Mai2UniversePlus(Mai2Universe): user_data = super().handle_cm_get_user_preview_api_request(data) # hardcode lastDataVersion for CardMaker 1.35 - # user_data["lastDataVersion"] = "1.25.00" - # hardcode lastDataVersion for CardMaker 1.36 - user_data["lastDataVersion"] = "1.30.00" + user_data["lastDataVersion"] = "1.25.00" return user_data diff --git a/titles/ongeki/brightmemory.py b/titles/ongeki/brightmemory.py index 954d0e5..6e2548b 100644 --- a/titles/ongeki/brightmemory.py +++ b/titles/ongeki/brightmemory.py @@ -142,8 +142,8 @@ class OngekiBrightMemory(OngekiBright): user_data = super().handle_cm_get_user_data_api_request(data) # hardcode Card Maker version for now - # Card Maker 1.34.00 = 1.30.01 - # Card Maker 1.36.00 = 1.35.04 - user_data["userData"]["compatibleCmVersion"] = "1.35.04" + # Card Maker 1.34 = 1.30.01 + # Card Maker 1.35 = 1.35.03 + user_data["userData"]["compatibleCmVersion"] = "1.35.03" return user_data