Page 2 of 4

Re: Shenmue Forklift Mod

PostPosted: Fri May 23, 2014 4:14 pm
by IlDucci
shengoro86 wrote:Does this game use different maps for when ur just walking around the harbour and when ur driving the forklift?

Wouldnt surprise me if they were two totallly different maps.


Just two? There's a ton of copies of the harbor and the main areas, depending on specific events (For Harbor: 70 Man Free Battle, Ryo entering with his bike, the Forklift Race...)

There's a ton of situations that MFSY covers, though.

Re: Shenmue Forklift Mod

PostPosted: Sun May 25, 2014 9:18 pm
by shengoro86
IlDucci wrote:
shengoro86 wrote:Does this game use different maps for when ur just walking around the harbour and when ur driving the forklift?

Wouldnt surprise me if they were two totallly different maps.


Just two? There's a ton of copies of the harbor and the main areas, depending on specific events (For Harbor: 70 Man Free Battle, Ryo entering with his bike, the Forklift Race...)

There's a ton of situations that MFSY covers, though.



Yup thats correct! I'm only just discovering this now. Been forever since I messed with these map files.

I don't recall a master list existing of which scene subfolders coorespond with which specfic events.

I'll just have to go through each mapinfo file and hex edit the pre-ecam code.

The only list I know of is the one released with the Shendream Beta, but I don't think it is this level of specific.

Re: Shenmue Forklift Mod

PostPosted: Mon May 26, 2014 12:27 am
by Locke_cole
How about a stand alone shenmue forklift racing game with online multiplayer........That would be the tits

Re: Shenmue Forklift Mod

PostPosted: Mon May 26, 2014 5:40 am
by IlDucci
shengoro86 wrote:I don't recall a master list existing of which scene subfolders coorespond with which specfic events.


The closest thing to be would be the Shenmue Beta's list.

Re: Shenmue Forklift Mod

PostPosted: Mon May 26, 2014 11:38 pm
by shengoro86
Locke_cole wrote: How about a stand alone shenmue forklift racing game with online multiplayer........That would be the tits

Hell yeah



IlDucci wrote:
shengoro86 wrote:I don't recall a master list existing of which scene subfolders coorespond with which specfic events.


The closest thing to be would be the Shenmue Beta's list.


Thats true, but as I said, its not specific enough.

Maybe I could compile a new list when this is done to be more specific.

Re: Shenmue Forklift Mod

PostPosted: Tue May 27, 2014 9:23 pm
by shengoro86
Ok here is my mockup solution:
NOTE: This is not the final solution as I still have one last major bug to figure out.


Here is what we do:
Dump the contents of both Shenmue Retail NTSC and the Shendream Shenmue Beta Release to get access to the game data files.

Do this on both games:

Open up HxD or any other hex editor and look at the Hex code for mapinfo.bin for Dobuita

SCENE03/D000/mapinfo.bin

Do a search for the String ECAM.

Then copy ALL of the hex code (thousands of lines possibly) all the way up to where ECAM starts, DO NOT COPY ECAM ITSELF, STOP BEFORE IT.

Now open up the mapinfo for the harbour maps.

Example we will use is MSFY, which is the free roam harbour map.

SCENE03/MSFY/mapinfo.bin

Search that map info for ECAM and replace all of the code before it with the code that you copied from the other mapinfo.

Once that copy is complete, now copy every other file from D000's folder into MSFY, without replacing the mapinfo file.

Now that that is done, test the map, you should see that the map is now switched to Dobuita.

If all checks out: use bootmake to compile the cdi, using a shenmue ip.bin customized with binhack32. Burn/Emulate to test.

FROM HERE:
Play another vanilla copy of shenmue up until you get to drive the forklift.
Using the beta shenmue, plug a controller into slot 2 and use the sub debug menu to make a legit save file for either when you are driving the forklift or right before you do so while on Lunch break.

Now load this file into the hacked shenmue game and test. You should have a forklift in a different area.



PROBLEMS:
When in dobuita, you are bound to the clipping of the harbour. During my testing, i see that the map loads u into out of bounds coordinates. I am looking into how to pivot the maps to see if I can sit dobuita right on top of where you load. Right now, you can only drive the forklift down 1/8th of the back road in dobuita over by Ono-san's Motorcycle Shop.


I will have more updates and photos possibly during the weekend.

But if you want to also try, test these methods.

Thanks,

