Jump to content

SPELL.IDS coding discussion


Recommended Posts

10 hours ago, DavidW said:

If you write your own version, SCS will avoid replacing it with its own. But (i) the AI will only use IWD spells if it detects that they’re all there, which currently means it needs either IWDification or SCS IWD spells; (ii) SCS doesn’t know what your spell does, so if it’s too different, it may do something stupid.

For Shades in particular, it doesn’t matter: I don’t use that spell.

I see, thank you for clarifying.

So basically there's no risk of breaking your AI in this case. In particular:

  • I'd like to replace the current summoned creatures with my own creatures.
  • I'd like to modify the special parameter of opcode #331 to always use "Dice values".
  • I'd like to give some specialist mages (notably Conjurers) the possibility of summoning extra creatures via opcode #177.

As you can see, none of these things is supposed to break your AI. Moreover, since you tend to give specialist mages spells belonging to their school, your AI will benefit from it as well.

I have a question about the associated scroll: do I need to CREATE it or will SCS do that for me and distribute it where appropriate?

Edited by Luke
Link to comment
19 hours ago, DavidW said:

In that case, yes.

I see. So I first need to do my modifications (including my version of MONSTER_SUMMONING_4, 5, 6, 7 and so forth) => then installing IWDification => and finally SCS. Right?

Edited by Luke
Link to comment
On 7/18/2019 at 5:28 PM, DavidW said:

Not sure. Maybe. Try it and see.

Upon further reflection, I do think it's better to tweak existing resources => in so doing, I don't need to worry about scrolls and the like.....

I could also optionally DELETE your resources/IWDification's from /override (just not to have unused resources around.....)

Link to comment
On 1/19/2019 at 3:57 AM, CamDawg said:

This, this, and an extra this. There are only two reasons to insert spells into this namespace: if you need them to be accessible to sorcerer/shaman spell selections at level-up, or granted automatically to divine casters.

Good point  (also taking into account that 'SpellRES()', 'RemoveSpellRES()' and so forth work fine), but, as @subtledoctor said, why the need to be so drastic?

I mean, there are more or less 50 (60 or even 70 in some cases) empty slots per level, so why should they be left empty?

Link to comment
3 hours ago, Luke said:

...

I mean, there are more or less 50 (60 or even 70 in some cases) empty slots per level, so why should they be left empty?

If we look at the level 9 mage spell ids'es, it's in a really bad state, as only the first 20 slots are actually level 9 (or 10) spells, with two empty slots, the others are secondary effects. Aka things that can presumably be indexed elsewhere.

In addition, a lot of the innate slots are wasted with effects rather than actual spells. But to fix that, one just needs to recreate/reindex the entire kit system.

1 hour ago, subtledoctor said:

It only goes up to 49,

Says who ?

Spoiler

2950 FAST_SKULLTRAP
2951 JELLY_SPLIT
2952 DRADEEL_FLAMEBLADE
2953 DRADEEL_BLUE_FIREBALL
2954 DRADEEL_MINOR_GLOBE
2955 PAIN
2956 FEAR
2957 RED_FIREBALL
2958 POWERWORD_BLIND
2959 POWERWORD_STUN
2960 POWERWORD_KILL
2961 DOPPLEGANGER_CHANGE4
2962 DOPPLEGANGER_CHANGE5
2963 DOPPLEGANGER_CHANGE6
2964 DOPPLEGANGER_CHANGE7
2965 DOPPLEGANGER_CHANGE8
2975 WHITE_HOLY_MIGHT
2979 SAREVOK_STRIKE
2980 FIREBALL_DEATH
2981 MUSHROOM_FIRE
2982 DAERRAGH
2983 RISE_FROM_ASH
2984 RED_SWIRL
2985 RED_HOLY_MIGHT
2986 SPIDER_SUMMON
2987 DOPPLEGANGER_CHANGE_DEFAULT_LESSER
2988 DOPPLEGANGER_CHANGE_DEFAULT
2989 EFFECT_ONLY
2990 DOPPLEGANGER_CHANGE3
2991 DOPPLEGANGER_RASHAD
2992 DOPPLEGANGER_CHANGE2
2993 DOPPLEGANGER_CHANGE
2994 PHASE_SPIDER_TELEPORT
2995 DRYAD_TELEPORT
2996 CHARM_KORAX
2997 GORION_LIGHTNING
2998 GORION_MAGIC_MISSILE
2999 DIETY_KILL

The scrolls might be restricted to first 50, but scripting is NOT.

For example, the 2995 teleport spell, works in multitude of scripts in BG1EE(+SoD)... at least assumable, go find it yourself if you need the evidence. iceland.bcs is a good example for that.

Edited by Jarno Mikkola
Link to comment

Yeah, it goes up to 99 (the same holds for priest spells of course...).

5 hours ago, Jarno Mikkola said:

If we look at the level 9 mage spell ids'es, it's in a really bad state...

Yes, you're right, this level is almost full... Nevertheless, I'd rather use the remaining free slots instead of leaving them empty (even if it is not strictly needed, like a spell castable by enemies only...)

Edited by Luke
Link to comment

I'll describe a lunatics idea, and you get the chance to speculate on it:

Perhaps, the ideal solution would be to read all the script(.bcs) files into source files(.baf), then rewrite them as desired with perfect replacements, and then replacing the .ids files identifiers ... and only then re-scripting the resources back into actual scripts. Yes, before this we can use DISABLE_FROM_KEY to all the script files. Yes, that's the lunatic idea.

Yes, it would take a while for the one core the weidu.exe can use for it, but who gives a ...

Link to comment
6 hours ago, Jarno Mikkola said:

The scrolls might be restricted to first 50...

Fortunately, that's not true (at least on EE games...)

I've just tried with SPWI982 – DAERRAGH (note that 82 > 50) and I successfully copied it to my spell book as a level 4 spell 😃

Edited by Luke
Link to comment

I guess 50 for wizards - I’ve been focused on divine spells lately, and the Shaman spells are in the spprx50 slot, so priests only get 49.

Anyway: fill out the slots of some level with dummy spells up to 50, then try to run a Weidu mod with ADD_SPELL to try to add a 51st. Then report back here. 

Of course you can manually add a spell in the 51-99 range, and you can manually add an IDS entry for it. But it won’t be available at CharGen, and there might be other deficiencies. I forget. 

Edited by subtledoctor
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...