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

Creating and Exporting Models from Unity for use in 7D2D

Updating for A21

Here are the links you will need to get started modding A21 using Unity. You must use Unity 2021.3 to create new assets for A21.  

Things you will need to follow along with the videos (note that the video talks about old version of unity but it is the same process).  

Step 1:  Download the Unity Hub and Unity 2021.3.19f1:  https://unity3d.com/get-unity/download/archive

then Install it.

Step 2:  Download my Unity 2021.3 template projecthttps://drive.google.com/file/d/1yPQ2yOj1Oe7pOml3ytfZcNggWWTAD4gq/view?usp=sharing then unpack it, saving it to a location you will remember.  

Step 3:  Open unity Hub, and click the ADD button, locate my project template, and select that folder. 

You now have a properly configured modding platform.  The project includes the TFP tagmanager, Linear lighting configuration, and the export script needed to export your new things as .unity3d bundles.  

Step 4:  Go watch the tutorial videos.

https://www.youtube.com/user/xythq/playlists?shelf_id=0&view=1&sort=dd

Step 5:   Make something cool, and have fun doing it! 

 
Last edited by a moderator:
Hello. Is the tutorial here still valid for 1.0? Latest Unity version is "2022.3.40f1". Tried to open project from github, but:

"To open your project, install Editor version 2021.3.19f1 or select a different version below. Please note: using a different Editor version than the one your project was created with may introduce risks."

So, we still need to downgrade to 2021.3, even for game version 1.0?

All i need is about Textures. To export textures>edit the ones i need>import back as mod>use in-game. Everywhere i look, tutorials are super outdated, from years ago. I'm using https://github.com/zhangjiequan/AssetStudio , an/or UABE, but again nowhere a single guide about extracting/importing/creating even a simple texture mod, plus UABE always throw errors. AssetRipper also same. So, anyone can provide please a fully updated tutorial (with tools we need, etc ) for game version 1.0? Thanks in advance.

 
Last edited by a moderator:
Hello, I need help for a little simple thing, please !

I try to made a 3D object cube poster (1 x 2 x 0.1) & the look-like is good in Unity...

But after use it in game, the transparent frame show a block size 1, 2, 0.1 with the good size of the picture, but after placed it that spawn a block 1 x 1 x 1 o_O"

I try too by set many random size like a simple size 2 x 2 x 1, the look-like is always good in Unity but after use it in game, it's always the same problem.

If I do a size 1 x 1 x 1, no problem, but with other size, in game that stay 1 x 1 x 1 & I can't destroy it too...

I follow many tutorial to set a picture/material on any size of cube, but always the same problem...

So I miss something in Unity and/or maybe my file xml is wrong ? ? ?

1 - Create 3D object cube.

2 - Set a tag T_Mesh_B & set size x,y,z = 1 x 2 x 0.1 without change any other option.

3 - Insert picture & without change any option.

4 - Put the image on the cube with no change any option too.

5 - Export to an asset bundle .unity3d

<block name="Poster1x2">
    <property name="CustomIcon" value="Poster1x2"/>
    <property name="CreativeMode" value="Player"/>
    <property name="Model" value="#@modfolder:Resources/Poster1x2A.unity3d?Poster1x2"/>
    <property name="Group" value="Science"/>
    <property name="FilterTags" value="MC_playerBlocks,SC_decor"/>
    <property name="SortOrder1" value="7000"/>
    <property name="SortOrder2" value="0002"/>
    <property name="Material" value="Mwood"/>
    <property name="Stacknumber" value="100"/>
    <property name="Shape" value="ModelEntity"/>
    <property name="ModelOffset" value="0,0.5,0"/>
    <property name="MultiBlockDim" value="1,2,1"/>
    <property name="ImposterDontBlock" value="true"/>
    <property name="WaterFlow" value="permitted"/>
    <property name="Place" value="TowardsPlacerInverted"/>
    <property name="IsDecoration" value="true"/>
    <property name="StabilitySupport" value="true"/>
    <property name="MaxDamage" value="1000"/>
    <property name="CanPickup" value="true" param1="Poster1x2"/>
    <drop event="Destroy" name="Poster1x2" count="1"/>
    <drop event="Fall" name="Poster1x2" count="1"/>
    <drop event="Harvest" count="0"/>
</block>

 
Hello, I need help for a little simple thing, please !

