Jump to content

SD2DX: How To Make Mods...


TheDroktarr

Recommended Posts

Hello TheDroktarr here, With a special 7D2D Tool called "SD2DX Mod Loader/Patcher" made by Domonix.

Today we are going to take a look at how you indeed make stuff with this amazing tool by making a simple Grenade!

 

 

Programs That Will Be Needed/Preferred:

1.) Unity3d v5.3.3 Free/Pro: Link---> http://unity3d.com/get-unity/

2.) SD2DX v0.6.0: Link--->https://7daystodie.com/forums/showthread.php?40412-SDX-0-6-0-(April-2016)/

3.) Notepad++: Link--->https://notepad-plus-plus.org/download/v6.9.1.html/

4.) Gimp/Paint.net Or Some sort of Icon Maker: Link-->http://www.gimp.org/downloads/

5.) Blender/Other 3D Modeling Software: Link--->https://www.blender.org/download/

1.) Needed, 2.) Needed, 3.) Preferred, 4.) Preferred, 5.) Preferred.

 

 

Setting Up The Project:

1.) Install/Extract All Programs/Files To Where You Feel Comfortable... Hint: Try To Organize A Bit!

 

 

2.) Firstly Think About What You Want To Make And How You Want It To Be Done...

 

 

3.) Then Open The Freshly Extracted "SDX_0.6.0_Package.zip" and Go To The Root Of The Folder Within That Open The Sub Folder "SDX_0.6.0" And Find A File Called "Settings.cfg" Then Just Right-Click The File If You Indeed Installed "Notepad++" And Select "Open With" Then Pick "Notepad++" After That Let It Load...

 

 

4.) You Should See "game_dir =" You Need To Make Sure This Is Pointing Towards Your 7D2D Root Folder. Default Is "C:\Program Files (x86)\Steam\SteamApps\common\7 Days to Die" After That Important Step Move On With Step 5...

 

 

5.) First Off Go Into The "Folder_for_the_GameFolder" And Drag Out The Fold Inside Called "SDXMods" And Drag It To The 7D2D Root Folder So It Looks like This "C:\Program Files (x86)\Steam\SteamApps\common\7 Days to Die\SDXMods" Then Move To The Next Step...

 

 

6.) So Inside The New SDXMods Folder You've Created Make A New One Called Your Mod Name Doesn't Matter The Words You Put Or Anything In That Matter. So You Can Put Spaces And Or Caps-Lock On/Off Freely Without Problems... Mine Is Named "Grenade" Nice & Easy...

 

 

7.) Then Drag This http://www.mediafire.com/download/d3storclmhc43bf/SD2DX_Mod_Template.zip Inside Your Newly Named Folder Within The SDXMods Directory.... Then Simply Extract It Right In There!

 

 

8.) Now Open The "mod.xml" And Lets Add Your Details, But That's Easy And Very Straight Forward So No Steps For That! Except "Configs\CHANGEME.xml" Modify That To The Same Name As Your Mod Name So Mine Would Be "Configs\Grenade.xml"...

 

 

9.) Let's Move On To The Next Step Now, Close Out Of The "mod.xml" Make Sure To Save Then Open The Config Folder And Rename The "CHANGEME.xml" To Your Mods Name Mine Would Be The Same Has The Folder And Inside The mod.xml Under "Configs\Grenade.xml" It Has To Match So It Actually Hooks Within That File... So Mine Would Be Called Grenade.xml In Both Spots!

 

 

10.) Now Open The File You Just Named. Mine Which Would Be "Grenade.xml" Inside The Configs Folder And Add Your Items And Recipes Inside The Correct Places. Not Going Into Detail On That Stuff Just Look That Up...

 

 

11.) When Done With The Items And Recipes Jot Down A Reminder On Your Items Name Mine Would Be "grenadeBomb" And Put "<property name="Meshfile" value="#CHANGEME?CHANGEMEPrefab" />" As A New Property In The Item Section. But Leave It For Now We Will Come Back To It Later...

 

 

