Skip to content

Commit 1e5c4af

Browse files
committed
Merge branch 'main' into dev/logging
2 parents 794d34f + 4e6526f commit 1e5c4af

25 files changed

+3991
-3893
lines changed

Diff for: battle/boss.py

+347-334
Large diffs are not rendered by default.

Diff for: battle/main.py

+598-566
Large diffs are not rendered by default.

Diff for: blitz.py

+282-280
Large diffs are not rendered by default.

Diff for: config.yaml.example

+43-43
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Main gamestate and step to load
22
# "none", "Baaj", "Besaid", "Boat1", "Kilika", "Luca", "Miihen", "MRR"
3-
# "Djose", "Moonflow", "Guadosalam", "Macalania", "Home", "rescueYuna"
3+
# "Djose", "Moonflow", "Guadosalam", "Macalania", "Home", "rescue_yuna"
44
# "Gagazet", "Zanarkand", "Sin", "Nem_Farm"
55
gamestate : "none" # valid values listed above
66
step_counter : 1 # valid step_counter values are dependent on gamestate
@@ -10,23 +10,23 @@ verbosity : DEBUG # Verbosity of log messages in the console.
1010
# These are the valid levels: DEBUG, INFO, WARNING, ERROR, CRITICAL
1111
# Full log will always be available in a file.
1212

13-
# RNG Seed (requires setting vars.setSeed: True)
14-
rngSeedNum : 160 # If starting a new run and using setSeed, use this RNG seed
15-
useFavoredSeed: False # If starting a new run and not using setSeed, use a curated array of seeds
13+
# RNG Seed (requires setting vars.set_seed: True)
14+
rng_seed_num : 160 # If starting a new run and using set_seed, use this RNG seed
15+
use_favored_seed: False # If starting a new run and not using set_seed, use a curated array of seeds
1616

1717
# Run configuration variables in vars.py
1818
vars:
1919
# Important Values
20-
artificialPauses : False # Set depending on hardware. True == less powerful hardware.
21-
csrValue : True # Set automatically on new game. For testing (loading a save file) set for your environment.
22-
nemesisValue : False # Set based on if you're doing any% (False) or Nemesis% (True)
23-
forceLoop : False # After game is finished, start again on next seed.
24-
setSeed : False # If you are using Rossy's patch, set to True. Otherwise set to False
25-
kilikaSkip : True # True == Tidus OD on Evrae instead of Seymour. New strat.
26-
perfectAeonKills : False # Before YuYevon, True is slower but more swag.
27-
attemptDjose : False # Try Djose skip? (not likely to succeed)
28-
legacySoundtrack : True # use the original Soundtrack instead of arranged
29-
doNotSkipCutscenes : False # - Missing documentation -
20+
artificial_pauses : False # Set depending on hardware. True == less powerful hardware.
21+
csr_value : True # Set automatically on new game. For testing (loading a save file) set for your environment.
22+
nemesis_value : False # Set based on if you're doing any% (False) or Nemesis% (True)
23+
force_loop : False # After game is finished, start again on next seed.
24+
set_seed : False # If you are using Rossy's patch, set to True. Otherwise set to False
25+
kilika_skip : True # True == Tidus OD on Evrae instead of Seymour. New strat.
26+
perfect_aeon_kills : False # Before YuYevon, True is slower but more swag.
27+
attempt_djose : False # Try Djose skip? (not likely to succeed)
28+
legacy_soundtrack : True # use the original Soundtrack instead of arranged
29+
do_not_skip_cutscenes : False # - Missing documentation -
3030
battle_speedup : False # Use 4x speed when doing battles.
3131

3232
# Accessibility for blind
@@ -37,45 +37,45 @@ vars:
3737
rails_egg_hunt : True # - Missing documentation -
3838

3939
# Blitzball
40-
forceBlitzWin : False # - Missing documentation -
41-
blitzLoop : False # Loop on the same seed immediately after Blitzball.
42-
blitzLossForceReset : True # True == reset after blitz loss
43-
blitzWinValue : True # No default value required
44-
blitzOvertime : False # Set to False, no need to change ever.
45-
blitzFirstShotVal : False # - Missing documentation -
46-
oblitzAttackVal : "255" # Used for RNG manip tracking
40+
force_blitz_win : False # - Missing documentation -
41+
blitz_loop : False # Loop on the same seed immediately after Blitzball.
42+
blitz_loss_force_reset : True # True == reset after blitz loss
43+
blitz_win_value : True # No default value required
44+
blitz_overtime : False # Set to False, no need to change ever.
45+
blitz_first_shot_val : False # - Missing documentation -
46+
oblitz_attack_val : "255" # Used for RNG manip tracking
4747

