View Full Version : 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!
Ducimus
03-10-08, 06:06 PM
@ 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.
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)?
skwasjer
03-13-08, 11:47 AM
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/showpost.php?p=800394&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.
http://sh4.skwas.net/images/screenshots/exp_raw.jpg
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.
http://sh4.skwas.net/images/screenshots/imp_raw.jpg
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... ;)
Madox58
03-13-08, 05:51 PM
I like advanced use.
:rock:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.