To determine ship size, just use the image size. That will be the size of your ship!
Rule breakdown for processing [or Legend]
+Black - negative space
+White - Hallway
+Silver - hull wall
+Dark Gray - doors
+Bright Silver - glass
+Gray - chair [chair, bed, furniture, etc. Basically, it's a half slab]
+red - anti-matter cannons [with dark red being it's control block. the Editor will automatically assign all connectable blocks to their control block if you define it]
+ Yellow/Dark Yellow - Shield capacitor / recharger
+Blue - engines
+Green/Dark Green - Power capacitor / reactor
+Cyan - Core
[I think that's all the colors?]
After placing this image into the converter part of the editor, all you would need to do is define the wall height [which is 3 by default] and let it run. The Converter will give you an operational [but not very optimized] ship.
You will be able to fully define what colors represent what blocks [including wedges, slabs, etc] in the image you upload... but there will hopefully be an auto-smooth feature in the editor itself that will add all the smoothing that StarMade itself can support.
Thank you! It's entirely possible that I will need your help in the future. Can I message you with any editor-related questions I have? Also, have you done a lot of bitwise and or HEX stuff in the past?
Thank you! It's entirely possible that I will need your help in the future. Can I message you with any editor-related questions I have? Also, have you done a lot of bitwise and or HEX stuff in the past?
Heyo, I've done some coding for myself today and it seems like the rawChunkData block in the smd2 file has changed with file version 2 (files starting with 00 00 00 02).
I have tested it with a few blocks and the ids/hp seems to match, as well as the new 5 bit orientatin seems to fit since the are for e.g. the corner block 24 possible rotations. (⌈log(2,24)⌉ = 5)
For anyone interested, my new block look like this (C#):
Code:
[StructLayout(LayoutKind.Sequential)]
public class BlockDataV2
{
public byte _a;
public byte _b;
public byte _c;
public byte Orientation { get; set; } // 5 bit
public byte Hitpoints { get; set; } // 8 bit
public ushort BlockID { get; set; } // 11 bit
public void RawToProp()
{
int buildint = _a << 16 | _b << 8 | _c;
BlockID = (ushort)(buildint & 0x7FF);
buildint >>= 11;
Hitpoints = (byte)(buildint & 0xFF);
buildint >>= 8;
Orientation = (byte)(buildint & 0x1F);
}
}
Heyo, I've done some coding for myself today and it seems like the rawChunkData block in the smd2 file has changed with file version 2 (files starting with 00 00 00 02).
I have tested it with a few blocks and the ids/hp seems to match, as well as the new 5 bit orientatin seems to fit since the are for e.g. the corner block 24 possible rotations. (⌈log(2,24)⌉ = 5)
For anyone interested, my new block look like this (C#):
Code:
[StructLayout(LayoutKind.Sequential)]
public class BlockDataV2
{
public byte _a;
public byte _b;
public byte _c;
public byte Orientation { get; set; } // 5 bit
public byte Hitpoints { get; set; } // 8 bit
public ushort BlockID { get; set; } // 11 bit
public void RawToProp()
{
int buildint = _a << 16 | _b << 8 | _c;
BlockID = (ushort)(buildint & 0x7FF);
buildint >>= 11;
Hitpoints = (byte)(buildint & 0xFF);
buildint >>= 8;
Orientation = (byte)(buildint & 0x1F);
}
}
That is the format for any block with 24 orientations. Logic blocks have:
orientation : 3
active : 1
hp : 9
blockID : 11
Other blocks have:
orientation : 4
hp : 9
blockID : 11
Apart from the bits for the blockID, the exact allocation of the bits depends on how many orientations the block with the given id has.
This is why I use the following union of structs(on machines operating in bigendian, littleendian has the same structs in reverse order, so that reversing the 3 bytes does not remove bits from their field. The compiler has to group bitfieds in structs together for this to be directly applicable):
Code:
union block {
char raw[3];
struct logicBlock {
short orientation : 3;
bool active : 1;
int hp : 9;
int id : 11;
} logic;
struct normalBlock {
short orientation : 4;
int hp : 9;
int id : 11;
} normal;
struct fullRot {
short orientation : 5;
int hp : 8;
int id : 11;
} fullRotation;
};
Thank you! These are quite helpful. I do have a question, though. The Header code for the wiki references blocks AND elements. What's the difference between these, if there is one?
Also, is what's a good [and hopefully, free] program to open up the StarMade ship files? [I'm writing this program on an astonishing 0$ budged] I've been using HexEdit, but it doesn't really seem to produce anything readable. I'm still trying to figure out why the Header is longer than it should be.
In essence an 'element' in a header file, is just a blockId with the number of times it is used on the blueprint in question. When spawning a blueprint, starmade actually checks whether or not this differs, and may prevent the use of blueprints, where the mismatch exceeds a threshold, and may even ban the user in question, if the server.cfg specifies that.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.