Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Lord Zedd

.MAP
BSP Injection And You!

34 posts in this topic

UPDATED 10/8: Updated naming again, "Scenario Zoneset Group Audibility" is now "Scenario BSP Audibility", and it is indexed instead of matching counts.

 

UPDATED 9/8: Updated some naming according to today's plugin update. If I missed something, "Scenario Zoneset BSPs" got changed to "Scenario Zoneset Group Audibility" along with some of it's child blocks. Let me know if I did miss something so I can fix it.

Also replaced link for rawpage Assembly.

 

UPDATED 7/11: Modified bsdt plugin for injecting extra blocks from scnr to solve various problems and blindly help those using multiple BSPs.

 

UPDATED 4/8: Adjutant integration.

 

UPDATED 3/14: Inclusion of decals, new plugins and rawpage push.

 

UPDATED 3/5: Accommodation for new push to rawpage branch, easier way to handle zone salt 2.

 

So today we are gonna be injecting a BSP from one map to another. Which is surprisingly easier to do than you may think. And while this tutorial can be applied to all 3rd gen games basically, the process isn't exactly set in stone for not-Halo 3. YMMV

You're gonna need the following:

-Rawpage Assembly http://builds.xeraxic.com/assembly/release/rawpage_tag_container/

 

-This bsdt plugin http://www.mediafire.com/view/8gl5zkqrdwtxsvl/bsdt.xml

 

-Adjutant 3.5.0.0 Link (Thanks Elijah for the link)

 

Part 1: Setting up Rawpage Assembly

I think other tutorials cover this, but I'll give a rundown. The latest rawpage now includes the necessary plugins, so nothing needs to be done there, but we need to put that bsdt in. Navigate to your Assembly directory, then Plugins\halo3. Rename the bsdt.xml in there to something different like "bsdt_orig.xml". Now copy the bsdt you downloaded into the halo3 folder.

Rawpage Assembly needs to be given map folders in order to extract. So open Assembly and head into Settings, go to the Map Editor tab. You should see this:

fgocOiO.jpg

Use the dropdown to choose the game you want to set, and go to that folder in Windows. You can click the url bar and turn it into text you can copy.

sXhR4jL.jpg

Go back to Assembly and paste that path to the box below the dropdown. Changes will save automatically and you can close the Settings tab. All set!

 

Part 2: Finding A BSP with Adjutant

 

Now finding a BSP couldn't be more simple with the help of Adjutant. All you gotta do is open the map you want, and browse each BSP in the model viewer. It's gonna look something like this:

qEIzZ1v.jpg

 

Once you've found the bsp you want let's take this time to move the camera (Click and drag along with WASD) to where you'd like to spawn. The coords in the bottom left are identical to the world coords, so when you've picked a spot copy the xyz (and the 2 facing degree values if you choose) to notepad or something for later. Close Adjutant.

 

Part 3: Prepping The Source Map

So open the map you want to take the BSP from in Assembly now; we've got to be hacky and mutilate a tag to host the stuff we want to extract. I like bsdt. First off you want to rename the tag, because every map has the 2 bsdt tags. Right click either bsdt and choose "rename". Name it whatever you want and click Continue. Right under the tag tree is a button that says "Save Tag Names". Click that, then open your renamed tag.

 

Once the host is open, open up scnr as well. Find your BSP in the Structure BSPs block and remember its index. Scroll down to "BSP Groups" and dig through it, watching the Included BSPs flags for your BSP to be the first/only checked. When/if you find one, right click the Included BSPs flags control and View Value As so you can grab the memory address from the Raw Example near the bottom. Paste that address into the appropriate place in bsdt, with a count of 1 and save.

 

Back in scnr scroll to Scenario Zoneset Groups and find the index that uses the same BSP group you just copied as well as the Audibility index at the bottom to follow into Scenario Zoneset Group Audibility right above and use View Value As again on the first Unknown inside before Unique Cluster Count to grab the memory address. Add that to bsdt too now with a count of 1 again and save.

 

Do a search in scnr for "decal" which should take you to the Decals block. what you need to do here is click the "i" button next to the index dropdown, then note the count and address of it. Do the same for Decal Palette right below it. If there is nothing in these blocks, just continue reading.

 

Go back to your bsdt tag, and plug the information you just grabbed into the convenient Decals and Decal Palette blocks in it. [Note: this plugin was modified to add those blocks, which didn't change anything to the game or map. It's just so Assembly will read those x18 bytes as 2 blocks so it can extract them.]

 

Now that all 4 blocks are filled we need to modify them a bit.

 

You can start by unchecking the Included BSP flags in BSP Groups then checking only BSP 0. (And more if you are trying multiple at once)