12.) Now Find/Make Your Model And Materials For It, But Make Sure It's A Supported Format On Unity. Then Open Unity v5.3.3 And Make A New Project Name It Anything You Want. You Should Be Greeted With A Workspace With Lots Of Useful Stuff But Today We Only Need A Few Things. Firstly Go Down To The Bottom Left Within The Project Tab And Make A New Folder Called The Same Name Of You Desired Mod And Drag This http://www.mediafire.com/download/jdjazca6giza4ol/ExportAssetBundles.cs Inside That New Unity Folder...

 

 

13.) Then Right Click The Project Window And Select "Show In Explorer" and Put Your Model Inside That. It Should Then Start To Load And Begin To import It! Then Once Imported Find It Inside Your Unity Folder via The Unity Program And Drag That Into Your Scene Screen Then Start To Resize It To Your Liking And After That Start Off By Going To The Top Left In The Hierarchy. Left-Click "Create" And Choose "Create Empty" And Go To The Name Of The "GameObject" And Rename It To The Same Name Has The ModName But Add Prefab At The End *No Spaces* Mine Would Be "GrenadePrefab" And The Model That I Imported Would Be Called Grenade.

 

 

14.) Now Drag The Model Inside The GameObject That You Just Named So It Makes It A Child Of It. Then Drag The GrenadePrefab With The Grenade Collapsed Inside Down Back Into The Mod Folder Within Unity To Make It A Prefab... Now Right Click The new Prefab Inside the Project Tab And Choose The "BuildAssets + Track Dependencies" And Name That The Mods Name Mine Would Be "Grenade.unity3d" And Navigate Back To The 7D2D Root Folder In SteamApps And put it Inside "SDXMods/YourModName/Resources" After That Go On To The Next Step...

 

 

15.) Now Head Back To The "SDXMods/YourModName/Configs/YourModName.xml" and Change The Step We Skipped Under Items That is This "<property name="Meshfile" value="#CHANGEME?CHANGEMEPrefab" />" To What We Just Exported From Unity Firstly ChangeMe Needs To Be In My Case Grenade And For The Other Just Put Exactly The Same Just With Prefab Included At The End Mine Would Look Like This "<property name="Meshfile" value="#Grenade?GrenadePrefab" />"...

 

 

16.) Now Go Back To Step "11.)" To Where You Had Your "SDXMods/YourModName/Configs/YourModName.xml" And Then Make Your Way To The "Text" Folder And Open It And Also Open The "English.txt" With Notepad Make And Change The First Name On The Left Side Of The "=" Sign To The Name You Jotted Down Earlier. And After The Equals It Can Be Called What Ever You Want It To Be Called In Game...

 

 

17.) Now To Import A Icon. Make A "YourModItemName.png" Name It The Name From Step 11.) That Was Jotted Down + Make Sure Its .png And 116x80 Pixels. You might have To Resize It. And Simply Drag And Drop Inside The Icons Folder

 

 

18.) Now To Compile The Mod Double Check Everything Once Or Twice Then Head Back To The SDX_0.6.0 Folder And Launch The Actual FrontEnd.exe Program... Wait... Now Check On/Off in This Situation We Want It "On" For The SDX Core And Grenade In Main Window Press Compile Wait.. Then Play!

 

 

 

Have Fun Guys!

 

-TheDroktarr-

Link to comment
Share on other sites

that´s my Goal - Fun for everyone

Till now I only get my "Hands dirty" on the Weapon´s without animation´s.

But the possibilities with the next Version of Dom´s SD2DX should be much greater :applause:, I feel a nervous "twitch " in my fingers if I think about it.

Link to comment
Share on other sites

Very nice now we wil see the dream of lpclpunishment and pacco fulfilled we WIL See a lot of nice mods in the NEAR future ore not if the community gets lazzy ( also the video quality of the icons is fixxed in a 11.3 thx to some optimisation).

Link to comment
Share on other sites

i just resise/rotate in blender. whit my game on windowed next to it to see what needs to be chainged.

 

Did exactly the same. Got a pre-version of SD2DX V3!!! It's coming soon. With this too I get animations in (and I didn't know anything about animations till today)! I'll make a video later for you!!!

Link to comment
Share on other sites

So here´s the promissed video.

 

don´t blame me about for the bad animation :neglected:, it´s my very first try!

 

there are still a few bug´s,till release, but it should be ready soon!!

 

And if anyyone of the PIMPs may see this threat,

if I where you,

