SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
08-07-07, 08:45 PM | #11 |
The Old Man
Join Date: Apr 2007
Location: Netherlands
Posts: 1,547
Downloads: 26
Uploads: 3
|
As promised, and prior to the upcoming release, I wrote up a brief explanation of the mechanism I coded into S3D for property data type detection. This is actually the primary reason why the application will still be alpha. I need help from the community to make the parser foolproof. As my modding skills are absolute zero, I can't guarantee detection is accurate, and this is where you (should) step in. Read up on this if you are interested.
Warning: skip if you don't have some technical background... PS: this doc is focused on the next release, some things I discuss are not in the current public alpha...!!! A word on automatic property data type detection Auto detection of property data types is not foolproof. Remember this. There are even scenarios possible when (especially regarding string types, more on this later), where a property may be detected as one type today, and as another the next (because you changed it's value). This is why I recommend 'predefining' as much properties as possible (the ones you change!!!). I have not done this yet, because I'm not 100% sure about certain data types, because there's so many of them, and because I'm lazy You can help out by providing feedback on each value that gives problems, so I can predefine more data types over time. So how does it work:
The biggest benefit of this mechanism is that S3D is able to open most files without problems, for reading even though not 100% accurate. I recommend that you never modify autodetected property values though, just because of the problems described above. Before modifying, analyse each property you want to change for it's datatype. Is it correct? What should it be if not? Next, ask me or try yourself to add definitions for them. Try to stay away from global definitions as much as possible, unless absolutely sure (they may cause other files to read incorrectly!). Once they work, change the values as per your wish, and feedback the definitions back to the community, and also me so I can include them in next updates. You are then helping out to improve S3D's property parser and editor. Over the months to come, the parser should rely less and less on autodetection, and only use definitions, resulting in less parse mistakes in the long run... PS: a how-to on property data type definitions is described in the xml config file 'propertydefinitions.xml' in the installation folder. Hope this clears up a few things. I guess it will raise questions too though, so ask away if you have any... Bed time now.
__________________
SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
|
|