SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Cloning Objects in "Plainer English" by stljeffbb1 (https://www.subsim.com/radioroom/showthread.php?t=84285)

martes86 09-17-05 04:36 PM

Nuevo juguetito a la lista, jeje. :P :up:

stljeffbb1 09-17-05 04:43 PM

OK, here is exactly what it looks like:

Quote:

C:\Pack3D\bin>Pack3D I NBB_SaoPaulo.dat 3d/NBB_Revenge_crane.obj
Exception in thread "main" java.lang.NumberFormatException: For input string: "N
BB"
at java.lang.NumberFormatException.forInputString(Unk nown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.<init>(Unknown Source)
at Pack3D.toDatFile(Pack3D.java:481)
at Pack3D.main(Pack3D.java:54)

C:\Pack3D\bin>Pack3D I NBB_SaoPaulo.dat 3d/NBB_SaoPaulo_crane.obj
Exception in thread "main" java.lang.NumberFormatException: For input string: "N
BB"
at java.lang.NumberFormatException.forInputString(Unk nown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.<init>(Unknown Source)
at Pack3D.toDatFile(Pack3D.java:481)
at Pack3D.main(Pack3D.java:54)

C:\Pack3D\bin>
I tried at first just importing the file, then I tried changing the name of the file....

Sorry to be such of a noob with this stuff :oops:

I'll keep on working on it!

-Jeff

stljeffbb1 09-17-05 06:27 PM

OK, now that I read a little more, I understand a little more ;)

Quote:

Quote:

EDIT: In the dat extractor I have found some data referring to coordinate points x y and z in one of the righthand boxes; however, there seems to be no way to modify this data. Has anyone successfully discovered how to use this data to move fixtures?


You need modify the type 4 node that control the position of this object. With my tool you see it , it's a type 4 with the same label as 3d object (type 1)
Ah yes......so it looks like this:

==================
Obj:34
Type: 4/100
id: 7CCEC3BC185E2BFD Label: NBB_Revenge_tir01

size: 66 Position:1767690

==================
Obj:35
Type: 8/0
id: 7CCEC3BC185E2BFD Label: NBB_Revenge_tir01

size: 26 Position:1767768




So, type 4 is the position of the object, and type 8 is the 3d portion?

If this is the case, then we need to hex edit the type 4 object?

The position refers to where it is located in the file....this is helpful for easy finding!

....OK, we will figure this out!

-Jeff

P.S. Position numbers changed from hexadecimal to regular (decimal) numbers

P.P.S. Important, so I'll use larger font.....when using DOS prompt and using list feature ("L") for Pack3D, I suggest ending the command with:

| more (| = "pipe" ...on US keyboards, it is often with the forward slash \)

to make it so you can read all of the objects at human speed!

stljeffbb1 09-17-05 06:40 PM

OK, I think there is improvement...I only get two error messages now!

C:\Pack3D\bin>Pack3d I NBB_SaoPaulo.dat 3d/113_NBB_Revenge_newcrane.obj
Importing objet: NBB_Revenge_crane
Exception in thread "main" java.lang.NullPointerException
at Pack3D.toDatFile(Pack3D.java:534)
at Pack3D.main(Pack3D.java:54)

C:\Pack3D\bin>Pack3d I NBB_SaoPaulo.dat 3d/113_new_crane.obj
Importing objet: NBB_Revenge_crane
Exception in thread "main" java.lang.NullPointerException
at Pack3D.toDatFile(Pack3D.java:534)
at Pack3D.main(Pack3D.java:54)

I find it interesting that even after I changed the file name, it still recognizes the file as coming from the Revenge.....also, when I open the object in hexeditor, there does not seem to be any trace of the Revenge tag.......

All right.....back to work!

:damn: ;)

-Jeff

Sansal 09-17-05 06:54 PM

New subversion http://rapidshare.de/files/5416649/p...20105.zip.html

It can clon all files .dat, .dsd, .val, .sim, .zon and .cam
And eliminate a little bug when import .obj (this null pointer exception)

Quote:

tried at first just importing the file, then I tried changing the name of the file....

Sorry to be such of a noob with this stuff

I'll keep on working on it!
The command no is Pack3D I NBB_SaoPaulo.dat 3d/NBB_SaoPaulo_crane.obj

is pack3d i nbb_saopaulo.dat 3d/1_nbb_saopaulo_crane.obj

you forgot the list number. Ever number_ The program control the object to remake by the prefix of the name file. The same with tga.

The fault is my. We need a windows interface and good error messages.

Don't use |more if you call the command: pack3d l ship.dat >list.txt when is finished you have a file list.txt that you can edit or print. It's best.

stljeffbb1 09-17-05 07:14 PM

OK, thanks again for the help Sansal! I also look forward to your new milk-cow mod!

Bravo!

:rock: :up: :know:

-Jeff

iambecomelife 09-17-05 07:30 PM

Thanks for the tips and the new version, sansal. I'll try them out asap.

Type941 09-17-05 07:41 PM

Is there any other NON-Rapidshare mirror to this great tool? :) please.... :yep:

Syxx_Killer 09-17-05 07:48 PM

Here, try this, Type941. This is the first time I used this service. If things seem to work good, I may start using it instead of Rapidshare.

http://www.savefile.com/files.php?fid=5901126

stljeffbb1 09-17-05 09:39 PM

OK, I've been playing with the Sansal tool...........

1) I can now get my 3D rendering program to import the .obj files that the Sansal tool creates....yaay....I had to use some older "Python Scripts" as they are called.....however I still can't export to .obj within the program (Blender) for some reason...I think this is a problem with Blender (I tried the XSI mod tool and I have never been able to import an .obj file)

2) OK, now when I'm using the Sansal tool, I do not get any more error messages, but let me describe what is happening:

Quote:

C:\Pack3D>Pack3D I NBB_SaoPaulo.dat 3d\113_NF_Boat_2_catarg.obj
Importing objet: NBB_Revenge_crane

C:\Pack3D>
Taking Sansal's suggestion, I tried to import a mast from a fishing boat into the spot on the Sao Paulo (which is still really the Revenge) where the crane goes (aft of center).....however, the "NBB_Revenge_crane" message comes up, and when I look in the museum, the crane is still there....

I wonder if some things need to be changed in the .dat file to accomodate new files or something like this....at the very least, I can begin trial and error editing, but it would be great if I could do it visually....I'm fighting against a couple of different things here, but I'm sure I'll get it.....back to experimenting!

-Jeff

Commander1980 09-18-05 07:56 AM

i think, you have to change the name of the importing obj into that of the obj you want to replace.

but

Quote:

Originally Posted by stljeffbb1
Taking Sansal's suggestion, I tried to import a mast from a fishing boat into the spot on the Sao Paulo (which is still really the Revenge) where the crane goes (aft of center).....however, the "NBB_Revenge_crane" message comes up, and when I look in the museum, the crane is still there....

the same here. I tried to import more that 12 objects from dido into fiji, but nothing changes.

stljeffbb1 09-18-05 10:38 AM

Hi everyone....

Commander1980....I tried copying the NF_Boat_2 mast (catarg), renaming it 113_NBB_Revenge_crane.obj, then using the Sansal tool to insert it into the NBB_Revenge.dat file......nothing changed

:(

Quoting Sansal from his post announcing this tool:

Quote:

Now i'm working in a problem with reinyection of .obj
I think this indicates maybe there is still a problem.....

So, I've begun trial and error hexediting to see what can be modified....using the Sansal list.txt option ("L"), I obtained the position of the NBB_Revenge_boat07 and looked at the data:

http://i13.photobucket.com/albums/a2...vengeBoat7.jpg

I noticed that before the ID (BF3E9C95970576BF), there are three pieces of data that, if I use my imagination, I could see as a 3D location representation (it starts with the highlighted portion and looks, before editing, like 04 0000 0064 0000 004A 0000 00...then the ID string begins)....I changed the "04" to "11"...the boat disappeared in the museum screen, but the game did not CTD....even though this might not sound like much, it is a beginning, as the change in the byte DID result in a change in game...

:damn:

-Jeff

EDIT: I changed the "11" to "05" (it was originally "04"), and the boat was still missing, so perhaps this portion of the object does still not modify it.

sergbuto 09-18-05 10:42 AM

Sansal,

I tried to import OBJ files with the same object created by three different programs. None of them could be imported. And the errors were different for each of them. Is the reading-in routine pretty specific?

Sansal 09-18-05 12:16 PM

I working now on it. Now i'm testing this....

lurbz 09-18-05 01:55 PM

stljeffbb1, moving parts is easy, i'll break up that type 4 node for you:

04 00 00 00 is the chunk type (if you touch this, no wonder the boat vanishes) ;)
64 00 00 00 "subtype"
4A 00 00 00 data size
BF-3E-9C-95-97-05-76-BF chunk id
BB-5F-44-93-D0-B4-40-BD parent node chunk id
8A-B7-88-69-67-C0-0C-8B 3D part id
00 something
01 something else
D1 03 37 3F = 0.71490200 X
90 ED 9A 3F = 1.21037500 Y
FA 0A 23 C0 =-2.54754500 Z

X,Y and Z are encoded in "IEEE single precision not rounded" float format:
you have an online converter for that here:
http://babbage.cs.qc.edu/courses/cs3...-754hex32.html
http://babbage.cs.qc.edu/courses/cs341/IEEE-754.html
be careful, because the order of the hex result in that page must be inverted into the dat file (just convert 0.71490200 in the second link and compare the result).

Every type 4 chunk will be the same.


Buen trabajo Sansal..... :)


All times are GMT -5. The time now is 02:15 PM.

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