Merging Shifter and HDTP

Dedicated to the discussion of OTP and Deus Ex in general.

Moderators: Master_Kale, TNM Team

Post Reply
Xan
Mole Person
Posts: 9
Joined: Wed Mar 20, 2013 5:31 am

Merging Shifter and HDTP

Post by Xan »

I'm trying to merge the DeusEx.u files from the new HDTP and Shifter. Running the HDTP file, the game loads as Deus Ex with Shifter. The new HDTP models are all present, as are some functions of Shifter. But alt fire doesn't work, along with other Shifter functions. Running Shifter's file, everything Shifter works fine, but the textures are broken. Stealth pistol is invisible, parts of the assault rifle are gone, flares are ugly again, etc.

Following the advice from this post, I used UED2 (UED1 isn't included in the pack) to extract all scripts from Actor Classes. I saved the Shifter ones, replaced DeusEx.u with HDTP version, extracted again (closed UED2 between extractions). Used DoubleKiller to compare the DeusEx folder, and it says the checksums are identical on every single file. So I compared the rest of the extracted files; the only difference in any of them was one line in EditorEngine.uc:
In Shifter verion: AutoSaveIndex=3
In HDTP version: AutoSaveIndex=5

So... anybody have any idea what I did wrong? How do I merge these two mods?
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Merging Shifter and HDTP

Post by DDL »

Dear god. Um.

Ok, that is not what I would ever risk doing. While HDTP does not make major changes to DX core code, it DOES make changes (mostly in various display-related categories, obviously), and shifter makes a ton of changes (mostly in various other categories). They...really can't be just mashed together and be expected to work flawlessly. It'd be like saying "hippos are descended from the same family as whales are, so if I just breed them together it should produce a hippowhale"
To get it to work you'd have to systematically go through comparing classes and seeing which things HDTP changes from default, and which things Shifter changes, and then working out how they can be combined. Which could take a while, and would require a decent grasp of how DX's code is organised.

The best person to know exactly what yuki has changed for shifter, and how he's changed it, is yuki. So honestly, your best bet if you want to play with shifter is to simply wait until a version of shifter compatible with the latest HDTP is released.

Sorry.
Xan
Mole Person
Posts: 9
Joined: Wed Mar 20, 2013 5:31 am

Re: Merging Shifter and HDTP

Post by Xan »

Well poop. Here I am, being impatient and trying to vent it in a productive way instead of bugging Yuki with endless, "Hey, done yet? Hey, are you working on it? Hey! Hey!"

So let's take this from an academic standpoint instead. I'm a computer guy by nature and profession. Ignoring the difficulty involved, and low possibility of success, how would I go about merging the two? Or, what did I do wrong, that none of the differences in code came up at all?
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Merging Shifter and HDTP

Post by bjorn98009_91 »

What you could do is to implement the new HDTP things into Shifter just like he has implemented them. Open up a class that is already "HDTPified" like Phone.uc. You'll see there that there is some code in regards to loading HDTP assets. You could simply go through all the classes that have new HDTP assets and add similar code.

He has this in the Phone class:

Code: Select all

function bool Facelift(bool bOn)
{
	if(!Super.Facelift(bOn))
		return false;

	if(bOn)
		Mesh = mesh(DynamicLoadObject("HDTPDecos.HDTPphone", class'mesh', True));

	if(Mesh == None || !bOn)
		Mesh = Default.Mesh;

	return true;
}
Just add the facelift function to all other classes that have new HDTP assets and use the correct mesh for each one. You can just browse through all of HDTPs code to figure out what mesh they are using by checking the Mesh value in defaultproperties. That should take care of most of the decorations.

Otherwise I'd recommend comparing HDTP and Shifter files in Notepad++, figure out what stuff if HDTP and then implement that in Shifter.

Good luck!
Producer and Quality Assurance Manager for Deus Ex: Revision.
Xan
Mole Person
Posts: 9
Joined: Wed Mar 20, 2013 5:31 am

Re: Merging Shifter and HDTP

Post by Xan »

Where do I find the code to compare? Extracting it didn't work (see OP). Do I just need to download the code directly, instead of trying to extract it?

Is the code even available for both Shifter and HDTP?
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Merging Shifter and HDTP

Post by bjorn98009_91 »

You can extract the code by installing Shifter, open up UnrealEd 1 and then "export all" scripts. Then you'll get all the UScripts for all the packages exported right into your DX directory. You just need the files in the DeusEx directory since that is for the DeusEx.u file.

When done, overwrite with HDTP's DeusEx.u and do it again.

However, you must have the DeusEx.u you are going to export in your base System folder ex. DeusEx\System.
Producer and Quality Assurance Manager for Deus Ex: Revision.
Xan
Mole Person
Posts: 9
Joined: Wed Mar 20, 2013 5:31 am

Re: Merging Shifter and HDTP

Post by Xan »

Did that. Didn't work. No changes between the two exports when compared with DoubleKiller. Did I mention I can't find UnrealEd 1 in the pack? Only UED2.

EDIT: Found UED1. It gets installed to System. Why there, I have no idea. Much easier to work with now that I actually have files to, uh, work with.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Merging Shifter and HDTP

Post by DDL »

Does doublekiller compare actual file content? Or just "number and name of files"?

Because both shifter's and HDTP's versions of deusex.u will have identical (or near identical) files and filenames, it's just the code inside those files that will be different.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Merging Shifter and HDTP

Post by bjorn98009_91 »

No DoubleKiller will compare size (bytes) and if that match, do a crc32 hash of both files and compare. So that should work, I've used that program myself many times just to do such an extraction we're talking about.

Just be sure the DeusEx.u file you want to export from has to be in the system directory, not DeusEx\HDTP\System, but in the regular system folder. If it still doesn't work I can zip and upload the extracted files here, if DDL approves of me releasing the source to HDTP.
Producer and Quality Assurance Manager for Deus Ex: Revision.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Merging Shifter and HDTP

Post by DDL »

Anyone with the SDK could extract it, so sure: go right ahead. :)
User avatar
Jaedar
Illuminati
Posts: 3937
Joined: Fri Mar 20, 2009 3:01 pm
Location: Terra, Sweden, Uppsala.

