Jump to content


Photo

A couple questions about spells


  • Please log in to reply
16 replies to this topic

#1 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 06 June 2008 - 05:31 PM

Where is "sphere" determined in priest spells, or is it (outside of Divine Remix)?

What about "area of effect"? Yeah I suppose it's embedded in the projectile or something but eh... yech. BG1 doesn't even use .pro files that I can tell.

Some of this was probably answered in a post I started at G3 a while back, but...

The forums are currently down for maintenance. We are working as hard a spossible to complete our tasks are restore the forums to normal use. Thank you for your patience.

All your forums are belong to us!

Edit: Oh and here's another query - spell range seems to be measured in yards (or metres for international versions) whereas area of effect is represented in feet - I think this has some precedent in PnP though. Does the engine reflect this? Also, "radius" seems to mean "diameter" at times. Maybe the PnP folks were a bit math-challenged (even more so than I am, which would be pretty bad).

Edited by Miloch, 06 June 2008 - 05:46 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#2 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 06 June 2008 - 11:37 PM

Where is "sphere" determined in priest spells, or is it (outside of Divine Remix)?

The .spl file doesn't contain any information at all regarding the sphere. I presume Divine Remix assigns spells to clerics one by one and "spheres" are only used to decide which spell goes to whom. But I may be wrong. :whistling:

What about "area of effect"? Yeah I suppose it's embedded in the projectile or something but eh... yech. BG1 doesn't even use .pro files that I can tell.

I don't know how BG1 handles it but in BG2 area of effects are embedded in the .pro files indeed. Area of effects are measured in feet though the engine uses different values in the .pro file (e.g. 10 feet = 110 in the .pro file) while range goes from adjacent foes (1-2) to caster sight (30). Anyway IESDP is still up fortunately and it's surely better to rely on it rather than listening to me! :D

#3 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 08 June 2008 - 12:43 AM

Thanks. I have a local copy of the IESDP (essential for modding) but I don't think it says where Area of Effect is for BG1 spells either. I guess I can use the BG2 .pro files as an estimate though. Could be hardcoded or something.

And I'm still confused as to this whole yards vs. feet thing as to range/area of effect and what the game window actually shows (which is longer in one dimension vs. the other), and radius vs. diameter, but oh well. If they just used the metric system for everything it'd be easier...

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#4 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 08 June 2008 - 02:49 AM

And I'm still confused as to this whole yards vs. feet thing as to range/area of effect and what the game window actually shows (which is longer in one dimension vs. the other), and radius vs. diameter, but oh well. If they just used the metric system for everything it'd be easier...

I agree it's quite confusing. Anyway I think it's more or less like this...

Range
1 or 2: touch
10: short range (3m)
20: mudium range (6m)
30: long range/caster sight, and maximum range in BG engine (9m)

Area of effect/radius
65-75: 5 feet (about 1.5m)
100-110: 10 feet (3m)
150-180: 15 feet (4.5m)
200: 20 feet (6m)
256: max allowed (7.5-8m)

Especially the area of effect is handled pretty bad imo (e.g. different spells that should have 5 feet radius uses a variable value between 60 and 75). :wall:

#5 -Guest-

-Guest-
  • Guest

Posted 09 June 2008 - 11:57 AM

Thanks. I have a local copy of the IESDP (essential for modding) but I don't think it says where Area of Effect is for BG1 spells either. I guess I can use the BG2 .pro files as an estimate though. Could be hardcoded or something.

Hardcode. If you have ToB, look at Missile.ids for a list of most of the IE projectiles (obviously, not all of them existed in BG/TotSC, but the first hundred or so did and are all hardcoded). The projectile values are still in the same spot in items and spells and can be changed to alter the projectile used by the ability.

And I'm still confused as to this whole yards vs. feet thing as to range/area of effect and what the game window actually shows (which is longer in one dimension vs. the other), and radius vs. diameter, but oh well. If they just used the metric system for everything it'd be easier...

Ranges are in feet. Yard is just rot from the description. AoE projectile (and certain effect and possibly other data structure) area sizes are all in some other metric; as listed, 256 is about 30' radius (I think you should be able to go higher, however).

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 09 June 2008 - 08:27 PM

256 is about 30' radius (I think you should be able to go higher, however).

Is this really a "radius" though or diameter? In other words, is it the width of a circle from one end to another, or the distance from the circle's centre to its edge? A 256 value would extend to the edge of the screen if it's a radius from the caster, but the ones I looked at that had that value (for example, Entang2) only cover about half the screen.

Edit: Oh, as long as I'm here, I need to copy a bunch of effects from a spell header and paste them into multiple level-based headers for a spell via WeiDU patch. I'll probably figure it out with enough hacking around, but if someone has a macro or snippet that does this already, it could save me some time.

Edited by Miloch, 09 June 2008 - 08:40 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#7 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 09 June 2008 - 11:16 PM

Is this really a "radius" though or diameter?

I think the latter.

#8 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 10 June 2008 - 12:39 AM

Is this really a "radius" though or diameter? In other words, is it the width of a circle from one end to another, or the distance from the circle's centre to its edge? A 256 value would extend to the edge of the screen if it's a radius from the caster, but the ones I looked at that had that value (for example, Entang2) only cover about half the screen.

Well, if the value is based on (256)pixels as I think, it's a radius, as the fireball covers the total vertical dimension of the BG1 normal screen(640 x 480 - the consoles).

Deactivated account. The user today is known as The Imp.


#9 -Guest-

-Guest-
  • Guest

Posted 10 June 2008 - 02:00 PM

