| 
 | 
     
    
    
    
     
    
    
    
 
    
    
 
    
     
    
    
    
     
    
    
    
     
    
    
    
 
    
    
 
    
    
 | 
       | 
      
 
 
	
	
	
	
	
	
	
	
		  | 
	
	 | 
 
 
		
	
	
	
		
	
	
	
		
		
		
			
			 
			
				May 12th, 2004, 09:17 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Corporal 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2004 
					Location: Denmark 
					
					
						Posts: 74
					 
					 
	Thanks: 0 
	
		
			
				Thanked 0 Times in 0 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Dom2 file formats
	
			 
             
			
		
		
		
		Hi 
 
Anyone know which Dom2 data files (map, player-data) are readable and where I can find a file format documentation? I gather the player files are encrypted with the player password, but if I got the password (to my own files) will I be able to read these and use the data? 
 
I'm hoping to make a short of "quick-bar" to help get a better overview of my armies etc., though I still wish Illwinter would simply put better main-map filters in (like Show/Hide: Scouts/Commanders/Priest/Garrisoned Troops (troops not in army)). 
 
Has anyone else done this or is it hopeless? 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 12th, 2004, 04:36 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Corporal 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2004 
					Location: Denmark 
					
					
						Posts: 74
					 
					 
	Thanks: 0 
	
		
			
				Thanked 0 Times in 0 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		Hmm, yes it was indeed the specific game data files I was interrested in. So for a running game, is the following correct? Otherwise please elaborate: 
jotun.2h - contains Jotun orders for current turn. 
Is this the file sent to host in PBEM games? 
So at start of game, this contains God data?
 
jotun.trn - contains Jotun player turn file describing situation at start of current turn. 
Is this the file returned from host to the Jotun player in PBEM games? 
In a running game does this file contains God data?
 
ftherlnd = history file 
Province data? Anyting else? 
When is this file updated in a PBEM game? When the player opens his new .trn file?
 
What I'm looking for of course is a way to open and decode all these files (provided I have the appropriate password, ie. my own), and present chosen data in another manner.
 
Btw. I read that something called Torvak's savegame utility can read the turn numer, so obviously someone has been able to figure out the data bytes         
Oh yea, and ordered the full game yesterday so soon no more demo for me       
Edit: ... after taking a look at the files with a hex-editor, it seems that byte 15 is the "turn number" byte - this goes for all three files: ftherlnd, .trn and .2h. So now I only need the rest    
 
 [ May 12, 2004, 16:08: Message edited by: Innocence ] 
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
            
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 12th, 2004, 05:51 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Major General 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jan 2004 
					
					
					
						Posts: 2,425
					 
					 
	Thanks: 0 
	
		
			
				Thanked 0 Times in 0 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		
	Quote: 
	
	
		
			
				Originally posted by Innocence: 
jotun.2h - contains Jotun orders for current turn. 
Is this the file sent to host in PBEM games? 
So at start of game, this contains God data?
			
		 | 
	 
	 
 That's right, Chief. 
 
 
	Quote: 
	
	
		
			
				jotun.trn - contains Jotun player turn file describing situation at start of current turn. 
Is this the file returned from host to the Jotun player in PBEM games?
			
		 | 
	 
	 
 Right again. 
 
 
	Quote: 
	
	
		| 
			
				In a running game does this file contains God data?
			
		 | 
	 
	 
 Only in the sense of the gods as units. I'm not sure if any other pertinent god data is included. 
 
 
	Quote: 
	
	
		
			
				ftherlnd = history file 
Province data? Anyting else? 
When is this file updated in a PBEM game? When the player opens his new .trn file?
			
		 | 
	 
	 
 ftherlnd is the "world state" file. It contains all of the information about the world, which is needed to host a game. It's updated at every hosting. In a PBEM game, players should not be sent this file unless you wish them to be able to do oracular hosting, or you wish to change who is handling the hosting. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 12th, 2004, 07:27 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
 
  
			
				
				
				Shrapnel Fanatic 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Oct 2003 
					Location: Vacaville, CA, USA 
					
					
						Posts: 13,736
					 
					 
	Thanks: 341 
	
		
			
				Thanked 479 Times in 326 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		
	Quote: 
	
	
		
			
				Originally posted by liga: 
 In which language is the Code ? Where did you got the information about the .2h formats ? Can you send me the code at liga(AT)treemme.org ? 
			
		 | 
	 
	 
 I think its ansi-C 
I didnt write it (and cant remember who did) 
I also dont know if it works 
Its here if anyone wants to look at it but remember it was just the start of a project, and it was for Dom1 not for Dom2 
 http://www.dom2minions.com/~dominion/dumpgod.c 
  
 [ May 12, 2004, 19:16: Message edited by: Gandalf Parker ] 
		
	
		
		
		
		
		
		
			
				__________________ 
				-- DISCLAIMER:  
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
			 
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 13th, 2004, 01:34 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
 
  
			
				
				
				Shrapnel Fanatic 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Oct 2003 
					Location: Vacaville, CA, USA 
					
					
						Posts: 13,736
					 
					 
	Thanks: 341 
	
		
			
				Thanked 479 Times in 326 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		Well the map image is readable (.TGA paint program format) 
