Back Home

Customising weapons and rewarding players with items in Dungeon Defenders

INTRO


As any Dungeon Defenders player will know, the more you play the more items you get. And everyone wants awesome new items. So when you're going to be building a custom map reward players new items!
Do note a few points however. Mod maps can include fully custom weapons e.g. custom models/textures/sounds while playing that specific map, however upon exiting it will no longer be avaliable. It is however possible to modify the name/stats/colours of existing weapons and making them permanent. To find out how, skip to the last section of this tutorial!

Now you can use current weapons and modify their stats, or you can create your own models etc. Now I wont be covering how to make a weapon only how to give one and modify the stats of existing ones.

Dungeon Defender weapon stats are simply archetypes, all you need to do is either duplicate one, or create a child of a pre-created one and you'll be good to go. This allows quick tweaking of new weapons, you can't edit weapons you already have in your inventory or equipped with this however.

Two Archetypes are required for a weapon, and each controls a different set of properties for the weapon. Now as weapon damages are based on so many different values, player stats, upgrades, randomisations no damage figure will ever be exact. A third archetype is employed for the dropped item visible in the world to pickup.

LETS GET STARTED

To start we need to find an existing weapon to modify. If you locate your maps folder (\Program Files (x86)\Steam\steamapps\common\dungeon defenders\UDKGame\Content\Maps) you should have TestMap.udk and possibly TestMap2.udk (I believe this contains DLC extras) you can use either.

*These levels were removed from the toolkit for some unknown reason. I have a backup of these which can be found here TestMap.udk TestMap2.udk

Both maps are filled with all the default weapons, you might not be able to see them. To do this turn on real-time preview if it isn't already.

The map has weapons, armours and pets here, allowing you to easily find their files in the packages.

For the purpose of this tutorial I will take the archetypes for the 'lightsabre' as located below. However, as options are very similar across items you can use a different one if you wish. Although some things may differ through the tutorial.



Once selected, hit F4 to bring up the properties. In the window that appears you need to find and expand the "DungeonDefense" section. There are a few items in here that are fairly self explanatory, I will cover them later, however we do not require this just yet.
What we are actually looking for is the line titled "Equipment Template" in most cases this should be a bold title as it will have been modified.

After you've located this line hit the magnifying glass on the right side of the row to locate it in the content browser.



If you're using the same as me you should now be looking at the archetype 'BroadswirdStyle1' located in 'DunDefEquipment_DLC.EquipmentSquire'

We need to make our own copy of this, so we don't mess up the default stats of the actual weapon if we require them later. To do this we can either use Create a child archetype, or create a copy, it's up to you what you use. I'll personally use 'Create a copy' and make a copy in my own package.



Once done you should be taken to your new copied item, if not browser to the package through your content browser now, double click it.

You'll get a new properties window, but before we start playing with options again we still need one more archetype. This one you can find by looking for the heading 'Equipment Weapon Template' again this is most likely a bold title. As before hit the magnifying glass to locate it in the browser and as you've just don't create yourself a copy. I named mine 'SwordTemplate_01'



Now you have two archetypes, I named the first one we copied 'Sword_01' and the second 'SwordTemplate_01'.
The reason I did this is because one of the archetypes is the basic template that provides the default statistics of the weapon, base damage, speed, reloading and has more technical elements, such as skeletal mesh sockets for placing effects in the right positions along with the weapon model.
Where as the other has more properties relating to the appearance, naming cost etc.

It can get a little confusing honestly, while I still haven't managed to test every single option available, most are named appropriately so you can feel free to throw numbers around and see what outcomes you'll get. I will however list a few of the list which I believe to be more important, or valuable to know.

WHAT ARE ALL THESE VALUES?

We will start with the template archetype (the last one you created a copy of)

A quick note, in these options there are a few shortened pieces of text. To clarify. Exp = Exponential, Min = Minimum, Alt = Alternative

If you expand the 'DungeonDefense' section you'll be assaulted by a great many options to edit here. However i'll skip over a vast majority and discuss a few.

First up, if you're using a default weapon most sounds are available for your use, although a custom weapon may get away with some of the default sounds, some people may wish to edit that so under the 'Attack Sounds' drop down you can find an entry for the sound effect used, if you want you can have a listen, or open up the soundcue to see how you need to create your own.