I try to made a 3D object cube poster (1 x 2 x 0.1) & the look-like is good in Unity...

But after use it in game, the transparent frame show a block size 1, 2, 0.1 with the good size of the picture, but after placed it that spawn a block 1 x 1 x 1 o_O"

I try too by set many random size like a simple size 2 x 2 x 1, the look-like is always good in Unity but after use it in game, it's always the same problem.

If I do a size 1 x 1 x 1, no problem, but with other size, in game that stay 1 x 1 x 1 & I can't destroy it too...

I follow many tutorial to set a picture/material on any size of cube, but always the same problem...

So I miss something in Unity and/or maybe my file xml is wrong ? ? ?

1 - Create 3D object cube.

2 - Set a tag T_Mesh_B & set size x,y,z = 1 x 2 x 0.1 without change any other option.

3 - Insert picture & without change any option.

4 - Put the image on the cube with no change any option too.

5 - Export to an asset bundle .unity3d
 Your process seems mostly correct, but I think I see where you might be having trouble. First, make an empty gameobject to hold each of your models. The game object should be unscaled--1x1x1. Then, put your cube inside that gameobject and perform the scaling on it at that sublevel, but leave the top level unscaled. Unity doesn't seem to like scaling changes made at the topmost level. You can probably even use the same name for the top gameobject as for your object cube, so you don't have to re-write your xml code. 

The inability to destroy these blocks might be due to a lack of a collider. You'll want to create a box collider on your cube at the same sublevel where you scaled it and tagged it. With that in place, select each model from the new upmost level and re-export your asset bundle and hopefully you'll have more luck.

 
@Cranberry Monster

Thanks very mush for you answer.

After many try after try, yes, I figure out myself that needed to create a 3D oject in a object emtpy to respect the size inside the game.

& that needed to export from the object empty & not directely from the 3D objet.

I followed/readed many tutorial where that don't explain that, at least for for 7DTD, IDK for other game if it's the same way...

About the box collider, Unity add it in auto but I figure out myself too how to fix it.

In fact with the xml, if the set of ModelOffset is out of the set of MultiBlockDim, no interacttion/destroying can't be apply on it.

Before set a ModelOffset, I let it on 0, 0, 0 & I could destroy it...

After that, I was set 0,0,-0.5 then no more interacttion/destroying, but by apply 0, 0, -0.49 that fix it.

Thanks again anyway.

 
Last edited by a moderator:
Updating for A21

Here are the links you will need to get started modding A21 using Unity. You must use Unity 2021.3 to create new assets for A21.  

Things you will need to follow along with the videos (note that the video talks about old version of unity but it is the same process).  

Step 1:  Download the Unity Hub and Unity 2021.3.19f1:  https://unity3d.com/get-unity/download/archive

then Install it.

Step 2:  Download my Unity 2021.3 template projecthttps://drive.google.com/file/d/1yPQ2yOj1Oe7pOml3ytfZcNggWWTAD4gq/view?usp=sharing then unpack it, saving it to a location you will remember.  

Step 3:  Open unity Hub, and click the ADD button, locate my project template, and select that folder. 

You now have a properly configured modding platform.  The project includes the TFP tagmanager, Linear lighting configuration, and the export script needed to export your new things as .unity3d bundles.  

Step 4:  Go watch the tutorial videos.

https://www.youtube.com/user/xythq/playlists?shelf_id=0&view=1&sort=dd

Step 5:   Make something cool, and have fun doing it! 
You can call me lazy, and you would probably be right, but I'm not looking through all of your youtube videos to find the one I'm looking for, especially if it doesn't exist yet. do you have a link to an updated video for how to export custom sounds to 7dtd, using Unity version 2021.3?

 
For 1.3 , do i still need to use 2021.3 ? or it's 2022.3.50f1 ( the one i see in the game log )

 
Last edited by a moderator:
I gave up on this a while ago. Whoever is in charge can close this topic. It's too stressful for me to listen to too much conflicting advice from too many people using too many different versions of Unity. I decided it's not really worth the hassle.

 
I gave up on this a while ago. Whoever is in charge can close this topic. It's too stressful for me to listen to too much conflicting advice from too many people using too many different versions of Unity. I decided it's not really worth the hassle.
Why close this post? I tried to help you in your thread before, but for help like this I would recommend joining Gup's discord server as it's much easier to help that way, if you still are interested in learning.

 
Back
Top