Changing NPC Equipment through script

Post » Fri May 13, 2011 5:12 am

I've, to this point, mostly avoided using FOSE so I'm a bit behind the learning curve on what it can/cannot do. I have a non-FOSE solution that is very time consuming to set up and somewhat limited in results. The effect I'm hoping for is a script that would scan all un-named NPCs in a cell then depending on certain conditions removes items from one leveled list from thier inventory and replaces it with items from a different leveled list. I know that FOSE can do all kinds of crazy things, I don't know if it can do this. I'm slowly but slowly reading through the FOSE documentation but if any of you FOSErs out there can point me in the right direction I'd sure appreciate it, even if that direction is away from FOSE because there is nothing in it that can do this.

My non-FOSE system is to give the NPC both leveled lists then change the values of the Chance None Globals through a script. It works, but the conditions have to be long term because once you change them you have to wait for the cell respawns, and there's a lot of really cool things that can be done if the inventory swapping can happen in real time.
User avatar
Sebrina Johnstone
 
Posts: 3456
Joined: Sat Jun 24, 2006 12:58 pm

Post » Fri May 13, 2011 7:59 pm

I've, to this point, mostly avoided using FOSE so I'm a bit behind the learning curve on what it can/cannot do. I have a non-FOSE solution that is very time consuming to set up and somewhat limited in results. The effect I'm hoping for is a script that would scan all un-named NPCs in a cell then depending on certain conditions removes items from one leveled list from thier inventory and replaces it with items from a different leveled list. I know that FOSE can do all kinds of crazy things, I don't know if it can do this. I'm slowly but slowly reading through the FOSE documentation but if any of you FOSErs out there can point me in the right direction I'd sure appreciate it, even if that direction is away from FOSE because there is nothing in it that can do this.

My non-FOSE system is to give the NPC both leveled lists then change the values of the Chance None Globals through a script. It works, but the conditions have to be long term because once you change them you have to wait for the cell respawns, and there's a lot of really cool things that can be done if the inventory swapping can happen in real time.


You can do a ref walk of a cell for leveled characters (Form type 45) and add/remove/equip items individually or from form lists. I haven't worked any with leveled characters but if the leveled lists you are talking about are inventory items, you should be able to do it. I don't see any FOSE functions for manipulating the leveled lists themselves, though.
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Fri May 13, 2011 7:46 pm

You can do a ref walk of a cell for leveled characters (Form type 45) and add/remove/equip items individually or from form lists. I haven't worked any with leveled characters but if the leveled lists you are talking about are inventory items, you should be able to do it. I don't see any FOSE functions for manipulating the leveled lists themselves, though.


That's because there are vanilla functions for that. AddToLeveledLists.
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Fri May 13, 2011 6:06 am

That is fantastic news! I was hoping to find an easier way and it looks like FOSE really is the answer. I never really had an issue with FOSE I just never had a real reason to use it.

Thanks.
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am


Return to Fallout 3