SetTextureOverride(string, string, object)

From NWN Lexicon
Revision as of 14:02, 9 August 2020 by Jasperre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Makes oPC load texture sNewName instead of sOldName.
int SetTextureOverride(
    string sOldName, 
    string sNewName = "", 
    object oPC = OBJECT_INVALID
);

Parameters

sOldName
The texture name specified in game models.
sNewName
The replacement texture name.
oPC
The player for whom the texture is overridden.

Description

Makes oPC load texture sNewName instead of sOldName.

If oPC is OBJECT_INVALID, it will apply the override to all active players.

Setting sNewName to "" will clear the override and revert to original.


Remarks

This changes a texture over an entire module. This is per-PC.

A variety of uses for this come to mind; you can alter textures of the ground tiles to replicate snow falling and piling up. You can alter the texture of a certain unique placeable (which affects the entire module). Per-PC madness effects, or even altering entire tileset appearances can occur.

Version

1.74.8193.6

Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: ReplaceObjectTexture()