Jump to content
Sign in to follow this  
polytope

Blindness

Recommended Posts

I didn't know where else to post this, but it seems being blinded (or maybe even having visual range reduced by the other opcode effecting it, 262) also alters the range at which a creatures scripts will normally run - by default script range is 24 or 10 more than visual range - but blinded creatures (visual range 2) seem unable to detect anyone outside a range of 3 (?) or so.

 

Consequences: A creature which would normally react to attacks from out of it's LOS i.e. a fireball from off screen can't do so if blinded - it's even possible to hit a blinded creature with a two handed weapon (range >3) without it reacting. Also this seems to apply to the "detect" trigger, for instance thieves which are scripted to hide if they don't detect enemies will do so automtically if blinded and nobody is within a range of 3.

 

Possible solutions to this bug? Spells/Items causing blindness could set visual range to 7 (or half normal) to reduce the buggy behaviour (detection by scripts would then increase to a range of 12, if it's calculated the way I suspect) - otherwise blindness (when used against the AI) is on par with stun or feeblemindedness - not to mention that it currently allows strange exploits like a blinded character being able to hide/set traps within full view of enemies.

Share this post


Link to post
Possible solutions to this bug? Spells/Items causing blindness could set visual range to 7 (or half normal)

 

If anyone decides to implement this I'd suggest doing an opcode edit via TobEx.

 

Otherwise you won't get blindness to properly set STATE_BLIND which is checked fairly often by a bunch of AI mods.

Share this post


Link to post
Possible solutions to this bug? Spells/Items causing blindness could set visual range to 7 (or half normal)

 

If anyone decides to implement this I'd suggest doing an opcode edit via TobEx.

 

Otherwise you won't get blindness to properly set STATE_BLIND which is checked fairly often by a bunch of AI mods.

I was thinking that 262 applied after the blindness effect might work, but (with further testing) it seems that a blinded creature is "immune" to visual range modification. Also the "enable offscreen AI" stat (293) doesn't seem to help blinded creatures either.

 

So yes, it needs an actual edit of the opcode, unless it turns out that visual range and scripting range are somehow intrinsically linked... Otherwise AI scripts can be patched, i.e. REPLACE_TEXTUALLY ~StateCheck(Myself,STATE_BLIND)~ ~CheckStatLT(Myself,14,VISUALRANGE)~, although there might be hundreds that need accounting for - certainly SCS and your RR and aTweaks mods; I don't know if Questpack ever checks for blindness.

 

What would be really useful is a variant of "modify scripting state" that could be used to set states rather than stats.

Share this post


Link to post

I think this is a modding question (though very advanced modding, because of the engine bug), not an IESDP question.

If you need to modify some ranges, then it is very easy to fix in ToBEx.

Though, your suggestion won't fix the hiding bug.

You need to change the logic so the hiding creature won't look around to see who's seeing it, instead it will be checked if anyone sees the hiding creature.

 

As you noticed, the blind state automatically restricts the visual range to 2, this isn't in the opcode code.

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...