Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Pokémon rename #506

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 97 additions & 1 deletion modules/data/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,38 @@
]
}
],
"D":[
{
"width":9,
"height":4,
"array":[
["A","B","C","D","E","F","G","H","."],
["I","J","K","L","M","N","O","P",","],
["Q","R","S","T","U","V","W","X"," "],
["Y","Z"," "," ","Ä","Ö","Ü"," "," "]
]
},
{
"width":9,
"height":4,
"array":[
["a","b","c","d","e","f","g","h","."],
["i","j","k","l","m","n","o","p",","],
["q","r","s","t","u","v","w","x"," "],
["y","z"," "," ","ä","ö","ü"," "," "]
]
},
{
"width":6,
"height":4,
"array":[
["0","1","2","3","4"," "],
["5","6","7","8","9"," "],
["!","?","♂","♀","/","-"],
["…","“","”","‘","’"," "]
]
}
],
"F":[
{
"width":9,
Expand Down Expand Up @@ -63,7 +95,39 @@
]
}
],
"jp":[
"I":[
{
"width":8,
"height":4,
"array":[
["A","B","C","D","E","F"," ","."],
["G","H","I","J","K","L"," ",","],
["M","N","O","P","Q","R","S"," "],
["T","U","V","W","X","Y","Z"," "]
]
},
{
"width":8,
"height":4,
"array":[
["a","b","c","d","e","f"," ","."],
["g","h","i","j","k","l"," ",","],
["m","n","o","p","q","r","s"," "],
["t","u","v","w","x","y","z"," "]
]
},
{
"width":6,
"height":4,
"array":[
["0","1","2","3","4"," "],
["5","6","7","8","9"," "],
["!","?","♂","♀","/","-"],
["…","“","”","‘","’"," "]
]
}
],
"J":[
{
"width":19,
"height":4,
Expand Down Expand Up @@ -94,5 +158,37 @@
["t","u","v","w","x","y","z"," ","°",".","‥","[","]","「","」","“","”/","♂","♀"]
]
}
],
"S":[
{
"width":8,
"height":4,
"array":[
["A","B","C","D","E","F"," ","."],
["G","H","I","J","K","L"," ",","],
["M","N","O","P","Q","R","S"," "],
["T","U","V","W","X","Y","Z"," "]
]
},
{
"width":8,
"height":4,
"array":[
["a","b","c","d","e","f"," ","."],
["g","h","i","j","k","l"," ",","],
["m","n","o","p","q","r","s"," "],
["t","u","v","w","x","y","z"," "]
]
},
{
"width":6,
"height":4,
"array":[
["0","1","2","3","4"," "],
["5","6","7","8","9"," "],
["!","?","♂","♀","/","-"],
["…","“","”","‘","’"," "]
]
}
]
}
31 changes: 28 additions & 3 deletions modules/data/symbols/patches/language/pokeemerald.yml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ gBattlescriptCurrInstr:
J: 0x2023eb8
gRngValue:
J: 0x3005ae0
gPaletteFade:
J: 0x2037c74
ITEMSTORAGE_HANDLEREMOVEITEM:
I: 0x0
Route120_Text_RileyIntro:
Expand Down Expand Up @@ -716,23 +718,46 @@ Task_SurfFieldEffect:
I: 0x80b8d98
J: 0x80b84dc
S: 0x80b8d98

#---------------------#
# Pokemon renaming #
#---------------------#
BattleScript_TryNicknameCaughtMon:
D: 0x82f1aef
D: 0x82f1ae5
F: 0x82e4d79
I: 0x82dcd3b
I: 0x82dcd31
J: 0x828a337
S: 0x82e353b
S: 0x82e3531
CB2_NamingScreen:
D: 0x80e4bc0
F: 0x80e4be0
I: 0x80e4bac
J: 0x80e474c
S: 0x80e4bb4
BattleScript_SuccessBallThrowEnd:
D: 0x82f1247
F: 0x82e4d97
I: 0x82dcd4f
J: 0x828a34b
S: 0x82e354f
BattleScript_GotAwaySafely:
D: 0x82f0836
F: 0x82e3ac4
I: 0x82dba7c
J: 0x8289078
S: 0x82e227c
Task_NamingScreen:
D: 0x80e2e08
F: 0x80e2e28
I: 0x80e2e00
J: 0x80e2678
S: 0x80e2e08
BattleScript_GiveCaughtMonEnd:
D: 0x82f1aef
F: 0x82e4d83
I: 0x82dcd4e
J: 0x828a347
S: 0x82e354e
sNamingScreen:
J: 0x2039c34
#---------------------#
3 changes: 1 addition & 2 deletions modules/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
with open(f"{DATA_DIRECTORY}/keyboard.json", "r", encoding="utf-8") as f:
key_layout = json.load(f)

# Will have to add more languages later and detect it
lang = context.rom.language.value if context.rom.language.value in {"E", "F"} else "E"
lang = context.rom.language.value

valid_characters = []
for page in key_layout[lang]:
Expand Down
Loading