Modification to increase visual range for all units.
Narrowminded
Member Posts: 5
I found these interesting informations on the wiki in the Game Terminology section https://baldursgate.fandom.com/wiki/Game_Terminology :
"Range
The actual casting range is governed by creature’s visual range, which is 448 units (pixels) radius by default, as per opcode (.EFF) 262. The unit numbers can be seen by using IE source browsers such as Near Infinity, also be measured in-game by subtracting the horizontal differences between x-coordinate numbers (y-coordinate is ¾ of the x), units can be converted to inch by a denominator of 16, eg, 448/16=28 ft radius is all creatures’ default visual range, and the 40 ft casting range of the Fireball spell wouldn’t be possible to achieve without increasing caster’s visual range through the opcode, up to a maximum of 48 ft radius.
Melee weapon reach, is 1 ft for one-handed weapons, 2 ft for two-handed weapons.
Both weapon and spell casting range, with the exception of sequencers/contingencies, are also given an extra 2 to 3 ft (exact number varies depending on undefined situations), the distance is normally calculated from center-points of the two creatures, sometimes from the nearest rims of the two selection circles, or friendly alliance creatures will just bump the other (Shadows of Amn LOADCNTR00004 Icon SoA.png and later) to shorten the distance if the combined range is still too short for effects to take place. Due to sequencers/contingencies not gaining the extra range, any touch spells stored in them will almost always fail."
It says there is an "opcode (.EFF)", on this website https://gibberlings3.github.io/iesdp/file_formats/ie_formats/eff_v2.htm it explains what is the "EFF file format" which is according to my comprehension a little repetition since EFF probably means by itself "Effect File Format" but it's make sense since it's also apparently a file extension.
"General Description
This file format describes an effect (opcode) and its parameters. The format is an extended version of that found embedded in creatures, items and spells, and is a replacement for the version 1 embedded effects used in BG1. The engine appears to roll a probability for each valid target type, rather than one probability per attack."
By searching further on the Effects section of this website I found that :
#262 (262) Stat: Visual Range Variants: IWD1 IWD2
Parameter #1: Statistic Modifier
Parameter #2: Type
Description:
Applies the visual range effect to the targeted creature(s).
This effect modifies the visual range of the targeted creature(s).
The Statistic Modifier parameter seems to be in the 0–15 interval.
Known values for Type are:
0 ⟶ Cumulative Modifier: Visual Range = Visual Range + 'Statistic Modifier' value
1 ⟶ Flat Value Modifier: Visual Range = 'Statistic Modifier' value
The effect modifies VISUALRANGE.
Info: With relation to this effect:
Each unit of visible range equals 2ft: 32px(horizontal)/24px(vertical)
Default Visual Range = 14
Maximum visual range to reveal "Fog of War" = 23
My questions are simple, how can we modify the game so it increases this default value for visual range of all units ? Are some things hardcoded ?
People recommended on old posts in this forum to use EEkeeper. When I use the effect tab, I have to choose on which of my characters I want to put the effect. However I noticed that there was a target section with an option called Everyone, unfortunately when I choose Everyone it is not working properly for other companions and enemies. It's only working for the character I have put the effect on (just as if I did not select the everyone option).
In addition, using EEkeeper this way seems not practical (maybe I didn't understand how to use that function properly) because firstly I have to load a saved game and put the effects on my Personal Character and all his companions, which means that if I have to add or change a companion I will have to quit the game and go change his visual range everytime. And as I said before, even when I do that it's still not working for enemies.
My feeling is that there is a default rule for visual range applied for all units in the game, what EEkeeper seems to be doing is create exceptions for that rule. I don't want to create exceptions for particular units, I want to change the default visual range and I believe that it's not mind-boggling to imagine that this default value must be written somewhere in the game files or even in the save files or saved characters using the importation feature. And to find where, maybe it would be interesting to know where EEkeeper is going to apply those modifications to the game. Is it only affecting save files ? I don't know but I noticed that in the main folder of EEkeeper there is a file called "bgEEEffects.dat". And as I said earlier in this post, the simple fact that EFF is a file format means that those files exist somewhere right ?
Thank you in advance for your help. If you know mods that can already allow us to change this I am interested, if not I'll keep trying manually.
Edit 1 : People on this forum also recommended to use special items that adds special effects to increase visual range but it seems complicated to give this item to all units in the game and also it would take a slot in inventory if we have to equip it I guess.
Edit 2 : Mastering this modification could be a great start for spells mods ! As some spells mods could create new blind spells that could reduce the visual range of the target or everyone for a short time and things like that.
"Range
The actual casting range is governed by creature’s visual range, which is 448 units (pixels) radius by default, as per opcode (.EFF) 262. The unit numbers can be seen by using IE source browsers such as Near Infinity, also be measured in-game by subtracting the horizontal differences between x-coordinate numbers (y-coordinate is ¾ of the x), units can be converted to inch by a denominator of 16, eg, 448/16=28 ft radius is all creatures’ default visual range, and the 40 ft casting range of the Fireball spell wouldn’t be possible to achieve without increasing caster’s visual range through the opcode, up to a maximum of 48 ft radius.
Melee weapon reach, is 1 ft for one-handed weapons, 2 ft for two-handed weapons.
Both weapon and spell casting range, with the exception of sequencers/contingencies, are also given an extra 2 to 3 ft (exact number varies depending on undefined situations), the distance is normally calculated from center-points of the two creatures, sometimes from the nearest rims of the two selection circles, or friendly alliance creatures will just bump the other (Shadows of Amn LOADCNTR00004 Icon SoA.png and later) to shorten the distance if the combined range is still too short for effects to take place. Due to sequencers/contingencies not gaining the extra range, any touch spells stored in them will almost always fail."
It says there is an "opcode (.EFF)", on this website https://gibberlings3.github.io/iesdp/file_formats/ie_formats/eff_v2.htm it explains what is the "EFF file format" which is according to my comprehension a little repetition since EFF probably means by itself "Effect File Format" but it's make sense since it's also apparently a file extension.
"General Description
This file format describes an effect (opcode) and its parameters. The format is an extended version of that found embedded in creatures, items and spells, and is a replacement for the version 1 embedded effects used in BG1. The engine appears to roll a probability for each valid target type, rather than one probability per attack."
By searching further on the Effects section of this website I found that :
#262 (262) Stat: Visual Range Variants: IWD1 IWD2
Parameter #1: Statistic Modifier
Parameter #2: Type
Description:
Applies the visual range effect to the targeted creature(s).
This effect modifies the visual range of the targeted creature(s).
The Statistic Modifier parameter seems to be in the 0–15 interval.
Known values for Type are:
0 ⟶ Cumulative Modifier: Visual Range = Visual Range + 'Statistic Modifier' value
1 ⟶ Flat Value Modifier: Visual Range = 'Statistic Modifier' value
The effect modifies VISUALRANGE.
Info: With relation to this effect:
Each unit of visible range equals 2ft: 32px(horizontal)/24px(vertical)
Default Visual Range = 14
Maximum visual range to reveal "Fog of War" = 23
My questions are simple, how can we modify the game so it increases this default value for visual range of all units ? Are some things hardcoded ?
People recommended on old posts in this forum to use EEkeeper. When I use the effect tab, I have to choose on which of my characters I want to put the effect. However I noticed that there was a target section with an option called Everyone, unfortunately when I choose Everyone it is not working properly for other companions and enemies. It's only working for the character I have put the effect on (just as if I did not select the everyone option).
In addition, using EEkeeper this way seems not practical (maybe I didn't understand how to use that function properly) because firstly I have to load a saved game and put the effects on my Personal Character and all his companions, which means that if I have to add or change a companion I will have to quit the game and go change his visual range everytime. And as I said before, even when I do that it's still not working for enemies.
My feeling is that there is a default rule for visual range applied for all units in the game, what EEkeeper seems to be doing is create exceptions for that rule. I don't want to create exceptions for particular units, I want to change the default visual range and I believe that it's not mind-boggling to imagine that this default value must be written somewhere in the game files or even in the save files or saved characters using the importation feature. And to find where, maybe it would be interesting to know where EEkeeper is going to apply those modifications to the game. Is it only affecting save files ? I don't know but I noticed that in the main folder of EEkeeper there is a file called "bgEEEffects.dat". And as I said earlier in this post, the simple fact that EFF is a file format means that those files exist somewhere right ?
Thank you in advance for your help. If you know mods that can already allow us to change this I am interested, if not I'll keep trying manually.
Edit 1 : People on this forum also recommended to use special items that adds special effects to increase visual range but it seems complicated to give this item to all units in the game and also it would take a slot in inventory if we have to equip it I guess.
Edit 2 : Mastering this modification could be a great start for spells mods ! As some spells mods could create new blind spells that could reduce the visual range of the target or everyone for a short time and things like that.
Post edited by Narrowminded on
0