Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

Modding (very advanced)

From Shadowrun Wiki
Jump to: navigation, search

Overview[edit | edit source]

This article explains how to do modding that goes way further than Content Packs that the Shadowrun Editor is capable of creating by modding game files (asset bundles, to be more specific). You'll need applications to extract, modify / hack and re-import assets into the game standalone asset bundles. These deep mods are not subscribed through Steam, so you'll need to supply executable files and instruct end users on how to use them. So far, possibilities are quite bold, especially if you have artistic abilities:

  • Replacing textures for 3d characters and items in general
  • Replacing and adding icons for abilities
  • Replacing and adding icons for weapons
  • Replacing 3d meshes for items
  • Replacing and adding animations
  • Replacing and adding audio
  • Adding new item prefabs with textures
  • Adding new character models with textures

This is deep modding, but not as deep as modifying game mechanics, which would require programming into the game engine itself.

(However, if you actually want to modify the game code and have C# skills you can use a tool called dnSpy on the Assembly-CSharp.dll file inside the \Shadowrun_Data\Managed folder)

Tools[edit | edit source]

  • Unity Asset Bundle Extractor (UABE) 32bit or 64bit
  • (Optional) Unity : Shadowrun Returns and the sequels were made with Unity. It's a professional tool, but if you're doing it as a hobbyist, non-profit you can download the Personal edition for free.
  • (Optional) Blender or your favourite 3d modeler, GIMP or your favourite image editor. MakeHuman might be quite useful for metahuman character creation.

Exploring Asset Bundles[edit | edit source]

Asset bundles are fiddly, because they were made to speed up scene loading time while still reducing game resource file size, and there are lots of internal references within bundles that could easily get you lost. They are almost all located in the \Shadowrun_Data\StreamingAssets\standalone\Seattle (or Berlin or HongKong) folders. The remaining ones are in \Shadowrun_Data\ , namely resources.assets, sharedassets0.assets, sharedassets1.assets and so forth. The resources.assets bundle contains most of the menu and icon basic game data. Music is in there too, but it's not immediately recoverable with UABE. For music see this other article. Inside the \standalone\ folders you'll find the bundles with the character meshes and textures, audio, animations and VFX.


To explore a bundle with UABE, first backup the original file by creating a copy and renaming it or adding an extension like .bak, run AssetBundleExtractor.exe and select File -> Open. Select the assetbundle or assets file. Large files may take a while to load. Click on Info. The list might be overwhelming: there are many unnamed assets, and not many have containers in the Container column. One easy way to find stuff is to sort by Type.

Changing Textures and 2D data in general[edit | edit source]

The most straightforward assets that can be changed for great effect are 2d textures, icons, menu buttons, even the title screen. Sort by Type and scroll to find the Texture2d assets. Click on the texture asset, click on the Plugins button and you'll see options to export to .png, .tga or Edit (replace) the texture. Export to png, edit the texture (keep exact same image size and work with png!) with an image editor like GIMP, save it, and then back in UABE, click on Plugins -> Edit and Load your new png texture. Do that for as much 2D data as you like. An asterisk on the Modified column will show that the asset was modified. Textures do not follow the same pattern for all prefab characters because the developer may design a mesh's UV map according to the mesh complexity, so one character's texture is sure to not fit another character.


In the Assets info list, select File -> Save then Close. Back in the main Extractor window if you select File -> Save you'll save a new bundle with the modified texture(s). You have to either save with a different name in the same folder as the original bundle or in another folder with the same name, because UABE does not support overwriting. However, selecting the option to create an executable will be smarter for you, the end user and save space (read further).

Viewing your Texture on the Mesh with Unity[edit | edit source]

Of course, you could just test-run a scene from the Shadowrun Editor with an actor that has the prefab whose texture you're modding, but it might be a tedious effort repeating all steps in the previous section until the texture looks exactly the way you want it in the game. So, you can hack Shadowrun's assets back into Unity, whence they came from, and check your .png textures on the prefab mesh in a much easier way.

Open the original assetbundle in UABE. Click Export. Instead of saving with the .assets extension, save it with the .asset extension, without an "s". Open Unity, create a new 3D project, select Assets -> Import New Asset and browse to the .asset file you created. The package is going to lose all hierarchy and objects are going to be broken in all their components, and the result in the Project window is just a mess of orphaned components, but meshes and textures should be okay. Filter by name to find the assets you need more quickly. You can then drag the desired mesh to the scene. Set position transforms to (0,0,0).

Unity Mesh Drag.png

Set shading mode in the Scene window to Shaded, if it isn't already. You can then import the .png texture you're modding / painting to the Asset List and then drag it over the corresponding prefab mesh and check if it's OK. If it's not, delete the texture from the asset list, modify it in your image editor, save it, re-import it and drag it over the mesh again.

Unity Texture Drag.png

Creating an Executable for your Mod[edit | edit source]

Creating an executable for your mod will automate the modding process and save everybody's time. If you read UABE's Usage.txt file, you'll also learn how to do batch file modding. After you have saved your work for multiple asset bundles, select File -> Mod Maker -> Create standalone .exe installer. Here you can name your Mod, credit yourself(ves), give instructions, load an icon for the exe, review the bundles changed and select the upper game folder. It will then create an installer for your mod that should be easy to use for all end users. 32bit UABE will create installers for both 32 and 64bit systems, while 64bit UABE will create installers for 64bit systems only.

Create exe.png

3D Character Simple Scaling[edit | edit source]

To scale a character up to create a big boss or down to create a miniature (or child / creature young) is fairly simple without editing the mesh itself. You just have to scale the skeleton bones corresponding to the body parts you want to scale. The tricky part is finding the correct transforms in the asset bundle, because they all show as "unnamed asset". The most straightforward scaling for humanoid characters is on the Biped_Root bone, which, as a parent bone, scales the whole character with child skeleton and does not cause any skeleton rigging problems. Likewise, any bone scale affects all children bones. First, to see how your scale is going to look like, export the asset bundle to .asset and Asset->Import Asset with unity. The Primerunner asset bundle is a good practice run because it contains only one character - Green Lucifer. If you're just going to scale the same number on all axes (proportional character scaling), skip to step 2.

1. Previewing the Scale[edit | edit source]

Drag the Green Lucifer mesh to the scene, drag the Green Lucifer Material over it. Find the Biped_Root SkinnedMesh Component in the Primerunner package, copy it and Paste as New Component in the scene character. Set Biped_Root as Root Bone.

Now look for the bone structure Transform asset(s) you want to scale. Slide the X,Y,Z scales as you like: 2 is double, 0.5 is half. When you think you're ready, write all X,Y,Z scale values down for each bone. Note how scaling a bone scales all children bones. After, for example, scaling up a bone, in order to revert an upscale for all children bones you have to scale down the next child bone in the bone structure. I would avoid messing with translations and rotations.

2. Changing Scale directly in the Bundle[edit | edit source]

Each bone has one parent and one to many child bones. Each bone has a transform component. After assetbundle packing, transforms will be linked to their parent GameObjects by PathID. First, find which transform is child to GameObject Biped_Root in the greenlucifer container by clicking on the View Data button. Take note of PathID. Order by PathID. Find the transform with that PathID. Export to Dump. Don't close UABE! Open the .txt file, change under Vector3f m_LocalScale the X,Y,Z scale to the values you had written down for that bone. Save txt, Import Dump for that same transform, save assetbundle and voila! If the bone you're looking for is not in the character container and there are many characters in the same bundle also without containers for their bones you may find at least the Root Bone looking for the GameObject Character_Name, click View Data, look for SkinnedMeshRenderer Base, find the root bone transform or bone number 0 in the bone array and that should be the PathID you need.

I'm not sure how it affects gameplay in Shadowrun, but you probably should increase the size of the capsule collider object for your character if you're making a giant. That's easy: just dump the Capsule Collider object, edit txt, increase radius and height (you could see the exact numbers in Unity too by adding a capsule collider to your mesh object and checking the suitable size).

Adding or Replacing Item Prefabs[edit | edit source]

(tested for SRR)

You need to have some 3d modelling skills and Unity to work with meshes themselves. Moreover, replacing meshes will work for item prefabs, but will not work for characters, which is a further topic. Also, I assume you have read the previous sections and learned how to use UABE.

For adding content I strongly recommend working with the Unity Editor version that was used to build the game you wish to mod. You can get the older versions in the Unity Download Archive, and it's free for anyone with the Personal subscription (there's a catch regarding asset bundles though, I'll come to that further on in the sections about adding new content). The versions are:

  • Shadowrun Returns - Unity 4.2.2
  • Dragonfall - Unity 4.3.4
  • Hong Kong- Unity 4.6.2

First, you make your model in any software like Blender (there are plenty of tutorials for this). In this example I have made a small pistol compared to the huge Ares Predator prefab used for most pistols that appear in characters' hands. Make a UV-mapped and textured (always use 512 x 512 png) model, export to fbx without cameras, lights, animation or armature and import the new model in Unity Editor. Be attentive to the scale, because fbx usually uses a scale 100 times bigger than Unity (centimetres rather than metres), so you might have to import with 0.01 scale. Don't import animation. Set Rig > Animation Type to None. In the scene compare the size of the mesh with an existing Shadowrun mesh that you can unpack from seattle_items.assetbundle via UABE like shown in the previous sections. Import the texture you made for the UV map and drag it over your mesh and see if it's OK.

Replacing an Item's Mesh[edit | edit source]

For replacing, if it's a sword the mesh needs to have the handle in the same position of the mesh you want to replace. If it's a gun, the grip and muzzle should be more or less in the same position of the original mesh. The muzzle not being in the same spot will result in muzzle flash not coming exactly out of the new model's muzzle, but that's not a big deal.

Have Unity build the "game" for you. Use UABE in the resulting scene0 (if you left the mesh in the scene) or sharedassets0 files and dump export the Mesh component of your model. Open the seattle_items.assetbundle in UABE, select the mesh you wish to replace, dump import your mesh. Select the 2DTexture you need to replace, Plugin > Edit > Load your 512x512 png. Save the new seattle_items.assetbundle, replace the old seattle_items.assetbundle (always backup!) and that should do it.

Adding a New Item Prefab with a New Asset Bundle[edit | edit source]

Being able to add unlimited new content to the game is pretty much the Holy Grail of a Shadowrun Editor enthusiast. That's possible and not very hard for item prefabs, by putting them inside assetbundle files. However, in older versions of Unity you needed a Unity Pro subscription in order to build assetbundles through a script. Well, the catch is that you need a working Pro Editor just to create assetbundles, and I don't think there's a workaround for this even though the current versions of Unity Personal allow you to build asset bundles for free. Borrow a license from a friend or something. Feel free to try building the assetbundle in a 2017+ version of Unity for free, but I can bet there'll be some compatibility issue. Scripts for building assetbundles can be found in the documentation for script reference Buildpipeline. I used this script to build uncompressed assetbundles with deterministic PathIDs like in Shadowrun. Drop the script inside the Assets/Editor folder to make it work in the Assets menu.

As in the previous section, load your fbx model into an Unity new project. Keep vertex count low, or else you might crash the game. Shadowrun is low-poly.

Import the assets from seattle_items.assetbundle to Unity as in the previous sections.

Create a Game Object with the name of your item. I called my small pistol SmallPistol. Add an empty animation to it. Then create a C# script asset called HighlightableObject (everything is case-sensitive, so be careful). Assign a monobehaviour component to your object with the script HighlightableObject (drag the script over the object). Don't worry about the script content itself, just its name is important for now. Create a child object, it can be called Small_Pistol_mesh. Drop your mesh over this object. It will create a mesh filter and a rendered mesh component. Drop the UV map texture you created on it. It's better to use the standard shader, and you can drag some sliders to make the object more metallic or shiny if you want.

Now, since it's a pistol, find the AresPredator4 object that has the rendered mesh components. Create a new empty object in the scene and paste all these components on it (dragging to the scene won't work because the Ares Predator prefab is broken). Look at its size and rotation. The new small pistol must have the same proportions and orientation as the Ares Predator. So, rotate and scale the new gun as necessary. When it's done remove the Ares Predator object from the scene.