4848
# Sphere grid
49-
fullKilikMenu : False # Default to False
50-
earlyTidusGridVal : False # Default False
51-
earlyHasteVal : 1 # Default -1
52-
wakkaLateMenuVal : False # Default False
53-
endGameVersionVal : 1 # Default 0
49+
full_kilik_menu : False # Default to False
50+
early_tidus_grid_val : False # Default False
51+
early_haste_val : 1 # Default -1
52+
wakka_late_menu_val : False # Default False
53+
end_game_version_val : 1 # Default 0
5454

5555
# Equipment
56-
zombieWeaponVal : 255 # Default 255
56+
zombie_weapon_val : 255 # Default 255
5757
l_strike_count : 1 # Default 0
5858

5959
# RNG Manip
6060
yellows : 0 # - Missing documentation -
61-
confirmedSeedNum : 999 # - Missing documentation -
62-
skipZanLuck : False # - Missing documentation -
61+
confirmed_seed_num : 999 # - Missing documentation -
62+
skip_zan_luck : False # - Missing documentation -
6363

6464
# Other
65-
newGame : False # - Missing documentation -
65+
new_game : False # - Missing documentation -
6666
self_destruct : False # Default False
67-
YTKFarm : 0 # Default to 0
68-
rescueCount : 0 # Default to 0
69-
fluxOverkillVar : False # Default to False
70-
tryNEVal : True # Based on
71-
# firstHits is still in vars.py
72-
neArmorVal : 255 # Default 255
73-
neBattles : 0 # Default to 0
74-
neaZone : 0 # Decides in which zone we charge Rikku OD after reaching Zanarkand.
67+
ytk_farm : 0 # Default to 0
68+
rescue_count : 0 # Default to 0
69+
flux_overkill_var : False # Default to False
70+
try_ne_val : True # Based on
71+
# first_hits is still in vars.py
72+
ne_armor_val : 255 # Default 255
73+
ne_battles : 0 # Default to 0
74+
nea_zone : 0 # Decides in which zone we charge Rikku OD after reaching Zanarkand.
7575

7676
# Nemesis variables, unused in any%
77-
nemAPVal : 1 # Default to 1
78-
# areaResults is still in vars.py
79-
# speciesResults is still in vars.py
80-
# originalResults is still in vars.py
81-
yojimboIndex : 1 # - Missing documentation -
77+
nem_ap_val : 1 # Default to 1
78+
# area_results is still in vars.py
79+
# species_results is still in vars.py
80+
# original_results is still in vars.py
81+
yojimbo_index : 1 # - Missing documentation -

Diff for: load_game.py

+15-14
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import os
44
from pathlib import Path
55

6+
import area.dream_zan
7+
import logs
68
import memory.main
79
import pathing
810
import screen
911
import vars
10-
from gamestate import game
1112
import xbox
1213
import zz_airship_path
13-
import area.dream_zan
14-
import logs
14+
from gamestate import game
1515

1616
# This file is intended to load the game to a saved file.
1717
# This assumes that the save is the first non-auto-save in the list of saves.
@@ -21,7 +21,7 @@
2121
game_vars = vars.vars_handle()
2222

2323

