Remove clipping in Shenmue II

(Modding and other series related projects)

Remove clipping in Shenmue II

Postby BlueMue » Mon Oct 26, 2015 11:50 am

I finally found the key to get rid of the clipping in Shenmue II!

phpBB [video]


Doing this in Shenmue II is something I've been wanting for a long time now, ever since Giorgio discovered how to remove it from the first game. I tried to find a way in Shenmue II many times but couldn't figure out how to do it as the map files are different. Now I finally found out what to look for and I did so more or less by accident.
I want to thank Giorgio for his work and the inspiration it gave me to hunt down the magic key in Shenmue II.
Also for checking this out and leading to an improvement that keeps the doors intact.

It works pretty much the same as the method for Shenmue I, except that you have to look for FLDD instead of COLS. So open the mapinfo.bin of the area you want to visit without clipping in your favorite hex editor.
Search for FLDD and start marking the code from there.

Image

You wanna go down all the way until you reach DOOR. If you want to modify a map that doesn't have doors you'll have to look for REGD. It's a huge portion of the code, about 80-90%, so you'll have to go almost to the end of it.
Once it's removed just save and build your image with the modified map file.

Image

I have compiled a list of what areas the map folders are linked to. This list is not 100% complete yet, but it covers all the major areas. I left out areas that are just for cutscenes or QTEs.

Aberdeen
AB00 = Beverly Hills Wharf
AK00 = Fortune's Pier
AK09 = Fortune's Pier Copy
AKS0 = Forturne's Eatery
AKS1 = Blue Sky
AKTx = Gambling Warehouses (x=0-3)
AKY0 = Warehouse F
AR01 = Worker's Pier Arrival Area
AR02 = Worker's Pier
AR03 = Queen's Street
AR09 = Queen's Street Copy
ARA0 = Bar Swing
ARC0 = Pigeon Cafe
ARM0 = Hong Kong Souveniers
ARSF = Rooftop Fight
ARZ0 = General Store

Wan Chai
WB00 = Scarlet Hills
WB01 = Man Mo Temple
WBBK = Airing out books
WE00 = Golden Qr.
WECF = Moon Cafe
WEG0 = Pine Game Arcade
WEM1 = S.I.C. Pool Hall
WES1 = Slot House W
WET0 = Tomato Convenience Store
WK00 = South Carmain Qr.
WK09 = South Carmain Qr. Copy
WKA0 = Yan Tin Apartments
WN00 = Lucky Charm Qr.
WR00 = White Dynasty Qr.
WRS2 = Bar Liverpool
WS00 = Green Market Qr.
WS09 = Green Market Qr. Copy
WSG1 = Green Market Qr. (Guang Martial Arts School)
WSY0 = Come Over Guest House
WT00 = Wise Mens Qr.
WTA0 = Da Yuan Appartments