For guns, create two more empty objects, children to the main object; weapon_root and weapon_muzzle. Melee items don't have muzzles, so... weapon_root must be where the character will grip it with the right hand, whereas weapon_muzzle is where the game engine will place the muzzle flash when fired.

When done, drag the main object from the scene to the Project window and it will be saved as prefab (become blue). You can remove all the broken assets from seattle_items from the project too. Select your prefab and go to menu Assets > Build assetbundle. Remember you need both the editor script that builds asset bundles and a Pro license.

Open your modname_items.assetbundle file with UABE. Replace the HighlightableObject Monoscript with the HighlightableObject text dump from any other SRR character or item assetbundle. The important bit (for SRR) is that it'll have the line UInt32 m_PropertiesHash = 3033599902. Save the resulting modname_items.assetbundle in a folder called Modname (or the name of a city just to preserve tradition) next to Seattle (or Berlin or HongKong) in the \Shadowrun_Data\StreamingAssets\standalone\ folder.

Now, in order to use your model you must assign it to a custom item in the data/items/ folder of your campaign Content Pack. I created a Glock19 (pi 1 glock19.item.txt) but I could just as well have replaced the Fichetti Security, Colt Manhunter or any other pistol smaller than the Ares Predator. Assign your prefab by name preceded by the new standalone folder name and a colon (ex: equipPrefabName: "David:SmallPistol"). When using your item in the story the model should appear.