Re: Merging Shifter and HDTP

Post by Jaedar »

Thank you Xan!

But your coder is in another castle.
"Delays are temporary; mediocrity is forever."
odio ergo sum
Xan
Mole Person
Posts: 9
Joined: Wed Mar 20, 2013 5:31 am

Re: Merging Shifter and HDTP

Post by Xan »

Nice avatar, Jaedar.

DDL, bjorn hit it dead on. DoubleKiller does a checksum comparison. It is theoretically possible for two (or more) unique files to have the same checksum, but the odds are, shall we say, worse than successfully navigating an asteroid field.

I was able to extract everything and now have 897 total files between the two, but *only* 762 need merged; the others are unique to either Shifter or HDTP. To clarify, that is 381 files present in both mods. Some of these will probably be very simple to go through; little changes like which texture to use or adding code that doesn't interfere with the other mod's operations. I suspect that some of them will be significantly harder to work through.

DDL and Yuki, is it okay with you guys if I release a merged .u file?

EDIT: Does anyone know if there are any problems using tab in the code? I know some languages force you to use spaces; I'd like to avoid editing all of these only to discover I couldn't use tabs...
Last edited by Xan on Mon Mar 25, 2013 11:07 pm, edited 2 times in total.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Merging Shifter and HDTP

Post by DDL »

No, all whitespace is fine.
Xan
Mole Person
Posts: 9
Joined: Wed Mar 20, 2013 5:31 am

Re: Merging Shifter and HDTP

Post by Xan »

Sweet, thanks. Are you cool with my releasing the finished .u file?

Total: 762
Complete: 136
Left: 626
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Merging Shifter and HDTP

Post by DDL »

If you're happy to put the hours and hours in merging and testing everything, I'm not gonna stop you.

HDTP is essentially a giant open resource as far as I'm concerned. Just give credit to the artists.. :P
Post Reply