On 06/01/13 00:18, paul emery wrote:
I am having problems with NPC's losing attachments.
1. I create an appearance note card by having an avatar touch a "Clone
yourself" prim having a script with the line
osAgentSaveAppearance(llDetectedKey(0), "appearance");
I open the prim and rename the resultant appearance note card and then save
it to my inventory. I can then drop this note card into another prim and
recreate the NPC controlled by that object using
npc = osNpcCreate(firstn, lastn, npcPos, renamednotecard);
Seems to work great if the model avatar is logged directly into the grid
when the note card is created. However if the avatar that i am modeling is
there via HyperGrid the attachments only seem to show up temporarily.
Clothing, shape and skin are still there when i recreate the npc but not
attachments.
Interesting. From looking at the code, what I think is happening here is that when the AvatarFactoryModule attempts to
permanently store the normally temporary baked textures, the HGAssetBroker AssetService implementation identifies those
as HG assets and thinks they need to be exported to the visitor's OpenSimulator installation, rather than persisted on
this installation.
It might be possible to work around this by setting the asset ID to a non-HG ID, but this would rely on the notecard
also saving the non-HG version. Perhaps you could attach the notecard so we could take a look?
So
2. I see by looking at the xml of a note card that it appears that
attachments are listed by their attachment point and then identified by an
item key and an asset key.
Can I edit the appearance card xml and add/modify attachments by reference
to something that i have in my inventory? (I can find an asset key by
looking at the item in my inventory but where would i find the 'item key'?
The item IDs are actually irrelevant and could be set to UUID.Zero [1]. They are there because the same data format is
reused for other purposes.
[1] http://opensimulator.org/wiki/Appearance_Formats
--
View this message in context:
http://opensim-users.2152040.n2.nabble.com/lost-NPC-attachments-and-editing-appearance-note-cards-tp7579268.html
Sent from the opensim-users mailing list archive at Nabble.com.
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
--
Justin Clark-Casey (justincc)
OSVW Consulting
http://justincc.org
http://twitter.com/justincc
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users