Gameplay New Item.pngNew item prefab delivered in gameplay! Compare it to the Predator on the left.

Adding Biped Character Prefabs[edit | edit source]

There's no way to replace a character mesh in UABE keeping the same bone-to-vertex relation, because any new baked mesh will have all vertices re-indexed. The result will be a complete blob mess. The only way is to add a new assetbundle with your characters. You can add the bundle in the Seattle folder or create your own folder.

First, you need to model your character and UV-Map it with a 512x512 png texture. There are plenty of tutorials around for you to master this. Again, keep vertex count to a minimum. I joined all submeshes into one and painted a single texture for all their UV maps.

Useless faces.png Blender UV map.png

Then, you must rig the character. There's a catch though: bone position, alignment and names must follow a very strict pattern, or else the character will float all twisted in-game when animated as Biped. Blender, for instance, always exports bone position with the local y axis along the bone, and that'll make your traditionally rigged thigh and calf bones point downwards, whereas the SRR models in unity have their thigh bone local transforms pointing up and calf bones pointing backwards! For a matter of expedience I'm sharing the biped skeleton in Blender format. A t-pose model exported (via fbx Export, for example, and it works for Unity 2017+ versions if you don't have an exporting script in your Unity 4.x Editor) from Shadowrun into Blender will automatically be aligned with this armature, but you might need to do some scaling and moving. Biped_Prop is supposed to be on the palm of the right hand. The important part is NOT rotating the bones in Edit mode. Due to the fact that bones are aligned in such an odd way for Blender, "Armature Parenting With Automatic Weights" might not work properly! That means that after parenting you'll have to weight-paint the mesh for each bone. Test posing each bone to check if strange things are happening to your vertices. Biped_Root and Biped_Prop are not to deform anything! Props as separate objects are useful if you're going to assign different materials to them. Otherwise, weight-paint and join all meshes into one.

