Console commands replaceblocks

Index: Console Commands

### Custom description

The replaceblocks console command was introduced in Alpha 4.0.2 to convert old style blocks into new style blocks, this can also be used to replace existing new style blocks *en masse* with a different type (say windows to armored windows). This should only be used in creative and not on a server!

Some block names are listed below, as examples.

For a (mostly complete) list of all blocks, please refer to the file "Localization.csv", located in <YourGameDirectory>/Content/Extras/

Simply search the file for the block you are looking to replace (For instance 'Armored Concrete Block', or 'Gepanzerter Betonblock' if you're german. Localization is somewhat supported, as it is the file used to provide the ingame names.

What you are looking for, is the first entry, the KEY, in the Armored concrete block example, that would be ConcreteArmoredFull or ConcreteArmoredThin or ConcreteArmoredBlocks.

Please take care when using the command, as there is no undo. Use at your own risk.

```
ConcreteArmoredFull,Armored Concrete Block,Gepanzerter Betonblock,Bloc béton armé,Blocco di Cemento Armato,Bloque de hormigón armado,,Bloco de Concreto Reforçado,Blok żelbetowy,Укрепленный бетонный блок,強化コンクリート・ブロック,加固水泥方块,,,,Ενισχυμένο Τσιμεντένιο Μπλοκ,,Khối bê tông bọc thép

```

Note, that it is the first row you are interested in.

Please note: **IF you change from one material to another, you MIGHT lose 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!)

### Syntax

**How the Replaceblocks console command works:**

```
*Syntax:* replaceblocks <entityid> <source blockname> <target blockname> <**optional**: index name>

```

Note, that Entityid must be a CV/SV/HV/BA

In order to obtain the EntityID, either use 'di' (debug info), which opens a box, showing extended information on what you are looking at.

Alternatively use the 'ents' command. This will list all entities on the playfield. Pick the corresponding one, for the structure, you wish the command to affect.

[ ERROR PARSING ENTITY ID ] this occurs when the <entityid> is not entered correctly. The <entityid> is just a 4 or 8 digit number without <>. Thus if a BA ID is (00001016) a correct syntax would read as follows:

replaceblocks 1016 ConcreteFull ConcreteArmoredFull or replaceblocks 00001016 ConcreteFull ConcreteArmoredFull

Examples for converting old to new blocks for a CV/BA:

replaceblocks <entityid> HullFull HullFullLarge

replaceblocks <entityid> HullThin HullThinLarge

replaceblocks <entityid> HullArmoredFull HullArmoredFullLarge

replaceblocks <entityid> HullArmoredThin HullArmoredThinLarge

replaceblocks <entityid> HullSmallBlocks HullLargeBlocks

replaceblocks <entityid> HullArmoredSmallBlocks HullArmoredLargeBlocks

(please do not use the index name at the end)

Examples for converting old to new blocks for a SV/HV:

replaceblocks <entityid> HullFullSmall HullFull

replaceblocks <entityid> HullThinSmall HullThin

#### Additional Documentation

##### **HULL BLOCKS**

The table below lists the internal block group names for all of the primary construction blocks. Using these group names as the source and target blocknames will replace all blocks of the source type on the structure with the matching block of the target type. This action cannot be undone using the build menu's Undo button. **Always save a blueprint before using the replaceblocks command!**

Alternately you may choose to convert only certain child block sets of each group. To convert all blocks on a structure from one material to another using the child block sets may require using 9 separate commands, replacing the Full, Thin, Extended, and Extended2-7 shape categories. When converting bock materials, convert between the same type in each column (ex: Wood**Extended3** to Concrete**Extended3**). If you convert across columns your block shapes will change and it cannot be undone. **Always save a blueprint before using the replaceblocks command!**

##### **WINDOWS**

*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

replaceblocks <entityid> WindowVertShutterArmored WindowVertShutterArmored 1

....and so on

Important: you have to add the index 1 at the end!

##### **EMPTY BLOCKS**

You may additionally specify 'empty' or '0' (zero) to use an empty blockspace. This can be useful for mass removal of one type of block, like container extensions.

## History

* 1.10.4: Added high-level group names that replace all child block groups with a single command
* 1.10: Added new "extended7" child block group to support new shapes
* Alpha 4.0.2 : Introduced replaceblocks Command