Skip to content

Commit

Permalink
v2.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
unexpectedpanda committed Apr 27, 2024
1 parent c170580 commit e3c0ed9
Show file tree
Hide file tree
Showing 40 changed files with 884 additions and 206 deletions.
15 changes: 15 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Retool changelog


## 2.3.6 (2024-04-27)

- **_Feature_**: You can now choose to prefer the oldest production version of a title
instead of the newest.

- **_Fix_**: Budget rereleases are now promoted above original titles with high
revisions. For example, `Example Title (USA) (PlayStation the Best)` is now chosen
over `Example Title (USA) (Rev 3)`. This is on the assumption that budget rereleases
most likely contain the latest revisions. This was also necessary to implement the
oldest version feature properly.

- **_Fix_**: Fixed the flags in the output DAT file filename to reflect system settings
when system settings were in use, instead of reflecting global settings.


## 2.3.5 (2024-04-27)

- **_Fix_**: Fixed Retool crashing when **Prefer titles ripped from modern rereleases**
Expand Down
15 changes: 15 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ hide:
# Changelog


## 2.3.6 (2024-04-27)

- **_Feature_**: You can now choose to prefer the oldest production version of a title
instead of the newest.

- **_Fix_**: Budget rereleases are now promoted above original titles with high
revisions. For example, `Example Title (USA) (PlayStation the Best)` is now chosen
over `Example Title (USA) (Rev 3)`. This is on the assumption that budget rereleases
most likely contain the latest revisions. This was also necessary to implement the
oldest version feature properly.

- **_Fix_**: Fixed the flags in the output DAT file filename to reflect system settings
when system settings were in use, instead of reflecting global settings.


## 2.3.5 (2024-04-27)

- **_Fix_**: Fixed Retool crashing when **Prefer titles ripped from modern rereleases**
Expand Down
14 changes: 13 additions & 1 deletion docs/contribute-clone-lists-variants-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ The valid results are:
<td>
<p>Optional, defaults to <code>false</code>. An English-friendly title
is one that hasn't been marked as supporting English, but an
English-speaking player can easily play to completion. Setting <code>englishFriendly</code> to <code>true</code> makes Retool treat a
English-speaking player can easily play to completion. Setting
<code>englishFriendly</code> to <code>true</code> makes Retool treat a
title as if it supports English.</p>
</td>
</tr>
Expand All @@ -153,6 +154,17 @@ The valid results are:
<a href="../naming-system#short-names">short name</a> for all the titles
that match the filter.</td>
</tr>
<tr>
<td><code>isOldest</code></td>
<td><code>bool</code></td>
<td>
<p>Optional, defaults to <code>false</code>. When a user selects
<b>Prefer oldest production versions instead of newest</b>, this can
be used to manually override Retool's automatic choice, or override priority
settings in clone lists. Setting <code>isOldest</code> to <code>true</code>
manually marks which title is the oldest in the group.</p>
</td>
</tr>
<tr>
<td><code>superset</code></td>
<td><code>bool</code></td>
Expand Down
11 changes: 11 additions & 0 deletions docs/contribute-clone-lists-variants-titles.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ You can use the following keys in an object that's in a `titles` array:
<code>true</code> makes Retool treat a title as if it supports English.</p>
</td>
</tr>
<tr>
<td><code>isOldest</code></td>
<td><code>bool</code></td>
<td>
<p>Optional, defaults to <code>false</code>. When a user selects
<b>Prefer oldest production versions instead of newest</b>, this can
be used to manually override Retool's automatic choice, or override priority
settings in clone lists. Setting <code>isOldest</code> to <code>true</code>
manually marks which title is the oldest in the group.</p>
</td>
</tr>
<tr>
<td><code>localNames</code></td>
<td><code>obj[str, str]</code></td>
Expand Down
6 changes: 5 additions & 1 deletion docs/how-to-use-retool-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,15 @@ These options change how Retool handles certain titles.
<br>For example, `シャイニング●フォースⅡ 『古の封印』` instead of
`Shining Force II - Inishie no Fuuin` (see `config/user-config.yaml`).