Also I strongly recommend thoroughly weight-painting the core male and female models (for all metahuman races that you're going to need new models for, at least) until the muscles work in a natural way in-game and saving them unaltered so you can use them later.

Blender Weight P.png

Then export the mesh to fbx. I scaled down to 0.01 in the export already. For armatures, deform bones only.

When importing the fbx to Unity, if you had already scaled the mesh down on export you won't need to scale down on import, keeping the import scale 1. Import Materials based on texture name. On Rig tab, just keep animation "Generic" and no need to assign the Root Bone. On Animation tab, don't import any animation. Import the png you used for UV-Mapping. I saved two Harebrained Schemes Shaders from imported SRR assetbundles in the folder structure HBS/Transparent/Cutout/Diffuse and HBS/Transparent/Cutout/VertexLit. To do that just open a compiled shader in Monodevelop and save a copy in these folders. Drag your imported model to the scene. Parent to Biped_Root must be Body, and parent to Body must be your main prefab object. Keep rotation and position of these three objects at 0. When imported from Blender and fbx the Body and Biped_Root objects came with -90 or 90 rotations and Body was scaled. Oddly enough, when resetting rotation I found the character to look much taller and thinner! Tweak the scale of the Body object so that the character is back to the right proportion (use other characters for comparison). Rename the main object to the name you want the prefab to have and remember this is going to be case-sensitive later! Create an empty object and call it HUDRoot. Drag it over "Body" so that it becomes child. Position the transform at about Y 1.90. That's where the interaction icons like the conversation balloon will appear. Some prefabs that carry a backpack (or deck?) will also need a Backpack object on their backs, child to Spine1.

Unity Shader Cutout.pngCutout Shaders are useful for pieces like this mohawk.

Delete the Animation Controller component. Copy the Skinned Mesh Renderer component to Biped_Root, use the HBS/Transparent/Cutout/Diffuse shader with your texture on it and then delete any other object in the scene that had the mesh assigned to it. Assign an empty Miscellaneous>Animation component to Body, uncheck Play Automatically and set Culling Type "Based On Renderers". Assign a Physics>Capsule Collider component to the main object roughly the size of your character disregarding the extended arms. I used center Y 0.73, radius 0.27 and height 1.47.

Then you must have 9 C# scripts in your Assets. They must be called (case-sensitive!) AnimationListener, CharacterAura, CharacterDisc, CharacterInfoPanel, HealthBar, HighlightableObject, ParentGeartoBody, PlayerBody, TotemDisc. All except PlayerBody will have the default Monobehaviour class inherit and need nothing else. PlayerBody, on the other hand, will input to the game a bunch of variables regarding your character. Don't worry about the original scripts in the game, only the input to PlayerBody is important now. I created a faux PlayerBody script and you can get it here. Use this code for PlayerBody and compile it. Drag HighlightableObject and AnimationListener over Body. Drag PlayerBody over the main object. A big variable input list will appear in the inspection window.

Configuring the PlayerBody Monobehaviour[edit | edit source]

Most of PlayerBody's input is left empty, especially for non-core characters. You need to tell the game that your prefab is male or female and what is its race. The default for the game when there's no data is human male, so the character will make male sounds for pain and death, for example. Click on Hud Root input button and select the HUDRoot Transform in the Scene. The original PlayerBody script had a drop-down menu for public enum Gender and Race defined in the "Player" class that returned an integer. I dropped that; just input the numbers for This Body Race and Gender according to the tables:

Race Number
Human 0
Dwarf 1
Elf 2
Ork 3
Troll 4
Dragon 5
Ghoul 6
Spirit 7
Drone 8
Object 9
Creature 10
Bug 11
Freespirit 12
Freedrone 13

I believe Freespirits and Freedrones don't need to be set independent via the Editor in order to exist in a scene without a master shaman / rigger. No "Dragon" characters were made for SRR/DMS. Just out of curiosity I checked that even You-Know-Who is set to human male.

Gender Number
None 0
Male 1
Female 2

If your character is a biped, like all metahumans, check the Is Biped box. Other default values for humans are:

Variable Default
Body Size 0
Move Multiplier 1.1
Move Multiplier Walk -1
Move Multiplier Sprint -1
Dead Wait Time 4
Dead Fade Time 3
On Death Fx DeathAction

Move Multiplier will make your character move faster or slower in the animations (it does not affect the move speed stat, which means how many squares your character moves per AP ). That might make the walk and run animations look more realistic when your character has bigger or smaller legs. It's usually 1 for dwarves and elves, 1.1 for humans, 1.05 for orks and 1.2 for trolls. In any case tweak it if your character seems to be "ice skating" when he walks. Dead Wait Time and Dead Fade Time are in seconds. That's overridden if you set actor body to persist. Body Size is set to 0 for humans, dwarves, elves and orks, while trolls are set to 1.3.

Building the Assetbundle and turning the prefab playable[edit | edit source]

With everything set, drag the Main Object from the scene to the Project window. That will create the prefab. Select the character prefab(s), select build assetbundle (remember you need the assetbundle Editor script and, for Unity 4.x, a Pro subscription).

Build Assetbundle02.png

Open the new assetbundle in UABE. Replace by Dump import PlayerBody, HighlightableObject and AnimationListener Monoscript from your pack with the PlayerBody, HighlightableObject and AnimationListener dump exports from any original character SRR assetbundle. Leave the Monobehaviour components alone, they are already good to go! Save and drop your assetbundle in the standalone/Seattle folder if it's seattle_characters_xxxxx or in your new standalone/Folder if it's named like folder_characters_xxxxx.

Open resources.asset in Shadowrun_Data. Export dump the charprefabschema Text asset. Leave UABE open. Open the text dump in Notepad with no line breaks! If you break a line or add a space character it will break the whole file! Insert your new prefab name following the same logic of the other ones: Charprefabschema add.png

Save and import dump over charprefabschema in UABE. Save, but remember resources.asset is 613M big! Create an executable mod with UABE. That way all you supply to the player is a tiny exe file plus your assetbundles in a zip, not a 613M file just to add a couple dozen bytes in charprefabschema!

Finally, in your Content Pack create the data/misc folder. Create a txt called YourContentPackName.pflib.txt. Create entries for all your characters following this logic: Contentpack pflib.png

You can refer to dead_man_switch.pflib.txt in the Dead_man_switch Content Pack data/misc folder (saved as source via Editor) to see how it's done.

There! Your prefab will show in the Editor as soon as it refreshes the content pack data. I'm sharing the resulting Unity 4.2.2 project with Molly's prefab so you can save your time and get the hang of the entire process.

New character in Editor.png

Game Molly.png Game Molly02.png

Adding New Drones as Prefabs and assigning them to Drone Items[edit | edit source]

The process for new drone prefabs, including matrix drones (ICs with no limbs) is pretty much the same as for biped characters, with the upside that there's no skeleton to rig this time. Create the drone model and UV-map it. When exporting to fbx, no need to export armature or animation. Import model to Unity and compare its size to the other drone meshes from the seattle_characters_drone assetbundle, just as for any other weapon item.

Then, the drone prefab structure is a mix between character and weapon. It has parts like hatch and weapon muzzle, but they're all children to Drone_Root and drone animations animate Drone_Root only. (This is for SRR. Hover drones in SRHK have rotating parts, so I haven't checked them yet). The hovering drones will be lifted from the ground by the animation, so keep their models grounded at 0,0,0. For hovering drones that emit particle smoke there is a particular child to Drone_Root called droneHover_Xffect with its child objects xftmesh vfx_hover and EffectLayer. For the particle sprites to work two extra scripts are needed: XffectComponent and EffectLayer.

