Jump to content

Proposal for common table/something when adding spells to the game


Recommended Posts

$SOURCE(RES) is just the array construct form, it holds the same value as SOURCE_RES.

Most arguments that accept the array construct as a value will automatically evaluate it one step (without auto_eval). I use it where I can to avoid using EVAL.  Just a shame the array construct can't be used everywhere.

Link to comment
22 hours ago, subtledoctor said:

Sorry, I meant it’s worth taking a look at Galactygon’s linked thread. Just for nitty-gritty issues like, is it “WIZARD_EVARD_BLACK_TENTACLES,” or “WIZARD_EVARDS_BLACK_TENTACLES?” If two mods use slightly different names, it can be problematic, in that players would get duplicative spells. That thread shows what consensus has been achieved so far; and if you are adding more spells that might conceivably be added by other mods (core rulebook stuff) you can post it there so others can match what you did.

Ah, okay.  Although I don't have mod compatibility high on my agenda (I write my mods mainly for myself), I suppose it cannot hurt to at least take a look.  I have not yet done any actual AI scripting with my spells yet (meaning enemies can not use them), it's probably best to get ids names right before I go there.

And yes, with only a small handful of exceptions (Ramazith's Slime Summons being the most obvious one), all spells I've added are from either the 2e PHB or official FR material.

Edited by Angel
Link to comment
30 minutes ago, Luke said:

what about extending the number of spells available to sorcerers/shamans at level-up, and to mages/bards/clerics/druids at character generation to 100 per level (01–99)?

If you actually follow the numbers, that's 99, not a full 100. But you could use the 00 too. 😛 But I don't believe that it works that way. As in, it's defaulted by something to the 01-50 range. Which cannot be changed, even if we wanted to. And you could then just use the letters as well on the place of the numbers and you would have a lot more options... but that too can't be done.

Link to comment
31 minutes ago, Jarno Mikkola said:

But you could use the 00 too. 😛

Yeah, better (right now SPWI100 is indeed not available, as if it were in the 51–99 range...)

31 minutes ago, Jarno Mikkola said:

As in, it's defaulted by something to the 01-50 range.

You're probably referring to SPELLS.2DA... But see? The file has been externalized, so I guess that having more than 50 spells per level is already partially soft coded...? As of now, if you write something greater than 50, nothing happens... Unless it's been externalized only to reduce the number below 50 (but that's pretty useless...)

33 minutes ago, Jarno Mikkola said:

And you could then just use the letters as well on the place of the numbers and you would have a lot more options... but that too can't be done.

Yeah, the UI would need to be updated accordingly... Hopefully, not that hard with a cap of 100 per level...?

Edited by Luke
Link to comment
5 hours ago, Luke said:

@Galactygon

For v2.7, what about extending the number of spells available to sorcerers/shamans at level-up, and to mages/bards/clerics/druids at character generation to 100 per level (01–99)? That would be extremely great and will solve most of the issues...

Better, I think, to simply do inside the engine what OlvynChuru is currently doing with UI hacks: add a table or something which CharGen/sorcerer level-up/priest level-up would check when displaying available spells.  Check the usual namespace for vanilla spells, and also check anything in that 2da table.  (Or heck, make it a proper IDS table.)  Bonus: modders wouldn't have to deal with ADD_SPELL and not knowing the ResRef of a spell at the time it is installed. (Saving us from the RES_NUM_OF rigamarole that is currently necessary to patch such spells.)

EDIT - heck, if we agree on and use a 2da table here, maybe Galactygon/Beamdog will recognize its value and add support for it in 2.7.  Consensus is the most important thing, methinks.

On 2/25/2021 at 8:43 PM, kjeron said:

I think it would be better to store them ids => res instead of res => ids,

Agree - that would also match (more or less) the existing format of SPELL.IDS, too.

Edited by subtledoctor
Link to comment
4 hours ago, Endarire said:

To clarify, would this table be part of your proposed 5e-style overhaul for casting for your mods?

No, that is wholly separate. This is purely for modders' convenience, to ensure that everyone's spell-adding mods work with everyone's spell-patching mods.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...