Jump to content

Enemies see further away


irswat

Recommended Posts

I am interested in making a mod that lets enemies see the player from further away. How would I go about doing this? I would also like to make enemies more aggressive across the board. Thanks.

Edited by irswat
Link to comment
Share on other sites

I am interested in making a mod that lets enemies see the player from further away. How would I go about doing this?

Increaes Perception http://geck.bethsoft.com/index.php?title=Stats_Tab_-_Creatures (attributes) & http://geck.bethsoft.com/index.php?title=SPECIAL. It still won't let them sight you from long distances even at it's max value, but it will help. You may want to research the game settings menu as well.

 

I would also like to make enemies more aggressive across the board. Thanks.

Set your agression on the AI data tab http://geck.bethsoft.com/index.php?title=AI_Data_Tab. You will probably have to set it by hand and individually for each base form.

Link to comment
Share on other sites

The NPC's are snipers on towers. they are already set to the supersniper class but because the player can see much further than the ai can "see" it is very easy to pick them off from a distance. How can I make it so they react to the player from about as far away as the player can react to them? Is it an engine limitation? I have aggro and guard radius set to 20000 which i thought was about as far as the player can 'see' in game.

Link to comment
Share on other sites

The NPC's are snipers on towers.

Yeah your definitely going to have to use some non traditional means. If it was in a box canyon or any place there was choke points you could use triggrs (like Arkansas in FO3). But I'm betting that's not the case (or at least not the case with all of them) since they'r in sniper towers. You don't want to start plopping down prmitives that stretch from horizon to horizon :sad:

 

There are probably quite a few ways to do this, and other modders may have better solutions but I'd suggest two methods. During the time you are wearing a disguise faction and during the hoover dam battle a CIOS spell pulse was sent out by the player. In hoover dam this guaranteed the legion (and I assume the reverse is true for the a legion character and the rangers) were aware of the player. I don't recall if the effect was initiated by a trigger, but it can just as easily be initiated by a quest. Something similar is happening during the faction disguise quest which happens when you don faction armor (except that the spell effect's result is different). The area of effect must, of course, be much larger. Obviously that's going to be tough to dig into and replicate if your new-ish to modding.

 

A second way is similar to how the radar fence works in OWB. It uses a script that counts how many game units the player is from a marker and fires of a block of code when you'v passed that limit. You'd use the quest and it's script as a guide to create your own. Each sniper would be a marker and using it with distances like 2000 or more is right in it's wheelhouse. You'll still have to use that cast immediate on self pulse to fire it off but the conditions would change from the OWB worldspace to NV and the distance would be <= rather than >=

 

If your new to modding it's either solution is probably going to be somewhat daunting, unless your really sharp or have a natural affinity for modding. Maybe someone can suggest a simpler method.

 

I believe you PM'd me previously about snipers (if that was someone else than I apologize in advance). And I'm afraid I'm still slammed. But see if you can muddle through it or if someone provides a better solution. If you can't, let me know. I might (no promises) be able to help out a bit later.

Link to comment
Share on other sites

I'm a coder by nature I think. It's just getting used to the functionality of GECK and the syntax of its language that is taking some time. I think I have learned alot in the week or two since I began messing around with things. Still learning the limitations of the engine to be honest. I was thinking about determining how far the player can see through a sniper rifle and then placing an invisible fence along that invisible arc. When the player crosses the fence it will trigger a script that will cause the sniper to target/attack the player. This is the part I can't figure out. Is there a function for something like player.AttackTarget(x,y,z) with x,y,z being the position the trigger was fired?

Link to comment
Share on other sites

I'm a coder by nature I think. It's just getting used to the functionality of GECK and the syntax of its language that is taking some time. I think I have learned a lot in the week or two since I began messing around with things. Still learning the limitations of the engine to be honest.

Then you have quite a leg up on me, and this should be much easier (possibly even trivial).

 

I was thinking about determining how far the player can see through a sniper rifle and then placing an invisible fence along that invisible arc. When the player crosses the fence it will trigger a script that will cause the sniper to target/attack the player. This is the part I can't figure out. Is there a function for something like player.AttackTarget(x,y,z) with x,y,z being the position the trigger was fired?

Yeah the invisible fence that your describing is a trigger, a primitive. It's why I suggested you examine Arkansas from FO3, it uses that method and you would have ample example of what you want to do. The useWeapon function is going to be the basis of that method. But there are other considerations, (which is why I included some alternate suggestions). The game engine checks every frame if an actor is in the trigger and the larger the trigger the more demanding it is. It's fine for a choke point that you know the player is going to go through and is relatively small, say the game equivilant of 20' by 20' or 30' by 30'. But I don't recommend it, if your making a very large trigger. In addition the useWeapon function still doesn't alert the actor to teh player's existence. So the sniper could fire at teh player, and when the player fired back and hit the sniper it could still be a surprise critical.

 

If you have the geography to set it up, that is the simplest way, and arakansas is a great example (can't stress that enough).

 

But if your dealing with large areas that need to be scanned like a 5k (game unit) radi that is waaaaaay too much area for a trigger and that's where the getDistance function paired with getLOS comes in. It can make for a much more realistic situation and it's more flexible (the quest script can fire off once every minute if the sniper has a large area of land to scan). And maybe throw in some head tracking via the look function.

 

Anyway you'v got all the pieces and even some great examples, along with direct link to the functions, should be a piece of cake for you from here on out.

 

Link to comment
Share on other sites

I created my NPC Called SMSniper. I will have hundreds of these snipers throughout the wasteland. Each sniper has a unique refID SMSniper01, SMSniper02, etc. Is there a way to return the reference id's of all instances of an NPC loaded into memory sequentially? I don't want to have to create hundreds of variations of this script for each instance of SMSniper.

.fctbNone{ color:#000000; }.fctbStyle5{ color:#ff0000; }.fctbStyle7{ color:#a52a2a;font-style:oblique; }.fctbStyle6{ color:#0000ff;font-weight:bold; }.fctbStyle4{ color:#800000;                          End
Link to comment
Share on other sites

It depends on what your purpose is. You can create a form list of all refIDs and in many cases it can be passed to a function just like any other var. You can also check out the "reference walking" functions of NVSE, but those are used (IIRC) in a cell as opposed to many cells in a worldspace.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...