The next major one is going to be 'Base Damage' this is exactly what it says this is the base damage value. However, with the many, many random values, this number is rarely going to be spot on in game, it could be higher, or even lower.

Right below that you have the 'Base Melee Damage Type' this applies only to melee weapons, and is the default type of damage. Change it to what ever you so desire.


There are many options here as I have already said; however listing them all isn't possible because I just haven't had the time to test it all. So experiment with them and find out what works best for you! After all it'll be your work.

Now there is one more thing in the Template properties, and that is the weapon model, Trendy decided to hide this one a little bit, it isn't in the same section. It is in fact in another sub heading titled 'Weapon' So expand that, and you can find a few more weapon settings, and the most important 'Mesh' for those who wish to create their own weapons, this is where you'll have to assign your mesh.

MORE OPTIONS?!

Now we'll take a quick look over a few of the options in the more appearance based settings. So open the other archetype you copied.

Most are again self-explanatory, so I'll only cover a few and let you test out the rest for yourself.


Again I skipped a vast amount of values, but most have sensible names and should be easy to figure out.

Now we'll go over the dropped equipment archetype now. As briefly discussed above, go to the 'Dropped Equipment Templates' in the archetype you were just using and using the magnifying glass locate it in the browser.

Now unless you're going to be using a custom model or changed a material you don't actually have to modify this. So there isn't a need to duplicate it. you can use it as is.

However, if you wanted to or needed to modify the weapon that displays when dropped, you'll be required to modify a particle effect located under the 'DungeonDefense' heading located in 'My particle Component > ParticleSystemComponent > Template'

REWARDS YAY

Now that you've modified a weapon or another item to your liking you might want to actually let someone use it!

Now current as a result of the way Unreal Engine works weapons that are fully custom with model changes etc, are no longer available when you leave a map it might be a good idea to give people items at the start of a round, so they can actually use them.

It's a fairly simple thing to do. We will utilise kismet, unreal's visual scripting part of the DDDK. What we need to do is check for a player joining the game. Thankfully this is rather simple as a result of some kismet nodes provided by Trendy. (Afraid of kismet? I suggest you give it a read, but you can skip on to get a bit of copy and paste code to just put this straight into your map!)

Right click in your kismet window and select 'New Event > Dungeon Defense > Player Joined'

Next right click and select 'New Condition > Dungeon Defense > Difficulty Switch'

Then right click and 'New Action > Dungeon Defense > Give Equipment' While you will need 4, just do one now and copy and paste when set up! and finally, 'New Variable > Object > Object'

What we need to do is set up the give equipment action. So that we make sure any class type will be rewarded with an item. So select your 'Give Equipment' node and at the bottom of kismet you should find its properties. In here there are a few options, such as auto lock, so it doesn't get accidentally sold.

In the 'Given Equipment Sound' paste the following - SoundCue'SFX_UI.GivenSpecialEquipmentItem'
Now where it says 'Give Equipment Entries' Hit the green '+' sign on the right of the row and expand it down.
Open your content browser and under 'My Collections' select 'Players' then pick any of the Hero Templates (correct names for each in image below), jump back to kismet and next to 'For Hero Archetype' click the green arrow to insert the hero template



Now find your desired item template in the content browser and using the same method add it to the equipment archetype. Note it's the archetype that has the information in, name etc, not the model. The default ones can be found under 'My Collections > Equipment' in the content browser.

Now we will say this 'Give Equipment' will only apply to those players playing on easy mode. As such you should set the 'Base Force Randomization Quality' to a rather low value somewhere around 0.6 - 0.7 . You can use your own values if you wish to give them better of worse increase or lower the value.

You will now need to repeat the above steps to add all of the hero types. and their respective weapons. to that 'Give Equipment' node.

Once you've added all the heroes you can duplicate the node by copy and pasting. You'll want 4 or 5 if you want one for nightmare mode.

For each extra mode you wish to add rewards for, the higher the difficulty the better the reward, so you can increase the 'Base Force Randomization Quality' on those that will be for higher levels. I used 1 for medium, 1.25 for hard and 1.5 for insane.

