Jump to content
  • entries
  • comments
  • views

Variable Length, GetEffectInteger and SpellEffectID

Rob McGinnis


Q: How long can a variable name be? How long can a string be?


A: While the runtime virtual machine doesn't have any limits that we could find, the compiler will reject tokens that are longer than 512 characters. So that would probably be the de facto limits of variable or hard coded string length.




Q: What effect information do different values for the Idx parameter give back for GetEffectInteger()? There doesn't appear to be many comments on this function that I can find.


A: The problem is that the Idx values will return different information for every single different kind of effect. While it would be nice if we could document all of that, doing so is outside the scope of answering just this question. If there is a specific spell we need to look into, let us know.




Q: Are the values for SetEffectSpellID limited to valid SpellID values only? I tried setting a high order value (maxinteger value - 500 or so) and failed to read back what I set. I was hoping to use this a a unique Efffect Identifier for effects applied outside spell scripts, so that I could unquely ID and remove that effect at a later point.


A: I couldn't find any limits to the SetEffectSpellID parameter. I also looked for areas where maybe the value would be stored as something that wouldn't accommodate a large number (such as a WORD), but couldn't find anything like that in the code either.

I would recommend trying this with a smaller number than something near MAXINT to see if you get the results you expect.






Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...