Kowloon
Q100 = Thousand White Qr.
Q109 = Thousand White Qr. Copy
Q200 = Stand Qr.
Q300 = Dimsum Qr.
QA00 = Three Birds, Tea Break, Dimsum & Dancing Dragon Bldg.
QA11 = Three Birds Roof
QA22 = Slot House K
QAE1 = Three Birds & Tea Break Bldg. 1F
QAE6 = Three Birds & Tea Break Bldg. 6F
QAW1 = Dancing Dragon & Dimsum Bldg. 1F
QAW6 = Dancing Dragon & Dimsum Bldg. 6F
QB00 = Great View Bldg.
QBAA = Great View Herbs
QC00 = Thousand White Bldg.
QC01 = Thousand White Bldg. 1F
QC06 = Thousand White Bldg. 6F
QCAE = Thousand White Warehouse
QD00 = Ghost Hall & God of Wealth Bldg.
QD01 = Ghost Hall & God of Wealth Bldg. 1F
QDKJ = Five Stars Corp. (Yuanda Zhu's Room)
QE00 = Moon Child, Golden Flower & Black Heaven Bldg.
QE01 = Moon Child, Golden Flower & Black Heaven Bldg. 1F
QE06 = Moon Child, Golden Flower & Black Heaven Bldg. 6F
QEDJ = Yuan's Room
QEEC = Kai's Room
QEHI = Moon Child Orphanage
QF00 = Yellow Head Bldg.
QF01 = Yellow Head Bldg. 1-2F
QF02 = Yellow Head Bldg. 3-4F
QF06 = Yellow Head Bldg.
QF39 = Big Ox Bldg. 40F
QF40 = Dou Niu's Room
QFHG = Hang On Room
QFRR = Yellow Head Rooftop
QGBT = Blue Dragon Garden
QJBT = Phoenix Bldg.
QKBT = Big Ox Bldg. B5F ?
QLBT = Black Heaven Bdlg.
QR00 = Dragon Street
QR09 = Dragon Street Copy
QRC0 = Huang's Room
QRR0 = Ren's Hideout
QSFA = Former Barracks
QSFB = Small Dragon Garden
QSFC = Star Gazing Point
QSFD = Construction Base
QT09 = Thunder House
QTB1 = Former Factory Site
QTB2 = Old Government Office Site
QTB3 = Thunder House Copy
QTB4 = Fighting Place
QUG0 = Underground

Guilin
KES1 = Stone Pit
KMZ1 = Forest
KMZ2 = Forest 2
KMZ3 = Forest 3
KMZ4 = Forest 4
KRF1 = Kowloon Intro
KRH1 = Langhuishan
KSH1 = Shenhua's House
KWM1 = Green Field
KWW1 = Path Through a Wood
KWW4 = Cloud Bird Trail

Like in Shenmue I there are some downsides. The clipping of the floor is removed too, so Ryo will stay at the same height as when the area is loaded, ignoring stairs or slopes. Most of the NPCs will be gone, with some exceptions. Objects like signs and the vending and toy capsule machines still work. Doors and elevators work but warping points mostly don't, so you won't be able to easily travel to the next area. A major downside to Shenmue I is that there is no beta where you could just load any area you want. On the plus side however you can save anywhere and just switch between the regular game for traveling and the modded one for exploration. Pretty cumbersome but better than nothing.

Removing the clipping from the more minor shops works differently. You'll need to look through the map folder where the shops are located and pick out the corresponding PKS file. Now open it with the IPAC Browser and extract the COLIFELD file. Open it with your hex editor, remove all the code except for the FLDD line in the beginning, save it and inject the modified file back into the PKS.

Image

I have only tested this with the duck racing map yet but it works. That is by the way where and how I found out about all this. I was just messing with the duck models and noticed this suspiciously named file. I tried removing the code from it and instantly I could race around with no clipping. Then I started looking into hacking the actual game maps again and soon enough I found FLDD in the map files and the magic happened!

User avatar
BlueMue
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2008
Location: Germany
Favorite title: Shenmue II

Re: Remove clipping from maps in Shenmue II

Postby shengoro86 » Mon Oct 26, 2015 12:03 pm

Nice! LOL You literally beat me to it. I found the mapinfo variable last night lol. I've begun working on a Shenmue 2 Explore mod, however it is tough without a proper debug menu. So save file manipulation will be done.

Thank you Bluemue for your work!
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Remove clipping from maps in Shenmue II

Postby Giorgio » Mon Oct 26, 2015 1:05 pm

Way to go, BlueMue! It's an honour that the area collision removal method for Shenmue 1, it was a/an motivation/inspiration to hunt down the one for Shenmue II.

The following might be wrong, but there is a hunch that you don't need to remove all the data from FLDD's offset until the offset of REGD.

Notice that after FLDD there are 4 bytes: BC 20 01 00. They are in the Little Endian format, therefore in the Big Endian one, the value is: 00 01 20 BC. That is the length of the FLDD section, starting from FLDD's offset.

Therefore, it is suspected and suggested that you need to remove a block of bytes of such length. Logically, this will fix the issues with NPCs removed.

Instructions: Place the cursor just before the "F" of FLDD. Press Ctrl+G; as offset put: 120BC (this is for the example of the first two images above, and it is not always the same, but depends on the 4 bytes following FLDD); for "Offset relative to", select "current offset"; press the Del button. Then, build a new image, in order to test it out.

Giorgio has received a thanks from: BlueMue
User avatar
Giorgio
"After Burner...Great!"
"After Burner...Great!"
 
Joined: February 2009
Favorite title: Shenmue
Currently playing: Yakuza series

Re: Remove clipping from maps in Shenmue II

Postby BlueMue » Mon Oct 26, 2015 1:17 pm

You two are much better with hexediting and all that stuff the I am. So if you have any ideas on how to improve on this, feel free to try around and put the info here.
User avatar
BlueMue
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2008
Location: Germany
Favorite title: Shenmue II

Re: Remove clipping from maps in Shenmue II

Postby Miles Prower » Mon Oct 26, 2015 1:25 pm

Great to see you finally get into Room 205 :P
This is awesome! Looking forward to seeing other areas and a potential exploration mod like S1's in the future :)
User avatar
Miles Prower
"Keep Friends"
"Keep Friends"
 
Joined: May 2003
Location: UK
XBL: sppeac1987
Favorite title: Shenmue II

Re: Remove clipping from maps in Shenmue II

Postby shengoro86 » Mon Oct 26, 2015 1:33 pm

Miles Prower wrote: Great to see you finally get into Room 205 :P
This is awesome! Looking forward to seeing other areas and a potential exploration mod like S1's in the future :)

Already working on it :) It'll be a bit different though.

BlueMue wrote:You two are much better with hexediting and all that stuff the I am. So if you have any ideas on how to improve on this, feel free to try around and put the info here.