24-
def load_into_game(gamestate:str, step_counter:str):
24+
def load_into_game(gamestate: str, step_counter: str):
2525
if not (gamestate == "Luca" and step_counter == 3):
2626
area.dream_zan.new_game(gamestate)
2727
game.start_time = logs.time_stamp()
@@ -67,7 +67,7 @@ def load_into_game(gamestate:str, step_counter:str):
6767
load_miihen_start_laugh()
6868
if gamestate == "Miihen" and step_counter == 2: # Agency
6969
load_save_num(28)
70-
returnArray = [False, 0, 0, False]
70+
return_array = [False, 0, 0, False]
7171
if gamestate == "MRR" and step_counter == 1: # Mi'ihen North after meeting Seymour
7272
load_save_num(38)
7373
memory.main.set_gil_value(4000) # Fixes a low gil state for this save file.
@@ -100,17 +100,17 @@ def load_into_game(gamestate:str, step_counter:str):
100100
load_save_num(60)
101101
if gamestate == "Home" and step_counter == 2:
102102
load_save_num(11)
103-
if gamestate == "rescueYuna" and step_counter == 1: # Airship, first movement.
103+
if gamestate == "rescue_yuna" and step_counter == 1: # Airship, first movement.
104104
# Blitz Win, save less speed/power spheres
105105
load_save_num(56)
106-
if gamestate == "rescueYuna" and step_counter == 2: # Bevelle trials
106+
if gamestate == "rescue_yuna" and step_counter == 2: # Bevelle trials
107107
load_save_num(15)
108-
if gamestate == "rescueYuna" and step_counter == 4: # Altana
108+
if gamestate == "rescue_yuna" and step_counter == 4: # Altana
109109
load_save_num(12)
110110
# memory.main.setEncounterRate(setVal=0)
111111
# memory.main.setGameSpeed(setVal=1)
112112
# Highbridge before Seymour Natus
113-
if gamestate == "rescueYuna" and step_counter == 5:
113+
if gamestate == "rescue_yuna" and step_counter == 5:
114114
load_save_num(42) # Regular
115115
# loadGame.loadSaveNum(67) #Nemesis
116116
if gamestate == "Gagazet" and step_counter == 1: # Just before Calm Lands
@@ -200,14 +200,14 @@ def load_into_game(gamestate:str, step_counter:str):
200200
if gamestate == "Nem_Farm" and step_counter == 8:
201201
load_save_num(73)
202202
if gamestate == "Nem_Farm" and step_counter == 9:
203-
#Start of Nemesis farm
204-
#import nemesis.menu
205-
#import memory.main
203+
# Start of Nemesis farm
204+
# import nemesis.menu
205+
# import memory.main
206206
load_save_num(19)
207207
game_vars.set_nem_checkpoint_ap(27) # See nemesis.menu
208208
game_vars.end_game_version_set(4)
209-
#memory.main.arena_array_nines()
210-
#while not memory.main.get_tidus_slvl() >= 70:
209+
# memory.main.arena_array_nines()
210+
# while not memory.main.get_tidus_slvl() >= 70:
211211
# nemesis.menu.perform_next_grid()
212212
# memory.main.set_tidus_slvl(memory.main.get_tidus_slvl()+1)
213213
if gamestate == "Nem_Farm" and step_counter == 11:
@@ -255,6 +255,7 @@ def load_into_game(gamestate:str, step_counter:str):
255255
memory.main.check_nea_armor()
256256
memory.main.check_nea_armor()
257257

258+
258259
def get_saved_files():
259260
saveFilesFull = sorted(
260261
Path(game_vars.game_save_path()).iterdir(), key=os.path.getmtime

Diff for: logs.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import memory.main
44

55
try:
6-
from memory.main import baseValue
6+
from memory.main import base_value
77
except Exception:
8-
baseValue = 0x0
8+
base_value = 0x0
99
game = "FFX_"
1010
ext = ".txt"
1111
fileName = "none"
@@ -177,7 +177,7 @@ def __init__(
177177
if self.isPointer:
178178
self.ptrOffset = ptrOffsetRef
179179
self.varType = typeRef
180-
self.key = baseValue + 0x003988A5
180+
self.key = base_value + 0x003988A5
181181

182182
self.set_last_value()
183183

@@ -323,15 +323,15 @@ def mem_change_list():
323323

324324

325325
def mem_change_handle():
326-
retArray = [0]
326+
ret_array = [0]
327327
firstEle = True
328328
memRefList = mem_change_list()
329329

330330
while len(baseArray) != 0:
331331
if firstEle:
332332
firstEle = False
333333
variables = memRefList.pop()
334-
retArray[0] = MemChangeMonitor(
334+
ret_array[0] = MemChangeMonitor(
335335
baseOffsetRef=variables[0],
336336
isPointerRef=variables[1],
337337
ptrOffsetRef=variables[2],
@@ -340,7 +340,7 @@ def mem_change_handle():
340340
)
341341
else:
342342
variables = memRefList.pop()
343-
retArray.append(
343+
ret_array.append(
344344
MemChangeMonitor(
345345
baseOffsetRef=variables[0],
346346
isPointerRef=variables[1],
@@ -349,7 +349,7 @@ def mem_change_handle():
349349
childReport=variables[4],
350350
)
351351
)
352-
return retArray
352+
return ret_array
353353

354354

355355
def time_stamp():

0 commit comments

Comments
 (0)