Jump to content

Need help troubleshooting AI packages


Guest Messenjah

Recommended Posts

Guest Messenjah

So, I am having trouble trying to get an NPC to use AI packages correctly. The packages are generic travel packages that move from point to point every 4 hours and they need to be precise and on-time. However, no matter what I do, through scripting, setting time and duration... setting gamehour as a global value.... nothing at all works.

 

What are some basic troubleshooting steps that I may have missed?

Link to comment
Share on other sites

All right, humour aside...

 

If there are more conditions than just the schedule on your package, ensure they're being met as well.

 

Make sure your markers are all marked persistent, and that the refIDs do NOT begin with a numeric character.

Link to comment
Share on other sites

So, I am having trouble trying to get an NPC to use AI packages correctly. The packages are generic travel packages that move from point to point every 4 hours and they need to be precise and on-time. However, no matter what I do, through scripting, setting time and duration... setting gamehour as a global value.... nothing at all works.

 

What are some basic troubleshooting steps that I may have missed?

 

 

Yeah, packages are a pita in NV v. FO3.

 

This is what I've experienced and I don't know how you have yours set up exactly, but maybe this will help you. So, if you have one NPC with several packages of the same type in its NPC record list they might not work like they should. Even if you have used unique variables for each package like you should (and like worked in FO3). The packages will fail to evaluate properly. What happens is the NPC will use any of the packages if they are of the same type (at least that's what's happened to me). And I suspect you might be having the same issue even if time should be making the NPC pick them correctly.

 

The way I got around the issue was this: In order to get the NPC to pick the package you really want it to use you will need to use all of the unique variables on all of the packages and set them to 1 and 0 appropriately.

 

So, say your NPC has four travel packages. When you want the NPC to use travel package one your condition page will look like this:

 

uniquevariabletravelpkg1 == 1

uniquevariabletravelpkg2 == 0

uniquevariabletravelpkg3 == 0

uniquevariabletravelpkg4 == 0

 

If I understood your issue, hopefully this will solve it. Although, you should also expect that you will have to script to drop evps on the NPC at the correct time and you might have to do a staged timer as well to get what you want. Sometimes it can be very difficult to get NPCs to do what you want to when you want them to here in NV.

Link to comment
Share on other sites

Guest Messenjah

LOL, that made my day. :)

 

I don't know what is wrong. The script I'm using, I know works.... I've used it multiple times in the past. However, I could never figure out why things finally would kick in... whenever I have set this up in the past, I would fiddle with it for days on end and have no results... then one day I would start NV and poof, it would magically just start working.

 

I actually reverted to a really old script I wrote a year or so ago. :\ Made sure references were persistent, made sure there are no possible numerical values within their names, I even tied the script to a quest script and made sure it had a priority of 60, script processing was checked to default, repeat stages, repeat conversations, start game enabled, ecs are all checked, there is a proper name and quest ID.... evp is set within the script.... Here is the basic script design for reference:

 

scn ...

short OldState
short StateVar

begin gamemode


if (GameHour>=14)&&(GameHour<=18)&&(StateVar!=1)
 set StateVar to 1
elseif ((GameHour<14)||(GameHour>18))&&(StateVar!=2)
 set StateVar to 2
endif


if StateVar==OldState
 return
endif

if StateVar==1
 set WEDancers.TreasureShowEnd to 0
 set WEDancers.TreasureShowStart to 1
 evp
elseif StateVar==2
 set WEDancers.TreasureShowEnd to 1
 set WEDancers.TreasureShowStart to 0
 evp
endif
set OldState to StateVar

end

 

 

ShowStart and ShowEnd are assigned to the packages accordingly.

Edited by Messenjah
Link to comment
Share on other sites

Guest Messenjah

Ok, finally got it working. I've noticed that whenever I update my esp, there are always problems... usually from the script not running or some-such. Also had other npc's trying to use another npc's script, and I've even seen it where I deleted all AI packages and the npc still kept using the AI packages, even though they were removed from their base object.

 

Any ideas on how to get around this so that I can see the changes I've made after I've made them, without fighting with FO:NV for hours on end trying to restart computer, delete my esp, re-copy and re-name my esp... validate and invalidate archives... check for conflicts... starting a clean save, re-saving, re-select my esp, re-save and check it?

 

Just wondering what exactly flushes whatever the game was doing wrong before from memory?

Link to comment
Share on other sites

The best way I've found to test changes in a mod is to set up a save in a place shortly before you 'start' the mod. Then every time you make a change, load that save, which will have none of your mod data stored, and start the mod.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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