• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Making custom plants?

Girthy

New member
I'm trying to figure out how to make a custom plant. So far I get the general idea. There is a master block in block.xml that all the other plants are extended from. That's about all I know. That and the fact that items and block xmls are somehow linked.

I want to make a custom bush based on the snowberry bush model. There needs to be a seed for the new bush that's craftable from a specific item.

So far I cant find any seeds in items.xml so where the heck are the seeds?

 
Seeds are now in blocks.xml.

You put plants in the world as a block.

see

<block name="plantedSnowberry1">

as an example

 
Last edited by a moderator:
Here is a full example of adding a new crop type, I use custom icons for everything and are easy and fun to make. If you want to use an existing icon for any block or item you can do that too and you can also add tint to it if needed. I have also included two harvestable crop types one for biome generation that does not downgrade into a seedling and one for player harvest which does.

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

<property name="CustomIconTint" value="ffb0b0"/>

+Blocks

Code:
<block name="plantedWheat1">
<property name="Extends" value="cropsGrowingMaster" param1="CustomIcon,DescriptionKey"/>
<property name="CreativeMode" value="Dev"/>
<property name="Shape" value="Grass"/>
<property name="Mesh" value="grass"/>
<property name="Texture" value="441"/>
<property name="Stacknumber" value="250"/>
<property class="UpgradeBlock">
	<property name="ToBlock" value="plantedWheat2"/>
</property>
<property name="PlantGrowing.Next" value="plantedWheat2"/>
<property name="Group" value="Food/Cooking"/>
<drop event="Destroy" name="plantedWheat1" count="1"/>
</block>

<block name="plantedWheat2">
<property name="Extends" value="cropsGrowingMaster"/>
<property name="CreativeMode" value="Dev"/>
<property name="Shape" value="Grass"/>
<property name="Mesh" value="grass"/>
<property name="Texture" value="377"/>
<property name="PlantGrowing.Next" value="plantedWheat3HarvestPlayer"/>
<drop event="Destroy" name="plantedWheat1" count="1"/>
</block>

<block name="plantedWheat3Harvest">
<property name="Extends" value="cropsHarvestableMaster" param1="CustomIcon,DescriptionKey"/>
<property name="Texture" value="377"/>
<drop event="Harvest" name="foodCropWheat" count="1" tool_category="cropHarvest"/>
<drop event="Harvest" name="foodCropWheat" count="1" prob="0.25" tool_category="cropHarvest"/>
</block>

<block name="plantedWheat3HarvestPlayer">
<property name="Extends" value="cropsHarvestableMaster" param1="CustomIcon,DescriptionKey"/>
<property name="CreativeMode" value="Dev"/>
<property name="Texture" value="377"/>
<drop event="Harvest" name="foodCropWheat" count="1" tool_category="cropHarvest"/>
<drop event="Harvest" name="foodCropWheat" count="1" prob="0.25" tool_category="cropHarvest"/>
<property name="DowngradeBlock" value="plantedWheat1"/>
<property name="CustomIcon" value="treeBrownGrassDiagonal"/>
</block>
+Items

Code:
<item name="foodCropWheat">
	<property name="HoldType" value="31"/>
	<property name="DisplayType" value="food"/>
	<property name="Meshfile" value="Items/Misc/parcelPrefab"/>
	<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
	<property name="Material" value="Mcompost"/>
	<property name="Weight" value="1"/>
	<property name="Stacknumber" value="50"/>
	<!-- STK resource -->
	<property name="EconomicValue" value="10"/>
	<property name="EconomicBundleSize" value="5"/>
	<property name="CraftingIngredientTime" value="10"/>
	<!-- 14 is large round hold -->
	<property class="Action0">
		<property name="Class" value="Eat"/>
		<property name="Delay" value="1.0"/>
		<property name="Use_time" value="..."/>
		<property name="Sound_start" value="player_eating"/>
	</property>
	<property name="Group" value="Food/Cooking"/>
	<effect_group tiered="false">
		<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodAmount" operation="add" value="1"/>
		<!-- <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodPerkDisplay" operation="add" value="@foodSatiationPSec"/> -->
		<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
	</effect_group>
	<property name="DescriptionKey" value="foodCropWheatDesc"/>
</item>
+Recipes

Code:
<recipe name="plantedWheat1" count="1" craft_time="1" craft_exp_gain="0" tags="learnable">
	<ingredient name="foodCropWheat" count="2"/>
</recipe>
+Localization

