Shifter and HDTP... kinda like Peanut Butter and Chocolate

Discuss every aspect of HDTP here.

Moderator: HDTP Team

Forum rules
Please do not feed the trolls.
Post Reply
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Shifter and HDTP... kinda like Peanut Butter and Chocolate

Post by Y|yukichigai »

...they go together oh so well.

Image

This is just a quick post to let anybody who cares know that I have in fact found a way to dynamically load in the HDTP textures if they are present, but default to the original textures otherwise. This means that Shifter will support HDTP with minimal effort required on the user's part. (You need to put the HDTP .utx files in your C:\DeusEx\Textures folder for my method to work)

For any of you other modders who would like to know exactly how I did it, here's the code I added to GuntherHermann.uc:

Code: Select all

simulated function PreBeginPlay()
{
	local mesh lMesh;
	local int i;

	Super.PreBeginPlay();

	lMesh = mesh(DynamicLoadObject("HDTPcharacters.HDTPGunther", class'mesh'));

	if(lMesh != None)
	{
		Texture = None;
		for(i = 0; i < 8; i++)
		{
			MultiSkins[i] = None;
		}
		Mesh = lMesh;
	}
	else
	{
		Texture = Default.Texture;
		Mesh = Default.Mesh;
		for(i = 0; i < 8; i++)
		{
			MultiSkins[i] = Default.MultiSkins[i];
		}
	}
}
Obviously this has to be tweaked for each HDTP-improved object and then pasted in, but it's fairly basic.

Anywho, cheers!
User avatar
James T
UNATCO
Posts: 130
Joined: Sat Sep 30, 2006 4:35 am
Location: Brisbane, 'Straya

Post by James T »

Hey Yuki, while you're at it, could you make it so that you still get a skill-points bonus if you disable a mech instead of blowing it up? kthxbye! ;)
"If all Americans want is security, they can go to prison." -- Dwight D. Eisenhower
User avatar
metche_steele
Illuminati
Posts: 1321
Joined: Thu Dec 09, 2004 4:45 pm

Post by metche_steele »

Great work Yuki :D

I know this will please many in the community!
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Post by DDL »

Nicely done!

In fact, there should only be one .utx in the HDTP install: the rest are all in the .u packages.

And in our next installer the HDTPanim.utx should get placed in the default texture folder, since there's no real need for it to be in HTDP\textures


It's a cunning 'use either case as available' workaround, too: I'll bet that TNM and others could probably benefit from this, since it means you don't have to release two versions.

Nicely done!
User avatar
Jetsetlemming
Illuminati
Posts: 2398
Joined: Mon Sep 18, 2006 9:11 pm
Contact:

Post by Jetsetlemming »

That's using the new models, too, right? I see mentions of the mesh in the code, so I'm assuming so. ^^
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Post by Y|yukichigai »

Jetsetlemming wrote:That's using the new models, too, right? I see mentions of the mesh in the code, so I'm assuming so. ^^
Erm, yeah, sorry, I meant textures AND models. You get the idea. :P
Post Reply