(This thread is somewhat of a follow-up question to that in the earlier "
I'm having trouble with dm_spawnitem" thread.)
How does one get a custom spell into a campaign without starting the campaign anew? Should the approach of adding blueprints and compiled script files (which seems to work for items) to the override folder work for scrolls?
Here's the situation: I created a level 7 wizard spell (basically a variation on Firebrand), including the two icons, the script, two modified .2da files (spells.2da and iprp_spells.2da) and added lines to a talk file (cep2_v1.tlk, which I saved as SunShards_cep2_v1.tlk). I packaged a .hak file with the two .tga icon files and two .2da files. I start the toolset and open the Shadows Over Heliopolis mod, enter the script into the script editor and compile it, then add my little hak file to the haks the mod uses, change the .tlk file to my modified tlk file, and use the item wizard to create a scroll that casts the spell. All of that seems to go well. (I even grabbed the .ncs and .uti files for the script and scroll, along with the exported script .erf, for future use). The only slightly odd thing is that, when creating the scroll item, my spell shows up in the cast spell list as
Sun Shards, rather than as
Sun Shards (13). In other words, it doesn't have the caster level after the spell name as most of the other spells do in that list.
When I start the mod fresh, there seems to be no problem. I can choose my spell as a new wizard spell when leveling up, I can dm_spawn the scroll and both cast from it and learn the spell from it, the scroll icon and spell icon are correct, the scroll/spell names are right and the description shows up fine. Woohoo!
But there is trouble getting the spell into a saved game. When I tried to use the same process as above on a saved game (the .sav file renamed as .mod and moved to the modules folder), the toolset does let me create the new scroll. But, when I save everything, rename the .mod file as .sav, put it back in its save folder, then try to load the game, it crashes. There's one little bar in the load progress indicator and then it locks. This may be an issue with the new .tlk file, though I'm not sure exactly why. I experimented a bit and just changing the .tlk file (not adding the hak and not creating the scroll item) results in a crash. I haven't tried changing anything else to see if there is some more general problem with loading saved games that have been edited as mods.
When I tried the other approach of putting the scroll blueprint .uti file and .ncs file in the override folder, I can load a saved game and spawn the scroll, but the name and description are generic. More importantly, I can try to learn the spell from the scroll, but it never shows up in the character's spellbook. And, I can't cast from the scroll either.
I also tried the trick that initially worked earlier in this thread of spawning the scroll in a fresh game, then both having the character learn the spell there and keep a copy of the scroll in her inventory, saving that character, then using the multiplayer approach to bring that character into a saved game. But, that doesn't work in this case. The scroll turns generic (and uncastable) in the loaded saved game and the character's spell book does not show the spell, even though the game reports that she already knows the spell if I try to learn it from the scroll.
Is there a way to do introduce a new spell into a saved game? I was hoping the modify-the-saved-game-as-a-mod-in-the-toolset approach would work, but I must be doing something wrong because it crashes consistently.
Also, maybe changing the .tlk file isn't what caused the saved game to crash, but I don't feel confident that I am doing that correctly. Is there a guide telling how to properly modify a .tlk file, like the CEP one I used? When I did it, I just used TlkEdit to add the lines to the top of cep2_v1.tlk, which (as far as I can tell) is the file the mod is using. That was what I thought I was supposed to do, looking at the example in
Hugie's spell creation guide. And, it seemed to work when I start a fresh campaign, but I am worried that that isn't always the right place to change a .tlk file.
Modifié par MrZork, 14 août 2010 - 03:12 .