Creating custom blocks

    Joined
    Jul 29, 2015
    Messages
    8
    Reaction score
    0
    Hey guys, apparently nobody has ever explained what some of the components of creating a custom block do. Sure, you can find a similar block and change some stats but that is hardly creating a custom block, right? Apparently people have been wondering for many months and never have gotten an answer.

    Below is the block config for brown advanced armor tetra. As far as I know, the things I have highlighted in red are not known. If someone knows what they are or how to use the trait, please let me know.

    Block icon="306" name="Brown Advanced Armor Tetra" textureId="3, 3, 3, 3, 3, 3" type="POWERHULL_COLOR_TETRA_BROWN">
    <Price>1000</Price>
    <Description>Further processing of Standard Armor results in Advanced Armor. With a far denser composition, it grants increased health and greater damage reducing properties. -Structural Stats- $ARMOUR% Armor $HP HP</Description>
    <BlockResourceType>2</BlockResourceType>
    <ProducedInFactory>5</ProducedInFactory>
    <BasicResourceFactory>0</BasicResourceFactory>
    <Consistence>
    <Item count="1">POWERHULL_COLOR_BROWN</Item>
    </Consistence>
    <CubatomConsistence>
    <Item count="1">POWERHULL_COLOR_BROWN</Item>
    </CubatomConsistence>

    <FactoryBakeTime>5.0</FactoryBakeTime>
    <CubatomRecipe>
    <mass>light</mass>
    <spinning>super_spin</spinning>
    </CubatomRecipe>

    <InventoryGroup>advancedbrownarmor</InventoryGroup>
    <Animated>false</Animated>
    <Armour>75</Armour>
    <ArmorHPContribution>100</ArmorHPContribution>
    <StructureHPContribution>5</StructureHPContribution>
    <Transparency>false</Transparency>
    <InShop>true</InShop>
    <Orientation>false</Orientation>
    <Enterable>false</Enterable>
    <Mass>0.25</Mass>
    <Hitpoints>250</Hitpoints>
    <Placable>true</Placable>
    <InRecipe>true</InRecipe> [though I'm assuming this means that it can be crafted?]
    <CanActivate>false</CanActivate>
    <IndividualSides>1</IndividualSides> [sides that texture is applied to]
    <SideTexturesPointToOrientation>false</SideTexturesPointToOrientation>
    <HasActivationTexture>false</HasActivationTexture>
    <MainCombinationController>false</MainCombinationController>
    <SupportCombinationController>false</SupportCombinationController>
    <EffectCombinationController>false</EffectCombinationController>
    <Physical>true</Physical>
    <BlockStyle>4</BlockStyle>
    <LightSource>false</LightSource>
    <LightSourceColor>1.0,0.8,0.4,1.0</LightSourceColor>
    <Door>false</Door>
    <Deprecated>false</Deprecated> [not in use T/F]
    <CubatomCompound>
    <Cubatom>
    <mass>medium</mass>
    <spinning>null_spin</spinning>
    <thermal>gas</thermal>
    <conductivity>draining</conductivity>
    </Cubatom>
    <Cubatom>
    <mass>negative</mass>
    <spinning>null_spin</spinning>
    <thermal>liquid</thermal>
    <conductivity>draining</conductivity>
    </Cubatom>
    </CubatomCompound>

    <ResourceInjection>0</ResourceInjection>
    <ExplosionAbsorbtion>0.0</ExplosionAbsorbtion>
    </Block>

    The rest of the items you can pretty easily figure out if you don't know it from the description. I would also like to point out that I am aware of the pastebin rule - just can't quite highlight the lines in it
     
    Last edited:
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Everything Cubatom is deprecated, as cubatom-crafting was removed from the game.
    IndividualSides contains the amount of different textures used for the block.
    Deprecated means that this block was removed from the game.
    ExplosionAbsorbtion refers to the block's resistance against explosions.
     
    Joined
    Jul 29, 2015
    Messages
    8
    Reaction score
    0
    Everything Cubatom is deprecated, as cubatom-crafting was removed from the game.
    IndividualSides contains the amount of different textures used for the block.
    Deprecated means that this block was removed from the game.
    ExplosionAbsorbtion refers to the block's resistance against explosions.
    Ok, I'll scratch out cubatom.
    ExplosionAbsorbtion is in HP or percentage?
     
    Joined
    Jun 30, 2013
    Messages
    175
    Reaction score
    262
    • Railman
    • Wired for Logic
    • Community Content - Bronze 1


    been messing with the custom textures and block config myself - i'm getting there, but working out all the exact details of what's supported and how to implement it is definitely taking some time.

    <Physical> is for items that do not cause collisions, like rod lights, capsules, etc. players will be able to pass through those blocks, basically. but i bet a collision calculation is still occurring, so don't expect to fly through walls of them.

    <Orientation> can be set to true for blocks that need to have a face rotated to a specific orientation. otherwise your block will have only a single orientation. best to enable this if you are creating computers or blocks with different textures for each facet. Note that custom blocks must be made ENTIRELY from the custom textures, you cannot call the base client textures, so i've fudged it in the above screenshot by creating custom entries for the blocks i'm "decal"ing my textures onto. sharing these textures for the tops and sides of these blocks (note: and their bump maps!) gives the emblems a really nice "painted on" look, i think.

    one last thing that is not immediately obvious: the BlockConfigImport.xml file literally does what it says on the tin: imports those entries into the game's BlockConfig.xml file. If you want to update those entires, you'll have to then do it there, or restore to a default BlockConfig.xml and have it re-import your custom entries. Once an custom block's ID (defined by the "type", the game will not updating its information. So if you're working to get everything perfect, remember you'll need to do that step several times!