Replaceblocks Command

Discussion in 'Knowledge & Info' started by Hummel-o-War, Jun 19, 2018.

  1. Hummel-o-War

    Hummel-o-War Administrator Staff Member Community Manager

    • Developer
    Joined:
    Jun 15, 2015
    Messages:
    5,403
    Likes Received:
    8,417
    You can use this console cmd to replace some of the old BA / CV blocks after our separation of blocks into small / large blocks

    1. Use this syntax to bulk-update a structure

    replaceblocks <entityid> -alpha4

    2. Use this syntax to individually update groups

    replaceblocks <entityid> <source blockname> <target blockname> <optional: index name>

    3. When you want to REMOVE a certain block type entirely from the structure use

    replaceblocks <entityid> <source blockname> empty

    -------------

    Please note: IF you change from one material to another, you MIGHT loose the applied textures as not all of the textures are the same for all blocks!

    To check this, use the texture tool and point at a steel or concrete block (You'll see the difference in the texture availablity!)

    -------------

    HULL BLOCKS

    All Hull blocks consist of TWO groups: Full blocks and thin blocks. You need to run the command 2x to swap all blocks of a structure.

    Terminology
    - Hull = Steel Blocks
    - Armored = Hardened Steel Blocks
    - Combat = Combat Steel Blocks

    HULL (Pre-Alpha)

    Steel: Hull

    Important Note: This only works for the pre-Alpha standard cubic blocks. This will NOT work for the old shaped or colored blocks, although they are still active IDs. But these old IDs do not have an equivalent in post1.0 block shape-ID groups. Results in: You can not make a pre-Alpha "hullwedge" into a "hullfull" block with the same shape! If you use the command "replaceblocks ID HullWedge HullFull" you will only get cubic blocks as a result!

    Check the LOCALIZATION.csv in the .../CONTENT/EXTRAS folder for more names of the old blocks (first row). Use at your own risk.


    Interior blocks (old internal deco blocks used before color/textur tool were available; convert to hullfull or other blocks, as Interior Blocks had no additional shapes! They will loose the textures, though)

    InteriorBlock01
    InteriorBlock02
    InteriorBlock03
    InteriorBlock04
    InteriorBlock05
    InteriorBlock06


    HULL (Alpha 8.0)

    SV/HV: hullfullsmall, hullthinsmall, hullarmoredfullsmall, hullarmoredthinsmall, PlasticFullSmall, PlasticThinSmall
    HV: hullcombatfullsmall, hullcombatthinsmall
    CV/BA: hullfulllarge, hullthinlarge, hullarmoredfulllarge, hullarmoredthinlarge, hullcombatfulllarge, hullcombatthinlarge, PlasticFullLarge, PlasticThinLarge
    BA: ConcreteFull, ConcreteThin, ConcreteArmoredFull, ConcreteArmoredThin, WoodFull, WoodThin, PlasticFullLarge, PlasticThinLarge

    Examples for converting old to new blocks for a CV/BA:
    replaceblocks <entityid> HullFull HullFullLarge
    replaceblocks <entityid> HullArmoredFull HullArmoredFullLarge
    replaceblocks <entityid> HullArmoredThin HullArmoredThinLarge
    (please do not use the index name at the end for HULL blocks!)

    WINDOWS

    Unlike Hull blocks, you need to replace the variants of each window (as they are distinct models).
    Point at a window with the Multitool to see its identifier name

    You can replace the following BA / CV window blocks

    Normal Windows:
    Window_v1x1, Window_v1x2, Window_v2x2, Window_s1x1, Window_s1x2, Window_sd1x1, Window_sd1x2, Window_sd1x2V2, Window_c1x1, Window_c1x2, Window_cr1x1, Window_crc1x1, Window_crsd1x1
    Window_v1x1Inv, Window_v1x2Inv, Window_v2x2Inv, Window_s1x1Inv, Window_s1x2Inv, Window_sd1x1Inv, Window_sd1x2Inv, Window_sd1x2V2Inv, Window_c1x1Inv, Window_c1x2Inv, Window_cr1x1Inv, Window_crc1x1Inv, Window_crsd1x1Inv


    Armored Windows:
    Window_v1x1Thick, Window_v1x2Thick, Window_v2x2Thick, Window_s1x1Thick, Window_s1x2Thick, Window_sd1x1Thick, Window_sd1x2Thick, Window_sd1x2V2Thick, Window_c1x1Thick, Window_c1x2Thick, Window_cr1x1Thick, Window_crc1x1Thick, Window_crsd1x1Thick
    Window_v1x1ThickInv, Window_v1x2ThickInv, Window_v2x2ThickInv, Window_s1x1ThickInv, Window_s1x2ThickInv, Window_sd1x1ThickInv, Window_sd1x2ThickInv, Window_sd1x2V2ThickInv, Window_c1x1ThickInv, Window_c1x2ThickInv, Window_cr1x1ThickInv, Window_crc1x1ThickInv, Window_crsd1x1ThickInv


    Shutter Windows:
    WindowVertShutterArmored, WindowSlopedShutterArmored, WindowSloped2ShutterArmored, WindowVertShutterTransArmored, WindowSlopedShutterTransArmored

    Example:
    replaceblocks <entityid> Window_v1x1 Window_v1x1 1
    replaceblocks <entityid> Window_sd1x2Thick Window_sd1x2Thick 1
    etc

    Important: you have to add the index 1 at the end!
     
    #1
    Last edited by a moderator: Nov 15, 2020
  2. Hummel-o-War

    Hummel-o-War Administrator Staff Member Community Manager

    • Developer
    Joined:
    Jun 15, 2015
    Messages:
    5,403
    Likes Received:
    8,417
    /added material terms for new Plastic Blocks (HULL BLOCKS)
     
    #2
  3. zaphodikus

    zaphodikus Captain

    Joined:
    Oct 1, 2016
    Messages:
    471
    Likes Received:
    229
    Want to delete blocks
    replaceblocks <entityid> <source blockname> Empty

    gives me an error
    'Empty' not found
    .. but If I type without Empty .assuming no parameter. I instead get
    Wrong number of parameters
     
    #3
  4. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,275
    Likes Received:
    11,936
    use 0 instead of empty. But this only works when removing blocks that are 1x1x1 in size.
     
    #4
  5. zaphodikus

    zaphodikus Captain

    Joined:
    Oct 1, 2016
    Messages:
    471
    Likes Received:
    229
    0 (numeric zero)
    Got it, are we saying that zero is the block number for air, because I was typing in variants of that, and not hitting it lucky.
     
    #5
  6. Kaeser

    Kaeser Rear Admiral

    Joined:
    Aug 17, 2015
    Messages:
    1,640
    Likes Received:
    2,422
    It actually should be

    replaceblocks <entityid> <source blockname> empty

    The Console Commands are case sensitive and that command was defined with lower initial letter, guess Hummel got that wrong in the OP
     
    #6
    Myrmidon likes this.
  7. zaphodikus

    zaphodikus Captain

    Joined:
    Oct 1, 2016
    Messages:
    471
    Likes Received:
    229
    Easy enough mistake to make.

    Ummm, but, that is an inconsistent user experience and a defect in that case.
    Block names are case insensitive, so whoever write the special casing for 'empty' versus 'Empty' was writting ocde at a different scope, because zero is a valid value for empty/none. Because for example using 'HullFullLarge' is equivalent to 'hullfulllarge' on my computer. But at least my question is answered, and since I just need to remember to always use lowercase block names, that should be just fine and easy enough. So for me it's solved, but for someone who had no way of discovering this detail, it's trickier.

    https://cdn.shopify.com/s/files/1/1341/8465/products/mockup-ae54c955_1024x1024.png?v=1520362089
     
    #7
  8. Kaeser

    Kaeser Rear Admiral

    Joined:
    Aug 17, 2015
    Messages:
    1,640
    Likes Received:
    2,422
    Yes this is all very inconsistent yet, the difference here is that Commands are case sensitive, most of them anyway, but Command Parameters are not, so empty is a parameter but also an exception so who knows....
     
    #8
  9. Khazul

    Khazul Rear Admiral

    Joined:
    Jan 15, 2020
    Messages:
    825
    Likes Received:
    1,447
    Cant we just have a version of this command to swap the material instead of having to issues 8+ commands (or whatever) to replace steel with hardened steel? (Full, Thin, Extended, Extended...1--6 etc). Never mind trying to do it for windows.

    Or have I missed something?
     
    #9
    krazzykid2006 likes this.
  10. zaphodikus

    zaphodikus Captain

    Joined:
    Oct 1, 2016
    Messages:
    471
    Likes Received:
    229
    I don't think that's really how it works. It cannot, sicne you can only replace concrete with steel, and with hardended concrete, or harder armour, but not with window for example. so it's only possible to transfer between the 4 materials (when legal to do so).

    And to be sure, nothing stops us from writing a script of all the 250 blocks (using a macro editor of course) and then pasting that into the game console in one go so long as it replaces the entity id.

    Although Khazul, I kinda get why the buttons for remove/delete/replace are not exactly doing what you might want to in the replace command. I'd like to see some mod written that refines this. I cannot program much myself, but to date, nobody has made this easy to follow yet. I imagine it's only time.
     
    #10
    Last edited: Nov 1, 2020
  11. japp_02

    japp_02 Commander

    Joined:
    Feb 11, 2021
    Messages:
    546
    Likes Received:
    209
    What about so called 'MarkerBlock' ? I cannot find them in the creative menu, yet I need their ID to erase them all with the replaceblocks command to eliminate forbidden blocks in my CV blueprint.
     
    #11
  12. zaphodikus

    zaphodikus Captain

    Joined:
    Oct 1, 2016
    Messages:
    471
    Likes Received:
    229
    { Block Id: 520, Name: MarkerBlock
    { Block Id: 521, Name: MarkerBlock2, Ref: MarkerBlock
    { Block Id: 687, Name: MarkerBlock3, Ref: MarkerBlock

    I believe these are alien blocks, they have been removed from the "game", I hope this little search helps :/
     
    #12
    Germanicus likes this.
  13. japp_02

    japp_02 Commander

    Joined:
    Feb 11, 2021
    Messages:
    546
    Likes Received:
    209
    Thank you zaphodikus, this will help me solve a big problem with my CV blueprint I think!
     
    #13
    Germanicus likes this.
  14. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,734
    Likes Received:
    2,066


    Usually console commands are case sensitive, no matter which console you use. Be it DOS, id Tech, Unreal engine, Unity, CryEngine, Linux, AXE etc. Same goes for Empyrion's console, built with Unity, hence "Empty" might not work but 'empty" does. I use it all the time.
     
    #14
    zaphodikus likes this.
  15. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,734
    Likes Received:
    2,066
    I never needed to replace the MarkerBlocks, but given you may use the whole name "MarkerBlock" as it is shown on the "di" (iirc "debug information") window that activates after first 'di' command and point the multitool on the block. You will see the name and ID of every block possible.
     
    #15

Share This Page