Jump to content

SD2DX: How To Make Mods...


TheDroktarr

Recommended Posts

Well I couldn't get my script to work in game, it worked perfect in the unity editor but no matter....I worked out what was wrong after looking at Domonix's example mod and now it works perfectly! It was so simple too, I was missing the "Scope" its just an empty GameObject named "Scope" I made it a child of the model and put it in front of the iron sight on the gun and it worked, I think it marks where the zoom view starts from.....There's another one called "Muzzle" I'm guessing that's for the muzzle flash.

 

Any idea why my blocks cant be broken? I have mesh colliders on them and they are solid to the player walking on them but the tools go straight thru them and do no damage.....

Link to comment
Share on other sites

Nice you got it working, I´m surely take a look at this too..... To your blocks, the need to be tagged as T_Block, but you need first to make a tag in unity with wathever name you like, then as second one you make that T_Block tag and tag your blocks with it. Thats it!

Thx to matite for showing me this :excitement:

Link to comment
Share on other sites

  • 1 month later...

Can anyone help me with sounds? I am trying to replace the vanilla weapon sounds, I tried doing it 100 different ways and I'm pulling my hair out.

 

http://imgur.com/a/tZ2Es

 

Tried re-adding the guns as an addons, tried editing the configs and loading sounds as a mod, tried direct asset editing, not having any luck at all. The AK47 for example is just firing silence, how can I point it to my audio asset folder?

Link to comment
Share on other sites

Can anyone help me with sounds? I am trying to replace the vanilla weapon sounds, I tried doing it 100 different ways and I'm pulling my hair out.

 

http://imgur.com/a/tZ2Es

 

Tried re-adding the guns as an addons, tried editing the configs and loading sounds as a mod, tried direct asset editing, not having any luck at all. The AK47 for example is just firing silence, how can I point it to my audio asset folder?

 

you should wait till the new sdx is out (hopefully soon), with it you could build your sounds as bundles in unity and then let them load with sdx.

btw you could do many other funny stuff with it.....

you could take a look at my you tube channel to see what I can do with it, and there are guys that where much better then me :anonymous:

https://www.youtube.com/channel/UCXbE9_UyMnBgy2FCbDwZUFA

Link to comment
Share on other sites

you should wait till the new sdx is out (hopefully soon), with it you could build your sounds as bundles in unity and then let them load with sdx.

btw you could do many other funny stuff with it.....

you could take a look at my you tube channel to see what I can do with it, and there are guys that where much better then me :anonymous:

https://www.youtube.com/channel/UCXbE9_UyMnBgy2FCbDwZUFA

 

Man i just watched several of em lol. Grrrr makes me want sdx7 even more lol. Hopefully soon so impatient haha

Link to comment
Share on other sites

Can anyone help me with sounds? I am trying to replace the vanilla weapon sounds, I tried doing it 100 different ways and I'm pulling my hair out.

 

http://imgur.com/a/tZ2Es

 

Tried re-adding the guns as an addons, tried editing the configs and loading sounds as a mod, tried direct asset editing, not having any luck at all. The AK47 for example is just firing silence, how can I point it to my audio asset folder?

It looks like <property name="Sound_start" value="#audio?ak47alternate2" /> should be <property name="Sound_start" value="#Audio?AK47Alternate2" />

 

I've also found that the sounds only work if you export without dependencies. But I've seen people pack audio into the prefabs bundles so it's not always the case.

Link to comment
Share on other sites

It looks like <property name="Sound_start" value="#audio?ak47alternate2" /> should be <property name="Sound_start" value="#Audio?AK47Alternate2" />

 

I've also found that the sounds only work if you export without dependencies. But I've seen people pack audio into the prefabs bundles so it's not always the case.

 

there are more then one way to get sounds on your prefabs,

you could pack it with your bundle and get it in (with sdx) but you need to set it in the sounds xml, too. Like this:

<SoundDataNode name="assaultRifle_fire_start">

<AudioSource name="Sounds/AudioSource_WeaponFire" />

<Noise range="50" prio="1" time="1" heat_map_strength="0.3" heat_map_time="120" />