the map commands are readable (.map file, ascii text) 
the MODs are readable (.dm file, ascii text, plus .tga's in the mods dubdirectory) 
 
the games scoreboard is readable if you use the --scoredump switch when running the game. (score.html, web format) 
 
I think thats about it. I have a bit of code someone did way back in Dom1 which is suppposed to be able to read god files (.2h) but I dont know how well it does Dom2 files. And I dont know if anyone has ever tried modifiing it to read the later .2h files in an ongoing game 
		
	
		
		
		
		
		
		
			
				__________________ 
				-- DISCLAIMER:  
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
			 
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 13th, 2004, 01:42 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Second Lieutenant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2001 
					Location: Modena, Italy 
					
					
						Posts: 412
					 
					 
	Thanks: 0 
	
		
			
				Thanked 0 Times in 0 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		
	Quote: 
	
	
		
			
				Originally posted by Gandalf Parker: 
  
I think thats about it. I have a bit of code someone did way back in Dom1 which is suppposed to be able to read god files (.2h) but I dont know how well it does Dom2 files. And I dont know if anyone has ever tried modifiing it to read the later .2h files in an ongoing game 
			
		 | 
	 
	 
 In which language is the Code ? Where did you got the information about the .2h formats ? Can you send me the code at liga(AT)treemme.org ? 
 
thkx 
 
Liga 
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 13th, 2004, 02:41 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
 
  
			
				
				
				Major General 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2000 
					Location: 500km from Ulm 
					
					
						Posts: 2,279
					 
					 
	Thanks: 9 
	
		
			
				Thanked 18 Times in 12 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		There's a pro and a con to generally known file formats: 
 
pro: 
Some folks could start working on "external", nation-specific AIs. 
(I still wonder if you could write one in F77 ...) 
 
 
con: 
Some folks would start working on cheats and exploits to ruin multiplayer games ... 
 
I would like to know the file formats very much - sadly the other game, which would have been much more suited for such a task, Stars!, died without the devs giving the specs to the public. 
Security by obscurity isn't the way to go, but that's only IMHO. 
 
Maybe our devs here could drop a line how they feel about this issue ?? 
  
 [ May 13, 2004, 01:43: Message edited by: Arralen ] 
		
	
		
		
		
		
		
		
			
				__________________ 
				As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot. 
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
			 
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 13th, 2004, 03:00 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Major General 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jan 2004 
					
					
					
						Posts: 2,425
					 
					 
	Thanks: 0 
	
		
			
				Thanked 0 Times in 0 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		
	Quote: 
	
	
		
			
				Originally posted by Arralen: 
con: 
Some folks would start working on cheats and exploits to ruin multiplayer games ...
			
		 | 
	 
	 
 It would seem to be the case that the data is encrypted and compressed to prevent exactly that. I've pulled open .trns and .2hses just to see if anything particularly edifying was revealed, but not only are they at least partially encrypted and compressed, as no plaintext strings such as the name was found anywhere, but they are also checksummed against modification. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 13th, 2004, 03:35 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Corporal 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jan 2004 
					Location: Wilmington, Delaware, USA 
					
					
						Posts: 191
					 
					 
	Thanks: 1 
	
		
			
				Thanked 13 Times in 2 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		dumpgod doesn't seem to work on dom2 files.  under linux, it dies with "g2 seems to be misaligned". 
		
	
		
		
		
		
		
		
			
				__________________ 
				No plan survives contact with the enemy. 
--Helmut von Moltke
 
Have too may pretender files to keep track of? Use  catgod to view them.
			  
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				May 13th, 2004, 07:57 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
 
  
			
				
				
				Corporal 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2004 
					Location: Denmark 
					
					
						Posts: 74
					 
					 
	Thanks: 0 
	
		
			
				Thanked 0 Times in 0 Posts
			
		
	 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
    
	
     
	
	
		
		
		
			
			
				 
				Re: Dom2 file formats
			 
             
			
		
		
		
		
	Quote: 
	
	
		| 
			
				ftherlnd is the "world state" file. It contains all of the information about the world, which is needed to host a game. It's updated at every hosting. In a PBEM game, players should not be sent this file unless you wish them to be able to do oracular hosting, or you wish to change who is handling the hosting.
			
		 | 
	 
	 
 Ok thanks - so it's a host-only file and in a normal multiplayer game the regular players wont even have this file     
 
	Quote: 
	
	
		| 
			
				I would like to know the file formats very much - sadly the other game, which would have been much more suited for such a task, Stars!, died without the devs giving the specs to the public.
			
		 | 
	 
	 
 Ah yes Stars! I wouldn't call it dead, though the sequel sadly is. 
 
It's likely that Illwinter has enrypted the files, but if they wont release the file-specs and encryption metod (and noone else has been able to figure it out) I say we stand almost zero chance of any progress. Too bad. 
 
Alternatively, maybe they could implement an export feature like Stars! has, dumping ALL information from the players PoV into semi-colon separated text-files, readable with anything from Excel to custom made programs. All without comprimising the file-security. 
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
            
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	
	
	
		
	
		 
		Posting Rules
	 | 
 
	
		
		You may not post new threads 
		You may not post replies 
		You may not post attachments 
		You may not edit your posts 
		 
		
		
		
		
		HTML code is On 
		 
		
	  | 
 
 
	 | 
	
		
	 | 
 
 
     |  
 |