Now you need to connect your kismet up do this by clicking and dragging on the points on the end of the nodes.



You should also connect the 'Instigator' on all your 'Give Equipment' nodes and the 'Player Joined' Event to the 'Object' variable you added. This is an empty variable that the 'Player Joined' Event will fill in real-time to make sure the correct new joining player is assigned the correct equipment.

As a player might not instantly load in and see they got a new item you can add a delay so that the item isn't rewarded instantly on join, to do this right click the node point going IN to the 'Difficulty Switch' and select 'Set active Delay' and put a value of about 10 into it (that's in seconds).



KISMET - COPY AND PASTE

Copy the following code and right click in your kismet window and select 'Paste Here'

Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_10
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=0.700000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=0.700000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=0.700000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=0.700000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=-254)
OutputLinks(0)=(DrawY=-254)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_3'),DrawX=-353)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-408
ObjPosY=-288
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_10"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_11
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=1.000000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=1.000000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=1.000000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=1.000000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=-182)
OutputLinks(0)=(DrawY=-182)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_3'),DrawX=-361)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-416
ObjPosY=-216
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_11"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_12
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=1.500000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=1.500000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=1.500000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=1.500000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=-30)
OutputLinks(0)=(DrawY=-30)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_3'),DrawX=-345)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-400
ObjPosY=-64
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_12"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_9
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=1.250000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=1.250000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=1.250000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=1.250000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=-102)
OutputLinks(0)=(DrawY=-102)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_3'),DrawX=-353)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-408
ObjPosY=-136
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_9"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqCond_DifficultySwitch Name=DunDef_SeqCond_DifficultySwitch_0
InputLinks(0)=(DrawY=-166,ActivateDelay=10.000000)
OutputLinks(0)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_10')),DrawY=-210)
OutputLinks(1)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_11')),DrawY=-188)
OutputLinks(2)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_9')),DrawY=-166)
OutputLinks(3)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_12')),DrawY=-144)
OutputLinks(4)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_8')),DrawY=-122)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-768
ObjPosY=-248
DrawWidth=118
DrawHeight=141
Name="DunDef_SeqCond_DifficultySwitch_0"
ObjectArchetype=DunDef_SeqCond_DifficultySwitch'UDKGame.Default__DunDef_SeqCond_DifficultySwitch'
End Object
Begin Object Class=SeqVar_Object Name=SeqVar_Object_3
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-776
ObjPosY=72
DrawWidth=32
DrawHeight=32
Name="SeqVar_Object_3"
ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
End Object
Begin Object Class=DunDef_SeqEvent_PlayerJoined Name=DunDef_SeqEvent_PlayerJoined_1
MaxWidth=96
OutputLinks(0)=(Links=((LinkedOp=DunDef_SeqCond_DifficultySwitch'DunDef_SeqCond_DifficultySwitch_0')),DrawY=-150)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_3'),DrawX=-1040)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-1088
ObjPosY=-216
DrawWidth=68
DrawHeight=105
Name="DunDef_SeqEvent_PlayerJoined_1"
ObjectArchetype=DunDef_SeqEvent_PlayerJoined'UDKGame.Default__DunDef_SeqEvent_PlayerJoined'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_8
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=42)
OutputLinks(0)=(DrawY=42)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_3'),DrawX=-337)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-392
ObjPosY=8
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_8"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Click to select code


OTHER WAYS TO REWARD

Not everyone will want to give items the second someone joins a game. Most items are rewarded through completing the map. This again is fairly easy to do, in fact much easier since you can just copy and paste the give equipment events, you just made.

Now by default in and out points on nodes will stay attached to some other nodes. You will need to remove any unnecessary ones. In my case I won't be needing to do a player check as we will reward all players, so 'Break All Links' on the pink nodes by right-clicking on the points.

Following that, you need to add a Custom Event which will allow us to check if the game has completed and we can reward players their well earned items.

To do this, right-click and select 'New Event > Dungeon Defense > Dungeon Defense Custom Event'



With this added, select it and in its properties we need to tell it what it actually does. So in the 'Custom Event Name' field enter 'AchievedLevelVictory' (without quotes) and you can also enter this into the 'Obj Comment' field so it shows you what it is in kismet.

