Trying to get rid of an npc put in the Aleswell Inn by anoth

Post » Thu Nov 12, 2009 7:03 am

Hello

I've found that one of CM Partners .esp's ends up putting a guy (cutter) into the Aleswell Inn as a potential recruit amongst 50 some more npc's as well alove the map.

I want to just disable him if he is present inside the Inn during the main quest line.. but I am struggling to find a way to 'grab' him in script to do this in my mod.

I thought using a TriggerZone would do just fine, but now I see that it only gets one target, and there is like up to 6 people in there at times! So chances are, the script would just return someone else not him..

I do know he is a Breton, and no one else goes into the Inn that is a Breton, so I can use that as a condition to be sure its him.. but I cant seem to effectively find a way to grab him, as in be able to cycle thru various actors in the trigger zone, because again, apparently they only return one actor/object.

Any input welcome, I can see I might just have to let this bug go if someone has that .esp active for Cm Partners, sadly, it means at a certain point walking into the Inn which is supposed to have a ton of dead people and a bad guy hanging out in there whom is the culprit.. and now instead, walk in and see 'Cutter' standing there at the bar with a smile on his face with dead people all around him..

Mod conflicts .. very unfun area :(
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Post » Thu Nov 12, 2009 4:47 am

If you know the mod index numbers of the ESP in question, and won't alter it (in other words, it's for your own use only), you could use "runscriptline" in order to disable and enable him when you want. Just need to know his ReferenceID, I think.
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Thu Nov 12, 2009 3:47 am

If you want to find the ID of said NPC, load up the console (Should the the ~ Key) and click on the Breton you want disabled. His ID should appear at the top of the screen, and you should be able to find him in the CS with it.
But I haven't played Oblivion in a loooong time, nor have I ever modded it, so it might be different. Hope this helps.
User avatar
Annika Marziniak
 
Posts: 3416
Joined: Wed Apr 18, 2007 6:22 am

Post » Wed Nov 11, 2009 11:23 pm

IIRC you do use OBSE, so the solution is GetFirst/NextRef
Place some object in the cell scripted to walk the NPCs around, find and disable that one.
Or, if the NPC is persistent, do it remotely (once at game load, maybe?) with GetFirstRefInCell + GetNextRef.
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Wed Nov 11, 2009 7:11 pm

If you know the mod index numbers of the ESP in question, and won't alter it (in other words, it's for your own use only), you could use "runscriptline" in order to disable and enable him when you want. Just need to know his ReferenceID, I think.


Thanks for the input :) No, the mod is being prepared for public release soon, so anything that would only work for my own purposes wont do.

If you want to find the ID of said NPC, load up the console (Should the the ~ Key) and click on the Breton you want disabled. His ID should appear at the top of the screen, and you should be able to find him in the CS with it.
But I haven't played Oblivion in a loooong time, nor have I ever modded it, so it might be different. Hope this helps.


Indeed, I have found him in the Cs already in the .esp from Cm Partners, but of course his editor and in game id's cannot be used in a separate .esp .


IIRC you do use OBSE, so the solution is GetFirst/NextRef
Place some object in the cell scripted to walk the NPCs around, find and disable that one.
Or, if the NPC is persistent, do it remotely (once at game load, maybe?) with GetFirstRefInCell + GetNextRef.


Hey there QQuix :) Thanks for chiming in.

Certainly do use Obse, heavily in the mod.

Not sure exactly what you man by 'Place some object in the cell scripted to walk the NPCs around, find and disable that one'

Im still pondering this one, you mean make all the known actors go into a wander state or something, and.. Im not sure from there.


"Or, if the NPC is persistent, do it remotely (once at game load, maybe?) with GetFirstRefInCell + GetNextRef."

Im not sure if he is persistent, I'll have to look, probably is, I think they all have to be for his companion scripts to run on them once recruited. Sounds like a possible solution much simpler than the aforementioned.


You just made me think of something too. I could use either disable or a temporary teleport of all known actors that could be in the Tavern, and then do a check on the cell, so basically, if anyone is left in there, then they dont belong in there and can be effectively disabled.

I need to check out that command 'GetFirstRefInCell', see how it functions.

Thanks m8 :) Got some testing to do :D
User avatar
Andrea P
 
Posts: 3400
Joined: Mon Feb 12, 2007 7:45 am

Post » Thu Nov 12, 2009 3:13 am

The actor in question is indeed persistent, and after looking up the command 'GetFirstActor' I see that your suggested method with this and GetNextRef will work and be easy to put in.

Thanks again QQuix :)
User avatar
Dagan Wilkin
 
Posts: 3352
Joined: Fri Apr 27, 2007 4:20 am


Return to IV - Oblivion

cron