DOW Tutorials/Setting up Custom Sync Kills

From Relic Mod Wiki

Jump to: navigation, search

Custom synckills can create some of the coolest moments in Dawn of War, so why not give your special character(s) a few?

Contents

Before we start

This tutorial is intended for advanced modders; it requires a good knowledge of 3ds Max, a good knowledge of the DoW Mod Tools Object Editor and a good enough knowledge of the attribute editor to change entries. This tutorial also assumes that you already have your own mod set up with at least the model you want to add the custom synckill to animated and in the Object Editor.

Required Tools

  • 3ds Max, any version supported by Dawn of War.
  • The Dawn of War Mod Tools

Tutorial

My bone setup
My bone setup

We're going to create a single custom synckill but you can add extra markers or motions as necessary.

Setup in 3ds Max

Adding the required markers

  • The first step is setting up the max files, you need to end up with two markers in your ref.max file and a bone in both your synckill animation file and the ref.
  • Open your ref.max file and create a point called sync_kill_release_4, make it a cross and an axis tripod, this will point where the enemy will be launched from if it is thrown.
  • Next create a point called sync_kill_remove and place this quite a way underneath the model (about 20 metres should do). This will be where the model goes if it needs to be removed, for instance if it is eaten. This may seem like a dodgy way of doing it but it’s the method relic use.
  • Then create a small bone called sync_kill_attach. I suggest adding a front fin to the bone as otherwise it’s hard to see which way the bone is facing. My setup is pictured to the right.

The Animation and Marker Positioning

  • If you haven’t made a synckill animation yet, make one. Don’t worry about where the enemy will be kicking and screaming just yet, we’ll add him in in a minute, save the animation as synckill_4. If you’ve already made the animation, rename it to synckill_4, any more custom synckills can be called synckill_5, synckill_6, synckill_7 etc.
  • The next step is to get the markers from the ref to the synckill animation. There a few ways to do this but the easiest is probably merging the ref into your synckill animation (file/merge) and just picking the markers and bone to merge. You don’t have to merge sync_kill_remove, but it doesn’t hurt.

Merging in markers

  • Now you’ve got the markers into your animation file we can start to play! Let’s start with sync_kill_attach, basically the centre of the enemy model is at the less pointy end of the bone, where the bone rotates. The legs of the unit should be facing the direction the front fin is facing.

Here’s an example. This max set up.

Bone positioning

Translates to this in game.

Result in game

  • Position the bone on the object where the enemy will be stabbed/grabbed/bitten etc. I suggest linking the bone to this object as it makes the whole animation process much easier. You don’t need to put the marker where the enemy will be as the enemy doesn’t attach to the bone until the event is triggered in the OE.
  • I can’t guarantee that it will work exactly the same for your model, so set it up like this and fiddle with it at the end of the tutorial until you get the enemy facing the way you want.
  • Next place the sync_kill_release_4 where you want the enemy to fly off from (if at all). For instance if the enemy is stuck on your guy’s sword, place the marker at the same place where sync_kill_attach is at the end of the swing which will send the enemy flying. Rotate the marker so the x axis is facing away from the direction you want the enemy to fly off to. You’ll know if you’ve done any of this wrong once we test the synckill in game.

If you don’t want the enemy to be thrown and want it to be removed (such as by being eaten) then don’t worry, we’ll get to that later.

  • Save the file and open your ref.max file again. Delete the sync_kill_release in this file and merge in the one from your synckill file. For some reason the DoW model exporter doesn’t seem to save the placement of this marker in the synckill animation, just the ref. This may just be a problem at my end, if you find out that it is possible to just position the marker in the synckill file then please let me know.

If you want to change the place where the enemy will be launched from, you will need to change it in the ref.max file. If you just move it in your synckill file it will NOT work.

OE Setup

  • Now export your model to the OE and open your unit in the OE.
  • Create two events

sync_kill_4_attach
attatch_our_marker: sync_kill_attach
attatch_to_target_marker: sync_kill_4_marker

sync_kill_4_detach
detatch_from_target: yes
detatch_marker_transform: sync_kill_release_4
detatch_velocity: 5 (But this can be any speed you like, experiment!)

  • Create a motion for your animation

synckill_4
Animations: Looping, add the sync_kill_4 animation
Timing: 0.20 transition out, ignore exit delay, ignore transitions (not vitally important but less likely to screw up)
Events: sync_kill_4_attach: when you stab the enemy
sync_kill_4_detach: when you throw the enemy

  • Save and close

Attribute Editor/lua setup

  • Open up the attribute editor and open your mod.
  • Go to your unit then - synckill_ext/synkillinfos/synckillinfo_01 (or 02,03 etc, whatever the first free one is)

chance: Chance of it happening against the unit's other synckills, for instance sk1=10 sk2=90, sk1=10% chance (10/100), sk2=90% chance (90/100)
dead_zombie_time: The amount of time the corpse has to stay around for, I suggest having this fairly high, 15 secs+.
distance: I believe this is the distance thrown.
killer_invulnerable_time: This is the time that the killer will be invulnerable for. This time should be equal to the animation length of the synckill.
killer_motion_name: The motion that will be played by your unit, so in this case synckill_4.
synckill_id: type_synckillids\sk_id_04.lua (can be 05, 06 etc for extra custom sync kills)

OR

  • Open up your unit's lua and add these lines to it -
GameData["synckill_ext"]["synckillinfos"]["synckillinfo_01"]["chance"] = 100.00000
GameData["synckill_ext"]["synckillinfos"]["synckillinfo_01"]["dead_zombie_time"] = 15.00000
GameData["synckill_ext"]["synckillinfos"]["synckillinfo_01"]["distance"] = 20.00000
GameData["synckill_ext"]["synckillinfos"]["synckillinfo_01"]["killer_invulnerable_time"] = 6.00000
GameData["synckill_ext"]["synckillinfos"]["synckillinfo_01"]["killer_motion_name"] = "SyncKill_4"
GameData["synckill_ext"]["synckillinfos"]["synckillinfo_01"]["synckill_id"] = Reference([[type_synckillids\sk_id_04.lua]])

Conclusion

I hope that your custom synckill now works in game! This process can be repeated quite a few times until you run out of synckill slots in the AE, in which case I'm sure someone will work out how to make some more!

If you have any comments or suggestions I'd really appreciate them, email me at kaveish@gmail.com or pm me (Kaveman) on the Tyranid Mod Site or Relic Forums.