PyLibMS 4.3.3__tar.gz → 4.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. {pylibms-4.3.3 → pylibms-4.3.4}/PKG-INFO +1 -1
  2. {pylibms-4.3.3 → pylibms-4.3.4}/PyLibMS.egg-info/PKG-INFO +1 -1
  3. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/msbf.py +5 -4
  4. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/tag2.py +3 -1
  5. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/tgg2.py +3 -1
  6. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/tgp2.py +3 -1
  7. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/config.py +7 -22
  8. {pylibms-4.3.3 → pylibms-4.3.4}/pyproject.toml +1 -1
  9. {pylibms-4.3.3 → pylibms-4.3.4}/LICENSE +0 -0
  10. {pylibms-4.3.3 → pylibms-4.3.4}/MANIFEST.in +0 -0
  11. {pylibms-4.3.3 → pylibms-4.3.4}/PyLibMS.egg-info/SOURCES.txt +0 -0
  12. {pylibms-4.3.3 → pylibms-4.3.4}/PyLibMS.egg-info/dependency_links.txt +0 -0
  13. {pylibms-4.3.3 → pylibms-4.3.4}/PyLibMS.egg-info/requires.txt +0 -0
  14. {pylibms-4.3.3 → pylibms-4.3.4}/PyLibMS.egg-info/top_level.txt +0 -0
  15. {pylibms-4.3.3 → pylibms-4.3.4}/README.md +0 -0
  16. {pylibms-4.3.3 → pylibms-4.3.4}/lms/__init__.py +0 -0
  17. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/__init__.py +0 -0
  18. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/field/__init__.py +0 -0
  19. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/field/io.py +0 -0
  20. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/field/lms_datatype.py +0 -0
  21. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/field/lms_field.py +0 -0
  22. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/lms_constants.py +0 -0
  23. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/lms_exceptions.py +0 -0
  24. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/lms_fileinfo.py +0 -0
  25. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/stream/fileinfo.py +0 -0
  26. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/stream/hashtable.py +0 -0
  27. {pylibms-4.3.3 → pylibms-4.3.4}/lms/common/stream/section.py +0 -0
  28. {pylibms-4.3.3 → pylibms-4.3.4}/lms/fileio/encoding.py +0 -0
  29. {pylibms-4.3.3 → pylibms-4.3.4}/lms/fileio/io.py +0 -0
  30. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/__init__.py +0 -0
  31. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/definitions/__init__.py +0 -0
  32. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/definitions/flowchart.py +0 -0
  33. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/definitions/lms_nodeexceptions.py +0 -0
  34. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/definitions/node.py +0 -0
  35. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/definitions/node_type.py +0 -0
  36. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/flw3.py +0 -0
  37. {pylibms-4.3.3 → pylibms-4.3.4}/lms/flowchart/msbfio.py +0 -0
  38. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/__init__.py +0 -0
  39. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/definitions/__init__.py +0 -0
  40. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/definitions/field/__init__.py +0 -0
  41. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/lms_messagetext.py +0 -0
  42. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/msbt.py +0 -0
  43. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/msbtentry.py +0 -0
  44. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/msbtio.py +0 -0
  45. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/section/__init__.py +0 -0
  46. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/section/atr1.py +0 -0
  47. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/section/nli1.py +0 -0
  48. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/section/tsy1.py +0 -0
  49. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/section/txt2.py +0 -0
  50. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/tag/__init__.py +0 -0
  51. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/tag/io/param_io.py +0 -0
  52. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/tag/io/tag_io.py +0 -0
  53. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/tag/lms_tag.py +0 -0
  54. {pylibms-4.3.3 → pylibms-4.3.4}/lms/message/tag/lms_tagexceptions.py +0 -0
  55. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/__init__.py +0 -0
  56. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/definitions/__init__.py +0 -0
  57. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/definitions/attribute.py +0 -0
  58. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/definitions/color.py +0 -0
  59. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/definitions/style.py +0 -0
  60. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/definitions/tag.py +0 -0
  61. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/msbp.py +0 -0
  62. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/msbpread.py +0 -0
  63. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/ali2.py +0 -0
  64. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/ati2.py +0 -0
  65. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/clr1.py +0 -0
  66. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/string.py +0 -0
  67. {pylibms-4.3.3 → pylibms-4.3.4}/lms/project/section/syl3.py +0 -0
  68. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/__init__.py +0 -0
  69. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/definitions/__init__.py +0 -0
  70. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/definitions/attribute.py +0 -0
  71. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/definitions/nodes.py +0 -0
  72. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/definitions/tags.py +0 -0
  73. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/definitions/value.py +0 -0
  74. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Badge Arcade.yaml +0 -0
  75. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Brain Age Concentration Training.yaml +0 -0
  76. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Kirby Planet Robobot.yaml +0 -0
  77. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Super Mario 3D Land.yaml +0 -0
  78. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Super Mario 3D World + Bowsers Fury.yaml +0 -0
  79. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Super Mario Odyssey.yaml +0 -0
  80. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/The Legend of Zelda Echos of Wisdom.yaml +0 -0
  81. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/The Legend of Zelda a Link Between Worlds.yaml +0 -0
  82. {pylibms-4.3.3 → pylibms-4.3.4}/lms/titleconfig/presets/Tomodachi Life Living The Dream.yaml +0 -0
  83. {pylibms-4.3.3 → pylibms-4.3.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLibMS
3
- Version: 4.3.3
3
+ Version: 4.3.4
4
4
  Summary: Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF.
5
5
  Author: AbdyyEee
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyLibMS
3
- Version: 4.3.3
3
+ Version: 4.3.4
4
4
  Summary: Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF.
5
5
  Author: AbdyyEee
6
6
  License-Expression: MIT
@@ -142,10 +142,6 @@ class MSBF:
142
142
  if flowchart_name in self.flowcharts:
143
143
  raise KeyError(f"Flowchart with name '{flowchart_name}' already exists!")
144
144
 
145
- # Node IDs may not be sequential after user additions/deletions, so we track the absolute max value of
146
- # all nodes and store it so that _generate_next_id can set any IDs added via the flowchart correctly.
147
- self._global_node_id = max((node.id for flowchart in self for node in flowchart), default=1) + 1
148
-
149
145
  if entry_point is None:
150
146
  entry_point = LMS_EntryNode(self._generate_next_id(), flowchart_name)
151
147
 
@@ -157,6 +153,11 @@ class MSBF:
157
153
  self._nodes[node_id] = node
158
154
 
159
155
  self._nodes = dict(sorted(self._nodes.items()))
156
+
157
+ # Node IDs may not be sequential after user additions/deletions, so we track the absolute max value of
158
+ # all nodes and store it so that _generate_next_id can set any IDs added via the flowchart correctly.
159
+ self._global_node_id = max(self._nodes, default=-1) + 1
160
+
160
161
  return flowchart
161
162
 
162
163
  def delete_flowchart(self, name: str):
@@ -5,7 +5,8 @@ from lms.project.definitions.tag import LMS_TagDefinition
5
5
  def read_tag2(reader: FileReader) -> list[LMS_TagDefinition]:
6
6
  info_list = []
7
7
 
8
- count = reader.read_uint32()
8
+ count = reader.read_uint16()
9
+ reader.skip(2)
9
10
  for offset in reader.read_offset_array(count):
10
11
  reader.seek(offset)
11
12
 
@@ -14,5 +15,6 @@ def read_tag2(reader: FileReader) -> list[LMS_TagDefinition]:
14
15
  name = reader.read_encoded_string()
15
16
 
16
17
  info_list.append(LMS_TagDefinition(name, parameter_indices))
18
+ reader.align(4)
17
19
 
18
20
  return info_list
@@ -5,7 +5,8 @@ from lms.project.definitions.tag import LMS_TagGroup
5
5
  def read_tgg2(reader: FileReader, version: int) -> list[LMS_TagGroup]:
6
6
  group_list = []
7
7
 
8
- count = reader.read_uint32()
8
+ count = reader.read_uint16()
9
+ reader.skip(2)
9
10
  for i, offset in enumerate(reader.read_offset_array(count)):
10
11
  reader.seek(offset)
11
12
 
@@ -18,5 +19,6 @@ def read_tgg2(reader: FileReader, version: int) -> list[LMS_TagGroup]:
18
19
 
19
20
  name = reader.read_encoded_string()
20
21
  group_list.append(LMS_TagGroup(name, group_id, tag_indexes))
22
+ reader.align(4)
21
23
 
22
24
  return group_list
@@ -6,7 +6,8 @@ from lms.project.definitions.tag import LMS_TagParamDefinition
6
6
  def read_tgp2(reader: FileReader) -> list[LMS_TagParamDefinition]:
7
7
  parameter_info = []
8
8
 
9
- count = reader.read_uint32()
9
+ count = reader.read_uint16()
10
+ reader.skip(2)
10
11
  for offset in reader.read_offset_array(count):
11
12
  reader.seek(offset)
12
13
 
@@ -24,5 +25,6 @@ def read_tgp2(reader: FileReader) -> list[LMS_TagParamDefinition]:
24
25
  parameter_info.append(
25
26
  LMS_TagParamDefinition(name, LMS_DataType.LIST, list_indexes)
26
27
  )
28
+ reader.align(4)
27
29
 
28
30
  return parameter_info
@@ -29,31 +29,16 @@ class TitleConfig:
29
29
  NODE_KEY = "node_definitions"
30
30
 
31
31
  GAME_PRESET = Literal[
32
- "Animal Crossing: City Folk",
33
- "Animal Crossing: New Horizons",
34
- "Animal Crossing: New Leaf",
35
- "The Legend of Zelda: Echoes of Wisdom"
36
- "Metroid Prime 4: Beyond"
37
- "Mario vs. Donkey Kong"
38
- "Paper Mario: Color Splash"
39
- "Paper Mario: Sticker Star"
40
- "Paper Mario: The Origami King"
41
- "Paper Mario: The Thousand-Year Door (Nintendo Switch)"
42
- "Super Mario 3D Land"
43
- "Super Mario 3D World + Bowser's Fury"
44
- "Super Mario Odyssey"
45
- "Splatoon 3"
46
- "The Legend of Zelda: Link's Awakening (Nintendo Switch)"
47
- "The Legend of Zelda a Link Between Worlds",
48
- "The Legend of Zelda: Tri Force Heroes"
49
- "Tomodachi Life (NA-EU)",
50
- "Tomodachi Life (JP)",
51
- "Tomodachi Life: Living the Dream",
52
- "The Legend of Zelda: Tears of the Kingdom"
53
- "Wii Sports Club"
32
+ "Badge Arcade",
54
33
  "Brain Age Concentration Training",
55
34
  "Kirby Planet Robobot",
56
35
  "Super Mario Odyssey",
36
+ "Super Mario 3D Land",
37
+ "Super Mario 3D World + Bowsers Fury",
38
+ "The Legend of Zelda a Link Between Worlds",
39
+ "The Legend of Zelda Echos of Wisdom",
40
+ "Tomodachi Life Living The Dream",
41
+ "Tomodachi Life NA-EU",
57
42
  ]
58
43
 
59
44
  def __init__(
@@ -7,7 +7,7 @@ include = ["lms*"]
7
7
 
8
8
  [project]
9
9
  name = "PyLibMS"
10
- version = "4.3.3"
10
+ version = "4.3.4"
11
11
  requires-python = ">=3.10"
12
12
  description = "Python library built for the libMessageStudio (LMS) proprietary file formats from Nintendo. Supports MSBT, MSBP, and MSBF."
13
13
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes