Put simply, Riddick is a first-person shooter that blends equal parts blasting, hand-to-hand combat, stealth attacks, and even some platforming into the mix. Riddick takes noticeable risks in a crowded genre and succeeds. From its movie-inspired presentation to its minimalist HUD and the deadpan delivery of Diesel's likeable killer, Riddick is saturated with a sleek kill-or-be-killed atmosphere that pervades all. The combat is sharp, the AI can be smart and relentless, and the level design deft. Oficial Forums Demo

Post tutorial Report RSS Riddick University: Changing Riddick's outfit

Here's a tutorial on how to switch Riddick's clothes out with another character.

Posted by on - Intermediate Players Modelling

Introduction

The Chronicles of Riddick: Escape from Butcher Bay ran on a proprietary engine created by the developer Starbreeze simply called Ogier. Like their previous two games, Enclave and Knights of the Temple, they released an SDK for it. Unfortunately Riddick is one of the only games I've seen that had a developer SDK created for it and yet no mods were made or released.

So I have decided to try and fix that and I'm going to upload several tutorials educating everyone on how the editor works. With the goal of teaching you how to make your own Riddick levels and mods.

Special thanks to Amran for the registry portion of the tutorial as I would have never figured out how to edit it properly without his help.

What you will need

It's recommended to have completed the first tutorial as it fills you in on how to make basic things like brushes and how to spawn entities.

Prelude

This is a bit of a preliminary tutorial on triggers and the registry. In Butcher Bay, Engine_Path entities are really powerful and can trigger almost every event seen in Butcher Bay. If you observe the source files to the game almost every scripted event is an Engine_Path.

Engine_Path entities are also flexible. You can make them trigger almost anything. For today's tutorial we will create a trigger that swaps out Riddick's clothes.

Note. At this time it is impossible to swap out both Riddick's body mesh and his head mesh. You can only do one or the other. You can use any of Riddick's meshes, you just can't do two non-Riddick meshes. Swapping out both makes the camera freak out and get stuck in the ceiling. I haven't figured out precisely why this happens but my main speculation is it's due to the Riddick models having a camera bone that none of the other models have. Unless someone writes a Blender plugin for BB's model format it's currently impossible to get around this without ripping the mesh and re-rigging it from scratch.

There are two main methods of handling this which I'll go over.

Entity Spawning method

This is the first method of swapping Riddick's model out. It involves spawning an entity in a custom level you're making. This is actually how Starbreeze did it when they changed Riddick's body model in the campaign itself when you explore Pigsville. At one point you can wear a guard uniform and it was handled the same way.

Let's build a level. In the middle of it spawn an Engine_Path entity. Engine_Path entities are located under engine in the tree of entities.


Tut1

Now let's go down the Engine_Path's options. Toggle "AutoStart" and scroll down to "TimedMessage". Click on the box next to TimedMessage. A new window should appear.

Tut2


Let's keep time the same. When you click on the box marked "impulse" it brings up a dropdown menu which is a list of all of the various triggers in the game. Scroll down until you click on "SetModel". Now change "Target" to $Player.

Tut3


We're almost done. Now click the little folder icon next to model. It should bring up a list of all of the various models in the game. The most important ones are located under the xmd folder.

Tut4

All of Riddick's particular models are conveniently located in their own folder. Character meshes are generally split between head and body meshes. Body meshes having the prefix B and head meshes having the prefix H. They're also located within their own folder depending on which part of the game they were found in. All of the first hub characters like Rust and Haley's meshes all exist in the PA1 folder for example.

For the purposes of this tutorial let's swap out Riddick's body mesh with one that has a jacket. Pa1_Inmate_B01.

Tut5

Now press OK. Now the only heading left is model ID. Starbreeze set body meshes as modelID 0 and head meshes as modelID 1. For now keep this at zero.

Now press OK. Save the level and compile it using XWC.

Tut6

There we go. Riddick's body model has now been swapped out.

Editing the registry method

This method is great if you just plan on editing Riddick's model in a custom level you're making. But what if you want to edit it in the vanilla levels? It begs the question, where does the game keep track of information like that?

Well thankfully Starbreeze kept all of this info in plaintext files called .xrgs located in the content/registry directory.

Screenshot 2023 02 14 121253

There is one issue however. If we edit these files it won't actually do anything. Why is that? There's actually a clue in one of the files called SvCampaign.xcr. This is a compiled version of the registry. Through our research we've determined this compiled version of the registry is a holdover from the Xbox port and isn't actually needed. If the file is deleted the game just uses the values located in the .xrgs. I recommend cut/pasting this file into another directory outside of the Riddick folder. Now if we edit the registry, the game will actually show our changes.

Now the registry file we wanna edit is called TplCharacters.xrg. Make sure you back it up before modifying it. Let's edit it with notepad and scroll down to the heading that says *// PLAYER TEMPLATES...

