Jump to content

Creating and Exporting Models from Unity for use in 7D2D


xyth
 Share

Recommended Posts

Updating for A19

 

Here are the links you will need to get started modding A19 using Unity 2019.2.  (A18 used Unity 2019.1)  You must use Unity 2019.2 to create new assets for A19.  

 

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 2019.2.21:  https://unity3d.com/get-unity/download/archive

then Install it.

 

Step 2:  Download my Unity 2019.2 template project:  https://github.com/7D2D/Templates-and-Utilities/blob/master/A19TemplateProject.zip  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! 

Edited by xyth (see edit history)
  • Like 5
  • Thanks 1
Link to comment
Share on other sites

Moving the topic from an old thread to this new one. Eventually we will have a master thread discussing the entire process, from using tools like blender to create models, to using SDX 7 to import the models and other modifications into 7d2d.

 

Here are the links you will need to get started using Unity 5.3.8p2, which is the latest version that will work for this purpose.

 

Things you will need to follow along with the videos:

 

Unity 5.3.8p2 https://unity3d.com/unity/qa/patch-releases

 

The export C# script asset: https://github.com/7D2DSDX/SDXModding/raw/master/Scripts/Unity/ExportAssetBundles.zip

 

Now on to the videos.

 

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

 

I'm new to using Unity, so if you have detailed Unity questions, I probably can't answer them. There are a lot of great beginner videos out there that for those who want to do more than just get a new game object into 7d2d. We hope to have a more comprehensive tutorial guide available in the near future, but for now this should help you understand this portion of the process.

 

 

 

I am grateful for this work

Link to comment
Share on other sites

The tutorial on using sdx 0.7.1 (being done by a tutorial team member, not me) will be available soon. Basicly you just run the sdx once, which add the "hooks" needed into the vanilla game code. Once that's done, just drop your new .unity3d file in the new resources folder that sdx makes for you, and then add a new block to your xml that uses the model. Full details and working examples are coming very soon.

Link to comment
Share on other sites

The tutorial on using sdx 0.7.1 (being done by a tutorial team member, not me) will be available soon. Basicly you just run the sdx once, which add the "hooks" needed into the vanilla game code. Once that's done, just drop your new .unity3d file in the new resources folder that sdx makes for you, and then add a new block to your xml that uses the model. Full details and working examples are coming very soon.

 

 

ok, thank you!

Link to comment
Share on other sites

Yeh now is the time to brush up on blender; straightforward block shapes are easy in unity and will be fully fleshed out in the upcoming tutorials... You will find that you can make new blocks in mere minutes. I'm super excited about what these guys are doing.

Link to comment
Share on other sites

hey i made my first "custom block" but ingame i get this error

 

https://img-fotki.yandex.ru/get/232848/158082080.2bf/0_1a58b4_53f3051e_orig

 

maybe any one can help me fix this ?

 

not sure why this happens

 

seems like an xml bug, to me... did you got a line like this one, <property name="Texture" value="282" />, in your custom block xml?

if so delete that one please

Link to comment
Share on other sites

nope, no part with this

 

xml is like this

 

...........................

 

<block id="2045" name="AmmonationBench">

<property name="Class" value="Workstation" />

<property name="Material" value="metal" />

<property name="MaxDamage" value="800" />

<property name="StabilitySupport" value="false" />

<property name="Model" value="#AmmonationBench?AmmonationBenchPrefab" />

<property name="MultiBlockDim" value="2,1,1" />

<property name="ImposterDontBlock" value="true" />

<property name="Place" value="TowardsPlacerInverted" />

<property name="OnlySimpleRotations" value="true" />

<property name="IsTerrainDecoration" value="true" />

<property name="HeatMapStrength" value="0.5" />

<property name="HeatMapTime" value="1200" />

<property name="HeatMapFrequency" value="25" />

<!--<property name="RecipeList" value="backpack, workbench"/>-->

<!--<property name="CraftTimeMultiplier" value="0.5,1"/>-->

<property name="Stacknumber" value="1" />

<property class="Workstation">

<property name="Modules" value="output" />

<property name="CraftingAreaRecipes" value="AmmonationBench" />

</property>

<property class="RepairItems">

<property name="forgedIron" value="25" />

<property name="mechanicalParts" value="20" />

<property name="wood" value="50" />

</property>

<drop event="Harvest" name="scrapIron" count="200" tool_category="harvestingTools" />

<drop event="Harvest" name="wood" count="20" tool_category="harvestingTools" />

<drop event="Harvest" name="forgedIron" count="10" tool_category="Disassemble" />

<drop event="Harvest" name="mechanicalParts" count="8" tool_category="Disassemble" />

<drop event="Harvest" name="wood" count="20" tool_category="Disassemble" />

<drop event="Destroy" count="0" />

<drop event="Fall" name="woodDebris" count="1" prob="0.75" stick_chance="1" />

<property name="TakeDelay" value="15" />

<property name="DescriptionKey" value="AmmoBenchDesc" />

<property name="EconomicValue" value="776" />

<property name="RequiredPower" value="20" />

<property name="Group" value="Building,Science" />

</block>

 

...........................

Link to comment
Share on other sites

[video=youtube;rfe-EUDnpeE]

 

here is a tutorial how to export the vanilla weapons, retexture them and get them as new ones in again. You could, if you place your own models at the same position, get every weapon mesh in you want.

I´ll post an advanced tutorial, with fire and reload animations, soon....

  • Like 1
Link to comment
Share on other sites

[video=youtube;rfe-EUDnpeE]

 

here is a tutorial how to export the vanilla weapons, retexture them and get them as new ones in again. You could, if you place your own models at the same position, get every weapon mesh in you want.

I´ll post an advanced tutorial, with fire and reload animations, soon....

 

Where can I learn the proper structure for the xml file that even makes the mod visible by sdx

to load? Learning this from scratch with no experience is a little frustrating.

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

Where can I learn the proper structure for the xml file that even makes the mod visible by sdx

to load? Learning this from scratch with no experience is a little frustrating.

 

The video tutorial on using SDX, including the instructions of how to setup the xml files for sdx to use is forthcoming. The delay is because we are striving to make sure everything is perfectly clear for the absolute beginner. Several of us have gone through the written tutorial line by line a few times, improving it on every iteration. I understand that folks are eager to move forward with modeling, but unless we get this right the first time, we will be buried in support questions.

 

Remember, as it relates to adding new game objects to 7d2d, you only have to run sdx one time without any mods selected. Once that's done, you can drop most unity3d files (any that do not have required scripts for animation, lighting etc) into the Mods/SDX/Resources folder found in your game directory, then manually add the new object as a new block into your blocks.xml. No need to re-run sdx for that. The standard format for the lines you need to add to the basic block are:

 

<block id="2013" name="newblock">  <!-- Need a unused ID number and name -->
	<property name="Shape" value="ModelEntity" />  <!-- required exactly as typed -->
	<property name="Model" value="#NewBlock?NewBlockPrefab" /> <!-- required - #____ is the name of the unity3d file, ?__ is the name of the object inside that file -->
               <property name="Material" value="wood" />  <!-- pick any material, but one with some stability, like wood, metal etc. -->
       </block>  

 

Look at a similar block in the blocks.xml for other properties you might want to add, like to enable picking up the block, enabling collision with the block, etc. Add those lines as you desire.

 

The launch of the website is scheduled for early September, but there is a chance that it will be available sooner than that. Patience please, we are nearing the goal.

Edited by xyth (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
 Share

×
×
  • Create New...