Jump to content

Modding Question


ZephyrX

Recommended Posts

Hi everyone. I'm trying to make an AI sandbox package for NPCs to use in my mod. My problem is that I can't figure out how to make the package have priority over other packages. I'm using the "addscriptpackage" function to add the package and it works for awhile until I leave the cell and wait a few hours. Then the NPCs seem to just walk away and do their regular scripts. I've tried everything that I know about modding (which isn't that much :biggrin: ) but I'm no closer to solving this than I was a month ago when I started this mod. Can anyone shed some light on this topic?
Link to comment
Share on other sites

@ gsmanners

 

I think that's a good idea, but I can't figure out how to get the "Must Complete" box checked in a sandbox package. The "Must reach end location" (or something like that) is checkable for a sandbox package, but it would terminate once the NPC goes to the area that it's supposed to sandbox in, which wouldn't make it indefinite. Maybe if there was a way to get the end location to be in some dummy cell that would be unreachable if there was a place to put the end location in?

 

@ Gerazzi

 

I'd really appreciate that you would take the time to look at my mod :smile: ! I was trying to make a home for the player and have most of it complete, except for prison for capturing NPCs. I got the idea from the Enclave Commander mod and thought it would be really cool to integrate with my mod since I couldn't figure out how to make a plugin for that mod that would work nicely. Anyway, the thing is that after an NPC is captured, it stays in the prison until I leave the cell, after which it seems to disapear. I found out that it was similar to what gsmanners posted how the sandbox package was being removed for another package. I've tried adding an "addscriptpackage" in the "change" part of the sandbox package, but that crashed the game. I'll try to get it up as soon as possible and I'll post the link when it's up. I just have to fix a few things with it first, but it should be up soon. Thanks!

Link to comment
Share on other sites

I fixed the small error in the mod and it's attached to this thread. The home I added is near Vault 101; there's a mapmarker there that you can fast travel to. It's called "Vault" simply because I couldn't think of a better name. The weapon used for capturing NPCs, which is named "Capture Laser" is on the desk in the Vault. It's not that big since my computer can't handle large cells so it shouldn't be too hard to find. Besides that, there's a teleport system that works mostly well I think. When you load the mod, it'll add an item called "Vault Teleport" to the Aid part of your pipboy. When you use it and exit the pipboy, you get sent to the vault and a marker is placed where you used it so that when you enter the other door in the vault, you get teleported back to where you were. Nifty, right? Anyway, like I said before the problem is that the prison system. Try shooting an NPC with the Capture Laser and then go to the vault. The NPC should be there, but when you leave and reenter it should change its script package and might be gone.

 

If you're going to look through it in the GECK, you should probably ignore that whole block of text :smile: . Thanks again and good luck!

Link to comment
Share on other sites

One thing you could do is add a special type of door to that room and give it a script that adds the package whenever the player activates the door (like the door to Moriarty's), and use the "Continue if PC near" flag. Or you could make it disable/enable the NPC like Moriarty's door does.
Link to comment
Share on other sites

I'll have to look into the door at Moriarty's to see how that's implemented. That might just work if I can apply it to a sliding door rather than a teleporting one because right now I have the entire vault only taking up one cell. Do you think it would still work on NPCs that leave the cell because sometimes they seem to evaluate their packages before I even reenter the cell?
Link to comment
Share on other sites

I was kind of wondering about that myself, which was why I suggested you try maybe disable/enable the NPC. :)

 

Disabled NPCs will not process their AI, so you'd be good as long as said NPC doesn't have a parentref (in which case, you'd have to track down the parent ref and disable that, which can be fun considering you never know if those are attached to some kind of special master or if they're daisy-chained together).

Link to comment
Share on other sites

Hmmmm, that is very interesting. Maybe there's a way to disable all of the NPCs in the cell once the player leaves or perhaps in a certain faction. I still have to look into that door script, but I wonder if there's a way to use an object script on the door that affects those NPCs. Do you know of any script functions that affect all of the NPCs of a faction or those in a cell that could be used?

 

EDIT: After thinking about this some more, maybe it might be possible to achieve the same effect of disabling the NPCs by disabling the cell when the player leaves and reenabling the cell when the player enters. Would that still prevent the NPCs from reevalutating their AI packages? Now I even wonder if it's possible to even disable a cell and what affects that would have on the gameworld. For example, if you brought a follower into the cell, would they be able to leave since I'm pretty sure that followers exit the cell AFTER the player leaves the cell. That would mean that the follower would be stuck in the cell, unless it left earlier.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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