Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 2      1   2   Next
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #1 
I'm trying to manipulate the system points in the ShipEditor program to more closely line up with the ships in my mods, but the "drag this point in 3-space with a 2-space manipulator" thing isn't going so well.  Does anyone know of a way to edit the .snt files either manually or a different way to shift around the points?  I can pull it open in a hex editor, but it's not making much sense to me.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #2 
So I've been delving into the .snt file with a hex editor.  This is, admittedly, a bit out of my comfort zone, but here goes.

Looks like each point location is 20 bytes, mostly padding at the end.  The points in the ship editor have X, Y, and Z point values.  There are up to 5 X points, 5 Y points, and 10 Z points.  This is conducive to longer ships rather than wider ships, but I digress.  The .SNT file is arranged in location order, in blocks.  The first block is all the points at X 0, then the next block is all the points at X 1, etc.  Within each X block, it is arranged in Y blocks (X 0 Y 0, then X 0 Y 1, etc).  Within each Y block the Z points are listed sequentially (X0 Y0 Z0, X0 Y0 Z1, etc).  I don't think it matters how the points themselves are declared, just don't mess up the order [tongue]

I've found the data points that whether and what type of points are at each location:
 [PointLocation_zps6e0a4c17] 
The location here is point <0 0 0>.  In the original file, there is no system point there.  In the tweaked file, there is a Torpedo location (system 1 in the ship editor).  For Tactical (system 2 in the ship editor) it would be 02 00 00 00, for Maneuver (system 3 in the ship editor) it would be 03 00 00 00, etc up through Primary Beam (system 0 in the ship editor) which is 00 00 00 00.  For a hallway (a point but no system) it is FF FF FF FF and for no point at all it would be FE FF FF FF.

Next, moving points around.  This is related to the above - each set of 4 bytes before the system declaration is one of the 3 coordinates.  The first 4 are the X location, then Y, then Z.  I pulled a point back as nearly pure Z as I could:
[PointDrag_zpsb0750c53] 
Just this one point was modified, and just the 10th byte in the 3rd word - I'm guessing this is Z location (from 40 AC 29 C3 to 40 AC 53 C3).  I think the file doesn't enumerate the point specifically beyond location in the file, and moving the point instead in the pure X direction modified the first word only (from 7E 92 00 C3 to 7E 92 4B C3).  

So, that's the quick file breakdown.  I'm not sure that's terribly useful yet in trying to get those points placed precisely, but it's at least a start.  I suspect that since the XYZ that is generated is based partly on the size of the model that is loaded, the quickest way to get started is to load up your model in the ship editor, generate a .snt, place the points close to where you want 'em, then fire up a hex editor and tweak manually until they're where you want them to be.  Unless someone with better programming chops than I wants to give a GUI a go? [smile]

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #3 
It's got a bit to go, but it's a step in the right direction.
[beginning_zpsb14123a9]
 

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
Arkantos

Avatar / Picture

Registered:
Posts: 466
Reply with quote  #4 
I have the chops, but I'm focused on ArtClientLib at the moment... [biggrin]
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #5 
Fair enough [smile] Looks like the third byte of each word allows for some movement of the point, but if it needs to move more than that, what I've been doing is moving the point in the (for example) Z only as close as I can in the ship editor, re-lining up the X and Y using the hex editor, then repeating as necessary for other related points. Honestly, I'd settle for an axis lock in the ship editor tool, so I can force the points to only move in one axis.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
russjudge

Avatar / Picture

Registered:
Posts: 209
Reply with quote  #6 
I was a bit preoccupied with other things, so missed your post until now.  I created a rough tool which I think will help you.  It's little more than a custom hex editor, but it lets you see the values as integers and floats as well as their hex value, so that the values might make more sense.  I can tweak it further to fit your needs--just let me know.  You can download the tool here: https://dl.dropboxusercontent.com/u/14746342/BlockByteEditor.zip
__________________
Russ
Author of:
Artemis Mod Loader.
The Big Red Button of Death!
ArtemisSBS-Protocol Sharp
DMX Commander
(contact me to become a contributer)
(and all are free)
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #7 
Oooh - that's pretty slick!  The float values actually start to make a bit of sense - as I'm stepping through the file (32 byte chunks) the Z values go from ~-200 to ~250, which is not out of range for the ship in DeleDCE units (~560 units long, but short by a bit).  I checked it against the file I'm using for the sovereign, and the ratio of ship length (684) to snt z values (538) is almost nearly the same as a visual inspection of the ratio from the ship editor (981 pixels / 774 pixels).  I think it's pretty safe to say the float values are precisely the location in model units for each of the locations.

