SUBSIM Radio Room Forums



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

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-23-19, 07:37 AM   #16
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

//------------------------------------------------
//--- 010 Editor Script File
// RAW file reader .001
// Reads the DetailMask RAW files in SH5 and outputs the height values
// Outputs 101 lines of 101 floats
//------------------------------------------------

int i, l, t, s=101;
char W[40];


float r;
for( i = 0; i < s; i++)
{
l=101;
Printf( "Line %d\n", i);
{
for( t = 0; t < l; t++)
{
r = ReadFloat();
Printf( "%f ", r );
FSkip(4);
}
}
}
W = InputString("Save File", "Name your save file", "c:\\temp\\");// You can change the path when saving.
OutputPaneSave( W );
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 10:12 AM   #17
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

The script above is undergoing changes to try something gap and I are working on.
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 02:08 PM   #18
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Here are 2 scripts I did for 010
Tangent and Cosine

010 does not use a perfect C code so I had to adjust.
Cosine corrected..............

#define PI 3.14159265

double param, result;
param = 60.0;
result = Cos ( param );// Correct for SweetScape 010
Printf ("The cosine of %f degrees is %f.\n", param, result );


Tangent corrected..........


#define PI 3.14159265

double param, result;
param = 60.0;
result = Tan ( param );// Correct for SweetScape 010
Printf ("The Tangent of %f degrees is %f.\n", param, result );
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 02:28 PM   #19
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Let's do something handy with 010 and S3D!
Open 010 and go to Tools\Options\Programs
Select the New button and then name it S3D
browse to the S3D install and select the S3D.exe
For arguments select filename.

OK it and then open a dat file in 010
Select Tools again and you will see S3D listed.
Go ahead! Click on it!
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 02:58 PM   #20
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

ooohh - pretty toys... cool. I still can't decipher hex anymore though...

that little menu now works for the sim, dsd, etc files also.

Thanks Jeff!

PS: ya know what? This is nice with a dual-monitor setup - or if I only had a 'modern' widescreen thingie...

Also, as before, if you want to open more than one file associated with S3D, you do have to go through the S3D interface of "File" "Open", if you are after having two different dat files open at the same time...
__________________

"...and bollocks to the naysayer/s" - Jimbuna

Last edited by propbeanie; 01-23-19 at 03:02 PM. Reason: more...
propbeanie is offline   Reply With Quote
Old 01-23-19, 03:02 PM   #21
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Quote:
Originally Posted by propbeanie View Post
widescreen thingie...
Isn't that a projector and a white sheet hung on the wall?
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 03:05 PM   #22
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

The boys got a "projector" that could do that from their computers a few years ago. It does distort things though, if not perpendicular to the surface. But don't mess with the sheet - just paint the wall white. Maybe even go outside and use the garage door...

Say, uh, you can build a script to find and potentially validate the links between the different S3D files much easier with this little technique, eh?...
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 01-23-19, 03:12 PM   #23
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

You could write a script that you put in, say an ID, that would scan all files for that ID and give you a list.
There's a program that does that already.
http://www.mediafire.com/file/ci2dd7...Finder.7z/file
Problem with that program is not being able to actually narrow things down.

Last edited by Jeff-Groves; 01-23-19 at 03:22 PM.
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 03:21 PM   #24
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

Yeah, but I was thinking of a different approach. Then I remembered that no two dat or sim or whatever files are laid-out the same way, the nodes in the same order or names... so my idea wouldn't work anyway. Might work for the first set of files, but bomb on the next...

(btw, that is a useful utililty - thank you for that)
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 01-23-19, 03:25 PM   #25
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Quote:
Originally Posted by propbeanie View Post
Yeah, but I was thinking of a different approach. Then I remembered that no two dat or sim or whatever files are laid-out the same way, the nodes in the same order or names... so my idea wouldn't work anyway. Might work for the first set of files, but bomb on the next...

(btw, that is a useful utililty - thank you for that)
Does not matter the lay out of a file. Search for an ID in a broad search? You find it! Trick is to narrow the search to only what your interested in.
Say I want to be sure no 3D model uses the same ID. I search for that ID BUT only in 3D file nodes.

Exactly what do you want to do?

Last edited by Jeff-Groves; 01-23-19 at 03:55 PM.
Jeff-Groves is offline   Reply With Quote
Old 01-23-19, 05:09 PM   #26
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

I was dreaming of an "all encompassing" utility that could find and fix the files, or even build them - text files in that regard. Use 010 to help me figure out what I'm looking at in the files. I'm kinda dense in that regard though... One thing I'm trying to make use of is the Inspector window in the default interface of 010. Lot's of stuff to explore.
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 01-24-19, 10:28 PM   #27
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

One of the best things to do is to play with the scripting and template ability of 010. Look at the scripts/templates available online at SweetScape.
If one looks like it may be close to your needs? Study how it works.
I'll be starting an aid soon to show you how 010 and S3D will work together to learn the Hex structure of dat files.
S3D shows you a false view. I'm going to show you how to open your eyes.
Jeff-Groves is offline   Reply With Quote
Old 01-25-19, 07:11 AM   #28
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

I know of two guys that would appreciate that!
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 01-25-19, 08:14 PM   #29
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

So you've chosen the red pill.
Jeff-Groves is offline   Reply With Quote
Old 01-25-19, 08:31 PM   #30
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

In my left hand, yes... Do you have a glass of water though?.. the blue one will be in my right, from when you're not looking and I've already got a purple thing with white polka dots, and another that looks like a gummy bear in my shirt pocket, lint and all, for back-up... ...
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 06:14 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.