Skip to content

Commit

Permalink
Formula updates
Browse files Browse the repository at this point in the history
  • Loading branch information
johndellarosa committed Jan 21, 2024
1 parent af5c49c commit 243a844
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
35 changes: 34 additions & 1 deletion Formulas.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ Hex number is the enemy entry number in each section->difficulty table

0.2 x 0x4a attack[0]

## Dragon

### Fire Breath
0.2 x 0x11 movement0

### Multishot
0.2 x 0x11 movement1

### Tunnel
0.2 x 0x11 movement2

## Gillchic

### Laser
Expand All @@ -17,6 +28,24 @@ Hex number is the enemy entry number in each section->difficulty table
### Laser
0.2 x movement[9]

## Canadine

### Zonde
0.2 x 0x07 movement1

## Canane

### Zonde
0.2 x 0x09 movement1

## Poison lily
### Megid level
0x4 movement6

## Nar lily
### Megid level
0x5 movement6

## nano dragon

### 2 bullets
Expand Down Expand Up @@ -60,7 +89,11 @@ Hex number is the enemy entry number in each section->difficulty table
## Chaos Bringer

### Charge
'0xd unknown_m5' x 0.2
0xd movement8 x 0.2

### Cannon
min: 0.2 x 0xd movement9
max: double

## Dark Gunner

Expand Down
11 changes: 5 additions & 6 deletions PSO_Battle_Parameter_Editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,10 @@ def set_stat_property(self, value, stat, enemy, difficulty):
enemy_position = enemy
self._check_enemy_entry_number_in_range(enemy_position)
# stats
table_length = 0x60

stat_size = struct.calcsize(player_stats_format)

pointer = 0x0 + difficulty * (table_length * stat_size) + enemy_position * stat_size
pointer = self.base_pointer_stat + difficulty * (self.table_length * stat_size) + enemy_position * stat_size
output_string = '<'
if type(stat) == str:
stat = stat.lower()
Expand Down Expand Up @@ -832,7 +832,7 @@ def set_stat_property(self, value, stat, enemy, difficulty):
elif stat == 'level' or stat == 11:
pointer += 0x18
output_string = output_string + "I"
elif stat == 'experience' or stat == 12:
elif stat == 'experience' or stat == 'xp' or stat == 'exp' or stat == 12:
pointer += 0x1C
output_string = output_string + "I"
elif stat == 'meseta' or stat == 13:
Expand Down Expand Up @@ -860,10 +860,10 @@ def set_resist_property(self, value, stat, enemy, difficulty):
raise KeyError("Check enemy spelling. List of keys in get_keys(episode num).")
self._check_enemy_entry_number_in_range(enemy_position)
# stats
table_length = 0x60

resist_size = struct.calcsize(resist_format_str)
output_string = '<'
pointer = 0x7E00 + difficulty * (table_length * resist_size) + enemy_position * resist_size
pointer = self.base_pointer_resist + difficulty * (self.table_length * resist_size) + enemy_position * resist_size
if type(stat) == str:
stat = stat.lower()
if stat == 'evp_bonus' or stat == 0:
Expand Down Expand Up @@ -922,7 +922,6 @@ def get_stat_table(self,difficulty:int,verbose:bool=False):
stat_table = pd.DataFrame(columns=['HP', 'XP', 'ATP', 'DFP', 'MST', 'ATA', 'EVP', 'LCK', 'ESP'])


# while pointer < 0x3600:
for i in range(self.table_length):
subset = self.data[pointer:pointer + stat_size]
if i in self.stat_num_to_str_map.keys():
Expand Down

0 comments on commit 243a844

Please sign in to comment.