I´ll get this man into my Staff this tool is exactly what you´ll need, if you want to make modding an official part of the game!!

It´s so easy to use, and with a bit of engagement you could make your own mods very fast!!!

And with own mods this Game is a "never ending Story" of fun!!!

:rockon:

Link to comment
Share on other sites

Is there a way to add in custom blocks and custom block textures? I've made the model, but I can't figure out the string sequence to import the texture into 7 days. The code works for applying the burning effect I want and everything, just can't get it to render.

 

Fire Trap

Capture.jpg.7425bce06806c6e57973792e5224c20d.jpg

 

FireTrap.xml

<configs>

<config name="recipes">
	<append xpath="/recipes">
		<!-- Add CHANGEME Recipe -->
     <recipe name="firetrap" count="1" scrapable="False" craft_time="15" craft_exp_gain="2" learn_exp_gain="20">
       <ingredient name="coal" count="1" grid="-1, 2" />
       <ingredient name="coal" count="1" grid="0, 2" />
       <ingredient name="coal" count="1" grid="1, 2" />
       <ingredient name="rockSmall" count="1" grid="-1, -1" />
       <ingredient name="rockSmall" count="1" grid="0, -1" />
       <ingredient name="rockSmall" count="1" grid="1, -1" />
       <ingredient name="rockSmall" count="1" grid="-1, 0" />
       <ingredient name="rockSmall" count="1" grid="1, 0" />
       <ingredient name="rockSmall" count="1" grid="-1, 1" />
       <ingredient name="rockSmall" count="1" grid="0, 1" />
       <ingredient name="rockSmall" count="1" grid="1, 1" />
     </recipe>
	</append>
</config>

<config name="blocks">
	<append xpath="/blocks">
     <block id="1375" name="firetrap">
       <property name="Material" value="wood" />
       <property name="Shape" value="Ext3dModel" />
       <property name="Mesh" value="models" />
       <property name="Model" value="#FireTrap?FireTrapPrefab" />
       <property name="IsTerrainDecoration" value="true" />
       <property name="BuffsWhenWalkedOn" value="burning"/>
       <property name="ParticleName" value="campfire" />
       <property name="ParticleOffset" value="0.5,0,0.5" />
       <property name="Group" value="Building" />
       <drop event="Destroy" count="0" />
     </block>
	</append>
</config>
</configs>

Link to comment
Share on other sites

So here´s the promissed video.

 

don´t blame me about for the bad animation :neglected:, it´s my very first try!

 

there are still a few bug´s,till release, but it should be ready soon!!

 

And if anyyone of the PIMPs may see this threat,

if I where you,

I´ll get this man into my Staff this tool is exactly what you´ll need, if you want to make modding an official part of the game!!

It´s so easy to use, and with a bit of engagement you could make your own mods very fast!!!

And with own mods this Game is a "never ending Story" of fun!!!

:rockon:

 

Made a new Video today, because yesterday night I´m a bit tired to show what it´s possible. :topsy_turvy:

 

it´s just a quick overview what (and many more) will be posible soon :applouse:

 

Link to comment
Share on other sites

what did i do wrong?

 

Hey mate,

 

Hoping you can help me here. Followed your guide step by step but I've clearly got something wrong. So I'll lay it all out and hopefully you can tell me what it is.

 

So I download all the necessary programs and link you supplied, made a 2nd copy of my 7DtD and put it on a spare drive, added the Mods folder, another folder inside that named BallPit then extracted your template within that so we have this:

1.png.2439c7836728b124c68d86cdff7e5327.png

 

Next I opened the mod.xml, put in the info:

 

<mod>
<info>
	<author>Napalm</author>
	<name>BallPit</name>
	<description>Custom Mod for Napalms 7DtD Server</description>
	<mod_version>1.0</mod_version>
	<game_version>11.4</game_version>
	<launcher_version>0.2</launcher_version>
</info>


<config_mods>
	<import file="Configs\BallPit.xml" />
</config_mods>

</mod>

 

 

Then went ahead and renamed the xml in the Configs folder to BallPit and added in the recipe and Item (copy pasted the Sledgehammer item info for testing purposes, kept the ID you had though in the original):

 

<configs>