Now connect your Out to the In on the 'Difficulty Switch' on the in node you should also right-click it and 'Set Active Delay' to 0 this way the player gets rewarded the instant they win.

KISMET - COPY AND PASTE

Copy the following code and right click in your kismet window and select 'Paste Here'

Begin Object Class=DunDef_SeqEvent_CustomEvent Name=DunDef_SeqEvent_CustomEvent_0
CustomEventName="AchievedLevelVictory"
MaxWidth=222
OutputLinks(0)=(Links=((LinkedOp=DunDef_SeqCond_DifficultySwitch'DunDef_SeqCond_DifficultySwitch_0')),DrawY=450)
VariableLinks(0)=(DrawX=-649)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-760
ObjPosY=384
ObjComment="AchievedLevelVictory"
DrawWidth=131
DrawHeight=105
Name="DunDef_SeqEvent_CustomEvent_0"
ObjectArchetype=DunDef_SeqEvent_CustomEvent'UDKGame.Default__DunDef_SeqEvent_CustomEvent'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_8
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=5.000000,MaxRandomizationQuality=5.000000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=618)
OutputLinks(0)=(DrawY=618)
VariableLinks(0)=(DrawX=-65)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-120
ObjPosY=584
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_8"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqCond_DifficultySwitch Name=DunDef_SeqCond_DifficultySwitch_0
InputLinks(0)=(DrawY=458)
OutputLinks(0)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_10')),DrawY=414)
OutputLinks(1)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_11')),DrawY=436)
OutputLinks(2)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_9')),DrawY=458)
OutputLinks(3)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_12')),DrawY=480)
OutputLinks(4)=(Links=((LinkedOp=DunDef_SeqAct_GiveEquipmentToPlayers'DunDef_SeqAct_GiveEquipmentToPlayers_8')),DrawY=502)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-408
ObjPosY=376
DrawWidth=118
DrawHeight=141
Name="DunDef_SeqCond_DifficultySwitch_0"
ObjectArchetype=DunDef_SeqCond_DifficultySwitch'UDKGame.Default__DunDef_SeqCond_DifficultySwitch'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_9
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=1.250000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=1.250000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=1.250000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=1.250000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=474)
OutputLinks(0)=(DrawY=474)
VariableLinks(0)=(DrawX=-81)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-136
ObjPosY=440
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_9"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_12
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=1.500000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=1.500000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=1.500000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=1.500000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=546)
OutputLinks(0)=(DrawY=546)
VariableLinks(0)=(DrawX=-73)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-128
ObjPosY=512
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_12"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_11
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=1.000000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=1.000000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=1.000000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=1.000000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=394)
OutputLinks(0)=(DrawY=394)
VariableLinks(0)=(DrawX=-89)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-144
ObjPosY=360
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_11"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Begin Object Class=DunDef_SeqAct_GiveEquipmentToPlayers Name=DunDef_SeqAct_GiveEquipmentToPlayers_10
GiveEquipmentEntries(0)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateInitiate',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentHuntress.CrossbowStyle1',BaseForceRandomizationQuality=0.700000)
GiveEquipmentEntries(1)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateSquire',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentSquire.BroadswordStyle1',BaseForceRandomizationQuality=0.700000)
GiveEquipmentEntries(2)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateApprentice',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMage.MagicStaffStyle1',BaseForceRandomizationQuality=0.700000)
GiveEquipmentEntries(3)=(ForHeroArchetype=DunDefHero'DunDefPlayers.HeroTemplateRecruit',EquipmentArchetype=HeroEquipment'DunDefEquipment.EquipmentMonk.MonkSpearStyle1',BaseForceRandomizationQuality=0.700000)
GivenEquipmentSound=SoundCue'SFX_UI.GivenSpecialEquipmentItem'
InputLinks(0)=(DrawY=322)
OutputLinks(0)=(DrawY=322)
VariableLinks(0)=(DrawX=-81)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=-136
ObjPosY=288
DrawWidth=111
DrawHeight=61
Name="DunDef_SeqAct_GiveEquipmentToPlayers_10"
ObjectArchetype=DunDef_SeqAct_GiveEquipmentToPlayers'UDKGame.Default__DunDef_SeqAct_GiveEquipmentToPlayers'
End Object
Click to select code


