Skip to content

Commit

Permalink
YGO06: show goal in status screen. show completed challenges as a num…
Browse files Browse the repository at this point in the history
…ber instead of %. Show booster completion as a number instead of %.
  • Loading branch information
Rensen3 committed Dec 18, 2024
1 parent 796d0c0 commit 1eb8315
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/yugioh06/card_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4381,7 +4381,7 @@ def import_data():
with open("Yugioh 2006 Card Data.tsv") as file:
data = csv.reader(file, delimiter="\t")
for card in data:
print(" \"" + card[2] + "\": CardData(" + card[0] + ", " + card[1] + ", \"" + card[2] + "\", \"" + card[3] + "\", "
print(" \"" + card[2] + ("" if card[4] == "0" else " Alt " + card[4]) + "\": CardData(" + card[0] + ", " + card[1] + ", \"" + card[2] + "\", " + card[3] + ", "
+ card[4] + ", " + ('True' if card[5] == "TRUE" else 'False') + ", " + card[6] + ", " + card[7] + ", " + card[8]
+ ",\n \"" + card[9] +
"\", \"" + card[10] + "\", \"" + card[11] + "\", \"" + card[12] + "\", " + card[13] + ", " + card[14]+"),")
Expand Down
Binary file modified worlds/yugioh06/patch.bsdiff4
Binary file not shown.
15 changes: 15 additions & 0 deletions worlds/yugioh06/rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from worlds.Files import APProcedurePatch, APTokenMixin, APTokenTypes

from worlds.AutoWorld import World
from . import Theme_Duels, Limited_Duels
from .items import item_to_index
from .rom_values import banlist_ids, function_addresses, structure_deck_selection

Expand Down Expand Up @@ -130,6 +131,20 @@ def write_tokens(world: World, patch: YGO06ProcedurePatch):
patch.write_token(APTokenTypes.WRITE, 0x10 + j, struct.pack("<B", b))
for j, b in enumerate(world.playerName):
patch.write_token(APTokenTypes.WRITE, 0x30 + j, struct.pack("<B", b))
# set up goal in status screen
patch.write_token(APTokenTypes.WRITE, 0xec7b6,
struct.pack("<B", world.options.final_campaign_boss_challenges.value))
# set up total limited and theme duels in status screen
limited = 0
theme = 0
for l in world.multiworld.get_locations(world.player):
if l.name in Limited_Duels:
theme = theme + 1
if l.name in Theme_Duels:
limited = limited + 1

patch.write_token(APTokenTypes.WRITE, 0xec968, struct.pack("<B", limited))
patch.write_token(APTokenTypes.WRITE, 0xeca4e, struct.pack("<B", theme))

patch.write_file("token_data.bin", patch.get_token_binary())

Expand Down

0 comments on commit 1eb8315

Please sign in to comment.