Xenoblade Chronicles Definitive Edition: Create Codes for removing gemstones from "U" gear

specialsnowflakehd

Member
Newcomer
Joined
Nov 21, 2017
Messages
17
Reaction score
5
Trophies
0
XP
102
Country
Finland
What is this about: Making cheat codes on a jailbroken Switch usable via Edizon, Breeze etc. for Xenoblade Chronicles Definitive Edition (XCDE).

What are the the cheat codes for?
a) Remove pre-equipped gemstones from "U" weapons/armor (e.g. Machine Sword III, Chosen One, Meyneth Monado, etc.) and let the player add any gemstone

During runtime, the game doesn't allow you to remove pre-added gemstones from "U" weapons/armor gear. Even if the "U" weapon/amor gear has empty slots (which is doable both on Wii and Switch), the game won't allow you add any gemstone. You can hit A on an empty slot, then your list of gemstones appear. But, all options are greyed out. Selecting any gemstone will trigger a "deny" sound.
This is all likely because there are flags and functions that are used during runtime, to specifically cause this.
This explains, if the slots are empty, you can't add any gemstone because the weapon/armor gear has that flag related to that "U" thing.

*"The the heck is "U"??" There are items with slots for gemstones. If you can add or remove any gemstone for a slot, you will see "S" on the weapon/armor icon. Otherwise, you will see "U", which indicates the weapon/armor comes with pre-added gemstones, that are tied to this gear. Then there are items that will never have slots for gemstones.


b) (Forcefully) Add slots for gemstones for any weapon or armor. Extend the number of slots if possible.

c) Make it fully possible for the player to freely remove / equip any weapon or armor.
Examples (in a non-NG+ save file): Melia's mask (during her trials) is unremoveable, Shulk's Monado or Monado II can't be removed, when Seven fights a certain someone she temporarily uses Meyneth's Monado.

Once the player is in a NG+ file, it looks like the game allows to remove or equip anything. But, I noticed there are few exceptions: In certain events, you can view let's say Mumkhar's inventory. His equipped gear is unremoveable.

The cheat code proposed in c) could be useful, because (if my memories serve me correct) if you manually equip a certain item (e.g. Melia's mask) you aren't supposed to manually equip nor have access to, you can't remove it. Likely because there is a flag in the object the game checks on runtime.

I need help:
This is where I need help. Enter Breeze, locate offsets, "Gen2Attach" to get dumps, ... => Failure... UGHHH... I can't get to find any useful starting point. I know how to load cheat codes, but I have no clue how to use the advanced options of Breeze. It's unfortunately very confusing to navigate through. I don't know what to look for nor what to do with with the findings. this is my first time I do this on console and secondly, create cheat codes to overwrite functions of a game.

Yes, I know how to use Cheat Engine, how to program in C, I can read Assembly (never wrote in practice though), do HEX <=> DEC conversions, Base ^2, calculate positions of offsets etc..
Yes, I know how to overwrite values in certain offsets... of variables or object attributes. No clue how to trace or overwrite (global) functions.
I just don't know how to archive my goal.

Any advice and help would be greatly appreciated! What I said here is based on observations. If I said something wrong, then please correct me. Thanks!

"Have you thought about editing the binaries directly, then re-package the game?"
Yes, I already did that with some GC and Wii games in the past. In this case, it is not a good solution... I believe... Technically, I could just remove certain flags. However, I want to preserve the option to have the pre-added gem stones. At the same time, I can have a duplicate gear, where there are my own added gemstones.

Not sure if it is true in practcie: Secondly, if the weapons/armor have their "U" flag removed, chances are the removed gemstones go *poof*. They are not added to the inventory. If this does happen: This makes the whole benefit of the pre-added gemstones kinda useless since the removed gemstones disappear.


A few important notes:
1) This is on a jailbroken Nintendo Switch, not emulator.

2) I already developed a GUI save file editor for game saves from said game. I will make a future post about it with a link to the repo.
It's in C# and PhotinoNET. No WPF, XML or web app bs. I will try to publish a self-contained executable, so you don't have to install dependencies before you can use it.

It is based on what damysteryman (see: https://gitlab.com/damysteryman/XCDESave) has build. His work is unfinished. Since his solution isn't very user friendly (no offense), I made an entire GUI. It does successfully edit save files and the imported save files work, when starting the game and viewing the inventory. HOWEVER, there are few issues:

a) this is still a work in progress so I can not gurantee 1000% functionality and safety

b) what damysteryman made, isn't finished, either. Specifically: A lot of string names for various objects are missing. The IDs are there, just not the names. Currently, there are string names for clothes and weapons. For collectibles, gemstones, etc.? No.

c) Yes, you can add gemstones into a "U" weapon/armor gear. The game will load them. But you can't remove nor add any gemstone. This is because of the aforementioned checks that happen during runtime.

Inspiration:
There are 3 Gecko Codes for Xenoblade Chronicles on the Wii Console. Those 3 don't exist yet for the Switch version of the game, which is why I want to recreate them?
Code:
The following is from https://gamehacking.org/game/135083

#1 Always Able to Remove Gems from Armor\Weapons
Write/Fill - Writes the value of 0x48000054 to + 1 consecutive byte-sized addresses, starting with the address 0x1FC958.
Write/Fill - Writes the value of 0x60000000 to + 1 consecutive byte-sized addresses, starting with the address 0x204B10.
Write/Fill - Writes the value of 0x38600003 to + 1 consecutive byte-sized addresses, starting with the address 0x205410.

041FC958 48000054
04204B10 60000000
04205410 38600003

#2 Max Gem Slots for All Selected Equipment
Insert ASM - Branches from ba+0x2069EC, and executes the next lines of ASM.
Insert ASM - Branches from ba+0x2061B8, and executes the next lines of ASM.
*Makes Permanent Changes Backup Save before using*
C22069EC 00000002
38800001 98940030
7E84A378 00000000
C22061B8 00000002
38800003 98930030
7E649B78 00000000

#3 Always Able to Equip or Remove Any Weapon
Write/Fill - Writes the value of 0x48000010 to + 1 consecutive byte-sized addresses, starting with the address 0x204A20.
Write/Fill - Writes the value of 0x60000000 to + 1 consecutive byte-sized addresses, starting with the address 0xA21B4.
Gecko
04204A20 48000010
040A21B4 60000000

Some last notes:
  • XCDE uses the same engine from Xenoblade Chronicles 2.
  • XCDE runs on the Switch, which uses an ARM CPU. The OG version...
  • ...runs on the Wii, which has the PPC CPU. The OG version uses a different engine.
  • Considering of the 3 points: this kinda makes "searching the culprit" a bit more challenging.
 

Site & Scene News

Popular threads in this forum