SPECIFIC MAP EQUIPMENT DROPS

What if, you want your map to be special and to drop certain weapons from chests or enemies randomly. This is possible through your WorldInfo.

Open your World Info through 'View > World Properties' and scroll down to the heading 'WorldInfo' in which section once expanded you should find a sub heading titled 'My Map Info' And again another sub heading 'DungeonDefense'.

As you can see there are some options here relating to enemies. You can do what you like with those. They're self explanatory and not being covered in this tutorial. What we're looking for is the 'Additional Global Equipment Drops' this allows us to add multiple items that can be dropped at random from enemies, or treasure chests during gameplay.



We want to add our weapon(s) into this so they can be dropped whenever, wherever. To do this locate your equipment, while it asks for an 'Equipment Template' this is not the same as your items 'Equipment Weapon Template'. Either way, the editor will only accept the correct archetype so you can not add the incorrect one.

You can add your custom one from your package here or anything located in the Content browsers, 'My Collections > Equipment'



Now when playing the added item can be dropped from chests or enemies at random!

But what if you only want the item to be dropped from chests? Well first I suggest you take a look at my Treasure Chest tutorial if you haven't already, so you understand how they work and how to modify their settings. The setting you're then looking for is 'Custom Equipment Drops' just like what you've done you can add your weapon/item here and the chests you place from the modified archetype will drop that weapon.

There are also the options 'Custom Equipment Drop Chance Threshold' and 'Num Custom Equipment Drop Chances' lowering these makes the drops more common.



Those are some of the ways to reward a player. You have almost endless possibilities. You could set up a trigger volume in the world, for an easter-egg. Then in kismet use 'Trigger Volume Touch' found under right click when your volume is selected. And make that trigger the reward difficulty switch. Or whatever you can think of!

PERMANENTLY SAVED EQUIPMENT

This is an update to my tutorial, previously I had stated that custom weapons did not get saved once a map finished. However while testing I was using custom models. This is where the issue is. Custom models, sounds or textures will not get saved into a weapon once you leave a map. However you can create modified equipment from the default equipment provided by Trendy in the DDDK. This will allow you to use their models, textures etc and modify colours, stats and names to your liking.

Thanks to Jeremy from Trendy for providing the insight on how this is done!

Here's how:
Find a base HeroEquipment that you like from the game's original Equipment list (Opening "TestMap" in the Editor and enabling Real-Time View will enable you to browse the weapons visually, and then selecting one of those dropped weapons and look at its "Equipment Template" [in its properties]). Those include the following currently:

