Skipped IDs

    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Some of you might know I am currently writing a "real" starmade mod(not just some added blocks here and there, which are just other blocks with new textures and names).
    While opening some chests full of code from the mighty cat for said purpose, I backchecked some arrays just to be sure what exactly they are. And stumbled upon unassigned IDs below the biggest used ID.
    The question is, why aren't they assigned?
    Were they forgotten?
    Are they features yet to come?
    Are they buggy?​
    If they are assigned, why don't they appear in the array?

    The list of the skipped IDs I located.
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    I have always wondered about this, because I noticed it awhile ago while flicking through the block properties file thingy. Considering we are always told that there are limited IDs and we might hit it, that's an awful lot of unused ID's
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    I have always wondered about this, because I noticed it awhile ago while flicking through the block properties file thingy. Considering we are always told that there are limited IDs and we might hit it, that's an awful lot of unused ID's
    We have 1024 IDs, and the highest currently used is 545.
    I can see why schine is conservative about IDs, but then I'd not outright skip any of them!
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    We have 1024 IDs, and the highest currently used is 545.
    I can see why schine is conservative about IDs, but then I'd not outright skip any of them!
    we can't be limited too 1024, I'm sure that @Crusade's IBM blocks had ID's over 1050, and I am sure I read somewhere here when someone did a breakdown of the bytes sent over the network that it was limited too 2048 :/
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    we can't be limited too 1024, I'm sure that @Crusade's IBM blocks had ID's over 1050, and I am sure I read somewhere here when someone did a breakdown of the bytes sent over the network that it was limited too 2048 :/
    I guess 1024 are for the game, not the total the user may add with custom blocks...
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    I guess 1024 are for the game, not the total the user may add with custom blocks...
    the game cant differentiate between custom blocks and real blocks, they all get declared in the same XML file. Realistically, you could remove the ship core from the game. Not sure how it would run, but the option is there.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    we can't be limited too 1024, I'm sure that @Crusade's IBM blocks had ID's over 1050, and I am sure I read somewhere here when someone did a breakdown of the bytes sent over the network that it was limited too 2048 :/
    the 1024 are originating from the amount of bits assigned to the BlockID in a .smd2 file [10] (.smd2 files are used to store blocks in blueprints and the client- and server-database)
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Then either you have only 1024 different per ship or the 1024+ IDs are sorted into the 1023-?

    Or has it changed?
     
    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    It could of course be wrong, but the code I've written here indicates that the bits 0-10 are for IDs, which would mean that we have 2¹¹ = 2048 at our disposal.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    It could of course be wrong, but the code I've written here indicates that the bits 0-10 are for IDs, which would mean that we have 2¹¹ = 2048 at our disposal.
    Well maybe I miscounted by 1, but it still doesn't explain the skipped IDs.