This shows you the differences between two versions of the page.
| tutorial:how-to-create-a-new-spell-in-ds3 [2026/04/28 17:31] – created jenovavirus | tutorial:how-to-create-a-new-spell-in-ds3 [2026/04/28 18:37] (current) – added the rest jenovavirus | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Tools ===== | ===== Tools ===== | ||
| - | * Unordered List Item Witchy | + | * Witchy |
| * Smithbox | * Smithbox | ||
| * hkxpack-souls (v0.3) | * hkxpack-souls (v0.3) | ||
| Line 12: | Line 12: | ||
| This tutorial will show how to add a spell from scratch but we will be using an existing animation (you can use your own one that you created instead). You normally have a cast and a fire animation for a spell and we will only use one but still cover how to implement both. Be aware that you should invest time to create a proper and fitting sfx for your spell or be prepared to have a mediocre one. | This tutorial will show how to add a spell from scratch but we will be using an existing animation (you can use your own one that you created instead). You normally have a cast and a fire animation for a spell and we will only use one but still cover how to implement both. Be aware that you should invest time to create a proper and fitting sfx for your spell or be prepared to have a mediocre one. | ||
| - | All text that is within quotation marks is meant to be literal so it's already existing exactly like this or meant to be like this. | + | All text that is within quotation marks is meant to be literal so it's already existing exactly like this or meant to be like this. The file names sometimes include the sub-folder (in the game folder) at the start of its name so you can easily find them. Always create/have a backup ready of the original files. You should always use ModEngine 2/3 and copy the files into the mod folder. |
| - | The file names sometimes include the sub-folder (in the game folder) at the start of its name so you can easily find them. | + | |
| - | Always create/have a backup ready of the original files. You should always use ModEngine 2/3 and copy the files into the mod folder. | + | |
| ===== Parts of the game that need to be modified to create a spell ===== | ===== Parts of the game that need to be modified to create a spell ===== | ||
| Line 21: | Line 19: | ||
| Param editor -> Magic | Param editor -> Magic | ||
| - | - Ordered List ItemOrdered List ItemDuplicate | + | - Duplicate |
| - The SortId determines how the spell is sorted in the attunement menu. | - The SortId determines how the spell is sorted in the attunement menu. | ||
| - The iconId references the icon on a sheet in " | - The iconId references the icon on a sheet in " | ||
| Line 28: | Line 26: | ||
| - Set the bullets in refId fields. You can go to the ID of an existing one, duplicate it and change it. | - Set the bullets in refId fields. You can go to the ID of an existing one, duplicate it and change it. | ||
| - | Optionally you can set a replacement status type for a stat like INT or FTH. | + | Optionally you can set a replacement status type for a stat like INT or FTH. \\ |
| - | Then you can set the threshold at which amount it should pick another spell when executing this spell. You add its ID into the replacement Magic ID field below. | + | Then you can set the threshold at which amount it should pick another spell when executing this spell. You add its ID into the replacement Magic ID field below. |
| - | This way you can let the spell execute in another way depending on a stat of the player. | + | This way you can let the spell execute in another way depending on a stat of the player. |
| Param editor -> Bullet | Param editor -> Bullet | ||
| Line 46: | Line 44: | ||
| - Set the exact same ID as the Magic ID. | - Set the exact same ID as the Magic ID. | ||
| + | | ||
| ==== Add new text ==== | ==== Add new text ==== | ||
| Text editor -> Goods | Text editor -> Goods | ||
| Line 58: | Line 57: | ||
| - Set your summary and description for your spell. This sets the name while it is equipped and in the attunement menu. | - Set your summary and description for your spell. This sets the name while it is equipped and in the attunement menu. | ||
| + | | ||
| ==== Add an icon ==== | ==== Add an icon ==== | ||
| - If you want you can download the clean spell templates: https:// | - If you want you can download the clean spell templates: https:// | ||
| Line 70: | Line 70: | ||
| - Repack with Witchy | - Repack with Witchy | ||
| + | | ||
| ==== Add new sfx ==== | ==== Add new sfx ==== | ||
| + | - Unpack " | ||
| + | - Duplicate an existing .fxr file and rename it accordingly to the CastSfx1 ID you set in the params. | ||
| + | - Edit it manually or use CCCode' | ||
| + | - Repack with Witchy | ||
| + | |||
| + | | ||
| + | ==== Animations ==== | ||
| + | These are the ID ranges in a000 for magic: | ||
| + | |||
| + | * 40000: right hand cast | ||
| + | * 40300: right hand fire | ||
| + | * 42000: left hand cast | ||
| + | * 42300: left hand fire | ||
| + | |||
| + | As you can see left hand animation is offset by 2000 and fire animation by 300. | ||
| + | |||
| + | |||
| + | DS Anim Studio: | ||
| + | - open c0000.anibnd.dcx | ||
| + | - Select a tae entry e.g. a000_42051 (last existing left hand cast) | ||
| + | - " | ||
| + | - " | ||
| + | - Repeat the process for the magic throw animation e.g. e.g. a000_42351 | ||
| + | - Optional: If you ony want to split an existing animation into two you can do: " | ||
| + | - Optional: If you want your own animation that you created you need to unpack the " | ||
| + | - Pick a spell with similar conditions (remeber to pick the CAST not the throw) e.g. lightning spear or emit force and copy& | ||
| + | - The event " | ||
| + | - Now you need to sort out what you don't need: | ||
| + | * PlaySound: There are often a lot of sounds included and it will take time to pick a fitting one. Take a look at " | ||
| + | * SpawnFFX: Those event are there so you can see vfx (you should at minimum have 114 to spawn the spells castsfx1 field) | ||
| + | * Jumptable: enabling and diabling what the character can do (maybe you want to disable movement or enable cancelling the animation with rolling). | ||
| + | * Jumptable: CAREFUL! The order from top to bottom is important! If you put " | ||
| + | * Correct order is: 91, | ||
| + | * AllowVerticalTorsoAim: | ||
| + | * ActivateJumpTableEarly: | ||
| + | * Invoke Rumble Cam: so the screen shakes | ||
| + | * Invoke Behaviour for something extra | ||
| + | |||
| + | | ||
| + | ==== Add Spell in HKS ==== | ||
| + | First download the decompiled versions of " | ||
| + | |||
| + | |||
| + | In " | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | " | ||
| + | |||
| + | Also add the variable (as name) to the " | ||
| + | |||
| + | |||
| + | In " | ||
| + | |||
| + | |||
| + | Example: | ||
| + | After line 2326 which is: | ||
| + | elseif magic_type == 50 then | ||
| + | magic_index = MAGIC_REQUEST_FAN | ||
| + | |||
| + | we add our own entry: | ||
| + | elseif magic_type == 51 then | ||
| + | magic_index = MAGIC_REQUEST_CUSTOM_SPELL | ||
| + | |||
| + | The " | ||
| + | The " | ||
| + | |||
| + | |||
| + | | ||
| + | ==== Add Spell in HKX ==== | ||
| + | Warning: " | ||
| + | |||
| + | - Unpack " | ||
| + | - Then convert " | ||
| + | - Open the resulting c0000.xml with Notepad++ | ||
| + | |||
| + | Every object has a unique name #XXXX \\ | ||
| + | There are hkobjects for every possible state to cast magic from. Those " | ||
| + | |||
| + | #7921: MagicLaunchLeft_Selector \\ | ||
| + | #8056: MagicLaunchLeftSA_Selector \\ | ||
| + | #8276: MagicFireLeft_Selector \\ | ||
| + | |||
| + | #10638: MagicLaunchLeft_Upper_Selector \\ | ||
| + | #10700: MagicLaunchLeftSA_Upper_Selector \\ | ||
| + | #10797: MagicFireLeft_Upper_Selector \\ | ||
| + | |||
| + | #8447: MagicLaunchRight_Selector \\ | ||
| + | #8585: MagicLaunchRightSA_Selector \\ | ||
| + | #8803: MagicFireRight_Selector \\ | ||
| + | |||
| + | #10866: MagicLaunchRight_Upper_Selector \\ | ||
| + | #10930: MagicLaunchRightSA_Upper_Selector \\ | ||
| + | #11028: MagicFireRight_Upper_Selector \\ | ||
| + | |||
| + | Launch means charging up the spell. \\ | ||
| + | Fire means throwing the spell. \\ | ||
| + | Upper means it only uses the upper body to perform the spell. \\ | ||
| + | |||
| + | |||
| + | Their ' | ||
| + | So e.g. " | ||
| + | |||
| + | Below every " | ||
| + | |||
| + | Example: | ||
| + | - You pick " | ||
| + | - This is #7921. So you scroll down and see a list in <hkparam name=" | ||
| + | - The first one is #7923 which is the " | ||
| + | - So for your new spell you copy #7923 and #7924 and paste it at the end after #8054. Now you change the IDs (name attribute in both hkobject on the their first line) to the next free ones: #12802 and #12803 | ||
| + | - Then for the first one you set a UNIQUE name: <hkparam name=" | ||
| + | - And for its animID you set your new ID: <hkparam name=" | ||
| + | - Also within the <hkparam name=" | ||
| + | - Then for the second one you set a UNIQUE name: <hkparam name=" | ||
| + | - And for its animationName you set your new ID: <hkparam name=" | ||
| + | - Then in #7921 you set the first ID #12802 in the list <hkparam name=" | ||
| + | |||
| + | Now repeat that for each other Selector. There you set other consecutive IDs (they need to be unique). \\ | ||
| + | |||
| + | Optional (split the animation): set a crop time if you have only one animation: \\ | ||
| + | For the " | ||
| + | cropStartAmountLocalTime = 0.0 \\ | ||
| + | cropEndAmountLocalTime = <end where your animation uses a windup in seconds e.g. 0.24> \\ | ||
| + | |||
| + | For the " | ||
| + | cropStartAmountLocalTime = <end where your animation uses a windup in seconds e.g. 0.24> \\ | ||
| + | cropEndAmountLocalTime = 0.0 \\ | ||
| + | |||
| + | Optional: Instead of splitting an animation you can set the idle anim ID a000_000000 for the " | ||
| + | |||
| + | Optional: \\ | ||
| + | playbackSpeed = the speed of your animation in % meaning 1.0 (default) is 100%, so 1.5 is 150% \\ | ||
| + | enforcedDuration = speeds up your animation so that it completes in that amount of time in seconds \\ | ||
| + | startTime = starts the animation AND TAE at this time in % (so 0 - 1 meaning at 1.0 it would complete instantly and at 0.5 it starts in the middle) so this SKIPS tae events that exist before the time it would start \\ | ||
| + | |||
| + | * Then convert " | ||
| + | * Then repack " | ||
| - | WIP | + | \\ |
| + | ==== Add the spell to the world ==== | ||
| + | * place the item in the world so it can be picked up: go to " | ||
| + | * let an npc sell the item: Go to " | ||
| + | * make the spell available as a covenant reward | ||