Author Topic: (Question - Resolved) How to make a spell with multiple options  (Read 670 times)

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0


               I'm trying to create spells that, like the Polymorph spell in the base game, have multiple alternate spells to be cast from the same "master" spell. I've got the spells I want under the "SubRadSpell" columns in the spells.2da, and they all appear on the radial menu. However, when added to the quickbar or actually cast, only the first spell is ever used. Is there another part of the 2DA that has to be edited to fix this, or am I doing something wrong? (Or is it a bug?)

Edit: The problem I was having stemmed from using feats to grant the spells in question, which apparently needs a few extra steps (quoted in the post below). I managed to get away without having a masterfeats.2da, but everything else seems to be necessary.

Alex Warren wrote...

You want to make a feat, not a spell, right?

Here's a quote from PRC manual:

Creating Multi-Function Feats (Sub Radials)

Somtimes you want to create an ability or spell that has multiple possible uses. Good examples of such an ability is the Orc Warlords Gather Horde ability. This class can summon an orc, and uses sub-radials to allow the player to summon several different types of orcs. The following instructions will help you create feats/spells that can do this as well.
Make an entry in masterfeats.2da for you feat/spell.
Create an entry in feat.2da for your ability.
Set the MASTERFEAT entry to the entry number of your entry in masterfeats.2da.
Set the SPELLID to the line number you plan to use for the master spell in spells.2da
Create a master spell entry in spells.2da.
You can copy an example one. If you have the PRC, copy line 2715 or 2716.
Set the SubRadSpell 1-5 entries to the appropriest spell entries.
(Typically I used the lines directly below the master spell).
Set one SubRadSpell entry per function the spell has.
Create the sub-spell entries.
When making a sub-radial you will want to pick unique numbers over 5000. This are your SubRadialNumbers.
Set the FeatID to (65536 * SubRadialNumber) + Feat Entry Number.

For example:
(65536 * 5001) + 898 = 327746434
(65536 * 5002) + 898 = 327811970

898 would be the line for the feat in feat.2da and 5001 and 5002 would be the unique numbers chosen for these two sub-radial items.
Once all the entries are done it should be ready for testing.


               
               

               


                     Modifié par jackkel dragon, 07 juillet 2012 - 04:31 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #1 on: July 07, 2012, 05:38:53 am »


               Can you post a copy of the lines for your spell.2da for the new spell(s)?  It would help to see exactly what you've got in the different columns.
               
               

               
            

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #2 on: July 07, 2012, 07:14:18 am »


               You want to make a feat, not a spell, right?

Here's a quote from PRC manual:

Creating Multi-Function Feats (Sub Radials)

Somtimes you want to create an ability or spell that has multiple possible uses. Good examples of such an ability is the Orc Warlords Gather Horde ability. This class can summon an orc, and uses sub-radials to allow the player to summon several different types of orcs. The following instructions will help you create feats/spells that can do this as well.
Make an entry in masterfeats.2da for you feat/spell.
Create an entry in feat.2da for your ability.
Set the MASTERFEAT entry to the entry number of your entry in masterfeats.2da.
Set the SPELLID to the line number you plan to use for the master spell in spells.2da
Create a master spell entry in spells.2da.
You can copy an example one. If you have the PRC, copy line 2715 or 2716.
Set the SubRadSpell 1-5 entries to the appropriest spell entries.
(Typically I used the lines directly below the master spell).
Set one SubRadSpell entry per function the spell has.
Create the sub-spell entries.
When making a sub-radial you will want to pick unique numbers over 5000. This are your SubRadialNumbers.
Set the FeatID to (65536 * SubRadialNumber) + Feat Entry Number.

For example:
(65536 * 5001) + 898 = 327746434
(65536 * 5002) + 898 = 327811970

898 would be the line for the feat in feat.2da and 5001 and 5002 would be the unique numbers chosen for these two sub-radial items.
Once all the entries are done it should be ready for testing.


               
               

               
            

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #3 on: July 07, 2012, 05:04:29 pm »


               I'll post the 2da lines below once the lines stop messing with me when I try to post them....

Edit: Uh, it appears the crisis is averted. I hadn't set the "FeatID" columns for the feat-based 'spells', so once I set those properly they fired the correct spell scripts. I'm sort of glad it started working, since I can't figure out how to post the 2da lines without making an unreadable mess.

Thanks for the help. I probably would have never suspected how the FeatID thing was supposed to be set....
               
               

               


                     Modifié par jackkel dragon, 07 juillet 2012 - 04:29 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #4 on: July 07, 2012, 05:30:29 pm »


               <dropping...>

Try wrapping the line in [ code ] [ /code ] tags (without the spaces) and breaking the 2da line in half as the word-wrap here is problematical :-P

<...pennies>
               
               

               
            

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #5 on: July 07, 2012, 05:33:26 pm »


               

Rolo Kipp wrote...

<dropping...>

Try wrapping the line in [ code ] [ /code ] tags (without the spaces) and breaking the 2da line in half as the word-wrap here is problematical :-P

<...pennies>


840 Evocation 16777217 is_PolySelf V M v 0x00 0x2B **** **** **** **** **** 4 4 4 1500 **** **** **** **** **** vs_chant_evoc_lm vs_chant_evoc_lf **** **** **** **** **** **** **** **** **** **** **** **** **** 0 855 856 857 **** **** **** **** 1 6224 1 0 **** 0 1116 **** **** 0

That doesn't look much better... >_<
               
               

               


                     Modifié par jackkel dragon, 07 juillet 2012 - 04:34 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #6 on: July 07, 2012, 05:33:58 pm »


               

Rolo Kipp wrote...

<dropping...>

Try wrapping the line in [ code ] [ /code ] tags (without the spaces) and breaking the 2da line in half as the word-wrap here is problematical :-P

<...pennies>


You can also alway post it on pastebin with a link back here.  

http://pastebin.com/Nzr3Jc5n

EDIT: Just remember to disable word wrap once you get to pastebin so you can read it better.
               
               

               


                     Modifié par Lightfoot8, 07 juillet 2012 - 04:35 .
                     
                  


            

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
(Question - Resolved) How to make a spell with multiple options
« Reply #7 on: July 07, 2012, 05:39:07 pm »


               Thanks for the link, Lightfoot8.

spells.2da: http://pastebin.com/3dBj7jZt

feats.2da: http://pastebin.com/UwfwGkU2

So far, only the first feat (Evocation1) and its four spells (the master spell and three sub-spells) are working, but I think I know how it comes together now.