Essentials Series/Porting a GameCube level to Xbox: Difference between revisions

no edit summary
Battlepedia>Skyweiss
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1:
{{EssentialsSeriesBox}}
== Introduction ==
This tutorialpage is part of the Essential Series modding tutorials. It will go through the process of porting a pre-existing GameCube level (ideally one you have created yourself) to be able to be played on the Xbox version of the game. The tutorial assumes you have extracted copies of the game for both of these platforms, the [https://github.com/Cxbx-Reloaded/Cxbx-Reloaded CXBX-Reloaded emulator], and Preview 52 or later of [[Industrial Park (level editor)|Industrial Park]].
 
This tutorial will go through the process of porting a pre-existing GameCube level (ideally one you have created yourself) to be able to be played on the Xbox version of the game. The tutorial assumes you have extracted copies of the game for both of these platforms, the [https://github.com/Cxbx-Reloaded/Cxbx-Reloaded CXBX-Reloaded emulator], and Preview 52 or later of [[Industrial Park (level editor)|Industrial Park]].
 
You will need to download the blank HIP and HOP files for Xbox [https://drive.google.com/file/d/111L7uR-7bnYkxjkzJq1lgVAKhuWuqlDv/view?usp=sharing here]. <!-- Replace this with github whenever igor lets me push -->
 
As a final note, this tutorial is geared towards those making levels for Battle for Bikini Bottom, but in theory the process should be very similar for other games.
 
== Steps ==
 
=== Getting started ===
 
# Use [http://www.magiciso.com/ MagicISO] to extract the files from the Xbox version of the game.
# Make a copy of the extracted Xbox files. This will be where your modded files are stored, as you will need to retain the clean copy for later.
# Make a copy of your level's HIP and HOP files. This copy will be converted to Xbox. Open an instance of Industrial Park with them in it.
# Copy and paste <tt>blank.HIP</tt> and <tt>blank.HOP</tt> to a level folder in your modded files. For example, my custom level has the name <tt>jf01</tt>, so I will copy <tt>blank.HIP</tt> and <tt>blank.HOP</tt> to the JF folder, and rename them to <tt>jf01.HIP</tt> and <tt>jf01.HOP</tt>.
# In each Archive Editor, click on '''Convert Archive''', under Edit (I recommend starting with the HIP). Change the platform from GameCube to Xbox.
# Industrial Park will convert the archive and assets from the GameCube format to Xbox. Note that not all asset types can be converted. In [[Industrial_Park_(level_editor)#Asset_Types|this table]], by looking at the "Cross-Version Copy" column, the ones which can be converted are marked as "Yes".
# If any of the assets could not be converted, Industrial Park will prompt you with choosing a folder to perform an '''asset search''', in which all HIP/HOPs in the folder you choose and all subfolders will be examined, and the matching assets which could not be converted before will be replaced with these. This is likely to happen in the HOP.
# At this point, I recommend choosing the root of the Xbox game. This way, all of the game's files will be searched. Another option is to choose the Xbox folder in the IndustrialPark-EditorFiles, but only do this if you are sure that the Xbox EditorFiles (which are less than the GameCube's at the moment) contains all the same archives you imported to your custom level.
# At the end of the process, if there are still assets which were not found and left unconverted, the list will be shown to you. Make sure you save this list for the further steps.
# Now, you should review your archives to make sure everything will work as expected.
 
=== Copying assetsModels ===
Models which were custom-made using Industrial Park's importer or one of the DFF plugins (for 3ds Max or Blender) are platform independent, so they can be left unchanged as their format will work in either GameCube or Xbox. This is not the case for many of the game's original models, however. If the asset search could not find all models you used, you have to replace them yourself by deleting them from the archive and copying over a Xbox version of that model.
 
=== Textures ===
# Open two instances of Industrial Park. In one of them, open the Xbox HIP and HOP files you just copied over. In the other, open the GameCube HIP and HOP files of the level you want to port.<br />''(Note: It is important to keep these isolated within two separate instances of Industrial Park, as having a GameCube and an Xbox level loaded at the same time in a single instance will have unwanted effects, due to the ways these formats are stored as well as parsed by the editor.)''
The Convert Archive function does not convert textures, and this is necessary as all of them are platform-specific. To do this, we are going to use [https://www.gtagarage.com/mods/show.php?id=27862 Magic.TXD].
# Hide the HOP windows for both. We will begin by copying over certain assets from the GameCube HIP over to the Xbox HIP.
# Go to the DEFAULT layer in both HIP windows, and under Assets->Type, change the dropdown to the first in the list.
# Find which assets can be copied and pasted [[Industrial_Park_(level_editor)#Asset_Types|here]] by looking at the "Cross-Version Copy" column of the table. I recommend sorting the column so that asset types listed as "No" will appear first.
# Copy and paste every asset from the GameCube HIP file that is not marked as "No" over to the Xbox HIP file. I do this by changing the asset type dropdown, looking to see if it is marked as "Yes" or "No," and if it is marked as "Yes," I copy every asset listed and paste them into the Xbox HIP file.<br />''(Note: I've found that Industrial Park will usually disallow you from pasting an asset if it is not a supported copy-and-paste type, but I would still use the wiki page as a reference as it contains the most recent and accurate information.)''
# Do the same for the HOP files. This will be a much shorter process, as many of the assets in HOP files cannot be easily copied and pasted as of writing this tutorial.
#* For ease, you can usually find copy-able assets in the MODEL and DEFAULT layers of the HOP file. Note that ''most'' models obtained from the GameCube version of the original game cannot be copied over, but models that have been imported using Industrial Park's model import (from a format such as OBJ, DAE, etc.) can be safely copied over, so it is up to you to recognize which models are safe to copy; however, as a rule of thumb, I would avoid copying models that were not custom-made.
#* Remember that only certain asset types in the DEFAULT layer can be copied over, which can be found on the aforementioned wiki page. In general, it's not a lot.
# Add a <tt>SNDI</tt> asset to the HOP file's SNDTOC layer. You can do this by right-clicking inside the asset list, and clicking Add Template -> Other -> SoundInfo.
 
# In the HOP's Archive Editor, click on Edit -> TXD Archive -> Export (RW3) and save the TXD to a file.
=== Scavenger hunt ===
# Do the same for the (No RW3) button and save another TXD (make sure you can tell them apart).
# Open both files in Magic.TXD and click on Edit -> Setup TXD Version.
# Set the format to Custom and set the platform and version according to [[Texture Format#RenderWare Versions|this table]] (it's 3.5.0.0 for Battle For Bikini Bottom on Xbox).
# After doing this on both TXDs, click on Edit -> TXD Archive -> Import (RW3) in the HOP's Archive Editor and import the first TXD you exported.
# Do the same for the (No RW3) TXD.
 
=== JSP and JSPINFO ===
Now begins what is likely the most tedious part of the porting process. Eventually there will be a way to make a level with cross-platform intent from the very start (using Xbox models which are compatible with all platforms), but as of now, this is how a pre-existing level must be ported.
If you're making a custom level (and using the blank HIP/HOP templates) I assume your HOP has the blank JSP and JSPINFO assets. You must delete those and replace them with the Xbox version, from the Xbox blank HOP also available in the IndustrialPark-EditorFiles. Make sure you put each asset in the correct layer (and don't accidentally switch the two); also check in the ENV asset in the HIP to see if the BSP Asset ID field points correctly to the JSPINFO's asset ID.
 
=== Scavenger hunt ===
The general process is as follows:
Now begins what is likely the most tedious part of the porting process. This is the point in which you must go through each asset that was not possible to be converted or found (which you got in the list at the end of the first section) and find them again in the Xbox files so you can copy them over to your level. Generally, these are things like <tt>ATBL</tt>, <tt>MINF</tt>, <tt>MODL</tt>, <tt>SND</tt>, etc.
# Make a list of everything the level imported from the original game (e.g. Duplicatotrons, Fodders, Wooden Tikis, etc.), whether it was from an existing level or from the Industrial Park Editor Files.
# Find a level that contains one or more of these things from the clean copy of the Xbox version of the game. For example, you can find Fodders, Ham-Mers, Duplicatotrons, Tikis, and more in <tt>JF01</tt>.
# Find the assets related to these things that you could not copy before. Generally, these are things like <tt>ATBL</tt>, <tt>MINF</tt>, <tt>MODL</tt>, <tt>RWTX</tt>, <tt>SND</tt> etc.
# Copy those assets to the appropriate places in your level. For example, you would copy a <tt>MODL</tt> to the MODEL layer in your HOP file; you would copy an <tt>ATBL</tt> to the DEFAULT layer in your HIP file. In reality, it doesn't actually matter if these assets are in the HIP or HOP, or what layer they are on, but it helps a lot to remain organized, and to add future-proofing for any specific dealings with the assets we find out are done by the game.
 
# Copy those assets to the appropriate places in your level. For example, you would copy a <tt>MODL</tt> to the MODEL layer in your HOP file; you would copy an <tt>ATBL</tt> to the DEFAULT layer in your HIP file. In reality, it doesn't actually matter if these assets are in the HIP or HOP, or what layer they are on, but it helps a lot to remain organized, and to add future-proofing for any specific dealings with the assets we find out are done by the game.
Repeat steps 2-4 as necessary until you have found everything from your list.
 
If you have the extracted textures from the game as PNG files, you can shorten this process a small bit by going to the TEXTURE layer in your HOP file, and clicking Edit -> Import Textures, then locating all of the textures in PNG format from the level. Through doing this, you will not need to copy <tt>RWTX</tt> assets from anywhere else. This is also the only way you can add custom-made textures.
 
A small note to add is that you will need to import any custom-made sounds manually using WAV files. Duplicate any existing <tt>SND</tt> asset within the SRAM layer of your HOP file, click Edit Data, check the "Trim Header and send it to <tt>SNDI</tt>" box, and click Import Sound Data, then locate the WAV file. Update the asset's header to match whatever the sound was originally called in your GameCube level. The process is similar for custom music; you would do this inside mnu5.HIP, but by replacing an asset rather than duplicating any.
 
For custom sounds with related JAW assets, you will also want to click Import Jaw Data after importing the sound.
 
If you are not well-versed in which levels things appear in the original game (e.g. where the heck do I find a Bzzt-Bot?), feel free to ask in [https://discord.gg/9eAE6UB our Discord server], as many of the people there have a high level of knowledge about the game.
 
=== Remaking assets ===
 
Fortunately, this part of the process has been cut considerably as Industrial Park has updated. Here you will need to remake any custom-made assets that cannot be copied over (again, check the wiki page). This is far easier than it seems, albeit slightly tedious.
 
Line 60 ⟶ 49:
# When you are done, close the asset data editor.
 
A small note to add is that you will need to import any custom-made sounds manually using WAV files. You can use the '''Import Multiple Assets''' tool (under Edit) for that. For custom sounds with related JAW assets, you will also want to click Import Jaw Data after importing the sound.
<div style="clear:right;"></div>
 
You should now have every asset from the GameCube level in your Xbox level.
 
=== Testing ===
 
# Save the Xbox HIP and HOP.
# Open <tt>sb.ini</tt> in your modded files and change the BOOT scene to your level name (e.g. replace <tt>HB00</tt> with <tt>JF01</tt>).
# Open CXBX-Reloaded.
# Go to File -> Open Xbe and find the <tt>default.xbe</tt> file in the modded version of the game.
Line 77 ⟶ 65:
 
== Debugging ==
 
Sometimes you will try to test a level, and it will freeze on loading, or at some other point in the level. There are multiple reasons for this.
 
Line 89 ⟶ 76:
 
== Polishing ==
 
Certain things in the original game are different depending on what version you are using. For instance, when you walk up to the clam gate at the top of Jellyfish Fields, it will read "Press the R button to enter Jellyfish Caves" on GameCube, but on Xbox it will read "Pull the R trigger to enter Jellyfish Caves." For an extra coat of polish on your level, I would make similar changes to fit the Xbox version.
 
[[Category:Tutorials]]