Skip to main content

Creating Custom AI - textures

See Creating Custom AI - decls before proceeding

Creating Custom Textures

While adding custom textures into the game is possible, it is not the optimal choice. Even if the added textures are in a relatively high patch directory, there is the chance that some of them will not load properly, especially if there are a lot of added assets in the mod(s).

Instead, it is recommended to replace the textures of an existing playable demon skin. Since injecting gameplay-altering mods disable Battlemode entirely, there is little concern for distorting playable demon skins. You will want to edit the regular demon skin like normal and replace its name with the cosmetic skin that you want to replace. Make sure to include the ENTIRE file extension ( ex: mancubus_body_set12.tga$streamed$mtlkind=albedo )

Also, be sure to replace ONLY the matching $streamed$ TGA extension. In the case of Gargoyles, replace any .tga$streamed$mtlkind=albedo file with that of the same extension for a set12 mancubus skin, for example. Most cosmetic skins are located in warehouse\models\customization\monsters

If your extracted textures do not have the $streamed$ TGA extension, then reference here - Resource Data

Then, you need to modify the material2 decls for demon skin in warehouse. They will be used to remap the textures on the custom AI. For the Stone Gargoyle, copy all the regular Gargoyle material2 decl parameters into the demon skin material2 decl equivalent that you set.

For example, the following would be copied over:

It is best practice to replace a demon skin material2 decl with a similar name to the custom AI material2 decl.

In the copied gargoyle_body decl, which is now named mancubus_body_set12, replace the RenderLayers with your modified demon skin textures. The following is an example:

RenderLayers = {
	item[0] = {
		parms = {
			bloommaskmap = {
				filePath = "models/monsters/gargoyle/gargoyle_body_e.tga";
			sssmask = {
				filePath = "models/customization/monsters/mancubus/set11/mancubus_body_set11_sss.tga";
				options = {
					format = "FMT_BC3";
			smoothness = {
				filePath = "models/monsters/gargoyle/gargoyle_body_g.tga";
			normal = {
				filePath = "models/monsters/gargoyle/gargoyle_body_n.tga";
			specular = {
				filePath = "models/monsters/gargoyle/gargoyle_body_s.tga";
			albedo = {
				filePath = "models/customization/monsters/mancubus/set12/mancubus_body_set12.tga";

Once each material2 decl is modified, you will need to use a materialRemap in the renderModelInfo of BOTH the entityDef decl and idAI2 entity. The following is an example:

renderModelInfo = {
	model = "md6def/characters/monsters/gargoyle/base/gargoyle.md6";
	materialRemap = {
		num = 8;
		item[0] = {
			from = "models/monsters/gargoyle/gargoyle";
			to = "models/customization/monsters/mancubus/set12/mancubus_guns_set12_hq";
		item[1] = {
			from = "models/monsters/gargoyle/gargoyle_body";
			to = "models/customization/monsters/mancubus/set12/mancubus_body_set12";
		item[2] = {
			from = "models/monsters/gargoyle/gargoyle_cs";
			to = "models/customization/monsters/mancubus/set12/mancubus_body_set12_hq";
		item[3] = {
			from = "models/monsters/gargoyle/gargoyle_eyes";
			to = "models/customization/monsters/mancubus/set12/mancubus_eyes_set12";
		item[4] = {
			from = "models/monsters/gargoyle/gargoyle_fbg";
			to = "models/customization/monsters/mancubus/set12/mancubus_legs_set12_hq";
		item[5] = {
			from = "models/monsters/gargoyle/gargoyle_gore";
			to = "models/customization/monsters/mancubus/set12/mancubus_head_set12_hq";
		item[6] = {
			from = "models/monsters/gargoyle/gargoyle_head";
			to = "models/customization/monsters/mancubus/set12/mancubus_head_set12";
		item[7] = {
			from = "models/monsters/gargoyle/gargoyle_wings";
			to = "models/customization/monsters/mancubus/set12/mancubus_legs_set12";
	lightRigDecl = "gargoyle/gargoyle_default";

If you want to go far enough to apply the textures to sync kills (glory kills, chainsaw kills, crucible kills, berserk kills), the apply the same materialRemap to added entitydef\characters\monsters decls and reference them in the added entitydef\syncmelee decls.

See Also