Is this really a "radius" though or diameter? In other words, is it the width of a circle from one end to another, or the distance from the circle's centre to its edge? A 256 value would extend to the edge of the screen if it's a radius from the caster, but the ones I looked at that had that value (for example, Entang2) only cover about half the screen.

Beats me. The distance from the selected character (after centering the view port on the character) to the fog of war in any direction should be about 30', so I guess you can just test and see.

I believe this same metric is used for the tracking effect (ToB), and it's probably what those "unknown" (usually 1,000) values in spawn points are (if the party gets "unknown" close or isn't "unknown" close to this point, then do spawn, or something).

Edit: Oh, as long as I'm here, I need to copy a bunch of effects from a spell header and paste them into multiple level-based headers for a spell via WeiDU patch. I'll probably figure it out with enough hacking around, but if someone has a macro or snippet that does this already, it could save me some time.

READ_ASCII where what (size)
WRITE_ASCIIE where "%what%" #size

is what you want.

#10 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 10 June 2008 - 03:26 PM

Beats me. The distance from the selected character (after centering the view port on the character) to the fog of war in any direction should be about 30', so I guess you can just test and see.

I'm kinda thinking Jarno might be right, since I was testing stuff on 800x600. Given the fact you can increase the screen space by that and more, wouldn't the maximum Range be variable then? If it's 30' in 640x480, might it not be 40 or 50 in 800x600 and so on? Or is it hardcoded by the engine to be 30' regardless? In any case, maybe we should reconsider making "Range: Sight" equivalent to "Range: 30'" since your maximum sight distance might be variable.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#11 -Guest-

-Guest-
  • Guest

Posted 11 June 2008 - 02:14 PM

Always 30. The screen size may differ, but the fog of war (usually) doesn't (you may be able to see the fog of war in all directions at 1600x1200, but the visual range of characters is still the same as at 640x480).

It would be interesting to see if the maximum range differs when extending the visible range (if there is a larger one; I can't remember if the cheat only reduces or also increases sight range). Reducing it would almost certainly reduce the range (I don't believe the engine will let you shoot off at a point that isn't in visual range of the selected character).

It still won't change just from playing at a higher resolution, however.

#12 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 12 June 2008 - 12:09 AM

Given the fact you can increase the screen space by that and more, wouldn't the maximum Range be variable then? If it's 30' in 640x480, might it not be 40 or 50 in 800x600 and so on? Or is it hardcoded by the engine to be 30' regardless? In any case, maybe we should reconsider making "Range: Sight" equivalent to "Range: 30'" since your maximum sight distance might be variable.

In the first case no, because you can scroll around the screen, but then again, cause there are spells that enlarge the field of vision(Wizard Eye, Farsight, etc.), or reduce it(Blindness), co-operated fields of vision, the game should allow you to fire to everywhere there is no 'fog of war(grayed out part of map)', as there are such thing in the literature that rely on this(drow tactics etc.). I don't actually know how the game behaves, but I have a grave doubt that it's the right one, so it's most probably Range: 30'.

Deactivated account. The user today is known as The Imp.


#13 -Guest-

-Guest-
  • Guest

Posted 12 June 2008 - 10:06 AM

In the first case no, because you can scroll around the screen, but then again, cause there are spells that enlarge the field of vision(Wizard Eye, Farsight, etc.), or reduce it(Blindness), co-operated fields of vision, the game should allow you to fire to everywhere there is no 'fog of war(grayed out part of map)', as there are such thing in the literature that rely on this(drow tactics etc.). I don't actually know how the game behaves, but I have a grave doubt that it's the right one, so it's most probably Range: 30'.

Personal vision is all that matters (you can only fire as far as *you* can see). Additional PCs or Wizard Eye or Farsight don't increase the range you can fire (where the fog of war is in these cases doesn't matter as you still have your own field of vision which hasn't been modified by any of these things), but Blindness does decrease it.

#14 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 12 June 2008 - 10:16 AM

...Personal vision is all that matters (you can only fire as far as *you* can see)...Wizard Eye... doesn't matter as you still have your own field of vision which hasn't been modified by

Read the inscription.
Posted Image It's very personal.

Deactivated account. The user today is known as The Imp.


#15 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 12 June 2008 - 06:30 PM

...Personal vision is all that matters (you can only fire as far as *you* can see)

Well I just fired a lightning bolt at someone off screen just by aiming in her general direction. But I guess that's different, since I wasn't actually aiming at that target, I was aiming at a point onscreen, but still, the maximum "Range" is further than "Sight" it seems.

Read the inscription... It's very personal.

Yeah, but a lot of those descriptions were just taken from the PnP sources regardless of what the game engines could handle.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#16 -Guest-

-Guest-
  • Guest

Posted 12 June 2008 - 08:21 PM

The wizard eye is just a cutspy. The engine only uses the caster's visual range (indeed, you can't string along your party to make a 200-foot "corridor" of visible area and fire off past the 30 feet of your actual vision).

Well I just fired a lightning bolt at someone off screen just by aiming in her general direction. But I guess that's different, since I wasn't actually aiming at that target, I was aiming at a point onscreen, but still, the maximum "Range" is further than "Sight" it seems.

Projectiles can fly to any range (indeed, you can ForceSpell() magic missiles or a chromatic orb or whatever all the way across the area). But you're limited to your own visual range (~30') when targeting, so that's the de facto spellcasting range.

#17 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 12 June 2008 - 11:16 PM

Wizard Eye, Farsight and similar effect won't extend the maximum range which is always 30 feet.