<config name="recipes">
	<append xpath="/recipes">
		<!-- Add CHANGEME Recipe -->	
		<recipe name="Katana" count="1" scrapable="False" craft_time="5" craft_exp_gain="2" learn_exp_gain="20">
			<ingredient name="ingotIron" count="1" grid="0, 0" />
			<ingredient name="ingotIron" count="1" grid="1, -1" />
			<ingredient name="ingotIron" count="1" grid="2, -2" />
			<ingredient name="stick" count="1" grid="-2, 2" />
			<ingredient name="cloth" count="1" grid="-1, 1" />
		</recipe>
	</append>
</config>

<config name="items">
	<append xpath="/items">
		<item id="745" name="Katana">
       <property name="Meshfile" value="#BallPit?BallPitPrefab" />
       <property name="Material" value="metal" />
       <property name="HoldType" value="33" />
       <property name="Stacknumber" value="1" />
       <property name="RepairTools" value="metalStrips" />
       <property name="Degradation" value="200" param1="true" />
       <property name="SoundDestroy" value="metaldestroy1" />
       <property name="FuelValue" value="16" />
       <property name="Weight" value="72" />
       <property class="Action0">
           <!-- AttackAction -->
           <property name="Class" value="Melee" />
           <property name="Delay" value=".8" />
           <property name="Range" value="2.5" />
           <property name="Sphere" value="0.2" />
           <property name="Block_range" value="4" />
           <property name="DamageEntity" value="35" />
           <property name="DamageBlock" value="1" />
           <property name="Sound_start" value="swoosh" />
           <property name="Stamina_usage" value="5" />
           <property name="Buff" value="criticalBlunt" />
           <property name="Buff_chance" value=".3" />
           <property name="DamageBonus.wood" value=".5" />
           <property name="DamageBonus.stone" value="1" />
            <property name="DamageBonus.metal" value=".5" />
           <property name="DamageBonus.head" value="4" />
           <property name="DamageBonus.concrete" value=".5" />
           <property name="DamageBonus.glass" value="20" />
           <property class="Attributes">
           <property name="EntityDamage" value="15,60" />
           <property name="BlockDamage" value="2,12" />
           <property name="DegradationMax" value="100,600" />
		<property name="DegradationRate" value="3,1" />
       </property>       
       </property>
       <property name="CritChance" value=".4" />
       <property class="Attributes">
           <property name="EntityDamage" value="20,50" />
           <property name="BlockDamage" value="1" />
           <property name="DegradationMax" value="100,600" />
		<property name="DegradationRate" value="3,1" />
       </property>          
       <property name="Group" value="Tools/Traps" />
       <property class="Preview">
           <property name="Zoom" value="-2" />
           <property name="Pos" value="0,-0.4" />
           <property name="Rot" value="0,24,0" />
       </property>
   </item>
	</append>
</config>
</configs>

 

 

Then I went and found myself a model, for testing I grabbed a Katana in 3ds format: http://www.3dvalley.com/models/katana.3ds.zip

 

Opened up the unity editor, made a new project, then a new folder down the bottom left, named it BallPit and dragged in your assetbundles cs file into the BallPit folder I just made. Then I hit show in explorer, copied the Katana.3ds into it, went back to Unity Editor and dragged it onto the Scene area. Then hit Create > Create Empty, renamed to BallPitPrefab and dragged the the Katana down into it. Dragged the BallPitPrefab back down into the BallPit folder and right click > Build Buindle - track Dependencies, saving it to my mod folder "Z:\The Vault\Games\7DtD\7 Days To Die\Mods\BallPit\Resources\Katana.unity3d"

2.jpg.16d90b04f274fb318d4305504e0dcc33.jpg

 

Then I went back to my Configs xml, change the meshfile location as you can see above, then went into the Text folder, English.txt, and changed the contents to

Katana = Katana

 

Made myself an icon and dragged it into the icons folder

Katana.png.4942ba3bd881d5252cd1d86433b9a869.png

 

Closed everythign down, opened up S2D2DX, made sure the directory was correct, my mod shows up fine, I make sure it's checked and hit compile mods, here is the log also:

 

Begin compile...

====================
Run task: Backup files
Success.

====================
Run task: Import UnityEngine.dll
Info: File already exists
Success.

