Jump to content

Swapping Armor Textures


Recommended Posts

just a quick question

 

I wanted to swap the textures of Dimona's Garments of Mutation

800px-Tg-special-dimionas-final.jpg.635a1878487a597e4762ef1bf3986062.jpg

 

with the textures of the Green Temple Guardian Special set

800px-Tg-special-green-final.jpg.870216dfa241748ad5b082e3c6b7c836.jpg

 

is this possible? and if so, what is required to do so?

Link to comment

Probably the best way to accomplish this is to replace the surface ID's for the items defined in itemtype.txt.

The mutation set itemtypes are 6466 - 6472.  I'm ignoring the battery since you don't see it.

The itemtypes for all the color variations of this set are 9246 - 9266.   The green set items all have the suffix "-var1" at the end of their surface ID.

Let's take an example.  This is the itemtype entry for the green helmet:

newItemType = {
	-- standard info
	renderfamily = "RENDERFAM_ARMOR",
	renderprio   = 0,
	family       = "FAMILY_ARMOR",
	subfamily    = "SUBFAM_ARMOR_HELMET",
	classification = "CLF_HELMET_CROWN",
	flags        = "FLAG_EQUIPCUT + FLAG_BLACKBACK + FLAG_HASPREVIEWIMAGE",
	weargroup    = "WEARGROUP_INVALID",
	-- 3d model + animation info
	model0Data = {
	  name         = "models/heroes/guardian/sets/std-special/n_templeguardian-special-helmet.GR2",
	  surface0     = { mgr.surfGetID ("tg-special-helmet_n"), mgr.surfGetID ("tg-special-helmet-var1_n") }, -- This is the line we're going to copy.
	  user         = "WEARGROUP_TEMPLEGUARDIAN",
	},
	-- logic bounding box
  logicBox = {
    minx=-4.931, miny=-10.583, minz=55.6, 
    maxx=4.931, maxy=3.907, maxz=69.616, 
	},
	dangerclass   = 0,
}
mgr.typeCreate(9258, newItemType);

Copy that "surface0" line and paste it into the same spot in the itemtype entry for Dimiona's helmet, which is itemtype 6466.

This tells the game to use the green textures for Dimiona's set without having to swap anything else.  If you want to fully flip the colors and make the green set into white, you'd just cut/paste instead of copy/paste so that there's no more surface0 line left in the green itemtypes.

The only thing is the icons won't be swapped.

  • Like! 1
Link to comment

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
×
×
  • Create New...
Please Sign In or Sign Up