Block Config Help

Discussion in 'The Hangar Bay' started by BloodAngel099, Jan 27, 2023.

  1. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    I am modifying some blocks for a server I am setting up and cant seem to figure out BlockColor. It looks like it would just use a 0-255 color code, but no matter how I change the numbers the block just turns white. I can still change it with a texture gun, but how do I get the default place color to work? Any help would be nice, thank you!
     
    #1
  2. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    I was also wondering what the different between using TemplateRoot and Ref to refer to another block?
     
    #2
  3. Vermillion

    Vermillion Rear Admiral

    Joined:
    Jul 15, 2018
    Messages:
    3,287
    Likes Received:
    8,959
    BlockColor (which are RGB values) only support colors on the default palette. It can't be a color that doesn't exist on the default palette.

    There is nothing in common between TemplateRoot and a Block Reference.

    Ref-ing another block means that any values missing from the current block will be taken from the referenced block. That does not include the template unless it's specified on that targeted block.

    TemplateRoot is the targeted crafting recipe for a block. An example would be a block that's meant to be salvaged/retrieved as something else (e.g. AI Turrets, Alien Sentry Guns and NPC Spawners) instead of itself, usually to prevent players from getting something they're not meant to.

    Templates (Crafting recipes) are found in the Templates.ecf. By default a block/item's crafting recipe will have the same config name, with TemplateRoot being used to specify a recipe that doesn't have the same name.
     
    #3
  4. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    Gotcha, thank you so much for explaining that!
     
    #4
  5. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    Is it possible to use Pentaxid for things other than shields/warp? I was wanting to make a thruster that has a small pentaxid consumption for example.
     
    #5
  6. Vermillion

    Vermillion Rear Admiral

    Joined:
    Jul 15, 2018
    Messages:
    3,287
    Likes Received:
    8,959
    No.
    Consumption is part of the shield generator and warp drive's code.
     
    #6
  7. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    Had a feeling, but was hoping to be wrong. Thank you.
     
    #7
  8. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    Are there certain things that can't be pulled through Reference? I am working on creating a new line of SV/HV thrusters from existing models. I don't seem to have any problems in my single player but when I load onto server, the game crashes everything time I try to open the factory screen (F2). There is no error message, the game just closes. I am not sure what the connection here is, but it only happens when I add the new thrusters info to the blocksconfig.ecf. Code below:

    { Block Name: QUANT_Thr_Base
    Class: Thruster
    IndexName: Thruster
    Group: cpgThruster
    EssentialCategory: cpgThruster
    Material: thruster
    Place: Free
    DropMeshfile: Entities/Misc/BagSmallPrefab
    StackSize: 100
    Category: Devices
    AllowPlacingAt: "GV,SS", display: true
    Info: bkiBlockGroup, display: true
    IsOxygenTight: true, display: true
    ShowBlockName: true
    ParticleOffset: "-1.3,0.5,0.5"
    IsTextureable: true
    IsGPUInstance: false
    Texture: 50
    IsDuplicateable: false
    IsActivateable: true
    IsIgnoreLC: true
    EnergyDynamicGroup: Thruster
    ShowUser: No
    BlockColor: "255,0,0"
    Shape: Invisible
    OccupySizeInBlocks: true
    }
    # {{ 1x1 }}
    { Block Name: QUANT_Thr_1x1_Grp, Ref: QUANT_Thr_Base
    CustomIcon: ThrusterSVDirectional
    ShowUser: Yes
    ChildBlocks: "QUANT_Thr_1x1x1_Cone_A,QUANT_Thr_1x2x1_Cone_A_Norm,QUANT_Thr_1x2x1_Cone_A_Slant,QUANT_Thr_1x1x1_Cone_B,QUANT_Thr_1x2x1_Cone_B_Norm,QUANT_Thr_1x2x1_Cone_B_Slant,QUANT_Thr_1x3x1_Cone_C"

    SizeInBlocks: "1,1,1", display: true
    Volume: 406.7, type: float, display: true, formatter: Liter
    Mass: 846, type: float, display: true, formatter: Kilogram
    HitPoints: 100, type: int, display: true
    CPUIn: 472, type: int, display: true
    EnergyIn: 1734, type: int, display: true, formatter: Watt
    ThrusterForce: 4476, type: int, display: true, formatter: Newton

    BlastParticleIndex: 6
    BlastRadius: 2
    BlastDamage: 600
    Radiation: 15, display: RadiationLevel
    Temperature: 1080, display: true
    }
    # Cone A
    { Block Name: QUANT_Thr_1x1x1_Cone_A, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterSSDirectionalPrefab
    CustomIcon: ThrusterSVDirectional
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_1x2x1_Cone_A_Norm, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterSSRoundNormalPrefab
    CustomIcon: ThrusterSVRoundNormal
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "1,2,1", display: true
    }
    { Block Name: QUANT_Thr_1x2x1_Cone_A_Slant, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterSSRoundSlantPrefab
    CustomIcon: ThrusterSVRoundSlant
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "1,2,1", display: true
    }
    # Cone B
    { Block Name: QUANT_Thr_1x1x1_Cone_B, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVDirectionalPrefab
    CustomIcon: ThrusterMSDirectional
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_1x2x1_Cone_B_Norm, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundNormalPrefab
    CustomIcon: ThrusterMSRoundNormal
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "1,2,1", display: true
    }
    { Block Name: QUANT_Thr_1x2x1_Cone_B_Slant, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundSlantPrefab
    CustomIcon: ThrusterMSRoundSlant
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "1,2,1", display: true
    }
    # Cone C
    { Block Name: QUANT_Thr_1x3x1_Cone_C, Ref: QUANT_Thr_1x1_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound1x3x1Prefab
    CustomIcon: ThrusterJetRound1x3x1
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "1,3,1", display: true
    }
    # {{ 2x2 }}
    { Block Name: QUANT_Thr_2x2_Grp, Ref: QUANT_Thr_Base
    CustomIcon: ThrusterMSRoundNormal2x2
    ShowUser: Yes
    ChildBlocks: "QUANT_Thr_2x4x2_Cone_A_Norm, QUANT_Thr_2x4x2_Cone_A_Slant, QUANT_Thr_2x4x2_Cone_A_Armor,QUANT_Thr_2x5x2_Cone_A, QUANT_Thr_2x5x2_Cone_B"

    SizeInBlocks: "2,4,2", display: true
    Volume: 1626.7, type: float, display: true, formatter: Liter
    Mass: 3384, type: float, display: true, formatter: Kilogram
    HitPoints: 200, type: int, display: true
    CPUIn: 1886, type: int, display: true
    EnergyIn: 6934, type: int, display: true, formatter: Watt
    ThrusterForce: 17904, type: int, display: true, formatter: Newton

    BlastParticleIndex: 1
    BlastRadius: 6
    BlastDamage: 7200
    Radiation: 15, display: RadiationLevel
    Temperature: 1080, display: true
    }
    # Cone A
    { Block Name: QUANT_Thr_2x4x2_Cone_A_Norm, Ref: QUANT_Thr_2x2_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundNormal2x2Prefab
    CustomIcon: ThrusterMSRoundNormal2x2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_2x4x2_Cone_A_Slant, Ref: QUANT_Thr_2x2_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundSlant2x2Prefab
    CustomIcon: ThrusterMSRoundSlant2x2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_2x4x2_Cone_A_Armor, Ref: QUANT_Thr_2x2_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundArmored2x2Prefab
    CustomIcon: ThrusterMSRoundArmored2x2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    # Cone A
    { Block Name: QUANT_Thr_2x5x2_Cone_A, Ref: QUANT_Thr_2x2_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound2x5x2Prefab
    CustomIcon: ThrusterJetRound2x5x2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "2,5,2", display: true
    }
    # Cone B
    { Block Name: QUANT_Thr_2x5x2_Cone_B, Ref: QUANT_Thr_2x2_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound2x5x2V2Prefab
    CustomIcon: ThrusterJetRound2x5x2V2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "2,5,2", display: true
    }
    # {{ 3x3 }}
    { Block Name: QUANT_Thr_3x3_Grp, Ref: QUANT_Thr_Base
    CustomIcon: ThrusterMSRound3x3Blocks
    ShowUser: Yes
    ChildBlocks: "QUANT_Thr_3x6x3_Cone_A_Norm, QUANT_Thr_3x6x3_Cone_A_Slant, QUANT_Thr_3x6x3_Cone_A_Armor,QUANT_Thr_3x7x3,QUANT_Thr_3x10x3_Cone_A, QUANT_Thr_3x10x3_Cone_B,QUANT_Thr_3x13x3_Cone_A, QUANT_Thr_3x13x3_Cone_B"

    SizeInBlocks: "3,6,3", display: true
    Volume: 1626.7, type: float, display: true, formatter: Liter
    Mass: 3384, type: float, display: true, formatter: Kilogram
    HitPoints: 200, type: int, display: true
    CPUIn: 1886, type: int, display: true
    EnergyIn: 6934, type: int, display: true, formatter: Watt
    ThrusterForce: 17904, type: int, display: true, formatter: Newton

    BlastParticleName: @rg_projectiles/RG_BlastAdvThruster
    BlastParticleIndex: 0
    BlastRadius: 7
    BlastDamage: 11550
    Radiation: 15, display: RadiationLevel
    Temperature: 1080, display: true
    }
    # Cone A
    { Block Name: QUANT_Thr_3x6x3_Cone_A_Norm, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundNormal3x3Prefab
    CustomIcon: ThrusterMSRoundNormal3x3
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_3x6x3_Cone_A_Slant, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundSlant3x3Prefab
    CustomIcon: ThrusterMSRoundSlant3x3
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_3x6x3_Cone_A_Armor, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/RoundThrusters/ThrusterCVRoundArmored3x3Prefab
    CustomIcon: ThrusterMSRoundArmored3x3
    Shape: ModelEntity
    Info: bkiThruster, display: true
    }
    { Block Name: QUANT_Thr_3x7x3, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound3x7x3Prefab
    CustomIcon: ThrusterJetRound3x7x3
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "3,7,3", display: true
    }
    # Cone A
    { Block Name: QUANT_Thr_3x10x3_Cone_A, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound3x10x3Prefab
    CustomIcon: ThrusterJetRound3x10x3
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "3,10,3", display: true
    }
    # Cone B
    { Block Name: QUANT_Thr_3x10x3_Cone_B, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound3x10x3V2Prefab
    CustomIcon: ThrusterJetRound3x10x3V2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "3,10,3", display: true
    }
    # Cone A
    { Block Name: QUANT_Thr_3x13x3_Cone_A, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound3x13x3Prefab
    CustomIcon: ThrusterJetRound3x13x3
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "3,13,3", display: true
    }
    # Cone B
    { Block Name: QUANT_Thr_3x13x3_Cone_B, Ref: QUANT_Thr_3x3_Grp
    Model: @models/Blocks/Thrusters/ThrusterJetRound3x13x3V2Prefab
    CustomIcon: ThrusterJetRound3x13x3V2
    Shape: ModelEntity
    Info: bkiThruster, display: true
    SizeInBlocks: "3,13,3", display: true
    }
     
    #8
  9. Vermillion

    Vermillion Rear Admiral

    Joined:
    Jul 15, 2018
    Messages:
    3,287
    Likes Received:
    8,959
    Wow... that's painful to look at.

    Okay, Parents have ChildBlocks. You have ChildBlocks with ChildBlocks and they're somehow their own Parents. That doesn't work. This isn't Futurama. No one wants inbred configs.
    Your references are all over the place and run backwards, with no commonality between thrusters that are different sizes and shapes. Vanilla did it right, so copy what they did instead of trying to do your own thing.

    First, you make a Parent Block. This has mass and volume for cargo, it's what crafting recipes go to for multiple-modeled thrusters, It does not get placed despite having all the stats. Stats on it are for display. It has ChildBlocks.
    Then you make the ChildBlocks. The first one acts as the template for it's siblings; it has mass, volume, thrust, energyIn, everything. The second one references the first ChildBlock and ONLY contains the stats and model that are different. Subsequent childblocks continue to reference the first childblock.
    For a different parent and different childblocks they DO NOT reference the childblocks and/or parents that are not related.

    Remove the Grp and Base. No. Bad.
    In trying to use a common template for all the thrusters you broke all the thrusters and quadrupled your workload.

    Parent 1: Has all the stats. Has ChildBlocks (Child 1, 2 and 3). Does NOT get referenced or placed.
    Child 1: Has all the stats of Parent 1. Has NO ChildBlocks. Does NOT reference anything else. Does get placed. TemplateRoot is Parent 1.
    Child 2: References Child 1. Only the stats that are DIFFERENT from Child 1 (usually just the model).
    Child 3: References Child 1. Only the stats that are DIFFERENT from Child 1 (usually just the model).

    Parent 2: Has all the stats. Has ChildBlocks (Child A, B and C). Does NOT get referenced or placed. Does NOT reference Parent 1.
    Child A: Has all the stats of Parent 2. Has NO ChildBlocks. Does NOT reference anything else. Does get placed. TemplateRoot is Parent 2.
    Child B: References Child A. Only the stats that are DIFFERENT from Child A (usually just the model).
    Child C: References Child A. Only the stats that are DIFFERENT from Child A (usually just the model).

    Parents are the group object that you craft in the constructor, unlock in the tech tree and goes into your inventory.
    ChildBlocks are the ones chosen with RMB, they do not get unlocked in the tech tree, are not craftable and exist only as a physical extension of the Parent.
    The Parent Block will by default place the first ChildBlock, and does not get placed itself.

    There is to be NO direct referencing, common referencing, or even vague gesturing between anything in or around Parent 1 and Parent 2. They are not connected. They are never to BE connected.

    Do not deviate from this.
     
    #9
    Last edited: Jul 13, 2023
  10. BloodAngel099

    BloodAngel099 Ensign

    Joined:
    Jan 24, 2023
    Messages:
    17
    Likes Received:
    2
    Thank you. This is really helpful, been trying to figure all of this out on my own. Been wanting to post some of the stuff I have done to get feed back but figured it would be really bad... lol apparently inbred bad.... lol
     
    #10

Share This Page