Jump to content

Obse command named "SetMale/FemaleBipedPath"


VAndolini

Recommended Posts

I was just searching through documentation for OBSE, then I stumbled across this command... From what I understood, it's used for changing NIF model for armor and clothing pieces... I tried using this command in a CS script, then applying this script to a clothing item, the script itself saved successfully, but it didn't work ingame. So I've got some questions regarding the command:

-Is it really used to change some item's model or am I misunderstanding something? If so, does the item's 3d need to be reloaded so that the model would show up?

-The convention for using this command looks like this:

reference.SetMaleBipedPath modelPath:string objectID:ref (from OBSE command documentation)

-So how do I put the model path? Should it be like C:\Program Files etc or does it already have something like Oblivion\Data header so that I would need to input the model path from Meshes\etc?

-What does the objectID:ref mean? What do I have to put in this?

 

I'll appreciate any help I get with this

 

P.S. Tell me if I didn't make myself clear enough - I'm pretty new to scripting and my English is not the best...

 

 

Link to comment
Share on other sites

About the syntax:

Most commands that affect the Base Object may be used either using a reference (syntax = reference.command) or a Base Object (syntax = comand objectID:ref)

(read Base Objects vs References to understand the basics. Also, the "What is this?" tooltip in function pages links to a page that explains the syntax) in detail)

 

About the function:

I think your understanding is correct, but i have never used it myself.

"modelPath:string" is the file file path within quotes, but i don't know if it should be the full path "C:\..." or starting from the Data folder, like "Data\meshes\...".

Edited by QQuix
Link to comment
Share on other sites

I fail to find any "Set..." function calls in my own scripts, as I was only ever using the "Copy..." and "Mod..." variants of these functions, so I can't provide any definitive examples, but some things are important to keep in mind with these.

As it's about setting the male and female biped path of a model, said model can only be an inventory object, something you can equip and which will look different on both male and female actors. An item lying on the ground's visuals it is not.

As Inventory Objects do not exist by reference while in an inventory, the reference way of using it is a no-go: reference.SetMaleBipedPath modelPath:string (never worked for me either)
All functions obtaining inventory objects only return their Base Objects. Thus the correct use of this function will only ever be: SetMaleBipedPath modelPath:string objectID:ref

I'm not exactly sure about the actual file path to use with these, but it's definitely never ever starting with the drive letter "C:"! Absolute paths are a nightmare to the game, and neither will the CS allow nor should resource files ever be using them. My best guess would be paths starting at "meshes\...", and mind the "\" as it'll likely not like a "/" instead (or was it the other way round?). "data\meshes\..." could be right as well, but for some reason I doubt it (it's too long since already, I knew it once in the past).

 

And yes, you guessed right before already, in order for the changes to "show" you need to update the visuals of the actor wearing the item. My scripts usually do so by unequipping and reequipping items, but my scripts also deal with "exchanging" items anyways. One might use "Update3D" on the actor instead, I'm just not sure it'll really work like that.

 

As you say it doesn't work, would you mind giving as a look at the script context you're using it in? Could as well be a fault of the way you obtain the item reference, or maybe a usage mistake and similar.

Link to comment
Share on other sites

Sorry I didn't reply that long, I'm on a vacation and my PC's back home...

To DrakeTheDragon:

So, in the CS I chose some kind of a clothing piece, like lowerclasspants05, which is a base object for jail pants that are on you from the start, go to Script in the edit menu, then type in something of that kind:

Scn script

Begin onEquip

SetMaleBipedPath modelPath: "either meshes\...model.nif or data\meshes... or start from the folder next after meshes"

objectID: now here I tried putting a referrence ID (of the dropped thing, I know it won't work now tho), a base ID and an editor ID (which is probably wrong too)

End

Didn't seem to work for me, tho I tried with npcs and also no effect, but I'm gonna try the Update3D, thanks for that!

To razorpony: thanks for the link, I'll check it out, but I want to ask one thing: since that function works only with a base object, then how don't all the clothes using that model change simultaneously, like on all the npcs wearing that shirt or whatever?

Link to comment
Share on other sites

To razorpony: thanks for the link, I'll check it out, but I want to ask one thing: since that function works only with a base object, then how don't all the clothes using that model change simultaneously, like on all the npcs wearing that shirt or whatever?

Actually they do, but you won't ever see it happen. The NPCs not to be affected by this also need to have their visuals updated first, e.g. with Update3D. And the script's likely setup in a way that when it's done with its iteration and resumes action back to the game the item's model selection was already reverted. So even "if" another NPC not to be affected by it was to accidentally happen to equip the same item changed during the script run "right" the frame the change was performed in, it still won't be able to do so unless the change got already reverted first.

 

Sadly your example wasn't really giving "any" information about your use of the function, no clue to go by telling you you're doing it right or wrong.

Turning your little snippet into an actual example I was rather hoping for something more along this line:

Begin OnEquip
    SetMaleBipedPath "meshes\...model.nif" lowerclasspants05
End

or maybe

ref myItem
...
Begin OnEquip
    set myItem to GetSelf ; obtain reference to the item the script is running on, not sure this will work here
    SetMaleBipedPath "data\meshes\...model.nif" myItem
End

or even

ref myItem
...
Begin GameMode
    set myItem to player.GetEquippedObject 3 ; obtain Base Object reference to what is currently equipped in the legs slot for the player
    SetMaleBipedPath "clothes\lowerclass\...model.nif" myItem
End

This would be something we could clearly spot any mistakes in and tell you right away.

 

Like using "int myItem" instead of "ref", or putting "lowerclasspants05" in quotes ("), or 'not' putting the path in quotes, or using the function to obtain "myItem" wrong, something along that line was what I was hoping for from getting the 'context' in which you use the function call.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...