4ds files hacked

This is for general discussion about Hidden & Dangerous 2, talk about what you liked or what you didn't like about the sequel. Talk about multiplayer games, setup matches etc.
User avatar
Marvin (hun)
Sergeant
Posts: 59
Joined: Sat Mar 19, 2011 3:01 pm
Location: Hungary

Re: 4ds files hacked

Unread post by Marvin (hun) » Wed Sep 21, 2011 1:56 pm

Yes, I noticed that I have to read them backward, but thanks.

Can you see any chance to making completely new maps for hd2 in the near future, hdmaster? Because I don't know what can we do without the collisions. Do you have any idea to making the collisions? (or lightmaps?)

As I promised before, I separated the textures of the hd2 into different folders. If you want, I can send the filelist on e-mail to you!

User avatar
betteryouthanme
Lieutenant
Posts: 116
Joined: Thu Jun 12, 2008 1:37 pm
Location: Germany
Contact:

Re: 4ds files hacked

Unread post by betteryouthanme » Wed Sep 21, 2011 5:21 pm

Now after importing & exporting (without change) and importing again it looks like on the pics below.
One stair is displayed correctly (in-game its glimmering? -> 3rd picture, with collision), in most cases the stairs look like on the picture of my previous post. (just the ramp without collision) and one stair is not displayed at all. (no ramp, no stairs, no collision)
stairs_2.jpg
stairs_2.jpg (99.31 KiB) Viewed 18028 times
stairs_1.jpg
stairs_1.jpg (36.56 KiB) Viewed 18028 times
stairs_3.jpg
stairs_3.jpg (28.43 KiB) Viewed 18028 times
Thanks for your explanations. Very helpful. thup01

User avatar
betteryouthanme
Lieutenant
Posts: 116
Joined: Thu Jun 12, 2008 1:37 pm
Location: Germany
Contact:

Re: 4ds files hacked

Unread post by betteryouthanme » Fri Sep 23, 2011 11:17 am

@ Jason: Could not find an "edit your post" button. Thought i've done that with my last post now it seems to be gone?

Where are the .bin loading options in your newest script version hdmaster? ;)

Also i want to add a door into a map where doors are not existing yet, if somebody tried that already what i have to mind?
Door definitions are stored in scene2.bin. Should be no problem to add. The door itself is a model and i can simply import it? Was trying to find the Libya1 doors model, but no luck yet.

User avatar
Marvin (hun)
Sergeant
Posts: 59
Joined: Sat Mar 19, 2011 3:01 pm
Location: Hungary

Re: 4ds files hacked

Unread post by Marvin (hun) » Sat Sep 24, 2011 10:13 am

Do the occluders matter anything with using a ~2009-2011 PC-performance? Or it depends only from the engine?
I imported and exported Libya2 and I found some holes on the map between the meshes in the game.

User avatar
Jason
Administrator
Posts: 1895
Joined: Thu Sep 02, 2004 7:26 pm
Location: Perth, Australia
Contact:

Re: 4ds files hacked

Unread post by Jason » Tue Nov 15, 2011 4:37 pm

hdmaster come back :cry:

User avatar
Marvin (hun)
Sergeant
Posts: 59
Joined: Sat Mar 19, 2011 3:01 pm
Location: Hungary

Re: 4ds files hacked

Unread post by Marvin (hun) » Fri Nov 18, 2011 10:10 pm

Jason wrote:hdmaster come back :cry:
Hmmm, I also start to worry about him. :sad:

hdmaster
Sergeant
Posts: 84
Joined: Thu Jan 27, 2011 9:31 pm
Location: Germany

Re: 4ds files hacked

Unread post by hdmaster » Sun Nov 27, 2011 5:24 pm

Jason wrote:hdmaster come back :cry:
I'm back here grin01
Marvin (hun) wrote:Do the occluders matter anything with using a ~2009-2011 PC-performance? Or it depends only from the engine?
I imported and exported Libya2 and I found some holes on the map between the meshes in the game.
I'd say both. I once read an interview where a developer said that the engine will handle about 30000 polygons in the FOV. But I've already had framerates > 25 in a FOV where I've added like 10 tanks each with about 70000 polys and I didn't use any occluders there. But there's a certain limit of polycount for each PC. The advantage of occluders is that they tell the engine which faces should not be rendered (cause they're behind walls or whatever) so more polys are available until it reaches the limit again.
betteryouthanme wrote: Where are the .bin loading options in your newest script version hdmaster? ;)
I've started again developing on the whole HD2 tools this week. There will be some really cool features including the .bin import. Here's a screen of an editor similar to DC-ED inside 3ds Max that will be available soon