* **`-o` * Prefer oldest production versions instead of newest**
<br>Useful for speedrunners and those concerned about censorship, who often want
unpatched versions of games.

* **`-r` Prefer regions over languages**
<br>By default, if a title from a higher priority region doesn't support your preferred
languages but a lower priority region does, Retool selects the latter. This option
disables this behavior, forcing strict adherence to region priority regardless of
language support
language support.
<br>
<br>This option also overrides similar behavior in superset selection, which means you
might get a title that was released in your preferred region that has less content,
Expand Down
4 changes: 4 additions & 0 deletions docs/how-to-use-retool-gui-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ These options change how Retool handles certain titles.
on the original system instead of those ripped from rereleases on platforms like
Virtual Console and Steam. This option reverses that behavior.

* **Prefer oldest production versions instead of newest**
<br>Useful for speedrunners and those concerned about censorship, who often want
unpatched versions of games.

* **Prefer licensed versions over unlicensed titles**
<br>Sometimes games are rereleased long after the lifespan of a console, in regions they
weren't originally available in. By default Retool selects these titles if they match
Expand Down
Binary file modified docs/images/options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/includes/file.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[retool-2.3.5-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.3.5-win-x86-64.zip)
[retool-2.3.6-win-x86-64.zip](https://unexpectedpanda.github.io/files/retool-2.3.6-win-x86-64.zip)
2 changes: 1 addition & 1 deletion docs/includes/sha256.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8c29954502f5a38a68266138d338ce435720216982912b6c5b0b1799824bf803
5117ab55af18637e526c380ef601a3e274e673c2e53556513faae50b8f603a72
30 changes: 30 additions & 0 deletions modules/clone_lists/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ def clone_list_variants(
'En',
)

# Manage oldest titles
if 'isOldest' in variant_title:
if isinstance(variant_title['isOldest'], bool):
if variant_title['isOldest']:
if title in processed_titles[title.group_name]:
if report_on_match:
eprint('')
TraceTools.trace_title('REF0129')
eprint(f'• {new_title.full_name}', wrap=False)

if config.user_input.warningpause:
eprint(pause=True)

new_title.is_oldest = True

# Manage filters
if 'filters' in variant_title:
# Check if at least one condition and result keys exist
Expand Down Expand Up @@ -549,6 +564,21 @@ def clone_list_variants(
'En',
)

if 'isOldest' in filter_condition['results']:
if isinstance(
filter_condition['results']['isOldest'], bool
):
if filter_condition['results']['isOldest']:
if report_on_match:
eprint('')
TraceTools.trace_title('REF0132')
eprint(
f'• {new_title.full_name}',
wrap=False,
)

new_title.is_oldest = True

if 'priority' in filter_condition['results']:
if report_on_match:
eprint('')
Expand Down
7 changes: 7 additions & 0 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(
dat_file_tags_key: str,
ignore_tags_key: str,
disc_rename_key: str,
budget_editions_key: str,
promote_editions_key: str,
demote_editions_key: str,
modern_editions_key: str,
Expand Down Expand Up @@ -86,6 +87,10 @@ def __init__(
multiple '(Disc)' tags should be renamed so they can be normalized and
compared.
budget_editions_key (str): The key in internal-config.json that specifies
which tags indicate a budget title that should be promoted over a non-budget
title.
promote_editions_key (str): The key in internal-config.json that specifies
which tags indicate a title should be promoted over another.
Expand Down Expand Up @@ -296,6 +301,7 @@ def import_key(
import_key(disc_rename_key, 'tags_disc_rename')
import_key(dat_file_tags_key, 'dat_file_tags', 'list', tags_ignore=False)
import_key(ignore_tags_key, 'tags_ignore', 'list', tags_ignore=True)
import_key(budget_editions_key, 'tags_budget_editions', 'tuple', tags_ignore=True)
import_key(promote_editions_key, 'tags_promote_editions', 'tuple', tags_ignore=True)
import_key(demote_editions_key, 'tags_demote_editions', 'tuple', tags_ignore=True)
import_key(modern_editions_key, 'tags_modern_editions', 'tuple', tags_ignore=True)
Expand Down Expand Up @@ -362,6 +368,7 @@ def key_missing(section_key: str) -> None:
dat_file_tags_key,
ignore_tags_key,
disc_rename_key,
budget_editions_key,
promote_editions_key,
demote_editions_key,
modern_editions_key,
Expand Down
3 changes: 2 additions & 1 deletion modules/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set the user files and options
__version__ = '2.3.5'
__version__ = '2.3.6'
CLONE_LIST_METADATA_DOWNLOAD_LOCATION: str = (
'https://raw.githubusercontent.com/unexpectedpanda/retool-clonelists-metadata/main'
)
Expand All @@ -10,6 +10,7 @@
DAT_FILE_TAGS_KEY: str = 'datFileTags'
IGNORE_TAGS_KEY: str = "ignoreTags"
DISC_RENAME_KEY: str = "discRename"
BUDGET_EDITIONS_KEY: str = 'budgetEditions'
PROMOTE_EDITIONS_KEY: str = 'promoteEditions'
DEMOTE_EDITIONS_KEY: str = 'demoteEditions'
MODERN_EDITIONS_KEY: str = 'modernEditions'
Expand Down
13 changes: 10 additions & 3 deletions modules/dats.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ def rom_format(attribute: str) -> None:

self.cloneof: str = ''
self.clonelist_priority: int = 1
self.is_superset: bool = False
self.is_mia: bool = False
self.is_oldest: bool = False
self.is_superset: bool = False
self.contains_titles: dict[str, dict[str, int]] = {}

# Determine if a title is fully MIA
Expand Down Expand Up @@ -559,6 +560,7 @@ def format_attribute(attribute: Any, string: str, tabs: str, is_rom: bool = Fals
return_list.append(format_attribute(self.languages_online, 'languages_online', '\t\t'))
return_list.append(format_attribute(self.languages, 'languages', '\t\t\t'))
return_list.append(format_attribute(self.cloneof, 'cloneof', '\t\t\t'))
return_list.append(format_attribute(self.is_oldest, 'is_oldest', '\t\t'))
return_list.append(format_attribute(self.is_superset, 'is_superset', '\t\t'))
return_list.append(format_attribute(self.contains_titles, 'contains_titles', '\t\t'))
return_list.append(format_attribute(self.clonelist_priority, 'clonelist_priority', '\t\t'))
Expand Down Expand Up @@ -979,11 +981,16 @@ def process_dat(dat_file: str, input_type: str, gui_input: UserInput | None, con
return input_dat

# Check the DAT file format -- if it's CLRMAMEPro format, convert it to LogiqX
is_clrmamepro_dat: bool = False

if 'clrmamepro' in input_dat.contents[0]:
if not gui_input:
eprint('• Validating DAT file... file is a CLRMAMEPro DAT file.', overwrite=True)
eprint('• Converting DAT file to Logiqx XML... ')
input_dat = convert_clrmame_dat(input_dat, input_type, gui_input, config)
is_clrmamepro_dat = True
if not gui_input:
eprint('• Converting DAT file to Logiqx XML... done.', overwrite=True)

# Go to the next file in a batch operation if something went wrong.
if input_dat.end:
Expand Down Expand Up @@ -1144,9 +1151,9 @@ def process_dat(dat_file: str, input_type: str, gui_input: UserInput | None, con
input_dat.end = True
return input_dat
else:
if not failed_check:
if not failed_check and not is_clrmamepro_dat:
eprint(
'• Validating DAT file... file is a Logiqx DAT file.',
'• Validating DAT file... done.',
overwrite=True,
)

Expand Down
8 changes: 8 additions & 0 deletions modules/gui/gui_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def import_config() -> Config:
const.DAT_FILE_TAGS_KEY,
const.IGNORE_TAGS_KEY,
const.DISC_RENAME_KEY,
const.BUDGET_EDITIONS_KEY,
const.PROMOTE_EDITIONS_KEY,
const.DEMOTE_EDITIONS_KEY,
const.MODERN_EDITIONS_KEY,
Expand Down Expand Up @@ -239,6 +240,7 @@ def write_config(
# Global options
disable_1G1R: bool = main_window.ui.checkBoxGlobalOptionsDisable1G1R.isChecked()
prefer_regions: bool = main_window.ui.checkBoxGlobalOptionsPreferRegions.isChecked()
prefer_oldest: bool = main_window.ui.checkBoxGlobalOptionsPreferOldest.isChecked()
include_hashless: bool = main_window.ui.checkBoxGlobalOptionsIncludeHashless.isChecked()
modern_platforms: bool = main_window.ui.checkBoxGlobalOptionsModernPlatforms.isChecked()
demote_unlicensed: bool = main_window.ui.checkBoxGlobalOptionsDemoteUnlicensed.isChecked()
Expand Down Expand Up @@ -298,6 +300,7 @@ def write_config(
# System options
system_disable_1G1R: bool = main_window.ui.checkBoxSystemOptionsDisable1G1R.isChecked()
system_prefer_regions: bool = main_window.ui.checkBoxSystemOptionsPreferRegions.isChecked()
system_prefer_oldest: bool = main_window.ui.checkBoxSystemOptionsPreferOldest.isChecked()
system_include_hashless: bool = main_window.ui.checkBoxSystemOptionsIncludeHashless.isChecked()
system_modern_platforms: bool = main_window.ui.checkBoxSystemOptionsModernPlatforms.isChecked()
system_demote_unlicensed: bool = (
Expand Down Expand Up @@ -503,6 +506,8 @@ def write_config(
gui_settings.add('d')
if prefer_regions:
gui_settings.add('r')
if prefer_oldest:
gui_settings.add('o')
if include_hashless:
gui_settings.add('e')
if modern_platforms:
Expand Down Expand Up @@ -548,6 +553,8 @@ def write_config(
system_exclusions_options.add('d')
if system_prefer_regions:
system_exclusions_options.add('r')
if system_prefer_oldest:
system_exclusions_options.add('o')
if system_include_hashless:
system_exclusions_options.add('e')
if system_modern_platforms:
Expand Down Expand Up @@ -846,6 +853,7 @@ def write_config(
empty_titles=include_hashless,
filter_languages=filter_languages_enabled,
local_names=use_local_names,
oldest=prefer_oldest,
region_bias=prefer_regions,
legacy=legacy_dat,
demote_unl=demote_unlicensed,
Expand Down
4 changes: 4 additions & 0 deletions modules/gui/gui_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def setup_gui_global(
if config.user_gui_settings:
if 'r' in config.user_gui_settings:
main_window.ui.checkBoxGlobalOptionsPreferRegions.setChecked(True)
if 'o' in config.user_gui_settings:
main_window.ui.checkBoxGlobalOptionsPreferOldest.setChecked(True)
if 'e' in config.user_gui_settings:
main_window.ui.checkBoxGlobalOptionsIncludeHashless.setChecked(True)
if 'z' in config.user_gui_settings:
Expand Down Expand Up @@ -1106,6 +1108,8 @@ def system_settings(open_files_list: Any, config: Config) -> None:
if config.system_exclusions_options:
if 'r' in config.system_exclusions_options:
main_window.ui.checkBoxSystemOptionsPreferRegions.setChecked(True)
if 'o' in config.system_exclusions_options:
main_window.ui.checkBoxSystemOptionsPreferOldest.setChecked(True)
if 'e' in config.system_exclusions_options:
main_window.ui.checkBoxSystemOptionsIncludeHashless.setChecked(True)
if 'z' in config.system_exclusions_options:
Expand Down
Loading

0 comments on commit e3c0ed9

Please sign in to comment.