///////////////////////////////////////////
//
// PLAYER TEMPLATES...
//
///////////////////////////////////////////

*player_riddick
{
	*classname template_char
	*model "Characters\\Riddick\\Riddick_B03"
	*model1 "Characters\\Riddick\\Riddick_H02"
	
	*team00 team_riddick 
	*team01 team_inmates

	*animgraph AGRiddick
	*animlist ALRiddick

	//*model "Characters\\pa2\\Pa2_RiotGuard_01"
	//*animgraph AGRiotguard2
	//*animlist ALRiotguard
	//*Ragdoll	1
	*Rollbone 1

	*damage_factor0 -1,0.0,neck
	*dialogue Dlg_Riddick_1
	*phys_height 31
	*phys_height_crouch 16
	*speed_forward 6

	// Measure light and use tracelines
	*ai_lightmeter	2

	*camera_stand_head_offset 	0, 0, 58 	// From feet, in worldspace (i.e. not rotated with head) (Fwd, Left, Up).
	*camera_crouch_head_offset 	0, 0, 50 	// (same as above)

	*camera_behind_head_offset 	0, -20, -80 	// From head, in camera space (i.e. rotated along with head) (Right, Down, Fwd).
	*camera_shoulder_offset 	10, -8, 5 	// (same as above)

	*camera_face_offset     	5, 5, 5    	// From mouth attachpoint, in model space (Fwd, Left, Up)

	*flags nohud+alwaysvisible

	*AUTOAIMOFFSET 0,0,58					// Riddick (or whatever character the player can control) needs to have this variable set. It should represent the height of the camera from the character feets.

	*rpgobject char
	{
		*attrib_health			64
		*attrib_maxhealth		64
		*healthrecoverydelay_ticks 100		// Five seconds

		*weapon_fist_riddick
		*item0 pickup_udmoney_0
	}
}


*player_riddick_pa1
{
	*classname player_riddick
	*model "Characters\\Riddick\\Riddick_B04"
	*model1 "Characters\\Riddick\\Riddick_H03"
}

*player_riddick_i1
{
	*classname player_riddick
	*model "Characters\\Riddick\\Riddick_B04"
	*model1 "Characters\\Riddick\\Riddick_H02"
}

*player_riddick_pa2
{
	*classname player_riddick
	*model "Characters\\Riddick\\Riddick_B03"
	*model1 "Characters\\Riddick\\Riddick_H02"
}

*player_riddick_pa3
{
	*classname player_riddick
	*model "Characters\\Pa3\\Pa3_riddick_body"
	*model1 "Characters\\Riddick\\Riddick_H03"
}

This contains all of the model information for Riddick's player model. We can also swap out any character's models here but for now let's just do Riddick's. The ones to look at are the headings at the bottom like *player_riddick_pa1

These point to the model files for Riddick's model in each of the game's 3 hubs. We can modify these to point to the new body mesh we want. Under *player_riddick_pa1 change it to be as follows.

*player_riddick_pa1
{
	*classname player_riddick
	*model "Characters\\Pa1\\Pa1_Inmate_B01"
	*model1 "Characters\\Riddick\\Riddick_H03"
}

Now save the file and let's start the game up and start a new game. Riddick should now be wearing the jacket.

Tut7

However one thing you might notice is that Riddick's neck clips into the mesh. Unfortunately Riddick's neck likes to do that. One easy fix for this is to swap out his head mesh with Characters\\Riddick\\Riddick_H_Civ. This unfortunately means Riddick will be wearing his goggles before he's supposed to actually get them but at least there will be no more clipping.

Tut8

This'll allow us to recreate a beta screenshot nicely.

546975 919755 20040127 001

This works with effectively every body mesh in the game including guards and even Hoxie's.

Tut9

I hope this tutorial has helped you with modding the game. It's very fun to swap out models like this. Unfortunately we don't have a method of swapping out both Riddick's head and body model right now but at the very least we can swap his clothes out. I hope you enjoy.

Post comment Comments
nazfalas
nazfalas - - 541 comments

Wow, this is an amazing article.
I looked into the SDK back in the day and was also wondering why there was basically no mod work released at all.

Great start for anyone thinking about starting with an "exotic" choice!

Reply Good karma Bad karma+1 vote
LithTechGuru Author
LithTechGuru - - 405 comments

Riddick's sdk is actually really convenient to use. The only clunky thing I've seen has been importing models which I'm still figuring out.

The main reason nobody made mods for it I suspect is because there's almost zero documentation for any of it. Everything I've posted tutorials about is stuff I had to figure out through guessing and reverse engineering. I'm documenting as much as I physically can right now to best help anyone wanting to mod the game.

Butcher Bay has an enormous amount of potential for mods due to its rpg elements like quests, merchants etc. It would be a shame to see it never get any mods.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: