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 03-10-08, 05:54 PM   #1
LukeFF
Silent Hunter
 
Join Date: Apr 2005
Location: Riverside, California
Posts: 3,610
Downloads: 41
Uploads: 5
Exporting and Creating New Nodes in S3D

I'm trying to learn how this whole process works, but all the options that come up when trying to export and import a raw chunk are a bit confusing to me at the moment. Basically, what I want to do is create new nodes for animated crewmen on the board the AI ships. Could somebody write up a step-by-step process for this? Thanks!
__________________


ROW Sound Effects Contributor
RFB Team Leader
LukeFF is offline   Reply With Quote
Old 03-10-08, 06:06 PM   #2
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

@ work so breif.

- node parent in dat, child (controller) in sim file. Locate both, and note where it resides in the file.

- export every little chunk of the child. Name each carefully so you dont get confused when you reconstrcut it. (you'll end up with like 6 different saves sometimes, name them carefully. example: CharacterInstantition.RAWCHUNK, and then CharacterInstantition_properties.RAWCHUNK) )

- Export node, and its "label".

- go to your dat file, import node, and then its Label. Position it where it needs to be by changing its parent ID. Do not change anything else yet.

- go to your sim file, import child of your dat, and position it where it needs to be, and import all of its properties.

- Go back to your node, change its ID. copy new id to buffer. NOTE: Node ID must be unique.

- go to your sim file, change your objects parent ID to your nodes new ID (paste from buffer).

- If neccessary, change naming convention of new node so its unique in ID handle (NOTE: note always neccessary, and sometimes you can't rename it and have it work)



Ill try and make a tutroial later on when i have the time.
Ducimus is offline   Reply With Quote
Old 03-11-08, 08:26 AM   #3
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

Good description, that's what I do. If you try and make a new ID and it is taken I think S3D won't take it, which is nice. I haven't messed with the latest version, does it generat them for you now (IDs)?
tater is offline   Reply With Quote
Old 03-13-08, 11:47 AM   #4
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Let me clarify a few things:
  • Duplicate Id's ARE accepted. S3D does NOT verify if Id's are already used.
    Reason:
    • In some scenario's duplicates 'are' allowed
    • S3D can't globally verify Id's unless I would track and scan all files and build a global database. Not happening soon (if ever)
  • As of v0.6 S3D comes with an 'Id generator'. It's a small tool (See menu Tools > Id generator) that can be used to generate a random Id.
    However, again, this Id is not guaranteed to be unique accross the game. That said, with 2^64=18446744073709551616 possibilities, there's little chance of a duplicate Id yet it's still possible.
As far as cloning nodes, there's a few approaches, one which Ducimus described, another I explained in the S3D thread:

http://www.subsim.com/radioroom/show...&postcount=435


Now, for all the export/import options, I agree the dialogs can be a bit confusing and I already considered a revision in the future, but here's how it works:

EXPORT

With the checkbox checked the entire chunk WITH header is exported. If unchecked, only the chunk data is exported. Without the header, S3D cannot 'figure out' what kind of chunk it is when you import it again. You have to explicitly tell it then. For regular use (cloning nodes), leave this option checked.




IMPORT

The two radio buttons are basically there to ask you what kind of raw chunk is going to be imported.

We have a raw chunk with header?
The first radiobutton should be on. You now have the option to ignore the header and basically replace data of the selected chunk. If this is selected you will not end up with a new inserted node, just the one selected will be updated. Usually you'd want a new node, so leave it off.

We have a chunk without header?
The 2nd radio button should be on. Since we don't have a header, S3D doesn't know what type of chunk it is going to read. It will therefor use the selected node as 'type' and reads the chunk with the rules set out for that type. And you will not end up with a new node, but the current node is updated.




Bottom line, leave all the default import/export settings on, and you're good to go. The options are there if you want more control or want to use/edit/modify chunk data in hex editors, without the requirement of a valid header (size specifier to be exact). Basically these options are there for advanced use...

If any questions, go ahead...
skwasjer is offline   Reply With Quote
Old 03-13-08, 05:51 PM   #5
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

I like advanced use.
  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 01:16 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.