<AudioClip ClipName="#hflnew?AssaultRifle_single" />

<AudioClip ClipName="#hflnew?AssaultRifle_lp" Loop="true" />

<AudioClip ClipName="Sounds/Weapons/Ranged/AK47/ak47_fire_end" />

<LocalCrouchVolumeScale name="1" />

<CrouchNoiseScale name="1" />

<NoiseScale name="1" />

<MaxVoices name="5" />

<MaxEntities name="30" />

<MaxRepeatRate name="0.001" />

</SoundDataNode>

 

or you could put it on your firing animation in unity and activate it when the fire parameter is active.......

Link to comment
Share on other sites

The Guide has been updated for Alpha 14.5 and SDX v0.6.0...

 

Have a good one guys!

 

-TheDroktarr-

 

Thank you very much... a lot of people will also appreciate this. I linked it in the main SDX release thread.

 

Cheers!

Link to comment
Share on other sites

How to get the position right?

 

Hi,

first off, I really like the tutorial and SDX.

I have nearly no modding experience, englisch is not my native language and I had no trouble understanding the tutorial.

 

But I do have a little bit of trouble with getting the positioning of my model correct.

 

I try to implement a new axe. But when I'm ingame, i can only see the shadow. I figured out, that the axe has to be behind my character by default. Sometimes it pops out in front of me (when I swing it), maybe 25 Blocks away. But i have no clue where exactly. On top of that, the model is way to big (which I was able to fix in Unity)

My model was made with Sketchup and exported as a .dae file. The scaling in Sketchup is correct, the axe is roughly 600mm tall. The positioning in Sketchup makes a difference, but i want to keep the model in the coorinate system origin.

When I Import the model into Unity it seems to give it a "random" position.

Then I "Create Empty" which gets a random position too.

Then I put the model into the "GameObject" and it subtracts the coordinates (seems logical).

 

I try to edit the values of the GameObject and the Model inside, some make a difference, some don't. But the ones that make a difference have such a huge impact that I change them slightly and the model disappears out of my vision in game.

 

 

Getting the positioning right doesn't seem to be a rare problem for beginners. I'm sure, I would get it correct in the next few hours, but it just doesn't seem like an efficient way. Is there a rule of thumb how to do it efficiently? Or at least some values to have a starting point, like the position of a hand.

It would seem logical to set all the position values to 0, exept at one place. Is that even possible, or do the animations get messed up then?

 

In my case the model gets dafault values like x;y;z=100,100;1000

And the GameObject x;y;z=20;50;1100

Are those Millimeters, Meters, Inches, Feet, or just so dimentionless values?

 

 

Ps: Is there a way of turning the camera in 3rd Person view without turning the character? Or another way to look behind the character.

 

Regards,

Leo

Link to comment
Share on other sites

Okay, I got my Sound mod working, thanks for the updated release!

 

I have a question, I have been trying to make a molotov cocktail thrown weapon and I can't for the life of me figure out how to set entities on fire, or apply buffs in an AOE

 

 

I have tried every variation of the following properties, not sure if they all even exist.

<property name="Explosion.Debuff" value="burning" />

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

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

 

Also here is the modified pipe bomb code I am using. At the moment its just a grain alcohol jar that makes torch noises for holding and throwing and explodes as a fireball...

 

<item id="180" name="pipeBomb">

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

<property name="Meshfile" value="Items/Food/bottledRiverWaterPrefab" />

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

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

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

<property name="SoundIdle" value="Weapons/Melee/Torch/torch_lp" />

<!-- STK explosives -->

<property name="Explosion.BlockDamage" value="0" />

<!-- End: Needed for damage for blocks in the center of the explosion -->

<property name="Explosion.EntityDamage" value="0" />

<!-- End: Needed for damage for entities in the center of the explosion -->

<property name="Explosion.ParticleIndex" value="4" />

<!-- End: Needed for which Prefab/particle is used -->

<property name="Explosion.RadiusBlocks" value="1" />

<!-- End: Needed for damage radius for blocks -->