DunDefEquipment.EquipmentGeneric.BootsArmorBase_Chain
DunDefEquipment.EquipmentGeneric.BootsArmorBase_Leather
DunDefEquipment.EquipmentGeneric.BootsArmorBase_Mail
DunDefEquipment.EquipmentGeneric.BootsArmorBase_Plate
DunDefEquipment.EquipmentGeneric.BootsArmorBase_Pristine
DunDefEquipment.VictoryItems.Broadsword_VictoryReward
DunDefEquipment.EquipmentSquire.BroadswordStyle1
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl1
DunDefEquipment.EquipmentSquire.BroadswordStyle10
DunDefEquipment.EquipmentSquire.BroadswordStyle11
DunDefEquipment.EquipmentSquire.BroadswordStyle2
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl2
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl3
DunDefEquipment.EquipmentSquire.BroadswordStyle3
DunDefEquipment.EquipmentSquire.BroadswordStyle4
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl4
DunDefEquipment.EquipmentSquire.BroadswordStyle5
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl5
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl6
DunDefEquipment.EquipmentSquire.BroadswordStyle6
DunDefEquipment.EquipmentSquire.BroadswordStyle7
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl7
DunDefEquipment.EquipmentSquire.BroadswordStyle8
DunDefEquipment_DLC.EquipmentSquire.BroadswordStyl8
DunDefEquipment.EquipmentSquire.BroadswordStyle9
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle1
DunDefEquipment.EquipmentHuntress.CrossbowStyle1
DunDefEquipment.EquipmentHuntress.CrossbowStyle10
DunDefEquipment.EquipmentHuntress.CrossbowStyle11
DunDefEquipment.EquipmentHuntress.CrossbowStyle2
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle2
DunDefEquipment.EquipmentHuntress.CrossbowStyle3
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle3
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle4
DunDefEquipment.EquipmentHuntress.CrossbowStyle4
DunDefEquipment.EquipmentHuntress.CrossbowStyle5
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle5
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle6
DunDefEquipment.EquipmentHuntress.CrossbowStyle6
DunDefEquipment.EquipmentHuntress.CrossbowStyle7
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle7
DunDefEquipment.EquipmentHuntress.CrossbowStyle8
DunDefEquipment_DLC.EquipmentHuntress.CrossbowStyle8
DunDefEquipment.EquipmentHuntress.CrossbowStyle9
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle1
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle2
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle3
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle4
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle5
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle6
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle7
DunDefEquipment_DLC.EquipmentMonk.DLC_MonkSpearStyle8
DunDefEquipment.EquipmentGeneric.GauntletArmorBase_Chain
DunDefEquipment.EquipmentGeneric.GauntletArmorBase_Leather
DunDefEquipment.EquipmentGeneric.GauntletArmorBase_Mail
DunDefEquipment.EquipmentGeneric.GauntletArmorBase_Plate
DunDefEquipment.EquipmentGeneric.GauntletArmorBase_Pristine
DunDefEquipment.EquipmentGeneric.HelmetArmorBase_Chain
DunDefEquipment.EquipmentGeneric.HelmetArmorBase_Leather
DunDefEquipment.EquipmentGeneric.HelmetArmorBase_Mail
DunDefEquipment.EquipmentGeneric.HelmetArmorBase_Plate
DunDefEquipment.EquipmentGeneric.HelmetArmorBase_Pristine
DunDefEquipment.VictoryItems.HuntressBow_VictoryReward
DunDefEquipment.VictoryItems.MageStaff_VictoryReward
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle01
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle02
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle03
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle04
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle05
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle06
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle07
DunDefEquipment_DLC.EquipmentMage.MagicStaffStyle08
DunDefEquipment.EquipmentMage.MagicStaffStyle1
DunDefEquipment.EquipmentMage.MagicStaffStyle10
DunDefEquipment.EquipmentMage.MagicStaffStyle11
DunDefEquipment.EquipmentMage.MagicStaffStyle2
DunDefEquipment.EquipmentMage.MagicStaffStyle3
DunDefEquipment.EquipmentMage.MagicStaffStyle4
DunDefEquipment.EquipmentMage.MagicStaffStyle5
DunDefEquipment.EquipmentMage.MagicStaffStyle6
DunDefEquipment.EquipmentMage.MagicStaffStyle7
DunDefEquipment.EquipmentMage.MagicStaffStyle8
DunDefEquipment.EquipmentMage.MagicStaffStyle9
DunDefEquipment.VictoryItems.MonkSpear_VictoryReward
DunDefEquipment.EquipmentMonk.MonkSpearStyle1
DunDefEquipment.EquipmentMonk.MonkSpearStyle10
DunDefEquipment.EquipmentMonk.MonkSpearStyle11
DunDefEquipment.EquipmentMonk.MonkSpearStyle2
DunDefEquipment.EquipmentMonk.MonkSpearStyle3
DunDefEquipment.EquipmentMonk.MonkSpearStyle4
DunDefEquipment.EquipmentMonk.MonkSpearStyle5
DunDefEquipment.EquipmentMonk.MonkSpearStyle6
DunDefEquipment.EquipmentMonk.MonkSpearStyle7
DunDefEquipment.EquipmentMonk.MonkSpearStyle8
DunDefEquipment.EquipmentMonk.MonkSpearStyle9
DunDefEquipment.EquipmentGeneric.TorsoArmorBase_Chain
DunDefEquipment.EquipmentGeneric.TorsoArmorBase_Leather
DunDefEquipment.EquipmentGeneric.TorsoArmorBase_Mail
DunDefEquipment.EquipmentGeneric.TorsoArmorBase_Plate
DunDefEquipment.EquipmentGeneric.TorsoArmorBase_Pristine
DunDef_HalloweenEquipment.Apprentice.HeroEquipment_Apprentice01
DunDef_HalloweenEquipment.Apprentice.HeroEquipment_Apprentice02
DunDef_HalloweenEquipment.Huntress.HeroEquipment_Huntress01
DunDef_HalloweenEquipment.Huntress.HeroEquipment_Huntress02
DunDef_HalloweenEquipment.Monk.HeroEquipment_Monk01
DunDef_HalloweenEquipment.Monk.HeroEquipment_Monk02
DunDef_HalloweenEquipment.Squire.HeroEquipment_Squire01
DunDef_HalloweenEquipment.Squire.HeroEquipment_Squire02