====================
Run task: Deobfuscate game code
Assembly-CSharp Deobfuscator for 7 Days to Die [by the 7 Days to Die Modding Community] (THANKS GUYS )
Deobfuscating Assembly-CSharp.dll...
___
Info: Patching 1592 type[s] ...
___
Info: Saving the new assembly to Z:\The Vault\Games\7DtD\SD2DX Mod Launcher V2\SD2DXBackup\7DaysToDie_Data\Managed\Assembly-CSharp.deobf.dll ...
Info: Success.

Success.

====================
Run task: Patch game code
Failed to patch menu version label
Patched 227 resource hooks
Saving...
Done.
Success.

====================
Run task: Compile mod scripts
No scripts.
Success.

====================
Run task: Apply mod config patches
Load all configs in: Z:\The Vault\Games\7DtD\SD2DX Mod Launcher V2\SD2DXBackup\Data\Config
Apply mod config patch: BallPit
Applying patch: Z:\The Vault\Games\7DtD\7 Days To Die\Mods\BallPit\Configs\BallPit.xml...
AddXmlByXPath: /recipes
AddXmlByXPath: /items
Save config files to: Z:\The Vault\Games\7DtD\7 Days To Die\Data\Config
Success.

====================
Run task: Generate icon atlas
Built atlas with 1458 icons
Success.

====================
Run task: Compile localization patch
Patching text...
Found 1 strings
Success.

====================
Run task: Copy payload dlls
Success.

Compile complete
(9) Succeeded   (0) Failed

 

 

What I do have:

The recipe showing up and working correctly

Icon in game

 

What I don't have:

3D Model

3.jpg.8b2d8d6c533bc934f7b5155f939ac7fa.jpg

(I had a lower case k instead of K in the png filename, but still can't get the model to work)

 

Is it simply a case of some bad spelling somewhere or is there something more? It's got me stumped. I've tried 2 other models to the exact same effect.

Link to comment
Share on other sites

Hmm for some reason my katana model isnt showing up in game now as well. ohw ell, think i'll just leave it until v3 comes out

 

should have nothing to do with the Version of SD2DX!!!

The way you get modelsin stay´s the same.

-Resize and set the right position of your model in any 3d software, because for some reason, the coordinates of the model in the 3dSoftware count´s not the position you´ll set them in unity, as long as you make no animations (but that will come later)!!

-then import it to your unity project, that contains the AssetBundle Script, and make there a Prefab, with textures and if you like for an weapon, an GameObject called "Muzzle" and maybe an Animator and an animation (better 2 animation scene´s,Idle and WeaponFire)

-save your complete model, as the just made Prefab

-look at the right lower corner, there you could give your AssetBundle a name(you have to press enter, to accept the name), then call it an unity3d file, -> right lower corner

-right click the Prefab and in the just popped up "selection field", press Build Asset Bundle!

-now you should have your bundle in your unity Projekt folder -> AssetBundles folder.

-now make a folder like the examples, with the Config, Icons, Ressources....folders

-give it a new ItemId!!!

- and write your Bundle name in the Config Xml like this:

<property name="Meshfile" value="#assaultrifle?Scar-H" />

- assaultrifle is the name of the .unity3d file and Scar-H the name of the Prefab.

-put your unity 3dfile in the Ressorces folder

-and dont forget to edit the mod.xml

 

this way it should work without throwing errors

Hope this helps a bit......

Link to comment
Share on other sites

Did exactly the same. Got a pre-version of SD2DX V3!!! It's coming soon. With this too I get animations in (and I didn't know anything about animations till today)! I'll make a video later for you!!!

 

I'm so jealous!

haha Wish I had a copy of the new (pre-)version of it. So excited about it.

 

So looking forward to not having to reorganize my loot file every time I compile. Yay! haha

Link to comment
Share on other sites

  • 1 month later...

sorry for bringing to life an old thread....

 

So i followed the instructions exactly. I have the model in the resources folder, have meshfile named correctly, and the recipes work along with the gun. But the pistol model is still the original model not my custom model, and i can't figure out why... I have xml files in the mods folder edited with my new pistols details, along with the 7 days to die/data/config xml files edited too. Does that have something to do with it? maybe I only need one? Or do i just change the mesh used in both? I'm sorry, I'm really new to the modding things Thanks for the help!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...