Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 3:02 am
All times are UTC + 0
New TMP editor
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [17 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Thu Jun 24, 2004 2:08 am    Post subject:  New TMP editor Reply with quote  Mark this post and the followings unread

Olaf wrote:
The normal graphics of a tile are horizontal. The (optional) extra graphics of a tile are vertical. If cx_extra is between 0 and 256, the extra graphics are present.
The normal graphics can be found directly after the TMP TS image header. It's a 576 byte block. Because TS uses an isometric grid, the tile is not rectangular. The first line has 4 pixels, the second line has eight pixels. Line 12 has 48 pixels, line 13 has 44 pixels and line 22 has 4 pixels.
After the normal graphics, there's another 576 byte block. This block probably contains height data.
Then you have the extra graphics (if present). They're rectangular, so it's a block of cx_extra * cy_extra bytes. They should be drawn at x_extra,y_extra.



Banshee here are some file to get you started.
It has a blank.tem file from TS. An image showing the two sets of the primary image (the image and z-data or shadow info). Also has a txt file laying out the hex code in a more understandable format.



work.zip
 Description:

Download
 Filename:  work.zip
 Filesize:  2.38 KB
 Downloaded:  347 Time(s)


Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jun 24, 2004 2:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks, I've downloaded the file and a lot of thing really clarified here. But... there are still a lot of thing to understand, but it's a good start. I'll need to take a look at the XCC code. But first I need to finish some personal stuff. I'll reply soon with more stuff. Thanks a lot.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Thu Jun 24, 2004 3:05 am    Post subject: Reply with quote  Mark this post and the followings unread

No problem. I will try to put together some more info tomorrow.
It help a lot when you see it in a visual way. Smile

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jun 24, 2004 3:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Yea, of course. I'm still wondering that 5th value. And it would also be interesting to make a table of values of the type of tmp files. XCC Tmp Editor doesnt make it very clear...

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Thu Jun 24, 2004 10:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Olaf wrote:
Directly after that, there is an index of the tiles. This index consists of c_files __int32 entries. When such an entry is zero, there is no tile. Otherwise, it's an offset from the start of the file and points to a TMP TS image header.


That one and the others that follow look like off set to the start of each (primary and extra image) sections.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 25, 2004 2:22 am    Post subject: Reply with quote  Mark this post and the followings unread

weird, if that's the objective of that value, then the value is set wrongly in the sample you sent me. It's set to 20, however, the picture starts in the byte 73.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Fri Jun 25, 2004 3:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Not the image the begining of that section or the header of the section.

01000000 01000000 30000000 18000000 14000000
00000000 00000000

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Jun 26, 2004 11:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh... I've confused that a bit... I thought there was a value between the header and the image header.... my bad. But I still dont understand what is this 14 00 00 00.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Sun Jun 27, 2004 3:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
Oh... I've confused that a bit... I thought there was a value between the header and the image header.....


Yes there are a group of code.

Banshee wrote:
my bad. But I still don’t understand what is this 14 00 00 00.


14 is in hex. If you change it to decimal it will = 20, this give you the location of where each data location starts. In this case it is at decimal 20 or hex 14.

Now find dec. 20 or hex 14 in the blank01.tem. It will be four bytes down the code.

It may be easer to make the hex editor read 00000000 (4bytes) instead of 00 00 00 00 one byte each.
Note this file uses one byte to four byte depending on the info.
like
All image color/ z-data = 2 bytes 0000
Most of the header info = 4 bytes 00000000
The property part = 1 byte each 00

Last edited by DJB on Sun Jun 27, 2004 6:37 pm; edited 1 time in total

Back to top
View user's profile Send private message
Kravvitz
Commander


Joined: 25 Mar 2003
Location: USA

PostPosted: Sun Jun 27, 2004 4:26 am    Post subject: Reply with quote  Mark this post and the followings unread

DJB, you it's spelled byte, not bite.

8 binary bits make one byte.

4 binary bits make one hex character, so two hex characters are one byte.

_________________
Check out my FAQ and Modding Info Page.
Community Links Page
http://www.dynamicsitesolutions.com/

Back to top
View user's profile Send private message Visit poster's website Skype Account Yahoo Messenger Account AIM Address
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Sun Jun 27, 2004 6:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

fixit

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Sep 26, 2004 11:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

XCC Code:

Code:
struct t_tmp_ts_header
{
   __int32 cblocks_x;
   __int32 cblocks_y;
   __int32 cx;
   __int32 cy;
};

struct t_tmp_image_header
{
   __int32 x;
   __int32 y;
   __int32 extra_ofs;
   __int32 z_ofs;
   __int32 extra_z_ofs;
   __int32 x_extra;
   __int32 y_extra;
   __int32 cx_extra;
   __int32 cy_extra;
   unsigned int has_extra_data: 1;
   unsigned int has_z_data: 1;
   unsigned int has_damaged_data: 1;
   __int8 height;
   __int8 terrain_type;
   __int8 ramp_type;
   unsigned __int8 radar_red_left;
   unsigned __int8 radar_green_left;
   unsigned __int8 radar_blue_left;
   unsigned __int8 radar_red_right;
   unsigned __int8 radar_green_right;
   unsigned __int8 radar_blue_right;
   __int8 pad[3];
};



In Delphi:


Code:
t_tmp_ts_header = record
    cblocks_x:integer;
    cblocks_y:integer;
    cx: integer;
    cy: integer;
end;

t_tmp_image_header = record
   x:integer;
   y:integer;
   extra_ofs:integer;
   z_ofs:integer;
   extra_z_ofs:integer;
   x_extra:integer;
   y_extra:integer;
   cx_extra:integer;
   cy_extra:integer;
   has_extra_data: word; // default value = 1
   has_z_data: word;  // default value = 1
   has_damaged_data: word;  // default value = 1
   height:smallint;
   terrain_type:smallint;
   ramp_type:smallint;
   radar_red_left:byte;
   radar_green_left:byte;
   radar_blue_left:byte;
   radar_red_right:byte;
   radar_green_right:byte;
   radar_blue_right:byte;
   pad: array [0..2] of smallint;
end;

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Oct 10, 2004 3:07 am    Post subject: Reply with quote  Mark this post and the followings unread

TMP File Structural Analysis:


[TMP Header]

Pointer to Image Header 1
Pointer to Image Header 2
....
Pointer to Image Header n-1
Pointer to Image Header n


Image 1
------------------------------------
[Image Header 1]

[FrameImage 1]

[Shadow Data 1]


Image 2
------------------------------------
[Image Header 2]

[FrameImage 2]

[Shadow Data 2]



...



Image n-1
------------------------------------
[Image Header n-1]

[FrameImage n-1]

[Shadow Data n-1]



Image n
------------------------------------
[Image Header n]

[FrameImage n]

[Shadow Data n]

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
The DvD
TiberiumWeb.com Webmaster


Joined: 30 Dec 2002
Location: Netherlands

PostPosted: Sun Oct 10, 2004 8:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, if there's anything i need, it's a working TMP editor..

Back to top
View user's profile Send private message Visit poster's website Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sun Oct 10, 2004 8:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

And do you also need a working SHP editor that also edits TMP? O.o


Anyway, does anyone knows how does the data pointed by the z_offset works?

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
DJB
Vehicle Drone


Joined: 08 May 2004
Location: who knows

PostPosted: Mon Mar 07, 2005 3:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Sorry for the long wait. if you start up on the tmp editor again.

No a shp editor and a temp editor are different.

Yes you will need the z-data to work. When you get around to this again send me an e-mail at DJBREIT@ptd.net and I will dig up the info you need.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Mar 07, 2005 4:06 am    Post subject: Reply with quote  Mark this post and the followings unread

I already know how this works... I just have other priorities before implement TMP editing in the SHP Builder or OS Modding Studio. The format is different, TMP has some settings that SHP doesn't have and also the graphical format is different as well, however, you can make everything in one program if you adapt it to edit different kinds of files.

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [17 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.4367s ][ Queries: 13 (0.2553s) ][ Debug on ]