SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Sub/Naval + Other Games > Classic Subsims
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-30-05, 12:47 AM   #1
Chapeau
Sailor man
 
Join Date: Oct 2005
Location: near USS Constellation
Posts: 48
Downloads: 423
Uploads: 0
Default Playing with the JRFs - there's a question in here somewhere

I've been looking at and modifying a couple of .JRF model files with a hex editor.

ADBHelldiver.JRF - there are many occurrences of the string 'ADBHelldriver'. I managed to figure out how to change them all to the correct spelling, and the danged thing still works. I learned something, but as we shall see, a little knowledge can be dangerous.

Relevant matter: Rendered into Works Database, the UnitXX.db files have the second and third letters of the JRF in the third column, which I call 'TYPE', thus 'Am,A,DB,Helldiver,...' is Am (column 1, titled NAT for nationality), A (column 2, titled CAT for category), DB (column 3, titled TYPE for type of unit), Helldiver (column 4, titled CLASS for class of unit), und so vieder. ADBHelldiver is an American dive-bomber of the Helldiver class.

Given the preceding: ACFockeWulf.JRF - as the Focke-Wulf 200 was a long-range patrol scout bomber, the file is obviously misnamed; it should be either ASCFockeWulf.JRF, or AHBFockeWulf.JRF, or perhaps we could have one of each.

WARNING: Stop reading this post now. You have better things to do.

Reminder: in the scenario definition file (SDF), the 'Class = filename' line calls out the unit definition file (filename.UDF). In the UDF, 'Class = filename' calls out the Janus rendering file (filename.JRF), which is the graphic definition file itself. All the filenames must be the same, keeping in mind that capitalization is irrelevant.

Example in this case:
In the SDF: Class = ACFockeWulf (name of the UDF)
In the UDF: Class = ACFockeWulf (name of the JRF)

So far, this is all as clear as Mississippi mud, right? Don't worry, it gets worse. Remember, you were warned.

I wondered if renaming the file to AHBFockeWulf.JRF would work, so I did that, changed it in the UDF, and wrote a short scenario to test it. It crashed while loading:

Tue Jan 29 11:46:58 2002
Error -1 [(!(bResult))]
DirectX code: "Unrecognized error: 0xffffffff"
F:\Devel\Janus2\WWII\Sources\WWIISUnit.cpp
Line 133

Hmmm... maybe the database has something to do with it. I went into the German database (UnitsGe.db) and copied the line with 'ACFockeWulf', changed the 'C' to 'HB' in the new line, and saved it. Result: crashed, same error.

Changed the UDF to call 'ACFockeWulf.JRF' again, works fine.

So, okay, you can rename the UDF to whatever you want but the JRF name is inviolate, thus in the UDF, 'Class = filename' must agree with the filename of the JRF.

Inside the JRF there are three occurrences of the string 'ACFockeWulf', but all the others are 'AHBFockeWulf'. What happens if that gets changed to make them all 'AHBFockeWulf'? Done. Crashed.

The Hard Code Almighty does not like you going in and making certain changes in the JRFs. Some are okay, others are not. Duh.

Query: in the JRF, is the first occurrence of the filename, e.g. 'ACFockeWulf', the "controlling name", so to speak (as I'm not a codehead and don't know what it should be or actually is called)? It is correct in ADBHelldiver.JRF and I didn't touch it, but I changed it in AHBFockeWulf.JRF (the renamed ACFockeWulf.JRF), and the result was, metaphorically speaking, a catastrophic failure on liftoff. As always, if the Gnostics here see something I'm missing, I'd be most grateful to know what it is.

I'd like to offer my hard drive as a place to keep all the knowledge about tweaking JRFs that the community cares to send me, so I can learn faster and share it with anyone who asks. I'm going to try to set up a server on this old machine sometime soon. Other ideas will be gladly welcomed.

Well, if you've come this far, I figure you must enjoy reading droning, pedantic bloviation, and that we both need to get a real life. Stop whining, you were given fair warning. Good night, and have a pleasant tomorrow.
Chapeau is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.