Jump to content


Photo

effect 293 Enable Offscreen AI

opcode effect AI script visual range fog of war hardware

  • Please log in to reply
9 replies to this topic

#1 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 03 September 2015 - 03:14 PM

As I understand it, unless a creature is either (a) in combat, or (b) within [PC]'s visual range, scripts do not run on a CRE.

 

Is there a definitively known range which qualifies as (b)?  I've seen maximum visual range given as 30, but many ranged weapons have a higher range than this.  Are there different scales used?

 

Has anyone enabled this effect on all CREs in a large, populated area like the Docks district to see whether it still matters on modern hardware?



#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4841 posts

Posted 03 September 2015 - 04:49 PM

That assumption is wrong. The reason why it generally works that way is because there's really no reason for it to not work that way. And also there might be other reasons ... like that the random walk is really bad at walking in a tunnel.
The visual range is generally the same for every non opcode #262 affected creature.
Look at the guards that come to the Nashkel's bridge, they walk to and from the bridge past the tavern etc up to the shop and back all on their own, and they start from the middle. So it's same to you as it's for all the creatures.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 04 September 2015 - 09:49 AM

As far as i know, if an action started before the creature went offscreen, the action is still executed. The problem occurs if you do a quicksave/reload or something like that while the creature is offscreen.

In this case, if the creature doesn't immediately issue an action (for example from OnCreation, or a trigger that's true at the moment of reload), it will be put to sleep until it becomes visible.

So, if you have patrols and such, it is wise to attach this effect onto the creature (or add an equipping item effect)

 

(note: offscreen actually means not seen by any PC in this case).


Edited by Avenger_teambg, 04 September 2015 - 09:50 AM.

Avenger

#4 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 04 September 2015 - 02:09 PM

Thanks.  I can't recall where I got the 30 visual range from.  When I searched for relevant topics, someone posted that the AI didn't run outside of either 24 -or- +10 beyond fog of war.  I might be confusing this with another game I mod.

 

I think I know what to do, but for people that like digging in to issues fully, my intention is to have areas as "alive" as can be.  For an outdoor area, this would include wandering prey animals occassionally stumbling into predators, or roving groups of <bad guys> encountering and fighting guards.  Things like that.  The biggest downside of doing this at all is the out-of-control combat messages in the text window.  If I can't somehow disable that, I'm not sure it's worth implementing.


Edited by Fiann of the Silver Hand, 04 September 2015 - 02:10 PM.


#5 Almateria

Almateria

    most garbage person

  • Modder
  • 936 posts

Posted 05 September 2015 - 03:02 PM

Hey, if Bioware could do that in Saradush, so can you. Believe in yourself



#6 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 937 posts

Posted 06 September 2015 - 02:43 AM

In the non-EE games, LOS in terms of clearing fog of war is hardcoded to a maximum of 15. Increasing LOS beyond that in non-EE BG2:ToB does the following: (1) allows the PC to see creatures in the fog of war beyond their LOS which looks strange and (2) allows creatures to "see them back".

For the EE games, there is no consistent behavior so I cannot comment too much on that. IWD:EE does allow you to set LOS to much larger ranges via opcode 262.
Posted Image

#7 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 06 September 2015 - 05:32 PM

Hey, if Bioware could do that in Saradush, so can you. Believe in yourself

 

Hah.  I'm trying to avoid stubborn or clumsy implementation, even if the idea is a good one.

 

@Galactygon

 

What is the relationship between visual range and the other unit of measure used with ranged weapons and spells?  Visual range 15 = ??? range for a spell target?



#8 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 937 posts

Posted 07 September 2015 - 11:50 AM

Visual range of 15 is the default hardcoded value of STAT 147 VISUALRANGE. Range values for .itm/.spl extended headers use another unit of measurement (range of 30 = 15 for STAT 147 VISUALRANGE). Projectile explosions use another unit of measurement (estimate: 60 unit radius = 30 units for range in .spl/.itm extended headers = 15 units for STAT 147 VISUALRANGE).

I am not so familiar in the way this works in the EE games. There is no person who knows this better than Avenger_teambg, perhaps he could provide an explanation for this?
Posted Image

#9 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 07 September 2015 - 04:35 PM

Great info, thanks!  I'm going to try to implement a lot of proximity-based, combat-only auras, so I need to get these measurements solidly in my head.

 

Is there a way to ping a user here?



#10 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4841 posts

Posted 07 September 2015 - 08:44 PM

Is there a way to ping a user here?
Go to the users profile and PM him. If you wish to bother them.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.






Also tagged with one or more of these keywords: opcode, effect, AI, script, visual range, fog of war, hardware