Then, select and right-click that particular HeroEquipment Archetype within the Editor and choose "Create Child Archetype". Save this new archetype somewhere.

Then edit the following properties of that new Child Archetype you've created:
- Set "Force Use Parent Template" to true.

You can then modify the following values in your child archetype and have them correctly utilized when your equipment is dropped or given to the player. Modifying any other values will NOT have effect! Values changeable are:

UserEquipmentName
EquipmentDescription
UserForgerName
bNoNegativeRandomizations
WeaponDamageBonusRandomizer
WeaponAltDamageBonusRandomizer
WeaponClipAmmoBonusRandomizer
WeaponReloadSpeedBonusRandomizer
WeaponKnockbackBonusRandomizer
WeaponChargeSpeedBonusRandomizer
WeaponBlockingBonusRandomizer
WeaponNumberOfProjectilesBonusRandomizer
WeaponSpeedOfProjectilesBonusRandomizer
WeaponAdditionalDamageAmountRandomizer
WeaponDrawScaleMultiplierRandomizer
WeaponShotsPerSecondBonusRandomizer
MaxEquipmentLevelRandomizer
StatModifierRandomizers
DamageReductionRandomizers
StatModifiers
DamageReductions
WeaponDamageBonus
WeaponNumberOfProjectilesBonus
WeaponSpeedOfProjectilesBonus
WeaponAdditionalDamageType
WeaponAdditionalDamageAmount
WeaponDrawScaleMultiplier
WeaponBlockingBonus
WeaponAltDamageBonus
WeaponClipAmmoBonus
WeaponReloadSpeedBonus
WeaponKnockbackBonus
WeaponChargeSpeedBonus
WeaponShotsPerSecondBonus
PrimaryColorSet
SecondaryColorSet
PrimaryColorOverride //this allows you to specify an arbritrary RGB vector value for color1 of the item
SecondaryColorOverride //this allows you to specify an arbritrary RGB vector value for color2 of the item
WeaponSwingSpeedMultiplier //this is a unique value that allows you to arbritrarily multiply up or down the swing-speed of a melee/monk weapon
MaxEquipmentLevel
MinimumSellWorth
bCanBeUpgraded
AllowRenamingAtMaxUpgrade
bCantBeDropped
bCantBeSold
bAutoLockInItemBox
bDisableRandomization
ManualLR //manually specify the level-requirement


Obviously this does mean you can't change many aspects of the Equipment, such as its core media set. But you still can alter the visuals significantly with colorization and draw scale, in addition to all of the statistics and name/description. And this WILL save to the user's profile correctly, so this kind of Equipment Archetype (I call them "Shallow Equipment Archetypes") can be used in any subsequent gameplay. Have fun guys!

PERMANENT WEAPONS IN TC

While mods lack the ability to save weapon models that are custom a Total Conversion doesn't have this limitation and can have a weapon saved with as many custom elements as you desire. Thanks again to Jeremy for this:

I should also note that if you do want to make entirely new HeroEquipments to save for your TOTAL CONVERSION (not a Mod), you should add them to your HeroManager archetype's ( DunDefHeroManager'DunDefPlayers.heroManager' ) Additional References array so that they are permanently loaded in memory.

THAT'S IT!

Hope you've found this tutorial of some use, if you still have questions feel free to check out the official DD forums.

HTML hit counter - Quick-counter.net

Back Home