<property name="Explosion.RadiusEntities" value="50" />

<!-- End: Needed for damage radius for entities -->

<property name="FuseTime" value="4" />

<!-- End: Needed for time in sec, max 6 -->

<property name="DropScale" value="2" />

<property class="Action0">

<!-- AttackAction -->

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

<property name="Delay" value="1.2" />

<property name="Throw_strength_default" value="0.8" />

<property name="Throw_strength_max" value="2.5" />

<property name="Max_strain_time" value="2.1" />

<property name="Sound_start" value="Weapons/Melee/Torch/torch_swoosh" />

</property>

<property class="Action1">

<!-- UseAction -->

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

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

</property>

<property name="Group" value="Ammo/Weapons" />

</item>

Link to comment
Share on other sites

Okay, I got my Sound mod working, thanks for the updated release!

 

I have a question, I have been trying to make a molotov cocktail thrown weapon and I can't for the life of me figure out how to set entities on fire, or apply buffs in an AOE

 

 

I have tried every variation of the following properties, not sure if they all even exist.

<property name="Explosion.Debuff" value="burning" />

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

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

 

Also here is the modified pipe bomb code I am using. At the moment its just a grain alcohol jar that makes torch noises for holding and throwing and explodes as a fireball...

 

first of you might want to use the main modding thread for thease kinds of questions, second those propertys dont exist ofcourse and for as far as i know and have known for a long time you cant ad a buff to a explosive item it just acts as dynamite. if you have any further questions please send me a private message (pm). Ore if anyone else has any questions/tips/help please send me a pm 2 and make a thread about it in the main modding section.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Is it possible to edit minimum and maximum wellness value with SDX modding? If yes - any tips would be welcome.

 

Edit: I know there is at least one perk in vanilla game that adds 10 points to minimum and maximum wellness ("Health Nut" I think). One way to create such mod would probably to create a copy of that perk and make it automatically learned on joining the server. So, is it possible to create new perks?

Link to comment
Share on other sites

  • 2 months later...

Thanks for this guide! It has helped me a lot so far.

 

For the sake of other beginners I'd like to add some criticisms to the guide:

 

- Step 10 is where I got lost for a while. As a noob I have no idea what to do and "go figure that stuff out..." really sucks to se. Could you add just a simple example underneath step 10?

 

- Step 12 says make or find your model. Where can I quickly find ANY model that I can use? This is another pain point slowing me down. I also cannot drag teh cs file into the unity folder. I imported it instead and now there are errors like:

Assets/XXXXX/ExportAssetBundles.cs(23,39): error CS0619: `UnityEditor.BuildPipeline.BuildAssetBundle(UnityEngine.Object, UnityEngine.Object[], string)' is obsolete: `BuildAssetBundle has been made obsolete. Please use the new AssetBundle build system introduced in 5.0 and check BuildAssetBundles documentation for details.'

Edit: Fixed via using this code snippet instead of the file provided:

https://docs.unity3d.com/Manual/BuildingAssetBundles.html

 

- I moved on to step 13 even though there was an error in step 12. I took a model that ended in .unity3d from another mod hoping that would work for now. Nothing loaded and I'm not sure if I was supposed to do something else. I cannot hit play because there are compiler errors from step 12 still.

 

Completely stuck at this point.

 

 

More to come...

Link to comment
Share on other sites

  • 11 months later...

so i worked on my fist model, only the simple cube from the tutorial video but ingame it has normal wood texture, not the now one ....

 

and on sdk :

 

INFO: Removing old asset from game directory: Cube.unity3d

 

not sure if this is bad or only an info ?!

 

any one any idea about it ?

Link to comment
Share on other sites

  • 4 months later...
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......

 

Hi Pacco,

I am modding model for another unity game, the simplest thing I want is to replace a model that is available from another game into the game that I want to mod. However, I tried to replace it with UABE but when I entered the game I could not see the model. Hope you will answer and guide me to do this. (I have no experience of coordinates in unity, how can I accurately know the coordinates of the model that I am wanting to change into the game?)

Thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...