Image

Uploaded with ImageShack.us

I've also fixed a few bugs of the 4DS import & export tools. I'll upload this version soon. thup01

User avatar
Marvin (hun)
Sergeant
Posts: 59
Joined: Sat Mar 19, 2011 3:01 pm
Location: Hungary

Re: 4ds files hacked

Unread post by Marvin (hun) » Mon Nov 28, 2011 5:56 pm

Nice news, you are a God, hdmaster!

off: Thanks for your tips about the editing on the bin files: I succesfully finished (after a half-year) the new version of my hungarian translate! :))

User avatar
betteryouthanme
Lieutenant
Posts: 116
Joined: Thu Jun 12, 2008 1:37 pm
Location: Germany
Contact:

Re: 4ds files hacked

Unread post by betteryouthanme » Wed Nov 30, 2011 2:47 pm

Great that you're back and still into it!
We all hang by a thread and the thread is you. You were lost without trace for that long i thought you would come up with H&D 3 :mrgreen:
Please don't forget about checkpoints.

hdmaster
Sergeant
Posts: 84
Joined: Thu Jan 27, 2011 9:31 pm
Location: Germany

Re: 4ds files hacked

Unread post by hdmaster » Fri Dec 02, 2011 8:06 pm

betteryouthanme wrote: Please don't forget about checkpoints.
I had a look again on the check2.bin files and came finally up with an improved script that creates the connection grid and also imports the vehicle cps.

Copy & Paste that script into the Maxscript Editor, edit the filename in the script and run the script:

Code: Select all

FILENAME = "E:\\Spiele\\Hidden & Dangerous 2\\UnpackedNew\\Missions\\co_burgundy1\\check2.bin"
FILESIZE =  getFileSize FILENAME
BUILDGRID = False

fn createPath cp1 cp2 = (
	spline = SplineShape pos:cp1.position
	addNewSpline spline
	addKnot spline 1 #smooth #line cp1.position
	addKnot spline 1 #smooth #line cp2.position
	updateShape spline
)


struct checkpoint (
	position, connections = #(), additional = #(), name = ""
)