Drone structure.png

The only actually required objects are the main object DronePrefabName, Body, HUDRoot, Drone_Root and your drone model, child to Drone_Root. Objects like Hatch and weapon_muzzle are just to spawn muzzle flash or bombs correctly when available, and the droneHover_Xffect is for smoky rotor looks. You can have one droneHover_Xffect per rotor by just duplicating the object and centering it on each rotor. The XffectComponent and EffectLayer scripts are available in the Unity project I'm sharing.

The PlayerBody script now has race 8 (drone) and gender 0 (none). Death FX is now DroneDeathAction and the new thing is that now This Body Identity is going to rule whether the drone is going to be animated and sound as wheeled, matrix, jet or hovering.

Type of drone/vehicle/object animation and sounds Race This Body Identity
Wheeled 8 WHEELED
Matrix 8 MATRIX
Hovering 8 FLIGHT
Jet 8 JET
Auto Turret 9 MILTURRET
Corp Turret 9 CORPTURRET
HKPD Turret (HK) 9 TURRET
Koschei-like (HK) 8 KOSCHEI
Spidertank-like (HK) 8 SPIDER


As for characters, build the assetbundle with the prefabs. A new folder other than Seattle is recommended, so build it as foldername_characters_drone.assetbundle. Open the bundle with UABE, replace the Monoscripts AnimationListener, HighlightableObject, PlayerBody, XffectComponent and EffectLayer by text dumps from seattle_characters_drone.assetbundle. I recommend keeping the BuildPipeline script with DeterministicAssetBundle to keep PathIDs always the same and making an UABE executable for this, so you won't have to repeat this operation as you re-build your assetbundle again and again. (But remember the UABE executable is going to work only for this assetbundle).