James

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Thu May 29, 2014 1:07 pm
by shengoro86
So far no luck with swapping the map for the Racing scenario and the forklift job scenario.

The only one that works is the free roam map MFSY.

Swapping the following SCENE03 maps did not do the trick:
MFBT
MK80
MKSG
MKYU

I assume that some of these are just different scenarios posibly pretaining to the harbour and warehouse districts.

Is it possible that modifying MFSY with just swapping the mapinfo hex representation before ECAM doesnt do the trick?

I also tried taking the dobuita pkf/pks and renaming it to RACE.pkf RACE.pks and overwriting those files in MFSY to see if that does it and no go.

I guess I'll blow through every map folder now to see if I can snag that scenario.

Does anyone know if MFSY calls different local map files within its own folder? Or is it ONLY that one free roam map?

Thanks!

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Tue Jun 17, 2014 11:02 pm
by shengoro86
BUMP.

Im still working on this project.

Unfortunately, im still having trouble finding the mapinfo file related to the race and driving segments for the forklift.

Anyone out there know the literal struture of the mapinfo files. Is it literally a 1 to 1 mapinfo per map. Or could the map info file related to more than one event which is why the standard ECAM copy/paste method wont work?

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Wed Jun 18, 2014 4:20 am
by Master Kyodai
If you wanna see the references mapinfo.bin uses then just search for the keyword "/scene/" in the file. There you should come up with something like "/scene/03/D000/" if it uses data from Dobuita map for example.

The mapinfo is not really cleartext as you noticed so it is much speculation to talk about the structure of the file. From my understanding the top part defines the placement of models in the scene (But I am guessing here) and around the bottom there is "scene initialization" data, like "Which music track is played?", which seqdata files are laoded (Scripting for scene events!!!), where is ryo placed when he enters the scene, and so on.

On the first look the PKS/PKF files look a bit uninteresting since they are merely a better "zip file", most just contain models for the scene. However, some also contain the important sequence (Scene scripting) files which control most scripted behaviour, these will definitely also be worth looking into.

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Thu Jun 19, 2014 12:33 am
by shengoro86
Thanks Kyodai!

I heard somewhere that the mapinfo binary can be decompiled using assembly. I am also looking into that as well.

Ill take a stab at the pks/pkf files to see what I can come up with.

I have another band aid method im working on as well.

The only thing I think Ill have a problem with at this point is changing the clipping in the map.


In my testing, I noticed that when doing a basic ECAM swap, the clipping remains the same so you get a hybrid map of a town that looks like dobuita with dobuita npcs BUT you get placed in the same coordinates on the world plane as u would with the harbour. Entry 00 puts you behind a building in the backend of the back road in dobuita, close to heartbeats bar.

im still looking into all of this.

I might have to make this mod only for the beta version so that u can force the dobuita entry points.

Thanks!

/james

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Mon Jul 14, 2014 2:13 pm
by shengoro86
Update:

Clipping issue has been resolved by Giorgio, thanks dude!

I think I can now finish this mod.

All that is left is to change the reference points remaining in sceneXX/MFSY/mapinfo to point to D000 with hacked map files and that should be all that is needed to drive the forklift in dobuita.

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Thu Jul 17, 2014 11:36 am
by shengoro86
Milestone has been hit.

Swapped MA00 with D000 and made the correct adjustments in mapinfo to get everything awesome.

Combined my retail release with Giorgio's Clipping mod to eliminate the clipping issues in D000.

Expect a release and video soon.

I wont be compiling a CDI, just releasing the map folder and the save file.

I may also update DreamExplorer with the save file to make it easier for those who use real hardware.

/james

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Thu Jul 17, 2014 9:51 pm
by shengoro86
Looks like my method isnt perfect.

So the mapinfo file has reference points out the ass for the forklift in random places.

Doing a full ecam swap breaks the forklift and just gives u this with the working man bgm

Image


Looking into this.

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Wed Jul 23, 2014 1:37 pm
by Fenix
You destroyed Dobuita! :lol:

I'm pretty sure you're close to find a way to make it.

Re: Shenmue Forklift Mod - Solution Inside

PostPosted: Wed Jul 23, 2014 3:35 pm
by MiTT3NZ
What it looks to me is that, whilst the MT5 files have been affected, the actual area models haven't, and I'm not particularly sure what they come under. Static meshes, yes, but I've never once found a reference for them, so if you do figure it out, it could go a long way to helping out the model extraction side of things.