Jump to content

How To Use Sonic GLvl with Sonic Unleashed: Difference between revisions

From HedgeDocs
No edit summary
Skyth (talk | contribs)
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Notice|type=note|content=This guide covers how to setup Sonic Unleashed Xbox 360 levels in GLvl, but does not cover how to use this tool or how to set it up for PS3 levels. It's recommended that you also read the [[How To Use Sonic GLvl with Sonic Generations|Sonic Generations GLvl guide]].}}{{Notice|type=info|content=This guide uses the following tools:
{{Notice|type=note|content=This guide covers how to setup Sonic Unleashed Xbox 360 levels in GLvl, but does not cover how to use this tool or how to set it up for PS3 levels. It's recommended that you also read the [[How To Use Sonic GLvl with Sonic Generations|Sonic Generations GLvl guide]].}}{{Notice|type=info|content=This guide uses the following tools:
* [[Sonic GLvl|Sonic GLvl]]
* [[SonicGLvl|SonicGLvl]]
* [[Unleashed Mod Toolbox|Unleashed Mod Toolbox]]
* [[HedgeArcPack]]}}
* Unleashed Object Template
* Xbox 360 SDK, find this yourself}}


== Preparing .ar Files ==
The latest [[SonicGLvl]] can now open Sonic Unleashed levels without needing to decompress any archive or move around files. Open a level through '''"File > Open Level"''' and select the # archive of a level of your choice. Refer to the [[Sonic Unleashed Stage IDs|Stage IDs]] page to find the level that you need.
This example will be editing Windmill Isle Act 1 Day. Open your extracted Unleashed game folder and locate your files. In my case, the files are:
#ActD_MykonosAct1.ar.00
#ActD_MykonosAct1.arl
ActD_MykonosAct1.ar.00
ActD_MykonosAct1.ar.01
ActD_MykonosAct1.arl
Once located you will need to copy those files to the #files folder inside your Mod Toolbox directory. now open #SUModToolbox.bat and press 3 and enter to decompress the files, press 1 or 2 depending on the system and press enter.


