Jump to content

Tutorial : How to recolorize the Inquisitors Mount Astute Supremacy Shroud Spider/add T-Energy Effect to Mount


Lindor

Recommended Posts

Requirements: Sacred 2 game, good Text editor (strongly recommend Notepad++), good image editing software (I recommend GIMP), file extractor (e.g. 7zip or WinRAR)

Step 1: Surfaces

The T-Energy "Scanning" Effect is applied via the Flag "SURFACE_FLAG_TENERGY" in Surface.txt

  1. Open scripts/shared/itemtype.txt
  2. Search (Strg+F) for your Special Mount (e.g. vi models/npc/ridingcreatures/mountname or via Itemtype_ID)
    • Astute Supremacy Spider has Itemtype_IDs 12871 (with saddle) and 11170 (no saddle)
    • Mountname can be viewed in graphics02/mq/models/npc/ridingcreatures/
  3. Look for skin Surface Entry and copy first and last entry (from now on called SE1 and SE2)
    • For AS Spider it's surface1     = { mgr.surfGetID ("spidertex_m"), mgr.surfGetID ("spidertex-var2_m") }, copy "spidertex_m" and "spidertex-var2_m"
  4. open scripts/client/surface.txt
  5. search for SE1 and look for the texture0Name entry and open that image in your image editing software (from now on called Im1)
    • for AS spider it's maps/npc/ridingcreatures/spider/i_spider-var2_dx.tga
    • it's always in graphics02/mq/
    • .tga and .dds are interchangeable
  6. repeat step 5 for SE2, image is called IM2 from now on
  7. on SE2 entry in surface.txt, add " + SURFACE_FLAG_TENERGY" under flags (if not already there)

 

Step 3: modeling

The "Scanning" direction is determined by the .GR2 model orientation. This tutorial does not cover on how to edit .GR2 models.

 

Step 2: Image Editing

Edit/recolorize a copy of Im1 to your liking. The body parts affected by the T-Energy Effect are determined by the Im2's Alpha channel, so you'll need to either edit the alpha channel or, easier, transfer i_spider-var2_dx.dds's Alpha channel to your edited copy of Im1. That only works for (all the different) Spider mounts though. I'll teach on how to do that in GIMP. Afterwards export your edited copy of Im1 into your mods folder under Im2 name and folder path.

Step 3: GIMP Tutorial on how to transfer Alpha Channel from Im2 to Im1 (only single Layer Images)

  1. Open Im1 and Im2 in GIMP
  2. Im2:
    1. Layer -> Mask -> Add Layer Mask -> Transfer layer's alpha channel -> make sure that Invert is not checked
    2. Alt + Leftclick on the Layer Mask that appeared to the right of the Layer
    3. Strg + C
  3. Im1:
    1. Layer -> Mask -> Add Layer Mask -> Transfer layer's alpha channel -> make sure that Invert is not checked
    2. Alt + Leftclick on the Layer Mask that appeared to the right of the Layer
    3. Layer -> Mask -> Delete Layer Mask
    4. Layer -> Mask -> Add Layer Mask -> Transfer layer's alpha channel -> make sure that Invert is not checked
    5. Alt + Leftclick on the Layer Mask that appeared to the right of the Layer
    6. Strg + V
    7. Layer -> Anchor Layer
    8. Layer -> Mask -> Apply Layer Mask
  4. Mark the name of Im2
  5. Strg + C
  6. Im1:
    1. Data -> Export -> mark the name -> Strg + V -> choose Im2 folder path as discussed in Part 2 -> Export -> Generate mipmaps
  7. Profit

Here's an example of what I was able to do:

deADr0l.jpeg

Edited by Lindor
Link to comment

Ok I kinda figured out what's going on. Kinda.

The FX are applied via the Flag SURFACE_FLAG_TENERGY of spidertex-var2_m in the client/surface.txt file. That's why the .dds texture file controls the body parts at which the effect is applied. Since it's the universal T energy effect, recolorizing is inadvisable because it'd recolorize all of T energy textures as well.

However there's one thing I still don't understand.  That's the saddle spider itemtype.txt entry:

newItemType = {
	-- standard info
	renderfamily = "RENDERFAM_TRANSPORT",
	renderprio   = 0,
	family       = "FAMILY_TRANSPORT",
	subfamily    = "SUBFAM_TRANSPORT_HORSE",
	classification = "CLF_WARHORSE",
	flags        = "FLAG_HASSOUND + FLAG_PERPENDICULAR2 + FLAG_HASPREVIEWIMAGE",
	weargroup    = "WEARGROUP_SPIDER",
	-- 3d model + animation info
	model0Data = {
	  name         = "models/npc/ridingcreatures/spider/m_spider@te.GR2",
	  surface0     = { mgr.surfGetID ("spiderhair_m"), mgr.surfGetID ("spiderhair-var2_m") },
	  surface1     = { mgr.surfGetID ("spidertex_m"), mgr.surfGetID ("spidertex-var2_m") },
	  user         = "WEARGROUP_INVALID",
	},
	-- logic bounding box
  logicBox = {
    minx=-32.000, miny=-30.454, minz=-1.026,
    maxx=32.000, maxy=29.000, maxz=81.388,
    }, 
	dangerclass   = 0,
}
mgr.typeCreate(12871, newItemType);

As you see, there are two applied in the surface1 entry. I thought 'spidertex-var2_m' would be "added" to the 'spidertex_m' surface, so I changed the 'spidertex_m' to a surface I recolorized purple in hopes it would recolorize the "basic" surface while leaving the t-energy effect. However in doing so, the spider just completely turned black and I don't understand why.

 

But at least there's now a way to easily remove the effect simply by removing the flag. If I figure out how to recolorize without removing the effect, I'll change this topic into a tutorial on how to do that.

Link to comment
  • The title was changed to Tutorial : How to recolorize the Inquisitors Mount Astute Supremacy Shroud Spider/add T-Energy Effect to Mount

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