Woot!!  That's fantastic.

Some (hopefully) minor tweaks to make this awesome (albeit fairly specific to this purpose):
Default block size of 32 bytes (or user configurable and remembered) - this is a fixed value for the .snt files, as far as I know

A way to label the float fields (so I can remember which row is X,Y,Z, and Node type (the first 4 floats per block, respectively) )

Maybe a node number indicator?  The file steps through X0 Y0 Z0, X0 Y0 Z1 ... X0 Y0 Z9, X0 Y1 Z0 ... all the way to X4 Y4 Z9, so each 32 byte sequential chunk is one of the 250 node points, and the .snt files are all 250 x 32 bytes.  Also maybe navigate by node numbers as well as raw byte location?

Maybe a dropdown box for float 4 of each block?  It would enumerate the different node options (No Node, Empty Node, Primary Beam, Torpedo, Tactical, Maneuver, Impulse, Warp, Front Shield, Rear Shield, A, B) so it can auto-insert the correct hex value (FE FF FF FF, FF FF FF FF, 01 00 00 00 ... 09 00 00 00 respectively) - that way I don't have to remember which is which [tongue]  Also it could read the values present in the file and show which type the node you're looking at is.

Man, this is great! [biggrin]

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
russjudge

Avatar / Picture

Registered:
Posts: 209
Reply with quote  #8 
Yeah, I should be able to make all those tweaks--I'll try to leave the more generic option available so that it can be used in different contexts, but default to using the SNT template.  In other words, I'll add a new option at the top where you can select the template--where currently there will only be two: SNT and Generic. 

I thought about making the program save the block size--which is currently configurable, but reverts back to the default 20 bytes when restarted.  I figured I'd add that in a bit later.

I think I'll have a little time tonight to throw those changes in.



__________________
Russ
Author of:
Artemis Mod Loader.
The Big Red Button of Death!
ArtemisSBS-Protocol Sharp
DMX Commander
(contact me to become a contributer)
(and all are free)
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #9 
Sweet - looking forward to it!
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
russjudge

Avatar / Picture

Registered:
Posts: 209
Reply with quote  #10 
Well--finally got it updated.  Trying to make it flexible for different templates proved a little more challenging than I thought, plus I kept running short on time to work on it.  Update is here: https://dl.dropboxusercontent.com/u/14746342/BlockByteEditor.zip.


You'll need to build the template yourself, but it shouldn't take but a minute or two.

__________________
Russ
Author of:
Artemis Mod Loader.
The Big Red Button of Death!
ArtemisSBS-Protocol Sharp
DMX Commander
(contact me to become a contributer)
(and all are free)
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #11 
Fantastic! I'll give it a spin!
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #12 
So, it works brilliantly!  It's a lot of fiddling and using the ship editor to find the right coordinates, but I think it's worth it in the end.  This is the new Ambassador Class player ship I'll be releasing with 2.1, and the .snt file as it stands (might tweak it a bit yet):
[SNTupdate_zps3be286c3] 

There's a weird bug where having a particular point active (<4,4,8> in this case) crashes the ship editor.  I'm not sure why, and it's not a bug in the editor (since it works just fine for every other point).  Might be a hardpoint limitation in the ship editor?  seems odd since it handles 250 points in a Borg cube situation, so I'm not sure.  Very bizarre, but overall it's great!  Now, for the other 19 ships in the mod...

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #13 
What's really interesting is that even trying to add it in the ship editor directly, 4,4,8 crashes the editor.  Very interesting....
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,959
Reply with quote  #14 
Follow up question on this - where are new templates stored?  I want to send a template to another person but I'm not sure how to do so.  It's getting stored... somewhere, since multiple instances of the program in multiple locations on this computer automatically load the test template files, regardless of which instance of the program created said template.

EDIT: 5/8/2015 - the node crashing issue is related to a 128 node limit.  Keep it under 8 bits, folks! [tongue]

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
Arkantos

Avatar / Picture

Registered:
Posts: 466
Reply with quote  #15 
I'm considering adding documentation for .snt files to the docs on Artemis Nerds. Reading this thread, I'm not quite clear on what we know for sure and what we don't, but I'll spend some time later to really look it over carefully. Having this information fully-documented would be very helpful for allowing people to create custom engineering consoles and system status displays.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.