Now copy the files inside #output/DecompressedFiles to a seperate folder. In order for GLvl to read the model you need to make a folder called "Packed" and inside your Unleashed game folder go to "Packed" and copy the level folder to the new "Packed" folder next to your decompressed .ar files.
== Setting Up Shaders ==
To display the level with game-accurate graphics, you need to copy the '''"shader.ar"''' file from your game installation to SonicGLvl's '''"database/shaders"''' folder. SonicGLvl will warn you about this if you have not done this step.


== Preparing GLvl ==
== Copying Files To Your Mod ==
Locate your Xbox 360 SDK's bin/win32 folder and copy xbcompress.exe, xbdecompress.exe, xbdm.dll, msvcp71.dll and msvcr71.dll and paste them into your GLvls "bin" directory.
If you open a level directly from the game files, you have the risk of corrupting your installation when you save your changes. It's recommended to first copy the files to a mod, and open the level from your mod directory. As an example, the files you need to copy for Windmill Isle Act 2 (Day) are as follows:


Open your GLvl folder and go to <code>/database/LevelDatabase.xml</code>, you will need to add your entry for the level, in my case it would be:
* <code>Packed/ActD_MykonosAct2/Stage.pfd</code>
* <code>#ActD_MykonosAct2.ar.00</code>
* <code>#ActD_MykonosAct2.arl</code>
* <code>ActD_MykonosAct2.ar.00</code>
* <code>ActD_MykonosAct2.arl</code>


<code><Entry name="ActD_MykonosAct1" geometry="ActD_MykonosAct1" layout_merge="" slot="WindmillIsle 1" game="Unleashed/"></code>
The stage ID and the amount of AR files you need to copy will vary between levels.


Afterwards the file should look something like this:<syntaxhighlight lang="xml">
Note that if you simply want to view the levels in SonicGLvl without making any changes, opening them from the base game files is fine. This advice is for when you want to make modifications to the level.
<LevelDatabase>
  <Entry name="ghz200"    geometry="ghz200"        layout_merge=""    slot="GreenHillZone"    game="Generations" />
  <Entry name="ghz201"    geometry="ghz200"        layout_merge=""    slot="GreenHillZone"    game="Generations" />
  <Entry name="cte200"    geometry="cte200"        layout_merge=""    slot="CityEscapeZone"    game="Generations" />
  <Entry name="ActD_Beach" geometry="ActD_Beach"    layout_merge=""    slot="JungleJoyride"    game="Unleashed" />
  <Entry name="ActD_Africa" geometry="ActD_Africa"    layout_merge=""    slot="SavanaCitadel"    game="Unleashed" />
  <Entry name="ActD_MykonosAct1" geometry="ActD_MykonosAct1"    layout_merge=""    slot="WindmillIsle 1"    game="Unleashed"/>
</LevelDatabase>
</syntaxhighlight>Open "Unleashed Object Template.zip" and extract the contents here, Replace files if asked.


Save the file, open GLvl, press Ctrl+O and find your decompressed .ar files. Click "Ok" on the first prompt and click "Yes" on the prompt asking about unpacking terrain.
== Missing Textures ==
Sonic Unleashed stores stage textures in different archives to share them between levels and save space. If you open a level from your game directory, SonicGLvl will automatically extract them to its '''"cache/country_name/slot_resources"''' folder.


== Extracting Textures and adding them to GLvl ==
However, if you open the level from a DLC or your mod files, and not copy over these archives, SonicGLvl won't be able to find the textures. To solve this, you can first open a level from the respective country region from the base game folder, then re-open the level from your DLC or mod directory.
Inside Unleashed Mod Toolbox delete the files inside #files and #output. From your Unleashed game folder copy the various Cmn.ar files for your level and paste them inside the #files of the Unleashed ToolBox.


Open #SUModToolbox.bat and press 4 and enter to decompress the files, press 1 and enter and press 1 or 2 depending on the system and press enter. go to #files and delete the contents of the folder. Inside #output you might notice some files have not been extracted. This is because files other than ar.00 and arl don't extract, however you fix this by simply changing the file extension to ar.00, changing the file name and re-extracting them in the ToolBox.
As an example, for Apotos, the common texture archives are named as follows:


Copy the contents of each folder in #output/ExtractedFiles into GLvl/cache/your-level/resources, replacing files if asked.
* <code>CmnActD_Terrain_Mykonos</code>
* <code>CmnActN_Terrain_Mykonos</code>
* <code>CmnMykonos</code>
 
== Missing Models ==
SonicGLvl does not come with the game assets, so objects are going to appear as cubes. To solve this, you need to extract the relevant AR files to SonicGLvl's "database/resources" folder. Most required assets are stored in <code>SonicActionCommon/EvilActionCommon</code> archives in the base game. [[HedgeArcPack]] can be used to directly extract the archives to the resources folder.
 
If you are unable to find the model for an object, you can open the corresponding object template from "database/objects" folder, and look for an Extra parameter with model as the type:<syntaxhighlight lang="xml"><Extra type="model" name="cmn_obj_sk2_hintring.model" /></syntaxhighlight>In this example, the HintRing object uses the <code>cmn_obj_sk2_hintring.model</code> file. You can then search for this file name in the [https://raw.githubusercontent.com/blueskythlikesclouds/SkythTools/refs/heads/master/Sonic%20Unleashed/File%20Index.txt Sonic Unleashed File Index] to find the archive it's stored in, and extract it.
{{Notice|type=warn|content=If you extract SonicActionCommon_Petra, a material file with invalid characters in its file name is going to crash SonicGLvl! Make sure to remove the faulty file to make it work: ptr_sk_dart01__NSP_CMN_ChaoTexSpecNrmTanVC____NPR_XB_������__.material}}{{Notice|type=warn|content=Some Sonic Unleashed object templates are currently incorrectly configured to load Sonic Generations model names. If you have the 2011 version of Sonic Generations installed, you can extract cmn100/cmn200 to the resources folder as a temporary workaround.}}

Latest revision as of 15:36, 2 May 2025

Note
This guide covers how to setup Sonic Unleashed Xbox 360 levels in GLvl, but does not cover how to use this tool or how to set it up for PS3 levels. It's recommended that you also read the Sonic Generations GLvl guide.
Info
This guide uses the following tools:


The latest SonicGLvl can now open Sonic Unleashed levels without needing to decompress any archive or move around files. Open a level through "File > Open Level" and select the # archive of a level of your choice. Refer to the Stage IDs page to find the level that you need.

Setting Up Shaders

To display the level with game-accurate graphics, you need to copy the "shader.ar" file from your game installation to SonicGLvl's "database/shaders" folder. SonicGLvl will warn you about this if you have not done this step.

Copying Files To Your Mod

If you open a level directly from the game files, you have the risk of corrupting your installation when you save your changes. It's recommended to first copy the files to a mod, and open the level from your mod directory. As an example, the files you need to copy for Windmill Isle Act 2 (Day) are as follows:

  • Packed/ActD_MykonosAct2/Stage.pfd
  • #ActD_MykonosAct2.ar.00
  • #ActD_MykonosAct2.arl
  • ActD_MykonosAct2.ar.00
  • ActD_MykonosAct2.arl

The stage ID and the amount of AR files you need to copy will vary between levels.

Note that if you simply want to view the levels in SonicGLvl without making any changes, opening them from the base game files is fine. This advice is for when you want to make modifications to the level.

Missing Textures

Sonic Unleashed stores stage textures in different archives to share them between levels and save space. If you open a level from your game directory, SonicGLvl will automatically extract them to its "cache/country_name/slot_resources" folder.

However, if you open the level from a DLC or your mod files, and not copy over these archives, SonicGLvl won't be able to find the textures. To solve this, you can first open a level from the respective country region from the base game folder, then re-open the level from your DLC or mod directory.

As an example, for Apotos, the common texture archives are named as follows:

  • CmnActD_Terrain_Mykonos
  • CmnActN_Terrain_Mykonos
  • CmnMykonos

Missing Models

SonicGLvl does not come with the game assets, so objects are going to appear as cubes. To solve this, you need to extract the relevant AR files to SonicGLvl's "database/resources" folder. Most required assets are stored in SonicActionCommon/EvilActionCommon archives in the base game. HedgeArcPack can be used to directly extract the archives to the resources folder.

If you are unable to find the model for an object, you can open the corresponding object template from "database/objects" folder, and look for an Extra parameter with model as the type:

<Extra type="model" name="cmn_obj_sk2_hintring.model" />

In this example, the HintRing object uses the cmn_obj_sk2_hintring.model file. You can then search for this file name in the Sonic Unleashed File Index to find the archive it's stored in, and extract it.

Warning
If you extract SonicActionCommon_Petra, a material file with invalid characters in its file name is going to crash SonicGLvl! Make sure to remove the faulty file to make it work: ptr_sk_dart01__NSP_CMN_ChaoTexSpecNrmTanVC____NPR_XB_������__.material
Warning
Some Sonic Unleashed object templates are currently incorrectly configured to load Sonic Generations model names. If you have the 2011 version of Sonic Generations installed, you can extract cmn100/cmn200 to the resources folder as a temporary workaround.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.