Author Topic: Scribe Scroll with Custom Spell  (Read 481 times)

Legacy_K-T-A

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« on: February 15, 2013, 02:19:07 pm »


               Hello,

I am trying to make it possible for a custom spell to be scribed to scrolls in-game, but I just can't get it to work. The custom spell is working, spell and scroll icons are set up, I can add the spell to a scroll in the toolset and I even made entries to des_crft_spells.2da and des_crft_scroll.2da as well as iprp_spellcost.2da. I appreciate any hints.

Thank you.

KTA
               
               

               
            

Legacy_K-T-A

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #1 on: February 21, 2013, 12:22:26 pm »


               I am still looking for help/hints on this issue. If more detailed information is needed I am happy to provide it.

Thank you.

KTA
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #2 on: February 21, 2013, 12:51:09 pm »


               show your modified des_crft_scroll.2da file

in this 2da you must specify a pre-definted blueprint of the spells in question
               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #3 on: February 21, 2013, 04:16:26 pm »


               I just recently had the same issue myself. It turned out that I'd missed entering the rrequired lines in the des_matcomp.2da. Even if a spell has no required components, you'll need to make certain it is represented in this 2da. Lines should correspond with those found in the iprp_spells.2da
               
               

               
            

Legacy_K-T-A

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #4 on: February 22, 2013, 03:37:41 pm »


               Thank you for your replies.

I did not have any entry in 'des_matcomp.2da' but when I made one it did not matter. So here are the entries in both 2da's I made:

des_crft_scroll.2da
668        DANCING_LIGHTS                     dancinglights      ****               ****               ****               ****               dancinglights

des_matcomp.2da
540        Dancing_Lights                   0           ****

IPRP_SPELLS.2da
540        Dancing_Lights                   16777312   1   0   500   840   0   1   1   iss_d_lights

The scroll item exists and is called dancinglights.uti any obvious error?

KTA
               
               

               


                     Modifié par K-T-A, 22 février 2013 - 03:39 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #5 on: February 22, 2013, 03:59:13 pm »


               both des_crft_scroll and des_matcomp 2das need to have the line number matching the line of your custom spell in spells.2da

also keep in mind that simply renaming the line number wont work as the index is recalculated by game - you need to add empty lines to do this
               
               

               
            

Legacy_K-T-A

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #6 on: February 22, 2013, 04:49:18 pm »


               Hmm... I matched the entries in des_crft_scroll, des_matcomp 2da and spells.2da but it is still not working. So here are the entries of all 2da's I made changes to:

des_crft_scroll.2da
840        DANCING_LIGHTS                     dancinglights      ****               ****               ****               ****               dancinglights

des_matcomp.2da
840        Dancing_Lights                   0           ****

IPRP_SPELLS.2da
540        Dancing_Lights                   16777312   1   0   500   840   0   1   1   iss_d_lights

des_crft_spells.2da
702   Dancing_Lights                     540               1          0        0          0       0

iprp_spellcost.2da
241   Dancing_Lights                   16777312   540   0.5

spells.2da
840   Dancing_Lights                      16777310   is_d_lights   V   M   VS   0x3e   0x2C   dancing_lights   0   ****   ****   ****   ****   0   0   1500   hand   ****   vco_smhanelec01   ****   sco_mehanelec01   vs_chant_illu_lm   vs_chant_illu_lf   area   1000   ****   ****   ****   ****   0   ****   ****   ****   ****   ****   ****   0   ****   ****   ****   ****   ****   15   ****   1   16777311   1   0   ****   0   ****   ****   ****   0

Why is it not working... all the 2da's have the right references now?

KTA
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #7 on: February 22, 2013, 04:51:38 pm »


               yet des_crft_spells.2da must have the 840line
               
               

               
            

Legacy_K-T-A

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #8 on: February 22, 2013, 05:25:54 pm »


               Ok, now the only files that do not have my stuff in line 840 are iprp_spellcost.2da and IPRP_SPELLS.2da. But it is still not working - maybe other 2da's must be involved that I have overlooked so far?

KTA
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #9 on: February 22, 2013, 05:29:19 pm »


               another thing is that the spellscript must have the line

   if (!X2PreSpellCastCode())
   {
   // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
       return;
   }

at the beginning of the script, if you have this or you add this and it will still not work, are you getting any feedback from game when you try to scribe this spell?
               
               

               
            

Legacy_K-T-A

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Scribe Scroll with Custom Spell
« Reply #10 on: February 25, 2013, 04:11:22 pm »


               Thank you so much, ShaDoOoW! It was indeed the missing code that prevented the whole thing. Works now.

KTA