Skip to content

Commit

Permalink
Merge pull request #11 from UnleashedGH/master
Browse files Browse the repository at this point in the history
Merge Unleashed Edits 1.1
  • Loading branch information
UnleashedGH authored Nov 16, 2021
2 parents 3c30a70 + e18ba36 commit 094256d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
2 changes: 1 addition & 1 deletion YaBCM Organizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from yabcm.dlg.replace import ReplaceDialog
from pyxenoverse.gui.file_drop_target import FileDropTarget

VERSION = '0.2.5'
VERSION = '0.2.6'


class MainWindow(wx.Frame):
Expand Down
7 changes: 6 additions & 1 deletion yabcm/dlg/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ def on_find(self, _):

@staticmethod
def get_value(ctrl):
#old logic caused EVERY value that was not hexadecimal to be converted to float type
#that causes struct.pack exception when writing and corrupts the file
value = ctrl.GetValue()
if value.startswith('0x'):
return int(value, 16)
return float(value)
try:
return int(value,10)
except ValueError:
return float(value)
41 changes: 31 additions & 10 deletions yabcm/panels/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class Page(ScrolledPanel):
def __init__(self, parent, rows):
def __init__(self, parent, rows=32):
ScrolledPanel.__init__(self, parent)
self.sizer = wx.FlexGridSizer(rows=rows, cols=2, hgap=5, vgap=5)
self.SetSizer(self.sizer)
Expand All @@ -28,11 +28,11 @@ def __init__(self, parent):
self.entry = None
self.notebook = wx.Notebook(self)
self.edit_thread = None
button_input_panel = Page(self.notebook, 3)
activator_panel = Page(self.notebook, 5)
bac_panel = Page(self.notebook, 7)
misc_panel = Page(self.notebook, 9)
unknown_panel = Page(self.notebook, 8)
button_input_panel = Page(self.notebook)
activator_panel = Page(self.notebook)
bac_panel = Page(self.notebook)
misc_panel = Page(self.notebook)
unknown_panel = Page(self.notebook)

self.notebook.AddPage(button_input_panel, 'Inputs')
self.notebook.AddPage(activator_panel, 'Activator')
Expand Down Expand Up @@ -77,6 +77,7 @@ def __init__(self, parent):
('Charge Type', {
'Automatic': 0x0,
'Manual': 0x1,
'Unknown (0x2)': 0x2,
}, False),
(None, None, False),
(None, None, False),
Expand Down Expand Up @@ -105,7 +106,7 @@ def __init__(self, parent):
self.primary_activator_conditions = self.add_multiple_selection_entry(
activator_panel, 'Primary Activator\nConditions', cols=3, orient=wx.VERTICAL, choices=[
('Health', ["User's Health (One Use)", "Target's health < 25%",
"User's Health(?)", "User's Health"], True),
"When own attack hits", "User's Health"], True),
('Collision/stamina', ["Active Projectile", 'Stamina > 0%', 'Not near map ceiling', 'Not near certain objects'], True),
('Targeting', ["Opponent Knockback", None, 'Targeting Opponent'], True),
('Touching', [None, None, 'Ground', 'Opponent'], True),
Expand All @@ -129,8 +130,17 @@ def __init__(self, parent):
self.bac_entry_user_connect = self.add_num_entry(bac_panel, 'BAC Entry\nUser Connect', True)
self.bac_entry_victim_connect = self.add_num_entry(bac_panel, 'BAC Entry\nVictim Connect', True)
self.bac_entry_airborne = self.add_num_entry(bac_panel, 'BAC Entry Airborne', True)
self.bac_entry_unknown = self.add_num_entry(bac_panel, 'BAC Entry Unknown', True)
self.random_flag = self.add_hex_entry(bac_panel, 'Random Flag', max=MAX_UINT16)
self.bac_entry_unknown = self.add_num_entry(bac_panel, 'BAC Entry Targetting Override', True)
self.random_flag = self.add_multiple_selection_entry(bac_panel, 'Unknown BAC Flags', majorDimension=2, choices=[
('', {
'None': 0x0,
'Random BAC Entry': 0x1,
'Unknown (0x2)': 0x2,
'3 Instance Setup': 0x3,
'Unknown (0x4)': 0x4,
'Unknown (0x5)': 0x6,
}, False)
])

self.ki_cost = self.add_num_entry(misc_panel, 'Ki Cost', True)
self.u_44 = self.add_hex_entry(unknown_panel, 'U_44', max=MAX_UINT32)
Expand All @@ -143,7 +153,18 @@ def __init__(self, parent):
self.health_required = self.add_float_entry(misc_panel, 'Health Required')
self.trans_stage = self.add_num_entry(misc_panel, 'Transformation\nStage')
self.cus_aura = self.add_num_entry(misc_panel, 'CUS_AURA')
self.u_68 = self.add_hex_entry(unknown_panel, 'U_68', max=MAX_UINT32)
self.u_68 = self.add_multiple_selection_entry(unknown_panel, 'Unknown Flags', majorDimension=2, choices=[
('', {
'None': 0x0,
'Use Skill Upgrades': 0x1,
'Unknown (0x2)': 0x2,
'Unknown (0x4)': 0x4,
'Opponent Reached Ground?': 0x6,
'Unknown (0x8)': 0x8,
}, False)
])

self.u_6a = self.add_hex_entry(unknown_panel, 'U_6A', max=MAX_UINT16)
self.u_6c = self.add_hex_entry(unknown_panel, 'U_6C', max=MAX_UINT32)

# Binds
Expand Down

0 comments on commit 094256d

Please sign in to comment.