Referencing vanilla items

Post » Fri Feb 18, 2011 10:56 pm

I recently had need to reference in a quest script a couple of items that were in the Oblivion.esm - doors on which I wanted to check lock status - that did not have unique names. So I used OBSE's GetFormFromMod with "Oblivion.esm" and the relevant refids to set local ref variables, rather than edit the items to give them names, which would have left them vulnerable to replacement by anyone else doing it. Is there a simpler way to do this, other than using a numeric value for the refid? Is there any non-OBSE method (not that I'd use it, but others might).
User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Fri Feb 18, 2011 8:16 pm

Could you place an xmarker, and parent to the door? This 'parenting' should be safe... :shrug:
Then you use the http://cs.elderscrolls.com/constwiki/index.php/GetParentRef command to get the reference of the door.

Ref Editor ID on XMarker: myXmarker001REF

In another script, you could then use:
set myREF to myXmarker001REF.GetParentRef

User avatar
Cody Banks
 
Posts: 3393
Joined: Thu Nov 22, 2007 9:30 am

Post » Sat Feb 19, 2011 1:23 am

There is a much simpler way to do this. Since you know that Oblivion.esm always has mod index 0, you can simply use its formId in quotes the same way you would use an editor ID. Here's an example from my Map Marker Overhaul, where I change the map marker type of to map markers defined in Oblivion.esm - but only one of them has an editor Id:

	GottlesfontPrioryMapMarker.SetMapMarkerType chapels	"000CD529".SetMapMarkerType chapels ;Cadlew Chapel


("chapels" is a short holding the map marker type they shall have)
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Fri Feb 18, 2011 9:05 pm

I'm not at my CS machine right now, but do the SI assets also start with "00"? If not, I'd assume that load order could come into play for those. I seem to remember the SI esp is minimal, but not how much.
User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Sat Feb 19, 2011 7:51 am

I'm not at my CS machine right now, but do the SI assets also start with "00"?
Yes. They are all defined in Oblivion.esm.

I seem to remember the SI esp is minimal, but not how much.
It is not only minimal, but completely empty. Its only effect is to get the SI bsa to load.
User avatar
james kite
 
Posts: 3460
Joined: Sun Jul 22, 2007 8:52 am

Post » Fri Feb 18, 2011 11:50 pm

I believe when you install SI, it becomes part of Oblivion, so its assests should also start with the form id '00'.
User avatar
Steve Fallon
 
Posts: 3503
Joined: Thu Aug 23, 2007 12:29 am


Return to IV - Oblivion