Jump to content

checking stat ranges in opcode 326


subtledoctor

Recommended Posts

I'd like to target spells based on have a certain range of DEX scores.

 

- I could have one spell use 326 with DEX >= x which casts another spell that uses 326 with DEX < y

 

- I could add a line to SPLPROT.2da for DEX = #, and then have separate spells using 326 defining the bonus for each and every value of DEX

 

- I could use DEX >= x, DEX >= y, etc, for each value of DEX where the bonus increases, and simply have all the bonuses stack

 

- I could add a line to SPLPROT.2da using stat 0x103 to combine two other entries, DEX >= and DEX <, to cast a single spell with a bonus for a range of DEX scores.

 

The last option seems way more efficient, and it seems like stat 0x103 was purpose-built for this kind of use. But, how do I pass two 'value' arguments along to the >= and < conditions?

 

Would I have to add two more lines to SPLPROT.2da for each range of scores I want to effect? Three extra lines for each score range seems inefficient. Is there a downside to doing this? Is the number of potential lines in SPLPROT.2da limited?

Link to comment

Use the sprprot primitive that merges 2 lines. Sadly you cannot use parameter1 for both of them. So one of them should be "hardcoded" into the splprot entry.

The potential line #'s are limited only by the 32 bit value of parameter2 (or the storage capacity of the computer).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...