Skip to content

[Questions] Custom Spell Creation

lroumenlroumen Member Posts: 2,538
edited June 2017 in General Modding
Hi all,

I have some question on spell creation. Maybe one of you can figure out what is going on.

I am creating a kit which has innates available. All of them create a list of spells to cast, similar to spell immunity.

Steps I took to create the innates.
1. Create innate spell
... Spell type innate gets it on the innate bar.
... SAY NAME1 gives it a name
... SAY UNIDENTIFIED_DESC gives it a description when right clicked.
... extended effect OP-CODE 214 allows it to select a spell from a table (2DA).
... At level 1, I get tabel 1 with 1 spell entry
... At level N, I get table N with N spell entries.
... all Spell entries are set to only function starting that level.

Now the 2DA works. I have a spell in there that I can cast. Only, when I rightclick it gives no description
I tried NAME1 which works, but NAME2 and UNIDENTIFIED_DESC do not give it a right-clickable info.
Does anyone know how to get this done?

Cheers

Comments

  • badungubadungu Member Posts: 53
    Have you tried setting the "identified" description to #-1 or to your description?

    SAY DESC #-1

    or

    SAY DESC ~Your string~
  • lroumenlroumen Member Posts: 2,538
    Thanks, I will try that.
  • The user and all related content has been deleted.
  • lroumenlroumen Member Posts: 2,538
    My innate refreshes itself after casting so that should be less of an issue. Good to know in future though. It probably make more sense to put the right click text in the main innate then. Hmmmm
  • lroumenlroumen Member Posts: 2,538
    Another question.

    Suppose I want to make a spell that makes me immune to haste. Why would I need to add immunity to the haste spell (I see that often being done)? Wouldn't immunity to the op code and string be enough?
  • kjeronkjeron Member Posts: 2,368
    lroumen said:

    Why would I need to add immunity to the haste spell (I see that often being done)?

    The normal haste spells also impose fatigue, which you should not block by effect, so you block the resource(spell).
  • AasimAasim Member Posts: 591
    lroumen said:

    Another question.

    Suppose I want to make a spell that makes me immune to haste. Why would I need to add immunity to the haste spell (I see that often being done)? Wouldn't immunity to the op code and string be enough?

    It would, if you want to be immunte to effects tied to Haste opcode (movement bonus, extra attack etc.).
    However, w/o immunity to haste spell, you'd still suffer other effects tied to the spell like fatigue.
  • lroumenlroumen Member Posts: 2,538
    edited June 2017
    Okay. That is clear. Thanks.

    The problem I have is that some mods add sources of the effect I am trying to block, so it would be troublesome to find out which spells I would need to block by resource.

    Moreover, if I do not install a certain mod this time, I would need to not have that spell blocked since it does not exist in the install and I have no idea if that would go wrong or not.

    Unless there is an easy way to verify which spells carry a common effect, I think I would therefore rather add another block to the secondary detrimental effect (which in the case of haste is then fatigue). Or is my reasoning flawed?
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,368
    lroumen said:

    Okay. That is clear. Thanks.

    The problem I have is that some mods add sources of the effect I am trying to block, so it would be troublesome to find out which spells I would need to block by resource.

    Moreover, if I do not install a certain mod this time, I would need to not have that spell blocked since it does not exist in the install and I have no idea if that would go wrong or not.

    Unless there is an easy way to verify which spells carry a common effect, I think I would therefore rather add another block to the secondary detrimental effect (which in the case of haste is then fatigue). Or is my reasoning flawed?

    Immunity to Fatigue will prevent all sources of fatigue, including natural fatigue over time. Not a good approach.

    You can have extra 206 effects for nonexistent spells in your spell, it won't cause problems.

    This only works for mod-prefix spells, not those added through ADD_SPELL, those will cause problems.

    If a mod adds a new haste spell, its up to that mod to clone all existing isntances of "Immunity to Effect: Haste" with "Immunity to Resource: Newspell". Its no different from properly updating Spell Level Immunity for new Area Effect sources.

    If a mod adds a new source of "Immunity to Effect: Haste", its up to that mod to add "Immunity to Resource" for all sources with more than just the Haste Effect. Scan all spells/items for "Immunity to Effect: Haste", if found scan for all "Immunity to Resource" effects, scan those resources for the Haste Effect, and if found, add "Immunity to Resource" for that resource to your spell/item.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Yeah, as I'm learning the hard way, there are layers and layers to spell creation: if you create an y-like spell, you have to be sure that all spells that protect against y protect against your spell; you also have to be sure that any spell that cancels y also cancels your spell( thankfully, these two often go together); if your spell cancels or protects against x- like spells, you have to be sure that it cancels or protects against all x-like spells ( often these go together, as well). And it is painful learning as you go, especially if you are adding a lot of spells. You may find, as I'm finding, that you have to do a top down revision of all the spells you have created so far. Also, as you go along, you realize that you need to recode an uncertain number of spells because you have forgotten to account for something ( looks up at Kjeron's post anxiously)
  • [Deleted User][Deleted User] Posts: 0
    edited June 2017
    The user and all related content has been deleted.
  • lroumenlroumen Member Posts: 2,538
    I was hoping not to put so much effort into it.
    If someone has a function that makes that easier it would really help the community, even smaller modders like me.

    Is spell creation via tp2 easy to learn? If it is easy to search all spells via tp2 and add the protection from resource, that would be really nice.
  • The user and all related content has been deleted.
  • AasimAasim Member Posts: 591
    @Iroumen
    If it's any help to what you want to do (i.e. collect all resources and do x with them) check out SR's Dispelling_Screen and/or haste_slow components.
    It would be perfect if somewhere existed a sort of a "spell database" for BG mods, but it doesn't.
    As per spell creation via .tp2, again, you can check Dispelling_screen in SR - I made use of a macro code made by Ardanis to create a spell from "thin air" . But it's mostly a trial and error work - don't expect things to go easy. It took me quite a few hours to get the spell working as I envisioned it.
  • lroumenlroumen Member Posts: 2,538
    Well, I am creating some spells that work on top of improved anvil spells. For instance, there are several Web lariat spells cast by spiders and things, and they have the Web and unconsciousness effects. I would like to be immune to those spells, so I can protect vs both op codes or I can protect vs the spell resources

    If I do the latter, I need to find out which spells those are.
    If i simply do the former that also makes me immune to wing buffet and emotion type spells, which is not the real desired effect I want. So protection from resource as explained is the best way, but requires a deep dive into all spells vanilla and anvil...

    But there are more spells and spell effects I want to be protected from via other spells I want to create. That requires me to go through the process multiple times.
    So if searching for spell effects and on the fly addition of protection vs opcode and resource is possible via tp2 (such that I have a generic spell that needs additions in accordance to what is searched for), that would make everything so easy.


    I will have a look at spell revisions. Sounds like what I want (ease of finding and adding) is already used there.
Sign In or Register to comment.