Awh shucks. thank you :) Giorgio is much better than I am though.
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Remove clipping from maps in Shenmue II

Postby BlueMue » Tue Oct 27, 2015 5:03 pm

Giorgio wrote: Instructions: Place the cursor just before the "F" of FLDD. Press Ctrl+G; as offset put: 120BC (this is for the example of the first two images above, and it is not always the same, but depends on the 4 bytes following FLDD); for "Offset relative to", select "current offset"; press the Del button. Then, build a new image, in order to test it out.

I actually didn't notice this part when I first read your post. Did you add that later? Anyway, I tried this and I got some interesting results. Sadly it didn't bring the NPCs back but some other worthwile and intersting things.

First of all, I found an easier way to get to that block. I checked a handful of mapfiles with that offset guide and it always jumps to an easy to recognize point: right infront of DOOR. Now everyone can already guess what this will do when it stays in the file. The doors will be functional, but in a funny way!

Ryo will maintain the height he had before he used the door. This can lead him to hover a good bit above the ground or walk around like he crapped his pants. Ryo's body will maintain the lower height but the feet will be on the correct ground level, leading to a very funny walk. :lol:

Image

EDIT: For maps that don't have any doors, like areas of Guilin, it will jump straight to REGD.

I will update the first post with this updated method of keeping more of the code intact.
Hopefully more can be achieved by further research.

BlueMue has received 2 thanks from: Giorgio, Miles Prower
User avatar
BlueMue
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2008
Location: Germany
Favorite title: Shenmue II

Re: Remove clipping in Shenmue II

Postby shengoro86 » Wed Oct 28, 2015 12:49 pm

I began the explore mod. Just finished Shenhuas house and pivoted ryo to the base floor for height which is optimal.
Video is rendering right now.
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Remove clipping in Shenmue II

Postby BlueMue » Thu Oct 29, 2015 2:09 pm

phpBB [video]


Freely walking around in the beautiful nature of Guilin, this time with working doors and a hacked submap (store).
I also did some swapping so I can freely walk around the Cloud Bird Trail, wich is normaly on rails with Shenhua only.

I was a pain to get to the actual path as Ryo was put miles away from it in the void. Traveled there with increased emulation speed on nullDC with clipping turned off and saved. Then transfered the save to one of my VMUs and fired up a different image on the Dreamcast with clipping intact on the swapped map. It causes some nasty glitches on the video output, probably because the DC is running out of memory when having a freely controllable camera in this area. But since it was so much trouble to get there I decided to show it out no matter what.

BlueMue has received 3 thanks from: Miles Prower, shengoro86, Snoopbob2006
User avatar
BlueMue
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2008
Location: Germany
Favorite title: Shenmue II

Re: Remove clipping in Shenmue II

Postby shengoro86 » Thu Oct 29, 2015 2:11 pm

Here is mine as well :)

phpBB [video]

shengoro86 has received a thanks from: BlueMue
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Remove clipping in Shenmue II

Postby BlueMue » Sun Nov 01, 2015 1:50 pm

One more video here, with the Lucky Charm Qr. and Queen's Street.
And I swapped maps around once more to make another area of Guilin freely explorable: The outside of the Crag.

phpBB [video]


Bonus image:
This is what happens if you fight Dou Niu without clipping. When Ryo get's up after being thrown to the ground he will go up in height a good bit every time, until they fight DBZ style.

Image
User avatar
BlueMue
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2008
Location: Germany
Favorite title: Shenmue II

Re: Remove clipping in Shenmue II

Postby Miles Prower » Tue Nov 03, 2015 6:53 am

Cool stuff Bluemue, looking forward to seeing more :)
User avatar
Miles Prower
"Keep Friends"
"Keep Friends"
 
Joined: May 2003
Location: UK
XBL: sppeac1987
Favorite title: Shenmue II

Re: Remove clipping in Shenmue II

Postby shengoro86 » Tue Nov 03, 2015 3:53 pm

Great footage Bluemue!

I'm gonna pm you as im working on some maps too. Don't want to duplicate your work.
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Remove clipping in Shenmue II

Postby shengoro86 » Tue Nov 03, 2015 4:05 pm

Here is the cave!
phpBB [video]

Shenhua's House:
phpBB [video]


Blue: I'm looking around to see which hex variants (endian w/e) may control verticle clipping. Maybe we can retain steps and slopes. Would make this a hell of a lot easier. However, using nulldc cheater (thanks to upper_dave), we can control the x/y/z radius of Ryo.
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Remove clipping in Shenmue II

Postby shengoro86 » Wed Nov 04, 2015 12:54 am

Dragon Street:
phpBB [video]

shengoro86 has received a thanks from: Switch
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Next

Return to Community Projects

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000-
ShenmueDojo.net