Jump to content


Photo

technical question about opcodes 335/326/214/146


  • Please log in to reply
No replies to this topic

#1 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 16 April 2018 - 02:06 PM

Yes, all used together.

 

I'm working on something that's still ~70% in the conceptual stage.  The idea is this:

 

- Represent "known" abilities by setting certain profs/stats via opcode 233.

- Use your "cast a spell" ability - "Spell1."

- Spell1 uses opcode 335 to check your profs/stats, and populate your wizard spellbook with several spells that you "know."

- Spell1 will then use opcode 214 to present you with a choice to cast one of your "known wizard spells."

- Choosing a spell will trigger that wizard spell, "Spell2."

- Spell2 is just a shell; it will use opcode 146/148 to cast "Spell3," which is an innate ability. 

 

(An explanation so far: opcode 214 with target = 7 will cast stuff instantly, so Spell2 will have param2=0 to cast Spell3 with Spell3's casting time.  The ultimate spell that is cast must be an innate because it has to respect non-wizard caster level.)

 

Now the tricky part: I want to create an ability that allows you to cast spells beyond the normal range of vision.  Think of, say, a wizard who can cast a Fireball at any point visible by a Wizard Eye, if has has a special clairvoyance effect active.

 

I think something like this can be achieved by giving Spell3 unlimited range, but giving a normal sight range limit to Spell2, the wizard spell.  If the range is controlled by the wizard spell, then I can substituting a different wizard spell in its place when the clairvoyant effect is active.  The Seven Eyes effect will populate your spellbook with a different wizard spell - call it "SpellB" - when it finds the prof/stat that usually gets you Spell2.  (This way I don't need to double up the profs/stats I use.)  SpellB wil have unlimited range, and cast Spell3 which also has unlimited range.

 

The tricky part, then, becomes how to evaluate that spellstate to use one Seven Eyes effect or the other.  I suppose it means that Spell1 will have two 326 effects, checking for the spellstate; these will trigger Spell1a or Spell1b... and then those two spells will have the 335 and 214 effects.

 

The big question, in that case, is whether such a setup would have the same simultaneity as a 214 effect with target = 7.  I want the 214 effect to process while the game is paused.  Would that happen if it is in a subspell triggered by opcode 326???


Edited by subtledoctor, 16 April 2018 - 02:12 PM.