Drop the assetbundle in the standalone/Foldername folder (I used "David" as usual). Copy seattle_animations.assetbundle and drop it in your Foldername. Rename it as foldername_animations.assetbundle. When you use prefabs in your custom folder the game will look for animation assetbundles in this folder, not in Seattle anymore. However, inside the animations assetbundle is an animation library that refers back to all animations in the Seattle folder. You can simply copy and rename the seattle_animations assetbundle if you're not going to need any new animations. If you're going to create new animations you'll need to mess with the animation library. More on this in the further animation section.

Insert your drone prefab in the charprefabschema text dump and save resources.assets. Insert the new drone character in your data\misc\CampaignName.pflib.txt like in the previous section (this time bundle_group is not going to be Seattle anymore). Finally, you can add a new drone item to be equipped or sold by merchants by adding to the \data\items folder and refer to your prefab in character_prefab_id. It must follow the schema "Foldername:Drone/PrefabName". Drone in this case, is just the prefab group, which is whatever comes after foldername_characters_. Load the Editor and your new drone will be ready for use in the campaign.



Equip Drone item.png

Equip drone to a rigger with datajack (according to item sheet)

Drone in game.png

Drone in-game with particles


Here's the Unity project for SRR Drones.

Adding Animations[edit | edit source]

Once you have a working character in Unity you can create animations for him and all characters of his skeleton schema (biped, quadroped etc) using the Unity Animation tool only. First drag a character prefab to the scene and break the prefab instance (GameObject menu). Then, the AnimationListener script that we had been using should be slightly modified to work with Events. Just add a function called OnAnimEvent that takes a string input:

public void OnAnimEvent(string animEvent) { }

Then, click on the Body object and open the Animation Window. As usual, the AnimationListener script must be attached to the Body object. Pose the character on an expected initial pose, then press the record button. Unity will ask to create a new animation file with the .anim extension. Start keying and animating the character; there are many tutorials for this. The specific part that concerns Shadowrun mechanics is that you may add a couple of Events that'll interact with it. There are three types of event for the function OnAnimEvent:

OnFootfall will tell the game to play a footstep sound on this frame, when applicable.

OnAction will tell the game the action is happening on this exact frame. If it's a gun attack action, the game will play the gunshot sound and create the muzzle flash.

OnComplete will tell the game the action is complete. Usually on the last frames of the animation.

The button to add an Event is just next to add keyframe. Click on the event, select the function OnAnimEvent and type in one of these three event names (case-sensitive!).

Animating Unity.png

Finally, when you finish animating, click on the animation in the assets and choose wrap mode:

Once will play the animation once. Appropriate for single actions, like attacks.

Loop will loop the animation. Appropriate for states like standing_idle_something...

Name your animations using the same schema the game uses: standing_idle_pickingnose, standing_attack_unarmed_flyingkick and so on. Build the assetbundle and place it in your own folder.

In your Content Pack create the file anims.mf.txt in the \data\misc folder. It's a manifest file that the Shadowrun Editor reads. This is how it looks in the Dead Man's Switch Content Pack:

Anims manifest.png

So, name your assetbundles using the same schema: standalone\Foldername\ foldername_animations_group_subgroup.assetbundle. And in the manifest the entry goes like Foldername:Group/Subgroup/animationname

Then open the foldername_animations.assetbundle with UABE. Dump export AnimationLibrary Monobehaviour and keep UABE open. Edit the text dump with Notepad. If it's your own folder and you had created a copy of Seattle_animations.assetbundle in it and renamed it, just overwrite any animations you won't need for your custom charaters (Bug animations, for instance). If it's Seattle itself, you should add new entries starting from entry [563] and remember to modify the header to say the array now has 564 (or more) items and you'll also have to create an UABE executable. (anyway, I recommend using your own folder to avoid this) Dump import the modified AnimationLibrary and save the new foldername_animations.assetbundle.

Animation Library.png

Don't worry: this won't cause a Bug animation to be missing, provided you leave the Seattle folder intact and work with a copy in your own bundle folder.

The animation should be ready to use in the Editor via "Play animation from manifest".

Getting the Animation to work With Game Mechanics (still under research)[edit | edit source]

The game, through the AnimationController script, looks for animations for weapons and abilities based on their names. The most common for creatures would be the schema

bundlegroup:race/identity/stance_action_type_mod

However, if you write "female" in your bundle the game will use the schema

bundlegroup:race/gender/stance_action_type_mod

If you write "general" in your bundle SRR will use it for all metahuman races except ghouls

Firstly, items rule animations via the entry anim_type in their data sheets. ItemType and AnimType are hardcoded in the game in the ShadowrunDTO.isogame ItemType and AnimationController (under public enum AnimationGroup) scripts. Hypothetically, if you use dnSpy and add a new AnimationGroup entry you'll need new animations for standing, running, crouching stances (if it's a weapon). That's not worth the bother to me. Even a bow and arrow can be properly carried around with AnimType_Pistol.