New way Editor!

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
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

New way Editor!

Unread post by Ikaros » Sun May 15, 2011 11:08 am

Hi all. I'm writing version2 of my editor, based upon new knowledges.

The code will be much more clear, so I'll can share sources with those are interested.

The .bin files will be read as a tree structure, so modifing a .bin will be easier and more error proof.
The functions that create, save as .bin, modify, etc. this tree will be in a package by itself, so they could be used as a base to other editors. If some of you want them, just contact me.

I'm planning to add (beyond the old interface) also a DC|ED-style inteface, to modify directly every value in files, with a correct handling of byte-counts and definitions. Here some screens:
[img width=351 height=600]http://malgolan.altervista.org/forumIma ... 2tree1.jpg[/img][img width=394 height=600]http://malgolan.altervista.org/forumIma ... 2tree2.jpg[/img]

Because of the recursive nature of .bin files (ID, length-of-block, data-block, where data-block again contains a list of ID-len-data, until leafs are reached) the .bin reader can skip whole unknown blocks of data, storing them as raw bytes, and then writing them identically when the tree is saved. In this way, not all the IDs must be known. Just the ones we want to modify.
Here is a list of IDs I've considered by now:
[img width=469 height=600]http://malgolan.altervista.org/forumImages/treeIDs.jpg[/img]
If you know the meaning of some IDs I've marked with "Unknown" just tell me. And if you want me to handle other IDs, idem.
Bye.
http://malgolan.altervista.org/
Italian politicians - Not in my name!

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

Re: New way Editor!

Unread post by hdmaster » Sun May 15, 2011 11:34 am

Yeah, amazing work!

I've sent you a message with a link to the scene2.bin documentation by the Mafia Modding Crew. It contains all the knowledge of the makers of DC||ED about the .bin files. Very useful stuff for you ;)

Also here's a list with all IDs (+ description) which appear in the 0x1140 block. The IDs apply to the .4ds files too, so not all are used inside the bin files. Because I've taken them from the disassembled HD2.exe, they are 100% correct ;)

1 Visual
2 Light
3 Camera
4 Sound
5 Sector
6 Dummy
7 Target
8 User
9 Model
10 Joint
11 Volume
12 Occluder
13 Scene
14 Area
15 Shadow
16 Landscape

User avatar
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

Re: New way Editor!

Unread post by Ikaros » Mon May 30, 2011 10:22 am

Works adavance. Some more screenshots..

This is the main interface. In the big area in center will be displayed the map. On the right there are some icons (temporary images!) to activate several layers (respawns, actors, zones, number of flags, etc.)
[img width=797 height=600]http://malgolan.altervista.org/forumIma ... 2main1.jpg[/img]

Also the DC|ED style editor has been improved. Here some screens of it.
[img width=797 height=600]http://malgolan.altervista.org/forumIma ... 2tree3.jpg[/img]
[img width=797 height=600]http://malgolan.altervista.org/forumIma ... 2tree4.jpg[/img]

And finally, for those who care, here is the design for interface:
http://malgolan.altervista.org/forumImages/H&D2 RevEngEd 2.pps

If you have suggestions, just tell me!
http://malgolan.altervista.org/
Italian politicians - Not in my name!

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

Re: New way Editor!

Unread post by Jason » Tue May 31, 2011 1:53 am

Looking great thup01
A new day, a new beginning

Fixing H&D2 Multiplayer tutorial

finnlayer
Corporal
Posts: 39
Joined: Sat Apr 09, 2011 10:17 pm

great news.

Unread post by finnlayer » Tue May 31, 2011 11:52 am

i hope you have plenty of paracetamol and black coffee, because their is so much to learn and do, i can imagine the headaches, one gets figuring all this hd2,

I have been trying the past week for map making, i am very pleased with your work and see the effort you have done for everyone, i can not wait to try it out, your editor.

will this editor also have plugin support  for other appz ??

one need to jack that petition for hd2, editor is born.

User avatar
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

Re: New way Editor!

Unread post by Ikaros » Wed Jun 01, 2011 2:31 pm

New feature implemented.

When loading an "actors.bin" file, now the editor checks for some byte counts integrity.
In fact, to manually modify files (using an hex editor) can introduce errors that H&D2 apparently can handle.
For istance, adding a "definition block" at end of file usually works, despite two byte counts should be changed according to the new byte length.

Here are some screens (the italian "s?" for "yes" will be fixed soon):
Image

Image

Also, graphic for layer icons has been improved, thanks to "Sonny":
Image

Do any of you knows if an actor.bin file can have different blocks AFTER the end of the definitions block? If so, could you make me an example among the vanilla missions?
http://malgolan.altervista.org/
Italian politicians - Not in my name!

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

Re: New way Editor!

Unread post by hdmaster » Tue Jun 21, 2011 6:37 pm

Here a few things that might be of interest:

The 3 float values in a 0x0032 block represent the color (RGB) of the ground plane in a scene (the one you see when you fall through the map)
I saw in one of your logs that you read the content of 0x24AE blocks as raw data, but these also have son datablocks (0x0100 up to 0x0900).
I've changed the value of a 0x00B6 block from 32 to zero on Normandy3_mp and the barbed wire around the first spawnpoints had no alpha anymore. The value in that block seems always to be 32 or 64

User avatar
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

Re: New way Editor!

Unread post by Ikaros » Wed Jun 22, 2011 7:23 am

Thank you! :)
Help is always appreciated!

I'll fix 0x0032 (just a label rename is needed).

I read as raw data all those blocks that are not worthing to modify (or I did not understand).
For example, the 0x24AE of ladder definitions is always the same (I suppose) and there is no need to change or understand its values. It's presence in the correct place it's enough.

Instead, the 0x24AE of zone definitions will be explored more, because it's needed to change flags owner and order.

If you have need for accessing some 0x24E block data, tell me which ones, and I'll add them to the editor.

And thank you again!
http://malgolan.altervista.org/
Italian politicians - Not in my name!

finnlayer
Corporal
Posts: 39
Joined: Sat Apr 09, 2011 10:17 pm

Re: New way Editor!

Unread post by finnlayer » Thu Jun 23, 2011 6:37 pm

Ikaros,,

you have much understanding of the files of hd2,

can you put a bik into walls and have them playing like they do on billboards, it be nice to see video playing on maps, n2_b, any were were their a wall.

Some old war movie cuts, and may be voice in the bik playing, or not ! so ikaros, is their any way to change a .bmp to a bik or place the module of voda,  in side a wall to play a bik,  ??? No one has even made this possible to play bik in a wall, i think you could achieve this and have  built in your editor bik playing in walls, i like to know how you do this playing bik in other places on a map.  :roll:

User avatar
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

Re: New way Editor!

Unread post by Ikaros » Fri Jun 24, 2011 1:40 pm

I've never tried such a thing  :eek:
Maybe hdmaster knows more than me.
If you can give me an example (a mission where this is achieved)
I could try to reverse engineer
and replicate it....
http://malgolan.altervista.org/
Italian politicians - Not in my name!

User avatar
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

Re: New way Editor!

Unread post by Ikaros » Fri Jul 01, 2011 7:51 am

Hi!
I've added "delete" and "duplicate" functionalities to my DC-ED-like editor.
If someone would you like to do some beta testing, please contact me!
http://malgolan.altervista.org/
Italian politicians - Not in my name!

User avatar
Ikaros
Sergeant
Posts: 82
Joined: Wed Mar 23, 2011 11:30 am
Location: Italy
Contact:

Re: New way Editor!

Unread post by Ikaros » Fri Jul 01, 2011 11:27 am

When a definition is missing its specification (a specification with the same label),
it's pointed out with a red exclamation mark:
Image

Do you think it's sufficient? Would you like also a pop-up on loading the file, or would it be too invasive?
Or, maybe, a completely different icon, more clearly visible? (for example, a big red disc...)

Which other marks would you suggest?
Model specifications which miss a relative definition? What else?

Bye.
http://malgolan.altervista.org/
Italian politicians - Not in my name!

User avatar
Mator
Private
Posts: 6
Joined: Tue Mar 29, 2011 12:18 pm
Contact:

Re: New way Editor!

Unread post by Mator » Tue Jul 05, 2011 12:02 pm

finnlayer wrote: can you put a bik into walls and have them playing like they do on billboards, it be nice to see video playing on maps, n2_b, any were were their a wall.
It's possible  ;)
But only with changes in game or with plugin for 3ds max.
Max can use movie like texture in format .avi or .mpeg.We may add new  movie format to hd2(hd2 engine can't play avi format any way).Not only .bik.[hard way]
Or get bik plugin for 3ds max.This will allow .bik [import/export](not .avi and .mpeg only).[easier way]
nods01
Hey Ikaros will you publish an editor or tease us?  :lol:
Last edited by Mator on Tue Jul 05, 2011 12:07 pm, edited 1 time in total.

miamidos
Private
Posts: 2
Joined: Thu Apr 02, 2009 8:55 pm

Re: New way Editor!

Unread post by miamidos » Tue Jul 05, 2011 1:02 pm

must give him time he makes a very good job  thup01 bravo ikaros good joob

User avatar
MCh2207Cz
Private
Posts: 11
Joined: Wed Jun 01, 2011 5:01 pm

Re: New way Editor!

Unread post by MCh2207Cz » Fri Jul 15, 2011 6:59 pm

I think that HD2 must be able to read BIK files internally, the cutscenes are in BIK files.

Also I think it is possible to make animated surface in a map. Look at rivers or sea surfaces.
The question is if they use the BIK files from "gamemovie" folder or BMP textures (saved as frames) from "maps" folder.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests