#leo tries modding ghost trick
Explore tagged Tumblr posts
sibyl-of-space · 1 year ago
Text
I FINALLY, FINALLY, FINALLY HAVE SUBSTANTIAL PROGRESS TO SHOW FOR MY GHOST TRICK ROMHACK. [04/18/2024]
THERE IS LITERALLY ONE SINGLE THING LEFT TO IMPLEMENT BEFORE I CAN CALL IT DONE.
As it is a massively spoilery ROMhack, details below the cut, do not open unless you have beaten the game.
Tumblr media
You have no idea how long I've been trying to make this happen.
The point of the hack is to replace every single instance of Sissel in the game with the cat (so you can play as a cat WOOO!!!) and leave Yomiel as-is (since he uses almost all of the same assets, which made this go from a "could do it in a weekend" hack to "has taken me about 4 years" hack).
For the longest time I had successfully replaced all of Sissel's sprites in each scene using a script I wrote after a ton of digging, because for almost all of the game the sprites are associated with each line of localized text (defined per-localization). So I just ran the file for each scene through a script that find+replaces all of the codes for Sissel's Yomiel sprites, point them to the cat, and then revert some scenes that have false positives (late game scenes with Yomiel). This didn't take too long to figure out and I documented the journey on Romhacking.net.
What this did not do was address the Yomiel!Sissel sprite in 3 places:
The "phone line is down" scene
The people directory
The "I fucked up let's rewind time" scene
The phone line was the easiest fix, I realized after much headache that using save states actually caches the system_0000 file [so changing that file and then loading the save state does NOT reflect the change], and *that* is where the phone line sprite is defined. Once I realized that, the script I used for everything else found another sprite code and fixed it. That last fix was... a while ago.
I tried to update the directory the same way, but the directory file did not have the sprite codes in it anywhere. It had the upper screen animations, so I was able to edit the animation of Yomiel's dead body and replace it with a kitty, but the sprite could not be changed from there.
Today, I have finally figured out why. I spent over 10 hours yesterday following the dead end of trying to figure out progression stuff via meticulous edits to the chapter.xml file, and after learning a lot about how the game works that does not help this hack whatsoever, it occurred to me that these sprites seem to be treated by the game as UI elements. So... I had to start looking at how the game handles UI stuff.
Many frustrating hours later, I finally found what I was looking for (at least for the phone book), and it was found in overlay9_0006.bin. I narrowed this down by noticing that if I replaced this overlay file with junk the game would play normally until I tried to load the directory and then it would crash. Then I eventually was able to replace Sissel's sprite with the cat, and it was very annoying but I'm so glad it's done. I was also able to replace the sprite on the bottom screen, but unfortunately there is no definition for the cat there that I could replace it with (and since the cat is black it might not even show up anyway...), so I settled on the ghost as it's neutral enough.
The unfortunate news is that this still leaves the "rewind time" scene, and that is the most important of the 3 because it comes up so often in gameplay. If I had found that one first I might have shipped the hack as-is. But I do not feel it is complete until I can find that last fucking bit of code.
I have a bit of an idea of where it might be. I think it is also in the overlay files. I KNOW it's NOT in 0002, 0004, or 0006, because replacing those with junk I was able to load the rewind time scene just fine. It is in one of:
overlay0000 - editing this one caused the game itself to fail to load even before the title screen, so I am assuming this is a very low-level overlay and am leaving it alone for now.
overlay0001 - same.
overlay0003 - this is the likeliest culprit. If modified, the game can load but as soon as you try to press either "select chapter" or "continue" it crashes. I imagine most of the UI stuff for regular gameplay is in here then which shoooould have the "Rewind Time" scene?
overlay0005 - second likeliest culprit. If modified the game can load the Capcom/etc logos but crashes trying to load the title screen itself. This implies to me it has info on the main title screen menus which I suppose could theoretically be the same level as the rewind time scenes, though I kind of doubt that and 0003 still seems likeliest to me.
I don't know when I will have time to work on this again. Technically I didn't have time to work on it this week, I just kind of did anyway. But next time I pick it back up, if I can find what part of (probably) overlay9_0003 (maybe) includes the code for that rewind time scene, I can finish this project that I started so long ago they went and made a whole ass Switch release in the interim.
11 notes · View notes
teamhook · 5 years ago
Text
CSSNS 2019 Rionnag Dorcha Gorm (Dark Blue Star) 4/4
Hello all!
This is my contribution to this year’s @cssns
I know my other story is still going on and it will find it’s ending, but since I cannot say no to @kmomof4  here I am, once more.
I wanna thank the lovely ladies at the CSSNS Discord. I love chatting with you all.
I wanna thank the mods of CSSNS19, my lovely very patient Beta @searchingwardrobes and my artist for the event @hollyethecurious
This is it guys. Final Chapter!!
Tumblr media
Tagging: @hookedonapirate @let-it-raines @profdanglaisstuff @seriouslyhooked @resident-of-storybrooke @revanmeetra87 @killianjonesownsmyheart1 @snowbellewells @gingerchangeling @ultraluckycatnd​ @shireness-says​ @sherlockianwhovian​ @stahlop​ @branlovestowrite​ @kymbersmith-90​ @ilovemesomekillianjones​
AO3
FFN
The next day, the day of the Founder's Gala on the outskirts of town, at the edge of the forest surrounded by shadows, Hester Blue's anger grew. The town was celebrating her killers. At that moment her thirst for vengeance consumed her. She would make them all pay.
The town was in a buzz with everyone doing last minute things to make sure the event was a success.
Emma and Killian had a battle plan. Belle was going to babysit Leo in Killian's room. Ruby was going to guide Emma and Killian into the forest entrance. They were prepared with some high powered flashlights, two shovels, water bottles, and a few snacks. They also had some salt and lighter fluid, and his new weapon: the hook from his father's ship. Emma had a simple crowbar. The books and video clips from the longest-running supernatural show had taught them what tools they would need on this mission. Good thing the objects they needed were easy to find rock salt to purify a corpse before burning the bones. Killian wasn't sure why they might need to purify a corpse, but he wasn't taking any chances.
Leo wasn't happy about staying behind, but he understood. Emma had explained to him why he couldn't go. They needed to cover as much ground as possible without any distractions.
Emma had also called on Robin, Liam's best friend to borrow his Jeep to get around the tougher terrain of the forest. It had been a brief reunion between Killian and Robin. He had offered to go with them, but with his wife sick, Emma and Killian had insisted he shouldn't leave her and their son alone.
They had started their quest at sunrise. The three were pacing themselves to avoid getting too tired since there was still a lot of ground to cover. They had lucked out - in the diaries, there had been a description of the location. Their only hope was for the scenery to not have changed much. It was crazy to think so, but stranger things had happened in the town.
Emma figured it had been guilt that led her great-great-grandmother to write about the injustice done to the poor woman. So they walked closely together up to the toll bridge, and then Ruby was urged to go back to town.
No one ventured further into the woods because the atmosphere changed drastically beyond that point. Everything seemed eerily dark and quiet. Hours had passed, and they had yet to reach their destination. There was no sound even as their feet crushed the leaves and branches on the ground. No birds chirped; no signs of life could be heard at all. The shadows played tricks on them. Killian was on high alert with his hook ready to strike. Emma was holding on to her crowbar. It felt as if they had entered a different dimension. The air was thicker, making it hard to breathe. They followed the landmarks mentioned in the diary. It had taken them most of the day, but they had reached their destination or so they hoped if the old beat up cabin was any indication. Emma scanned the area. It was simply too quiet. She noticed a withering tree next to the cabin.
The founder's gala is in full swing. It's the biggest celebration in town and nothing is left to chance.
Belle keeps a close eye on Leo. There's no way she is letting something happen to the boy. There's a sudden knock on the door, and Belle wonders if Ruby is back already. She opens the door, and Brennan Jones stands tall on the other side of the doorway. He smiles as soon as the door opens.
"Hello, I would like to have a word with my son."
"Oh, Killian isn't here." She checks to make sure Leo is still reading his book. "He won't be back for a while."
Brennan walks past Belle. "What is Leo Nolan doing here?"
"Mr. Jones, I think it's best if you leave. I will let Killian know you stopped by." Belle tries to push him out of the room.
"I'm not leaving until I speak to my son," Brennan states, thinking Belle is hiding Killian from him.
Leo looks up from his book and says, "Killian and Emma went to fight the monster to keep it from hurting me."
Brennan looks at Leo, then turns to Belle, "Monster? Is my son still telling that story?"
The lights flicker in the room for a second, allowing a shadow to appear. The inn's lighting is dated, frozen in time like all of Storybrooke. Leo halts as he notices the shadow become larger and thicker as it solidifies behind the older man.
Belle notices Leo's attention has been captured and follows his line of sight. Startled by what she sees, Belle grabs Leo and pushes him behind her. There's a large solid shadow behind Brennan Jones, and the man is oblivious to it. Brennan feels the little hairs on the back of his neck rise. He turns to the source of dread he is feeling.
Brennan freezes as he realizes that his son had told the truth all those years ago, that his beloved Alice was lost to him because of the thing in front of him. The rage in his heart ignites as he moves towards the monster that had torn his family apart. Hester evades the movement easily and turns to Leo with a wicked smile as she approaches the boy. Belle's small body seems to shrink in front of Hester's unnatural presence. She's no coward, but the phantasm kept moving. Brennan bypasses Hester, and pushes Belle and Leo out of the way. Hester's hands land on Brennan's body. He tries to bite back his scream he looks to Belle and Leo to mouth the word run which is ignored by the two as they stare at the man writhing in pain. Ruby bursts through the door holding an iron skillet from the kitchen. She swings at Hester, who releases Brennan and disappears.
Ruby turns to Belle and Leo. "She is real." She looks at the skillet and laughs "it worked."
Ruby nods at Belle to take Leo out of the room as she looks down at the man on the floor. She slowly approaches him, and he opens his eyes. "Please, tell Killian I'm sorry." His labored breath stills. His skin is red as if sunburnt. Ruby looks around at the room to make sure Hester is truly gone. She hasn't been back for long when she hears some scuffling upstairs. Luckily, she grabs the skillet before going upstairs.
Downstairs a rattled Belle is holding onto Leo so tightly that the little boy's eyes are wide. "Belle, is Mr. Jones okay?" The young boy sniffles.
"I don't know, Leo." She squeezes him. "The important thing is that you're okay."
Ruby comes down the stairs, "I'm going to have to call Graham."
Belle nods, "Okay, what are we going to say? I don't think we can say that a ghost attacked him."
Ruby sighs, "I know Belle, but we can't just leave him there. Granny will kill me. People need to know that they're in danger."
"She is not after everyone it's just some. There's no need to cause panic."
"Are you kidding me? Belle, I don't think Mr. Jones fits the victim criteria, but he is still dead. Emma and Killian told me what you all found and this Gala gives me a bad feeling. You know the attacks have escalated a whole lot more. Killian was attacked and now you and Leo. Mr. Jones is dead. That thing killed him."
Emma and Killian had been lucky finding the cabin so quickly. Emma's heart breaks for Hester as they snoop around it, for it must have been a lovely place to love but also lonely.
The tree beside the cottage is so huge, it defies logic. It has a thick tree stump, and the roots are so thick they appear to be cradling something. Perhaps protecting something- the body? That makes no sense, but apparently vengeful ghosts exist, so why not?
"Killian, do you think it knows we're here?"
They stand in front of the tree. "I hope not, because if she knows we're here, she knows why we're here."
Emma nods, "I'm just worried about Leo."
"I know you're worried about that lad, but I'm sure Belle is taking very good care of him. Besides, the equipment in that room has the best sensors money can buy."
After a few discussions, Belle and Ruby decide to call Graham. "In the end, they feel they don't really have a choice. After all, there's a dead body. The only disagreement was if they should mention Hester.
Graham arrives at the Inn to investigate the death, and after a quick look over the body, his first question has nothing to do with it. "Ruby, where's Emma?"
"She's with Killian, what does this have to do with the dead body?"
"Did you know he spent time in a mental institution? Where are they?"
"Wait a minute. Are you seriously suggesting Killian did this?" Ruby asks incredulously. "He wasn't even here."
"Ruby, answer the question. Emma could be in danger."
"This is bullshit and you know it. I don't think it's possible for Killian to be in two places at the same time. They went into the forest, beyond the toll bridge. So how did he do it, oh great detective?"
Graham only glares at her.
"Graham, this goes beyond your unrequited love for Emma. we need to cancel the Gala. Mr. Jones killer might attack again." Ruby sassed.
"Are you crazy? They would lynch me if I even suggested it. If the killer is not Killian, who is it?"
"Well, are you going to let them know that a descendant from one of the founder's members is dead?"
"Do you want me to say how he was found in his estranged son's room? And that he has very similar injuries to his first wife's?"
"You know perfectly well that Killian is not here and he was innocent then and now. This is just about Emma. You're seriously not going to warn them? You don't get it. I have a feeling this will not be the last death tonight if we don't at least try.."
"Ruby, warn the town about what? You're not making any sense"
Belle and Leo look at each other. They had been sitting quietly while Ruby talked, but fed up Leo yells, "It was the monster, she killed Mr. Jones. Killian didn't. The monster is going to hurt everyone and you don't care!" The young boy sniffles.
Ruby turns to Leo and smiles, "Come on, kid." Belle and Leo fall into place behind her as she faces Graham, "If you won't, I will!" The three of them storm out.
Graham stands over the body and decides to go looking for Emma and Killian.
After leaving Graham; Belle, Ruby, and Leo head towards the Gala to warn people. Leo gets on stage followed by Ruby and Belle, and the three of them try to explain the danger that's lurking in the dark. At first, no one believes them.
Abruptly the power goes out, and chaos ensues. Random people are screaming in pain. Mr. Midas pushes his daughter Kathryn out of the way from Hester's grasp and falls in her place.
George Spencer pulls a startled Ashley in front of him as Hester approaches him. The young girl's cries echo beyond the walls. The new Mrs. Jones falls too as she tries to help her. The great Mr. Spencer reaches for the doorknob at the emergency exit. He smirks as he opens the door: he made it. Sometimes collateral damage is necessary, what a pity, the girl was nice. Once the door is fully open, and he is finally going to cross the threshold, he turns his full attention only to find Hester waiting for him. She jabs her in hand his chest. The door slams shut behind him as his screams end quickly.
Ruby and Belle are trying to help people, but Leo is their priority. The boy is trying to find his parents. Leo, Belle, and Ruby narrowly escape Hester's wrath as they manage to find Mary Margaret and David to make a quick getaway. As they walk away they try not to think about how many of their friends they've lost - the carnage is too great to comprehend.
Emma and Killian have tried digging by the tree, but the roots were too thick. Dried sweat has made their hair stick to their faces. They've been going at it for hours, and it seems to make no difference. Emma is losing hope and her patience. "Killian, this isn't working. We need to get to that body soon."
"Aye, I know love." Killian keeps trying to dig. "If only we had something sharper."
The two suddenly turn to each other and at the same time say "the hook"
They had laid their belongings on the ground when they started digging. He goes to grab the hook and looks at the tip. It looks extremely sharp. So he goes back to work. The root has started to splinter.
The air has become thicker, making it hard to breathe. Killian turns to Emma. "I don't think we will be able to get the body out. We will have to burn the tree and hope that the body burns with it. Give me the salt."
Emma hands him the salt as she is taking deep breaths.
He pours it all over the crevices and pats it down. "Emma, let me have the lighter fluid." She hands him the can. He douses the tree's roots.
It doesn't take Graham long to track them.
"Graham, what are you doing here?" Emma asks, sweat making her body glisten.
"I came looking for Mr. Jones." He curtly answers.
Killian's brow raises as he plunges the hook on the tree root. "Mate, can't you see we're a little busy at the moment?"
"I have questions about your father."
"My father? I haven't crossed words with the man."
"Then explain to me, how is it I just left his body in your room?"
"His body, in my room?" Killian's heart beats faster.
"Yes, his body resembles the one of your mother."
Crackle, crackle, crackle, crackle…
"Sheriff, -crackle- come in -crackle- power out -crackle- we're -crackle- attack"
Emma and Killian turn to each other and say, "Hester." He resumes his work frantically, he needs to hurry.
Graham looks curiously at what Killian is doing.
"Graham, you know he couldn't have done any of that. We've been here all day." She sighs, "I don't want to argue. All I can say is that once we burn the body, the unexplainable deaths will end. My brother will be safe: him and all the children."
"Emma, I don't understand," Graham says.
Emma's green eyes get big as saucers, Graham turns to see what has captured her attention. Hester is moving towards them. Emma turns to Killian, "we're out of time, do it now!"
Graham is frozen in place.
Killian pours the remaining lighter fluid and turns a match as Hester makes her attack on Graham. His body drops to the ground lifeless.
The fire roars to life fast. Hester shrieks in pain as the tree and the exposed roots are engulfed by the fire, consuming the body as Hester starts to burn.
Emma locks eyes with her, "Your truth will be known."
Hester's body incinerates, her ashes ignite a fire that burns out of control. The flames quickly reaching the cabin she once called home, and soon it spreads throughout the forest that embraced her in her vengeance.
Emma and Killian start running as everything turns to ash. The fire cleansing the cursed forest.
After the massacre at the Gala, the truth about what had been done to Hester was revealed. Sadly the event had left a lot of families torn apart. The town embraced the ones left behind. Storybrooke had become peaceful and united.
Killian became his half brother's, Liam guardian. He left his life in Vegas behind and moved to Boston. His boss Nemo, and surrogate father followed soon after. He had become fond of the young boy who reminded him of a lost boy he met years ago.
Emma moved to Boston and joined the BPD. She shared a lovely apartment with the love of her life and his little brother. During the weekends they would visit her parents at the farm in Storybrooke. Her little brother, Leo was once again the happy little boy he used to be. The bond that Leo and Killian shared had only gotten stronger, although there was no monster haunting them.
Years later while visiting her grandparents, a young blonde girl is being tucked into bed by her loving parents. She is afraid because she has just lost her last baby tooth, and she's heard the scary stories. Her mother lovingly caresses her hair soothing her fears and pulls a gold coin from her pocket. Her father stands close behind her mother as he leans to kiss the top of his wife's head. "Hope, there's no need to be afraid anymore."
20 notes · View notes
sibyl-of-space · 1 year ago
Text
Well I was possessed to try and make more progress on my Ghost Trick ROMhack this evening because I really and truly am so close to finishing it, and after spending 3 hours being annoyed I can confidently say that I maybe sort of kind of made some slight progress.
I've been really digging into the chapter.xml file because I think it holds the key to telling me some things about how the game handles progression. This is important because the 2 remaining sprites I have not been able to update using the scripts I've done so far both seem to be updated via how the game handles progression [they are updated at the same time during a certain key reveal] - so if I can learn how this database update mechanic works, I might be able to learn what is telling it which sprites to use, and then finally finish this thing I have had ""almost"" done since before I went back to school and got a whole ass masters degree.
Things I have figured out with respect to the chapter.xml file:
- it definitely does have the ability to flag or indicate database progression/updates, because by some shenanigans I tested, I can force it to load the same scene from different "chapter select" buttons and doing so will cause the database to reflect different points in the story. because the scene is identical I know this is almost certainly not flagged by the scene itself or by the stage root file (generally if it were that I'd expect the stage root file to load a different scene altogether along with a different game progression state) ((suppose I shouldn't totally rule it out but anyway..))
- individual stages also have the ability to flag database progression/updates obviously though because sometimes new info is added mid-stage, but there is SO much more code in the stage .xml files that testing and isolating it with the chapter.xml file seems Much Easier
Things that walled me from making more substantial progress with the chapter.xml file:
- I got to a point where it seemed that the process of exporting, decompressing, and recompressing resulted in a crash when the game tries to load any chapter beyond 3.
- Turns out this was completely unrelated to any changes I was making and was caused by probably the emulator cacheing something weird and/or me not properly saving the changes made upon reinsertion in crystaltile and/or the compression algorithm not liking that I renamed the file and/or any number of small little things I was not being careful about. This resulted in about an hour of rigourously testing specific changes in the chapter.xml file being rendered completely useless because all these crashes I experienced were caused by something else.
On the plus side, supreme annoyance aside, I have some strong Hunches that should be able to be confirmed next time I have some time to sit down and test them properly. I have no clue if these will lead me to where I want to go but they should at least further my overall understanding of the game which will, EVENTUALLY, VERY EVENTUALLY, lead me to what I'm looking for. Which has been just the biggest pain in my ass but so it goes.
(I'm trying not to think too hard about the very real possibility that progression stuff needs to be tested by looking at the data in the save file itself; this will be the inevitable next step if chapter.xml bears no fruit.)
8 notes · View notes
sibyl-of-space · 1 year ago
Text
Ghost Trick ROMhack Update
Alright, I think I'm gonna have to put this down for another several months before I'll have time to look at it again. I was REALLY hoping that the overlay files would be the final key to this puzzle and I'd be able to find the last scene No Problem after that.
Unfortunately that hasn't been the case. I've learned a lot more about the ROM but it's still not enough to figure out where that last scene's rendering instructions are.
Details on what I have figured out under the cut. As always, insert warning here on how this hack is very spoilery so don't read if you haven't finished Ghost Trick.
As far as I can tell, the overlay files control the following:
0000 - this seems really low-level I haven't really been able to make changes to it that don't just prevent the game from loading. It also doesn't have any plaintext in it so it's really difficult to discern what it does. O001 - fairly certain this is just initial loading stuff, it's almost definitely not in this one. 0002 - an empty file. 0003 - this handles the menu for the "chapter select" screen and the "continue from this time?" screen. 0004 - this handles some stuff [for example, the animation that plays after you select "go back to beginning"] but NOT the "should I go back in time?" scene itself. I know this because replacing it with all 0's the scene loads fine. 0005 - this handles the main title screen menus. I did a lot of testing with it, and can replace some of the UI buttons with other textures and move them around, but it only controls stuff on that main menu. 0006 - as established previously, this is just the people/phone book database.
So there really doesn't seem to be an overlay file with the UI/rendering instructions for gameplay scenes specifically (unless it's in 0000, which would be annoying but not impossible). The reason I care about this is that the way that "back in time" scene is handled it REALLY seems to me that it's handled the same way UI elements are, since whether Sissel is a human or a ghost will be reflected by whatever your save file's progression says it should be, regardless of what specific scene it's pulled from. It's not a hard-coded sprite. And it's NOT pulled from the System_0000 file where the text is defined, because those can be deleted and the scene renders fine just with no text.
I started to wonder if maybe the instructions for rendering that scene are in fact hard-coded individually in the st##_game###.xml file for each scene (not the localization file, where the sprites for regular dialogue lines are indicated, but the main .xml file that has the code for the scene) that has a back-in-time function. That would be WEIRD, but a lot of how this game is put together is a bit weird so it honestly isn't out of the question.
I've been testing with st13_game021.xml, which is the final gameplay scene in the game where you are in Temsik Park in the past. I've tried to compare it with st13_game012.xml, which is a different gameplay scene with back-in-time, but it's difficult to do so because it's not like the information is in the same place, and both files are large.
I have found one thing that might be a good sign:
In both files, there is a "FE" toward the beginning in the portion of hex code that messing with has a tendency to just crash the game when it tries to load.
st13_game021: at position F4 st13_game012: at position 78
And if this "FE" is replaced with "FF", it results in the scene loading normally... except the "back in time" button has disappeared:
Tumblr media
Note the conspicuous lack of a button in the upper right. Not only does it not spawn the first time, it also does not spawn after returning to gameplay from the database or anything else.
Now, this really doesn't prove... anything. But it does mean that in at least some sense, these st##_game###.xml files DO have some control over the rendering of the UI, which I think means it's quite possible that they hold the key to this final change I want to make.
I haven't been able to narrow down any other part of the hex code that corresponds to the "rewind time" scene. But I did test replacing this particular "FE" value with a lot of other things and in some cases I got interesting results.
The vast, vast, vast majority of replacement values either freeze the game or cause it to stutter a bit and then load fine, but with no "rewind time" button. But a few exceptions:
FE = intended behavior, rewind time button spawns. F8 = top screen renders a grey and black line pattern and game freezes. EF = game automatically goes to a "saving progress" screen and DOES IN FACT OVERWRITE THE CURRENT SAVE. In the case I tested it created a save that thought it was in Chapter 1 and freezes if you try to load it. AF = there is a transparent black bar at the top of the bottom screen that appears before it freezes.
I don't know for certain what my next approach will be when I pick this up again. The unfortunate thing is that I'm almost completely certain that the rendering instructions for that "should I go back in time?" scene are somewhere really annoying, because I'm pretty sure everywhere that uses some amount of clearly labeled plaintext when decompressed has been ruled out at this point. It's almost certainly somewhere low-level-enough that making random hex code edits without precision just make the game freeze before you can test anything useful. I would love to be wrong about this.
If anyone has recommendations for useful tools that might help isolate this remaining change I'm all ears. I think I am reaching the limits of what my approach of "very laborious hex code changes, load the ROM and see what changed, take notes, and try again" can do. I'm trying to cross reference different scenes that also have the rewind time function to look for similarities but it's difficult because I can't just do a side-by-side byte comparison since often the same instructions are at different locations in memory depending on what else each scene has. But I may also just need some time away from this to figure out a better approach. Possibly messing with save files will help, and since I now know that for some reason changing the "spawn back in time button" byte can make it force a save file, I guess I could use that to my advantage.
At any rate, that's probably as much progress as I'll be making in April 2024. I'm just as dedicated to finishing this as I was 3 years ago but after spending 2 weeks working kind of nonstop on this (and successfully updating the database, which was huge) I need to put it down again. Hopefully the next time I pick it back up I will completely finish.
Please feel free to DM or post in the RHDN thread if you have any knowledge that might help. Also, I have a metric f***ton of notes from my testing of the chapter.xml file, the overlay files, and the stage files; eventually I feel like I should publish some of my findings that aren't relevant to my own hack just so people have access to them. It's not a priority atm, but if anyone thinks any of those would be useful let me know and I'll prioritize it.
CURRENT STATE OF THE HACK:
In the English language, Sissel has been updated to use the cat sprite for all known gameplay scenes except for the "should I go back in time?" scene. Yomiel's corpse has also been replaced with an animation of the cat.
In other languages, the database sprite change will populate but no other changes. Sorry.
3 notes · View notes
sibyl-of-space · 1 year ago
Text
RIP to amadeus i havent touched his game this week but today was productive as fuck i
with the help of one other person on the team helping me brainstorm, finalized all the pieces of the mystery and list of clues we'll need for our mystery jam game, and now i just ("just") have to write the rest of it and revise what i already wrote to match
MADE WHAT I THINK IS PROGRESS ON MY GHOST TRICK HACK..... I made a UI button disappear from a st##_game###.xml file, which I happened upon via sheer dumb luck because it's in the part of the code for each stage where random changes have a 90% chance to just cause a crash; but this implies that I'M PROBABLY RIGHT IT'S NOT AN OVERLAY FILE I'M LOOKING FOR and I have an attack plan to prove that more conclusively (or disprove, which would honestly be baffling at this point but isn't technically impossible)
If this hack takes much longer though I'm gonna have to bench it again for a while and catch up on Amadeus, but I gave myself permission to go nuts this week and see what comes of it. Will report back tomorrow.
4 notes · View notes
sibyl-of-space · 1 year ago
Text
I sincerely hope I'm wrong, but I think I know where the "last" scene I need to edit in the Ghost Trick ROM is to complete my hack.
So far I've edited:
- every single scene's localization file (over 100 of these but I was able to script the edits, reinserting was annoying because I didn't look into automate that) (this was the first thing I did and took care of about 90% of what I wanted to do in one sweep)
- one of the arm9 overlay files (this was so annoying to figure out)
- database/system files
And I assumed that this last scene I needed to edit would be in one singular place. There were a lot of reasons I made this assumption, and it was pretty evidence-based, but unfortunately I think it's wrong. I think this last "scene" is actually coded individually in every single scene in the game that references it as a duplicate.
And in my own defense I had originally thought this was the case! If the sprites in the scene were coded the way they are everywhere else then I would have caught this years ago. But because the sprites are implemented differently my script doesn't catch them, and by the time I learned that the pointers might be different, I had gone way past that script and was looking at overlay files and a ton of way deeper stuff about how the game runs. The text for the scene is pulled from one single place, too. But I think the rendering instructions... Might not be.
I haven't actually confirmed this. But I'm preparing myself for the possibility. It will be nice to have solved the last puzzle I need for this hack but also like.... bro I don't want to have to batch edit another 100+ files I thought I was almost done with this shit SJDHDKDHDJDH
I'm definitely going to have to learn how to automate extraction and reinsertion if this is the case because I'm NOT doing all that manually again. On the plus side if I have to figure that out anyway then I might as well run my scripts on the other language localization files and make the hack compatible with all of the other languages (right now it's just English)
3 notes · View notes
sibyl-of-space · 3 years ago
Text
GUESS WHO FINALLY MADE TANGIBLE PROGRESS ON MY GHOST TRICK ROMHACK AFTER LIKE LITERALLY A YEAR!!!!! HOLY FUCK!!!!
There are 3 scenes out of the entire game that I have been unable to figure out, and I have FINALLY figured out ONE of them. The solution is making me feel stupid but oh well I AM SO HAPPY TO HAVE FIGURED IT OUT.
More under cut because uhh massive ghost trick endgame spoilers
So the only 3 scenes where my “update sprite pointers from Yomiel/Ghost portraits to Cat portraits” script didn’t do anything were:
1. “Rewind Time” scene 2. Sissel entry in the People database 3. “Phone line down” scene
The first two are still driving me nuts, BUT #3 HAS BEEN SOLVED. I ran my same script - the exact script I made last year and that did 99% of the game for me in one swoop - on one of the main system files for the game (system_0000.en.msg.xml.bin), and here is the kicker. I had actually done this before, but it didn’t look like it updated any of those scenes, so I reverted it in case it had messed something up inadvertently.
I did not realize that desmume save states include data from this system file IN THE SAVE STATE. So even if I changed the file in the ROM, if I then loaded a save state made from a version of the ROM without those changes, the changes would not be reflected. I only realized this today, when I was testing something COMPLETELY ELSE entirely.
SO, once I realized that, I ran the script again, replaced the file, and started from a chapter select (chapter 7 was the most convenient) instead of a save state, AAAAAAND:
Tumblr media
MY BELOVED YOU HAVE NO FUCKING IDEA HOW HAPPY I AM TO SEE YOU. IT HAS BEEN SO FUCKING LONG SINCE ANYTHING I DID HAS HAD ANY IMPACT ON THESE 3 FINAL SCENES. BUT WE DID IT. WE FINALLY FUCKING DID IT
So, I still need to figure out what’s going on in the database and rewind time scenes. The rewind scene is biggest priority because it comes up a lot in gameplay. But.... progress. Finally. At last, progress
13 notes · View notes
sibyl-of-space · 3 years ago
Text
...I've had "publish document with your findings on the animations code in Ghost Trick" on my to-do list literally all summer, and I just went to go knock that out and. I opened my last version of the document. And it was literally done. Formatted and everything. Literally all I have had to do for about 2 months to finish this task was just upload it
WELL THE GOOD NEWS IS I did that finally lmao. Pending approval on romhacking dot net but I have a version on my website ROMHacking page in the meantime
7 notes · View notes
sibyl-of-space · 2 years ago
Text
making a demo for a point-and-click game with entirely original assets and scripting the mechanics from scratch was the easy part. the hard part will be taking what i learned about how games work to finish my ghost trick romhack, which has been 90% done for about 2 years now
4 notes · View notes
sibyl-of-space · 3 years ago
Text
I need to take a break for my wrists, so I may not finish this today, but I am actually kind of figuring out how the animations in Ghost Trick work. I didn't set out looking for this, but somehow this was an answer that was easier to find than the answer I'm still looking for about sprites hey hey no
(.....i'm using voice to text and my roommate's cat decided to start attacking my legs as I was dictating this. I'm keeping it)
4 notes · View notes
sibyl-of-space · 3 years ago
Text
I have finally actually tangibly dusted off my Ghost Trick ROMhacking project and honestly I don't know that I'm any less confused than I was six hours ago when I started. I did have one small victory (successfully implemented a VERY minor and silly text change which I think will complement the visual changes I'm working on really well) but unfortunately I still don't quite feel I'm getting anywhere with these last elusive issues. you wouldn't believe that this thing is actually like 95% done because that last 5% is driving me up the waaaaaaaaalllll
(naturally, in my journey to solve this final problem, I have kind of stumbled across another additional change I want to add on top. I guess we'll see what ends up being doable.)
Anyway it is way too late for me to properly document my findings tonight but I will do so after I have slept, or in the best case scenario, after I have figured some more stuff out tomorrow. in the meantime enjoy shenanigans
3 notes · View notes
sibyl-of-space · 4 years ago
Text
Ghost Trick ROMHack Project: UPDATES
Bad news: still have not solved the issue with 3 scenes not working properly.
Good news: I have determined why.
Details, including massive game spoilers, under the cut. Apologies for the radio silence for so long on this, school has been kicking my ass; but I finally got the time to look into the leads I got from some users on Romhacking.net.
Huge thanks to the user CrazyMLC for pointing me in a productive direction.
I think I have figured out why this is giving me such a headache, but I have not solved the underlying problem. The good news is, I'm 99% confident that all the find-replace-ing I did previously for all of the dialogue worked, and Sissel is uniquely a cat for pretty much the whole game, these particular scenes aside.
Here's what I've learned about system_0000.en.msg.xml.bin and database_0000.Expand.en.xml.bin:
1. There is a reason that all of my testing before this yielded absolutely no fruit. For some reason known only to God and Capcom, the compressed (.lz) versions of these files, as far as I can tell, do fuck-all. Those are the ones I had been replacing before, but I have since learned that they can be ignored completely, and the .bin versions are what matters.
So if, for example, I replace the system_0000.en.msg.xml.bin file with the system_0000.fr.msg.xml.bin file, then the game runs exactly the same except the "rewind time" scene's dialogue is suddenly in French. You get the picture. Same with replacing the database file with the "fr" one, and finding that suddenly all of the "people" log book entries are in French.
This is actually fantastic news because it means if (BIG IF) I can figure out how to swap the sprite pointers here, I can still implement "cat mode" as a specific language that can be toggled on/off!
2. The sprite that accompanies the "rewind time" entry and the people log books is coded completely differently from all of the "m##_####" pointers that I found earlier, which was why I was having a hell of a time finding them. In fact, it is NOT - as far as I can tell - a singular hard-coded pointer.
I'm not explaining this well, so I will illustrate with an example.
In st13_game021 (the endgame, final 4-minutes-to-death sequence from 10 years ago), if you fail and are prompted to rewind time - in normal gameplay, Sissel is a ghost in this "rewind time" scene. Because, well, you know, it's endgame and that reveal has happened already.
Now, I have been doing a kind of jank way of hopping around to endgame scenes on a new save file. I've edited the st01_root file so that the first legible line in it after all the jargon code reads "st13_game021", instead of "st01_game000", effectively telling it to jump straight to endgame on a new save file. This obviously screws some stuff up, but it's a quick and dirty way to test.
OF NOTE: when I did this, and then waited out the timer to fail during that endgame sequence, prompting the "go back in time" scene? Sissel still has Yomiel's sprite.
Tumblr media
(Ignore the weird text, That was me changing random values to confirm that it was pulling from the system_0000 en bin file as I hoped it was... and also, to determine with certainty whether it is pulling the SAME scene from different gameplay scenarios. Basically I was screwing around with the text to see if I could modify the sprite pointer [I couldn't] and whether it truly was the exact same scene being pulled in early game and endgame [it was].)
I *also* happened to open up the "people" book (which is in French because I didn't bother reverting that after experimenting with .bin vs .lz), and found that Sissel was still in Yomiel-form there too.
Tumblr media
TL;DR of the above point is that when jumping to st13_game021 - literally endgame - from a new game, both Sissel's entry in the people book and the "rewind time" scene have him in Yomiel-form. (This is also in a modified ROM where I have swapped all dialogue pointers to the cat already, but as we've established that appears to be a separate thing.)
But, if you open the people book after teleporting directly to, say, st14_game050.... the scene during which Sissel transforms from using Yomiel's image to the ghost in normal play....
[after a ton of dialogue...]
Tumblr media
Bam, Sissel's entry turns into a ghost. This, I am 99.9% sure, corresponds to the "new info added" event triggered by that scene.
This is all a very poorly-way of phrasing the following key take-away:
The rewind time and people book scenes display a different sprite for Yomiel based on certain progression flags. I have not yet figured out anything about what those are or how they work, all I know is that if you don't have the flag specifically telling the game "transform Sissel into the ghost now," then it will use his human form.
My hypothesis is that the st##_game## XML files tell the game when to update the "is Sissel a ghost yet" variable, and then the book and rewind scenes display the appropriate sprite based on its current. I still have absolutely not even the faintest idea how that's implemented in the code, or how to tell it to pull a different sprite (if that's even possible as-is...). It may be a higher-level modification than the individual dialogue indicators I was doing before, but I don't know that for certain.
Anyway, I spent basically my whole day today getting this far, and while I unfortunately don't have anything actionable to show for it, I'm happy to have at least figured out why this has been such a headache. I think the next step will be trying to figure out either:
a) How that "turn Sissel into the ghost now" flag is set, or
b) where in the hell is the data that tells it what sprite to display based on that flag.
I don't know when I'll have more time to dig into this, but I'm at least glad that I have a better understanding of why these were giving me such a hard time. And I'm super thankful for the external help that's guided me to where I can ultimately find some answers.
5 notes · View notes
sibyl-of-space · 4 years ago
Text
UMMMM HOLY SHIT WHAT??
EXTREMELY HUGELY BIG GHOST TRICK SPOILERS B/C I CANNOT TALK ABOUT WHAT I HAVE JUST DISCOVERED WRT ROMHACKING WITHOUT TALKING ABOUT IT
So.... I think? Sissel and Yomiel? Are given DIFFERENT CODES that point to their sprites???? Let me explain what I mean. There is only 1 “master” Yomiel-sprite for each expression in cpac_3d.bin, and changing this changes every instance of that sprite in the game. This was what I first tried that turned Yomiel into a cat with no way to turn him back.
I have been going through every single scene instead, and the sprite pointers are hard coded by language per line of dialogue, so I have been mass find+replace-ing the codes that correspond to Sissel’s sprites on the left side. Doing it this way has so far replaced all of the dialogue as expected, and - I assumed - it missed Yomiel in one of the scenes because he conveniently is located on the right side of the conversation.
BUT. I JUST TESTED WITH ANOTHER SCENE WITH YOMIEL. AND HE IS ON THE LEFT. AND //IT DID NOT REPLACE HIM.//
These were both screenshots from the SAME scene where I had find+replaced ALL codes that point to Human-Sissel. Yomiel is intact... Sissel is a cat:
Tumblr media Tumblr media
I THINK THIS MEANS THAT EVEN IF THEY SHARE THE SAME SPRITES, THE PALETTES, DEFINED GOD KNOWS WHERE, FOR YOMIEL AND SISSEL ARE SEPARATE. DIFFERENT NUMBERS PULL THE SAME SPRITES DEPENDING ON WHO IS TALKING. THIS IS HUGE.
However, for now, I have absolutely no fucking idea where in the FUCK those palettes are defined. I am going to try to finish doing it this way just to get a janky version done, but if I can find those palettes, that will be the holy grail. It means I can a) re-point Sissel in one place rather than 47302483298430284398 places, b) easily do it for other languages, and c) if I can figure out how to export, edit, and import new sprites [enormous “if”; the file types are not recognized by anything I have used so far, will probably take reverse-engineering] I might be able to eventually work toward the ultimate goal of a full palette of Cat Sissel Expressions.
That’s way out of my depth currently. For right now, I am focused on just making a very basic Playable Full Cat Mode. But this has implications for more down the road. I may not be done with this for a while yet.
14 notes · View notes
sibyl-of-space · 4 years ago
Text
I FOUND WHAT I WAS LOOKING FOR IN THE GHOST TRICK ROM. For some reason known only to Capcom and the gods above, the sprite data for every single line of dialogue is hard coded next to the line of dialogue IN EACH SPECIFIC LOCALIZATION. By which I mean the pointer that tells the game “okay, the person whose image appears next to this dialogue is Lynne” is pulled from the file for the SPECIFIC LANGUAGE YOU HAVE CHOSEN. If I want to do a sprite swap for a specific line of dialogue, I need to do it in each language if I want it to show up for each language.
This means that for now I’m just going to be focusing on doing this in English. I am but one person and am also lazy. BUT, I’ll continue posting all of my findings such that if anyone wants to replicate it for other languages they should be able to. And perhaps down the line I will even do so myself if I become less lazy.
More details under cut.
So effectively every scene in the game has an associated .xml file, and then specific sub-files for each language.
Example: st14/st14_game050_Expand.xml
This is the “main” file with details on how the scene “050″ at stage “14″ plays out. However, depending on what language you have chosen, it will pull from one of the following sub-files:
st14/st14_game050_Expand.en.xml st14/st14_game050_Expand.fr.xml st14/st14_game050_Expand.gr.xml st14/st14_game050_Expand.it.xml st14/st14_game050_Expand.sp.xml
(NOTE: all .xml files in this game are compressed and will appear in the ROM as .xml.lz - in order to properly read them, you have to export them from the ROM using CrystalTile2, then decompress them using BatchLZ77. The decompressed versions can be opened and edited in CrystalTile2, and after making changes, must be re-compressed using BatchLZ77 and re-inserted into the ROM. This is annoying, I know, but it must be done.)
These language.xml files are what define the “m##_####” variables that the main .xml files refer to for lines of dialogue. What I didn’t realize until now was that this includes the sprite data.
The pointers that indicate what full-size talk sprites will be associated with a line of dialogue appear in the format:
FF ## 00 0D FF
Replacing “##” with the two-digit hex number corresponding to the sprite you want will cause that sprite to appear for that line of dialogue. This is non-exhaustive, but I have at least documented the numbers that pertain to my interests for this project, by which I mean the protagonist’s talk sprites specifically:
[26 - no sprite] 27 - default smirk (left) 28 - default smirk (right) 29 - default neutral/frown (left) 2a - default neutral/frown (right) 2b - thinking hand on chin (left) 2c - thinking hand on chin (right) 2d - sweating (left) 2e - sweating (right) 2f - angular “shocked” gag face (left) 30 - angular “shocked” gag face (right) 31 - ghost with sunglasses (left) 32 - ghost with sunglasses (right) [33 - no sprite] 34 - shrugging with palm up (left) 35 - shrugging with palm up (right) 36 - mouth agape, slight shock (left) 37 - mouth agape, slight shock (right) 38 - thin line mouth, looking down, melancholy (left) 39 - thin line mouth, looking down, melancholy (right) 3a - angry emotional yelling (left) 3b - angry emotional yelling (right) 3c - CAT! (left) 3d - CAT!!! (right)
These codes point to the codes in the “master” spritesheet in cpac_3d.bin that I mentioned in my previous posts (where my previous janky solution was just pointing all of the Yomiel sprites to the cat, which turned Yomiel into a cat too). Unfortunately, that solution is just not possible as it prevents me from being able to add Yomiel back in.
So, where does that leave us? We have to swap every single instance of Sissel in the en.xml files. Manually.
My current plan of attack is as follows:
1. Isolate all of the stages where Yomiel is out of the picture (everything up through end of chapter 14). For these, I intend to figure out a way to script searching for the pattern “FF [insert protag sprite number here] 00 0D FF” and having it replace it with “FF [3c or 3d depending on if left or right] 00 0D FF”, and that should solve those stages.
2. Isolate the stages where Sissel is the ghost with sunglasses. For these, there is no need to change any of the Yomiel sprites, and it will suffice to simply point 31 to 3c and 32 to 3d.
3. For the remaining stages that feature both Yomiel and Sissel with the same sprite sheet, it will be necessary to just manually go through these and point Sissel’s only to 3c/3d as necessary.
This should take care of all of the full-size talk sprites. I will need to do something similar with the mini talk sprites, but I haven’t yet isolated the codes corresponding to those. Once I have figured out how to do this for the full-size sprites my hope is that this step should be straightforward.
There is one silver lining to this: the fact that apparently sprites are hard coded by language, means it may be possible to implement “Cat Mode” on the language select screen! Meaning you can play in “English” or “English (Cat)”. I had hoped to somehow implement this as an optional feature, so maybe language select is the way to do that. Unintentional bright side? Yippee!
EDIT: So I determined the values for the mini talk sprites as well, they seem to be--
01 - protagonist
08 - cat
(i forget what ghost was am off my computer now so will have to check later, i believe it was somewhere around 0d-0f)
So that's another value figured out! A bit of bad news, I tried doing a find and replace all of the FF##000DFF's listed above for st01 game000, and it appeared to miss most of the protagonist's talk sprites... (it did catch a few though) so, I think that full range of code is not needed to indicate a sprite. I will need to do more testing to narrow down exactly which surrounding values are necessary to find and replace things automatically and easily.
One final thought before sleep, is that because the sprites are differentiated by right/left, I am hoping that even in the scenes where Yomiel and Sissel are both present, it may be possible to automate the swaps if one is always facing one way or something. Like "only swap the lefts." Worth considering when approaching those scenes.
At any rate, this is getting into the nitty gritty now. This might actually become a reality but will be an undertaking for sure
9 notes · View notes
sibyl-of-space · 4 years ago
Text
MORE DEETS WHEN ITS NOT 3AM BUT. I MANAGED TO AUTOMATE THE REST AND THE GHOST TRICK ROM IS 99% DONE. PLAYTESTING TOMORROW TO CONFIRM (...and then i need to figure out why 2 specific instances aren’t working). BUT SOON!!!!! AND MORE IMPORTANTLY I HAVE AN AUTOMATION TOOL NOW TO MAKE FUTURE MASS EDITS WAYYYY EASIER!!! WOOHOO
3 notes · View notes
sibyl-of-space · 4 years ago
Video
tumblr
i dont have any meaningful romhacking updates because i am still working on replacing all the sprite pointers for a playable version 1, and there are over 140 scene .xml files to go through so it’s just taking a while. in the meantime please enjoy this video of the phone flying around in the background because weird things happen when you pull up random scenes from the “new game” file instead of normal progression
4 notes · View notes