Jump to content

Help with Pathing, Idle Markers, Etc.


steelplate

Recommended Posts

Hey gang,

 

Been a while since I've requested help here but I'm glad to say that the quest mod is coming along quite nicely. The "New Follower" part works a treat, the "Custom Weapon" is doing what it's supposed to, the "Real" Dialog attempt is about 80% done and the Underground base with Traps, Enemies, Factions & General Scripting is kicking ass nicely. Unfortunately I've hit a rather odd snag.

 

Firstly, unrelated quick question. Does anyone know how I can get my custom Protectron to fire up at you when you trip a tripwire? He seems to activate and execute his "Bodyguard this NPC" package, but he doesn't seem to try and kill me either. Now the main problem...

 

See when I have my troops go out on their patrol run from their underground base, there's two exits, and they're taking the long way. I want them to stand out and patrol the surrounding area of their main entrance, but the hidden (far, far, away in the opposite direction) door seems to be what entices them more. I thought that maybe I got what door they were to monitor screwed up, but once their out of their main area and in the Wilderness (having come out of their hidden entrance), they make a beeline for their main entrance patrol zone. At first I was kind of alright with it, but it turns out that they run through some random occurrences involving huge packs of Raiders and in some cases Deathclaws, which kind of ruins everything when they die instantly :P

 

Any ideas as to how I can get these guys to pick the right door to come out?

Link to comment
Share on other sites

Script for tripwire

 

short actionRef

short myLinkedRef

 

begin onTriggerEnter

...

set actionRef to getActionRef

set myLinkedRef to GetLinkedRef ;Protectron

myLinkedRef.StartCombat actionRef

...

end

 

Pathfinding problem - often navmesh problem. Try toggle preferred pathing, renavmesh (entrance - both sides), refinalise.

Link to comment
Share on other sites

Your navmesg suggestions worked a treat. Unfortunetly the protectron is still being a jackass. I keep getting some error to do with myLinkedRef not being a valid varible. Tried not being noobish and straight referencing the protectrons ref in it as well but it still gave me the error. Maybe I didn't tick the Persistant Ref box?

 

Anyways, thanks muchly so far, I shall sing your praises.

Link to comment
Share on other sites

Well, my mistake. Should be

 

ref actionRef

ref myLinkedRef

 

begin onTriggerEnter

...

set actionRef to getActionRef

set myLinkedRef to GetLinkedRef ;Protectron

myLinkedRef.StartCombat actionRef

...

end

 

(and tripwire should be linked to protectron)

Link to comment
Share on other sites

Heh, yeah sorry... Figured that out a few days ago, should have updated.

 

Currently though, that still doesn't seem to work with sending the StartCombat messege. I'm thinking it's because when the Protectron is triggered to activate by it's Pod, and the Pod is triggered to activate by the Tripwire, actionref's are getting confused and messed up.

 

At work at the moment but when I get home I'll post what my scripts are so far, see if it can be nutted out.

 

Thanks.

Link to comment
Share on other sites

Hey folks, cutting to the chase... StartCombat and such and all is working on the Protectron now but I'm having another issue with paths and packages.

 

I have this "Find" package setup for one NPC to go and find another in this Cell. The problem seems to be that they do know where they are, it's just when they get to the edge of the Map Marker in the Wasteland (where the cell entrance can be found), it just stops running the package. The NPC runs all the way there! Out of his cell, across the Wasteland, makes it all the way to Map Marker edge where the door to the Cell interior exists and BAM... Stops. I don't understand it?

 

I searched into the problem and discovered that Travel Packages do this, so I changed it to a Find Package, but it still does it :S

Link to comment
Share on other sites

Wrestling with AI packages for NPCs is fun and frustrating. I believe that the game engine is not kind to long range packages, especially when they require that the NPC move between interior and exterior cells. The NPC becomes confused, will not move or engages in repetitive motion. The Wasteland is especially hostile, not only in its own default random encounter ways but also in its mod heavy environment. Sometimes you can jog the packages back on task by saving, shutting down FO3 and reloading, but it doesn't feel like smooth modding to have to recommend that to a player.

 

I believe through no testing but some observation that NPCs tend to maintain their packages better when they do not change cells. I am wondering if an NPC patrol might be more dependable and stable if it is set up as a sort of relay race with multiple NPCs that appear identical but do not cross cell barriers. Timers, triggers and player GetInCell conditions might give the illusion that several NPCs are actually one NPC. That series of NPCs enabled and disabled in different cells appearing to complete a series of tasks might actually be more reliable than trusting one NPC to actually carry them out.

 

I can't say that it is a solution, but I am frustrated by the same AI behavior and it is a potential workaround that I am experimenting with.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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