Code:
plantedWheat1,blocks,Farming,New,Wheat Seed,,,,
plantedWheat3Harvest,blocks,Farming,New,Wheat (Harvestable),,,,
plantedWheat3HarvestPlayer,blocks,Farming,New,Wheat (Harvestable),,,,
foodCropWheat,items,Item,KgNone,Wheat,,,,
foodCropWheatDesc,items,Item,KgNone,A cereal plant that of which is ground to make yeast for alcohol or flour for bread.,,,,
 
Last edited by a moderator:
Seeds are now in blocks.xml.You put plants in the world as a block.

see

<block name="plantedSnowberry1">

as an example
OH THANK YOU

That would be a seed... labeled with a 1 indicating the first stage. First stage being seed. The seed is probably linked to cropsGrowingMaster.

It makes sense that seeds would be in blocks because they are able to get placed in the world like a block would.

EDIT* THANKS CLOCK WORK I THINK IM REALLY STARTING TO UNDERSTAND NOW!!! :)

 
OH THANK YOU
That would be a seed... labeled with a 1 indicating the first stage. First stage being seed. The seed is probably linked to cropsGrowingMaster.

It makes sense that seeds would be in blocks because they are able to get placed in the world like a block would.

EDIT* THANKS CLOCK WORK I THINK IM REALLY STARTING TO UNDERSTAND NOW!!! :)
Yeah no problem, and you can also use items to place blocks in the world, seeds used to be items back in the day the same way a torch is now. If you check out the torch item ( meleeToolTorch ) you will see it places down as a block ( wallTorchLightPlayer ) and that block can be picked up as the item.

( wallTorchLight ) <property name="CanPickup" value="true" param1="meleeToolTorch"/>

 
Cool to know. Maybe I can use this to make other items able to be placed down in the world like torches are. Thanks again

 
...just wait until you find out you can hit a block with one item, and have it change that item...

(Check out water buckets)

 
Ok so I've got a problem... The plant I made works perfectly but there is no icon for the seed. I used corn plant as the template and not even the corn seeds are showing up on the seeds for my plant in game.

basically that seeds to my plant show up as blank square no icon.

 
Ok so I've got a problem... The plant I made works perfectly but there is no icon for the seed. I used corn plant as the template and not even the corn seeds are showing up on the seeds for my plant in game.
basically that seeds to my plant show up as blank square no icon.
I use custom icons for almost everything so im not sure what the corn seed path would be other than plantedCorn1

so for the block it should have <property name="CustomIcon" value="plantedCorn1"/>

otherwise you can make custom icons from almost any picture online if you want I even have a tutorial video showing the basics on how to do it with free programs if you are interested. I find making icons one of the more fun and creative things to do because its so simple.

 
Oh that worked! I just added that customicon command to the seed stage block and it worked.

I made a "poop tree" you make the seeds from human turds. The seeds look like bits of corn. Grows and gives one human turd per plant (haven't tried fertilizing yet).

No I need to figure out how to make new guns without getting errors. Making a new gun (variant of ak47) didn't work like making a poop tree.

 
Oh that worked! I just added that customicon command to the seed stage block and it worked.
I made a "poop tree" you make the seeds from human turds. The seeds look like bits of corn. Grows and gives one human turd per plant (haven't tried fertilizing yet).

No I need to figure out how to make new guns without getting errors. Making a new gun (variant of ak47) didn't work like making a poop tree.
Lol well..., thats creative for sure, to make a new gun I would suggest not using the extends property until you get comfortable with it because some things you dont want to extend in some cases.

so for eg you can copy paste the Ak47 and just rename it and give it a custom icon and it will be working Ak47 just with a different name, you can then make adjustments from there. Just watch out for the ammo types it uses in case you are using custom ammo.

 
Well it didn't work when I copied it and renamed it (also item id was unique) I got a ton of errors when I dragged it from cm to my inventory it froze my client. I didn't try it with a custom icon though. That video you made is pretty good but what do you do with the icons you make so you can link them to your items? Will people automatically download the icons when they join the game?

 
Yeah if you have a dedicated server then the files should be pushed automatically.

The icons go into Steam\steamapps\common\7 Days To Die\Mods\MYMODNAMEIcons\ItemIcons

inside MYMODNAMEIcons folder you should then have a ModInfo.xml file inside that file, here is an example of my ModInfo file

if you are still confused you can download my mod A Clockwork Project and you can see the file paths that way if you need

Code:
<xml>
 <ModInfo>
   <Name value="ACP Icons"/>
   <Description value="Icons for A Clockwork Project"/>
   <Author value="Clockwork Orange"/>
   <Version value="14"/>
<Website value="http://7days2mod.com/AClockworkProject/"/>
 </ModInfo>
</xml>
 
Back
Top