Reduce the BSP Checksums block count to 1/the number of BSPs you are using so only they are shown, and do the same for the following "BSPs" blocks: (More than 1 BSP will need you to go into each BSPs index and reduce the counts there as well)

 

0fdDq7i.png

 

At the bottom of BSP Groups is another BSPs block with a count for every BSP on the map, like so:

gYDPkqF.png

 

Visit the indexes for the BSP(s) you are using and see if the blocks inside are filled. If they are copy them to the first few and reduce the size. If not just reduce the size and move on.

 

Now for Scenario BSP Audibility you want to set the count for Encoded Door PAS and Cluster Door Portal Encoded PAS blocks to 0, they shouldn't be needed:

 

e92skl1.png

 

Go down to the BSPs block and head to your index(es), note the start and count values and move them to the first indexes then change the block's count to match.

 

Do the same for BSP Cluster List. Then whatever number the start and count values equal on the last index equals you want to change the Cluster Mapping block count to that number.

 

After all that, replace the tagrefs at the top (conveniently labeled for you) with the relevant tags (design and cubemap isn't required but would complete that map). Include some other tags if you'd like but please fill any remaining tagrefs with a random tag and re-null to clear any bogus data hiding under them from the original bsdt layout. Save changes.

 

To reduce the filesize, you can also head into sLdT and isolate the index of just your BSP(s) with the View Value As method used for BSP Groups. Save changes when done.

Part 4: Extraction

Straightforward. Right click your bsdt and select extract. Name the tagc files whatever you want.

Part 5: Injection

Open the map you want this BSP in. Shouldn't matter which you choose, but remember to think of the forge palette and sky.

Below the tag tree there is an Inject button. Inject the tagc you made.

 

Step 5.5: Quick Test

 

To prevent issues, copy your map over to your Xbox and load it. The map should load fine and you should spawn fine, though it may take a little longer to start. This is just to ensure the injection worked fine and didn't corrupt your map or anything. Reboot the game and go back to your computer.

 

If you got a black screen freeze, you may want to consider trying a different map to inject into, or a different bsp. Play around with it.

Part 6: Fixing Stuff

Hooray! You have your tags injected! Now, if your BSP was not the first in the original map, there are some index values you have to change, one in every one of the sbsp's Instanced Geometry's Collision Definitions and one in sldt. If it is the first, scroll down a bit and continue on.

First up is Instanced Geometry. Chances are there are several hundreds of these suckers in your BSP, so doing it by hand is out of the question unless you are crazy. We are going to use a hex editor to do this job.

Go back to your sbsp tag and head to the Instanced Geometry block and note its entry count, then go into the Collision Definitions block inside. Scroll until you see BSP Index like in this image.

QLGVq7S.jpg

Right click the Unknown above the -1 you see and choose view value as. Copy/note the file offset.

ssFle61.jpg

Make sure you saved any changes from before and close your map. Now open it in your hex editor of choice. Go to the file offset you got. Select 0xE bytes from that point and copy them.

Rj398M9.jpg

Now open your hex editor's replace tool and paste your selection in both fields, but modify the replace field so that there is a 00 before the 02 at the end.

7v6q8z1.jpg

This is risky but the easiest way to replace these values. You're going to want to hit replace all. But luckily you noted the Instanced Geometry count so you can feel at least somewhat safe. Your hex editor should tell you how many were replaced, and that number should be LESS THAN the IG count. If it is more than you are gonna have a bad time and probably just corrupted your map. If this was the case (though I highly doubt it will happen) you can run the replace on the tagc itself before injecting.

When the deed is done save the map, but if you are doing multiple BSPs repeat the above steps but with 01 instead of 00. Close the editor, and open the map back into Assembly. Open sldt, and since you trimmed it down before extraction, only the relevant index(es) will remain. set the first BSP index to 0 and count up for any further BSPs. Save changes.

 

If your BSP was the first in the map, continue reading here:

The final step is to reference everything in scnr and clean some things up. So open scnr and replace the sbsp reference with your injected one (along with anything else you added if any) and null the sddt. Do a search to sldt and replace that reference with the injected one. Now search "Kill Zones" and set the count for both Kill Zones and Safe Zones to 0. Save changes.

 

Open your bsdt and copy the address and count of the 4 blocks into scnr one by one, replacing the the original values. Save changes.

Almost done! Now all we need now is to set the scenery count to 1 and make it a spawn point so you actually spawn in the map. Go to the scenery palette and find the index for the respawn point object and plug it into the lone scenery entry, making sure the name index is -1 and the team is neutral. Lastly give it the coords you got from Adjutant.

 

The final thing you should do is do a search in scnr for "Background Sound Environment Palette" and grab its address/count.

Search the same in sbsp and replace them with the scnr ones.

Once you do that save changes and copy the map over to your xbox, and the map should start with no issues.

 

Bonus recommendations:

Null the Sky Parameters tag in scnr to get rid of any fog.

BSP too dark? Inject the sldt tag from the mainmenu and use its primary/intensity bitmaps. There may also be cfxs and sefc tags you can inject from the original map to help things.

110 from 020_base is a big cube that you can do stuff in once you swap the shader and lightmap:

AUGCtsc.jpg

Share this post


Link to post
Share on other sites

Thank you very much!!! Can't wait to see some releases soon....BTW I still got assrmbly error when giving a try why would it be??

Share this post


Link to post
Share on other sites

Thank you very much!!! Can't wait to see some releases soon....BTW I still got assrmbly error when giving a try why would it be??

What error did you get?

Share this post


Link to post
Share on other sites

What error did you get?

 

When i try to extract it

System.ArgumentException: A segment has already been defined at the given offset.

at Blamite.IO.FileSegmenter.DefineSegment(Int32 offset, Int32 size, Int32 offsetAlignment, Int32 sizeAlignment, SegmentResizeOrigin resizeOrigin)

at Blamite.Blam.ThirdGen.Structures.ThirdGenHeader.Load(StructureValueCollection values, FileSegmenter segmenter)

at Blamite.Blam.ThirdGen.ThirdGenCacheFile.LoadHeader(IReader reader, String buildString)

at Blamite.Blam.ThirdGen.ThirdGenCacheFile.Load(IReader reader, String buildString)

at Blamite.Blam.ThirdGen.ThirdGenCacheFile..ctor(IReader reader, EngineDescription buildInfo, String buildString)

at Assembly.Metro.Controls.PageTemplates.Games.HaloMap.contextExtract_Click(Object sender, RoutedEventArgs e)

at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Share this post


Link to post
Share on other sites
snip

 

The shared cache file (mainmenu.map, shared.map, etc.) that the resources are in is corrupt.

Share this post


Link to post
Share on other sites

Updated a little bit to make prep easier. Needs the newer commit of Assembly which has been noted.

Share this post


Link to post
Share on other sites

Halo Reach:

I'm trying to find the BSP Index in the Instanced Geometry Block and there's nothing there. Would I have to do something different for reach .maps?

Share this post


Link to post
Share on other sites

Halo Reach:

I'm trying to find the BSP Index in the Instanced Geometry Block and there's nothing there. Would I have to do something different for reach .maps?

It was relocated into fixups. Once Reach shaders work I'll look into it more.

Share this post


Link to post
Share on other sites

After doing this, could I modify the plugin conveniently inject other scnr spawning blocks, such as scenery or crates? Or is there some sort of limit to the amount of data the tag could take?

Share this post


Link to post
Share on other sites

After doing this, could I modify the plugin conveniently inject other scnr spawning blocks, such as scenery or crates? Or is there some sort of limit to the amount of data the tag could take?

You're limited to the xA0 size of a bsdt tag. If you exceed that you'd need a different tag.

Share this post


Link to post
Share on other sites

You're limited to the xA0 size of a bsdt tag. If you exceed that you'd need a different tag.

How can I calculate the limit of a tag, so I could make my own dummy tag. This could be useful for quick injecting.

Share this post


Link to post
Share on other sites

How can I calculate the limit of a tag, so I could make my own dummy tag. This could be useful for quick injecting.

Calculate? Blocks are xC in size so add it up that way.

Share this post


Link to post
Share on other sites

so question. what if the map loads but when you turn to look towards the map it freezes the game. what does that mean?

Share this post


Link to post
Share on other sites

so question. what if the map loads but when you turn to look towards the map it freezes the game. what does that mean?

Usually a bad shader somewhere.

Share this post


Link to post
Share on other sites

so when i have to replace the hex values with 00 00 00 00 FF FF FF FF 00 00 00 00 00 02. what if its already like that its it all set. just wanting to make sure.

Share this post


Link to post
Share on other sites

any reason why assembly keeps trying to search for halo 2 vista maps? i set my location properly to the halo 3 maps, and yet assembly is thinking they are halo 2 maps..

Share this post


Link to post
Share on other sites

any reason why assembly keeps trying to search for halo 2 vista maps? i set my location properly to the halo 3 maps, and yet assembly is thinking they are halo 2 maps..

Did you change the "Selected Game" to Halo 3 and have the directory with an "\" at the end?

Share this post


Link to post
Share on other sites

Adjutant supports BSP viewing/extraction now, so I included its use in the tut. Now you can easily find the exact BSP you want as well as easily get coords without loading up the original map ingame.

The404Spartan likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now