Jump to content

Extending an existing shape/block?


Recommended Posts

I'm having an issue with a modlet I am porting from A19 to A21. A19 had a "CustomIcon" value and I had it set to the stainless steel block. That's gone so I just removed the custom icon line for now. However, the growing line is confusing me. I cannot figure out how to tell it to grow a steel block.


<property name="PlantGrowing.Next" value="steelBlock"/>

This does not work. I see something called "steelShapes" in the official blocks.xml file, but I am not sure how to use that in my modlet. This thing basically costs the same as X steel blocks, you place it down, and it grows up X blocks to speed building. How do I tell it to place a steel cube in A21?

Link to comment
Share on other sites

Okay, I figured it out.


<property name="PlantGrowing.Next" value="steelShapes:cube"/>

I had no idea I could do that. My only remaining option is the "CustomIcon" field. Is there a way to set that to the steel cube icon? I've tried several things and nothing seems to work. The icon is always blank or the mod fails to apply.

Link to comment
Share on other sites

On 7/11/2023 at 2:25 PM, The_Great_Sephiroth said:

I had no idea I could do that. My only remaining option is the "CustomIcon" field. Is there a way to set that to the steel cube icon? I've tried several things and nothing seems to work. The icon is always blank or the mod fails to apply.

 

What does your code look like?

Link to comment
Share on other sites

  • 2 weeks later...

Been away from 7 Days recently. Things in real life taking over. I do not need a custom icon. Somehow the game knows what to put on its own.

 

Spoke too soon. I started adding pillars and such, and they have the wrong icon. Going to look into the icons folder and see if I see pillar icons.


<property name="CustomIcon" value="woodMaster"/>

That's the icon line currently.

Edited by The_Great_Sephiroth (see edit history)
Link to comment
Share on other sites

Okay, I believe I know what my issue is. I extended the "woodMaster" for the basic cube that grows up. I also used this for the pillars (woodShapes:pillar100) and the icon is a wood cube. In fact, when I place it in the world it is a wood cube, but as it builds up, it changes into the correct pillar shape. The thing is, I cannot find the shape for a "pillar100" that I need to extend or use as an icon. The two lines that are likely my problem are below.


<property name="Extends" value="woodMaster"/>
<property name="CustomIcon" value="woodMaster"/>

I assume I should extend some wood pillar, but I cannot find it in the "blocks.xml" file, so I am a tad lost.

Link to comment
Share on other sites

@The_Great_Sephiroth

 

Have you tried the shapes.xml file?

 

    <shape name="cubeHalf1mHole">
        <property name="Path" value="solid" />
        <property name="Model" value="cube_half_1m_hole" />
        <property name="CustomIcon" value="shapeCubeHalf1mHole" />
        <property name="ShapeCategories" value="Square,Round" />
        <property name="Collide" value="movement,melee,bullet,arrow,rocket" />
        <property name="UseGlobalUV" value="G,L,G,G,G,G" />
        <property name="LightOpacity" value="0" />
        <property name="WaterFlow" value="permitted" />
    </shape>

 

Edited by BFT2020 (see edit history)
Link to comment
Share on other sites

I did not. I'll check it out, thanks for the tip!

 

Update:

That's the file I needed! Now to figure out how to mesh it all into the modlet. Thanks! The first thing in the "ROUND" section:


    <shape name="pillar100">
        <property name="Path" value="solid" />
        <property name="Model" value="Pole1m" />
        <property name="CustomIcon" value="shapePole1m" />
        <property name="ShapeCategories" value="Basic,Round" />
        <property name="Collide" value="movement,melee,bullet,arrow,rocket" />
        <property name="UseGlobalUV" value="Local" />
        <property name="ImposterExchange" value="imposterBlock" />
        <property name="WaterFlow" value="permitted" />
    </shape>

The piece I was looking for. Thanks!

Edited by The_Great_Sephiroth (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...