SetModelPath

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

[Ref.]SetModelPath "path string" [objectID]

This function sets the model for the base object. Call it on a reference, or supply a base object ID; if both are used, the base object ID takes precedence.

Notes[edit | edit source]

  • The first parameter must point to a valid .nif file.
  • The file path is relative to Oblivion\Data\Meshes.
  • If the .nif supplied is not found, no model will be associated with the object.
  • This function works on simple objects which have only one model associated with them, e.g. activators, statics, most inventory objects, etc. It does not affect clothing and armor (use SetMaleBipedPath and the like instead), and calling it on an actor may lead to later crashes when the actor is reloaded.
  • This function alters the model for the base object, which means that objects of the same type which are subsequently loaded will share the new model.
  • Changes are not saved in the savegame (with the exception of cloned forms), so reloading after changing the model will cause the model to be reset.
  • The new model will not appear until the object is reloaded. For equippable objects, this requires you to unequip and re-equip the item. For world objects, calling Disable followed by Enable will update the model immediately.

See Also[edit | edit source]