fn main = (
	if not doesFileExist FILENAME do ( MessageBox ("ERROR: File '"+FILENAME+"' does not exist"); return false )
	f = fopen FILENAME "rb"
	if f == undefined do ( MessageBox ("ERROR: Opening '"+FILENAME+"' failed"); return false )
	s
	do (	
		if ReadHex f 4 == "0x0901D07E" then (
			theLength = ReadLong f
			
			nCheckpoints 	= ReadLong f
			nUnk1			= ReadLong f
			nCP18			= ReadLong f
			nUnk2			= ReadLong f
			nCPVar			= ReadLong f
			
			CPs = #()
			TEST = #()
			
			for i = 1 to nCheckpoints do (
				print (ftell f)
				
				theCP = checkpoint()				
				X = ReadFloat f; Z = ReadFloat f; Y = ReadFloat f
				theCP.position = [X,Y,Z]
				
				unk1 = ReadLong f -- ??????????????????????????????
				unk2 = ReadHex f 4 -- ???????????????????????????????
		
				nConnections = ReadByte f
				unk3 = ReadByte f -- ???
				
				if not bit.And nConnections 0x40 == 0 do nConnections -= 0x40
				
				fseek f 10 #seek_cur
			
				for j = 1 to nConnections do (
					append theCP.connections (ReadShort f #unsigned+1)
					append TEST (ReadShort f #unsigned)
				)
			
				print theCP
				
				append CPs theCP
			)
			
			for i = 1 to nCP18 do (
				cpIndex = ReadShort f #unsinged+1
				CPs[cpIndex].name = ReadFixedString f 16
			)
			
			for i = 1 to nCPVar do (
				cpIndex = ReadShort f #unsinged+1
				CPs[cpIndex].name = ReadString f
			)
			
			if BUILDGRID do (
				for x in CPs do (
					for connection in x.connections do (
						createPath x CPs[connection]
					)
				)
			)

			for x in CPs do (
				cp = Point pos:x.position name:x.name size:1.0 centermarker:True cross:False box:False constantscreensize:True
			)
			
		) else (
			MessageBox ("Stopped reading @ "+(ftell f) as string)
			exit
		)
	) while (ftell f) < FILESIZE
		
	OK
)

main()
I've tested this only on a few files but worked for all of them. The result is something like this (Tutorial map):

Image

Uploaded with ImageShack.us

Unfortunately I have not collected all information on this file type, so I am not yet able to write an exporter no_01
Last edited by hdmaster on Sat Dec 10, 2011 1:32 pm, edited 3 times in total.

User avatar
betteryouthanme
Lieutenant
Posts: 116
Joined: Thu Jun 12, 2008 1:37 pm
Location: Germany
Contact:

Re: 4ds files hacked

Unread post by betteryouthanme » Tue Dec 06, 2011 12:56 pm

Seems not to work for co_burgundy1
Now i've edited the path to "E:\\Programme\\Hidden & Dangerous 2\\Missions\\bytm_bur1\\check2.bin"
But it stops at line 49
"--Nein ""+"" Funktion für undefined"

hdmaster
Sergeant
Posts: 84
Joined: Thu Jan 27, 2011 9:31 pm
Location: Germany

Re: 4ds files hacked

Unread post by hdmaster » Tue Dec 06, 2011 4:44 pm

Has been fixed. Updated the code in my previous post.

User avatar
betteryouthanme
Lieutenant
Posts: 116
Joined: Thu Jun 12, 2008 1:37 pm
Location: Germany
Contact:

Re: 4ds files hacked

Unread post by betteryouthanme » Fri Dec 09, 2011 12:22 pm

Is there a way to show only vehicle checkpoints? Cause with all the checkpoints & grids it's very confusing.
Also it won't show the checkpoints names. Maybe just a setting in 3ds Max i've to set?
Thanks again! Hope you'll find a way exporting checkpoints.

Lars told me, some time ago, about "Chameleon" a game that is using the same engine like HD2.
http://www.youtube.com/watch?v=Pu31Aj8VLtU

There are the same folders like in HD2 (missions.dta, models.dta, ...) or at least very similar and maybe you could extract them the same way you done with Sabre Squadron and then let's see if and in what way we can use these maps in HD2.. The maps of Chameleon are looking very very nice. And of course we'd have probably some new 4ds model files.
Maybe you know already about it, just wanted to mention so we won't miss something. ;)
Last edited by betteryouthanme on Mon Dec 12, 2011 2:17 pm, edited 1 time in total.

User avatar
Jason
Administrator
Posts: 1895
Joined: Thu Sep 02, 2004 7:26 pm
Location: Perth, Australia
Contact:

Re: 4ds files hacked

Unread post by Jason » Fri Dec 09, 2011 1:06 pm

betteryouthanme wrote:Lars told me, some time ago, about "Chameleon" a game that is using the same engine like HD2.
http://www.youtube.com/watch?v=Pu31Aj8VLtU

There are the same folders like in HD2 (missions.dta, models.dta, ...) or at least very similar and maybe you could extract them the same way you done with Sabre Squadron and then let's see if and in what way we can use these maps in HD2.. The maps of Chameleon are looking very very nice. And of course we had probably some new 4ds model files.
Maybe you know already about it, just wanted to mention so we won't miss something. ;)
It would be awesome if we could crack open the Chameleon files and translate it to English!

hdmaster
Sergeant
Posts: 84
Joined: Thu Jan 27, 2011 9:31 pm
Location: Germany

Re: 4ds files hacked

Unread post by hdmaster » Sat Dec 10, 2011 1:22 pm

betteryouthanme wrote:Is there a way to show only vehicle checkpoints? Cause with all the checkpoints & grids it's very confusing.
Also it won't show the checkpoints names.
Ups, I've somehow deleted that part of code. Updated the script again ;). You can now choose if you want to build the path connections by setting BUILDGRID to True or False


Yes I've already heard about Chameleon years ago and it looks pretty good. I think it won't be a problem to use the extractor for SS the same way here cause it's the same engine. If the game has a 'rw_data.dll' in it's main dir then I can tell for sure that it will work. But then I need to create a list with all filenames first, so I need the game and probably a savegame to load all missions/chapters because that way I can log the names of the files that are loaded by the game.

Post Reply

Who is online

Users browsing this forum: No registered users and 68 guests