Jump to content

Question: Syntax for Block Shapes


Numberz

Recommended Posts

 

Does anyone happen to know the syntax behind the block shapes?

 

<block name="woodShapes" shapes="All">

 

Does anyone have any insight into the possible options for the "shapes" attribute on these blocks beside the "All" choice?

I'm looking to try to define some block shapes which either only encompass a subset of shapes or exclude some shapes from the set.

Any insight would be appreciated.

 

Link to comment
Share on other sites

20 hours ago, Numberz said:

 

Does anyone happen to know the syntax behind the block shapes?

 

<block name="woodShapes" shapes="All">

 

Does anyone have any insight into the possible options for the "shapes" attribute on these blocks beside the "All" choice?

I'm looking to try to define some block shapes which either only encompass a subset of shapes or exclude some shapes from the set.

Any insight would be appreciated.

 


Not tested but just had a look in shapes.xml after consulting this comment in blocks.xml:

 

<!-- Shapes are similar to the old master blocks in that they contain the material properties. -->
<!-- The shapes are then combined at run time with the shapes.xml shapes to produce -->
<!-- all of the various block shape and material combinations. -->

 

Here a two random shapes with shapes.xml

 

<shape name="cube">
		<property name="Path" value="solid"/>
		<property name="Shape" value="New"/>
		<property name="Model" value="cube"/>
		<property name="CustomIcon" value="shapeCube"/>
		<property name="ShapeCategories" value="Basic,Square"/>
		<property name="MaterialHitpointMultiplier" value="1"/>
	</shape>

	<shape name="cubeFrame">
		<property name="Path" value="solid"/>
		<property name="Mesh" value="opaque"/>
		<property name="Shape" value="New"/>
		<property name="Model" value="cube_frame"/>
		<property name="CustomIcon" value="shapeCubeFrame"/>
		<property name="ShapeCategories" value="Basic,Square"/>
		<property name="MaterialHitpointMultiplier" value="1"/>
		<property name="UseGlobalUV" value="Local"/>
		<property name="Collide" value="movement,melee,rocket"/>
		<property name="LightOpacity" value="0"/>
	</shape>

 

Considering this, would the following work?

 

<block name="woodShapes" shapes="cube,cubeFrame">

 

As I mentioned, not tested.

Also, looking at this property in shapes.xml:

<property name="ShapeCategories" value="Basic,Square"/>

 

Could 'Basic' and 'Square' be values in the same respect as 'All'?

Link to comment
Share on other sites

  • 3 weeks later...
On 5/26/2022 at 4:23 PM, poly said:


Not tested but just had a look in shapes.xml after consulting this comment in blocks.xml:

 

<!-- Shapes are similar to the old master blocks in that they contain the material properties. -->
<!-- The shapes are then combined at run time with the shapes.xml shapes to produce -->
<!-- all of the various block shape and material combinations. -->

 

 

Considering this, would the following work?

 

<block name="woodShapes" shapes="cube,cubeFrame">

 

As I mentioned, not tested.

Also, looking at this property in shapes.xml:

<property name="ShapeCategories" value="Basic,Square"/>

 

Could 'Basic' and 'Square' be values in the same respect as 'All'?

 

Unfortunately, negative on both of these.

 

Specifying the actual shape names has no effect.  You still get "All" as the result.

 

The categories seem to only apply to where they display in the UI.  Tried anyway but had no effect.

 

Suspect this feature may only be partially coded.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...