lost NPC attachments and editing appearance note cards

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

lost NPC attachments and editing appearance note cards

paul emery
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.

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'?
Reply | Threaded
Open this post in threaded view
|

Re: lost NPC attachments and editing appearance note cards

justincc
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
> [hidden email]
> 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
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: lost NPC attachments and editing appearance note cards

paul emery
the HG visitor was from osgrid. the world she was visiting is stand alone running 7.4 Post_Fixes
The note card is as follows:

<llsd>

  <map>

    <key>serial</key>

    <integer>0</integer>

    <key>height</key>

    <real>1.8235428333282471</real>

    <key>wearables</key>

    <array>

      <array>

        <map>

          <key>item</key>

          <uuid>46105c81-f8e5-45ae-bf1a-8555dc1dc8fa</uuid>

          <key>asset</key>

          <uuid>7d7b437d-b0fb-cb69-d43d-c75153c90183</uuid>

        </map>

      </array>

      <array>

        <map>

          <key>item</key>

          <uuid>bbc0ca43-c84e-40e3-9caa-421d45bffa2b</uuid>

          <key>asset</key>

          <uuid>ff4c4bf0-3aba-5e8c-9df7-d5bf6091e1f6</uuid>

        </map>

      </array>

      <array>

        <map>

          <key>item</key>

          <uuid>0b0b420c-b5bd-428d-b5f1-9a6ae5f69a45</uuid>

          <key>asset</key>

          <uuid>273f394d-dbd0-43af-8145-aa832ea8c027</uuid>

        </map>

      </array>

      <array>

        <map>

          <key>item</key>

          <uuid>157df91a-a7a9-4abe-8d99-381d8c067ce4</uuid>

          <key>asset</key>

          <uuid>92e88643-08ce-4e67-b305-b68b499914b7</uuid>

        </map>

      </array>

      <array />

      <array>

        <map>

          <key>item</key>

          <uuid>9d193260-b219-4228-b3ca-1c28b61073d2</uuid>

          <key>asset</key>

          <uuid>953d0a86-6d47-44bd-8677-ed7e5a2e0c28</uuid>

        </map>

      </array>

      <array>

        <map>

          <key>item</key>

          <uuid>0394ed16-1f57-46ca-bca3-8ddcc2768134</uuid>

          <key>asset</key>

          <uuid>1dc440e7-d08f-4372-addc-a6a89ee681e9</uuid>

        </map>

      </array>

      <array>

        <map>

          <key>item</key>

          <uuid>c0955600-3789-4203-8159-a84e86a54ce1</uuid>

          <key>asset</key>

          <uuid>1eafd0ed-758f-6d70-3adc-b92a7755e13c</uuid>

        </map>

      </array>

      <array>

        <map>

          <key>item</key>

          <uuid>f3789fc1-543f-4cc1-bf27-00684d80b6c0</uuid>

          <key>asset</key>

          <uuid>8b988448-f4db-2c52-9406-0c0a11c93f75</uuid>

        </map>

      </array>

      <array />

      <array />

      <array />

      <array />

      <array />

      <array />

    </array>

    <key>textures</key>

    <array>

      <uuid>46697265-7374-6f72-6d00-000000000000</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>3f578ae3-cae5-42af-9e7e-82d0f36f4028</uuid>

      <uuid>6bd45a1e-45f2-4e1e-b6f4-bd7c0c42c7b7</uuid>

      <uuid>4c009098-600f-4bca-8b0c-b3725e45d2f4</uuid>

      <uuid>cdf305a0-f44e-4282-81fe-e667975f4d13</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>

      <uuid>59e02b0d-7b54-443c-b624-ec7d2319f4ed</uuid>

    </array>

    <key>visualparams</key>

    <binary encoding="base64">JT9aF0x/WXI/WQCkP0xxv5lMPgBMdYx/Jr91VXKMfwDL/wB/AAB/AAoMAAAA/3J/Yz9/jH9/AAAAvwCMBQAAAAAAAAAAkdiFAIQAcp4AAIeEdUn/NQBgdWTY1v////8Af0zMAIQZAIVaf2V/awB/mX9/f387M3J/f3JMT3eMpT8AAAAAf38AAAAAfwCfAADJf1tVg4Sya45yAADMPXqCANb/xgAAWx5m4v/G////HBwc////5QD/f39//////////wD//39//wB/f/8ZZP////9UAAAAM2v///8=</binary>

    <key>attachments</key>

    <array>

      <map>

        <key>point</key>

        <integer>13</integer>

        <key>item</key>

        <uuid>12122a8f-dab4-43d0-aac9-4197a790b95e</uuid>

        <key>asset</key>

        <uuid>cf56f185-3b9a-420b-aaba-032f3094e8a9</uuid>

      </map>

      <map>

        <key>point</key>

        <integer>14</integer>

        <key>item</key>

        <uuid>56effb5e-3be6-4e01-8d4b-dd65cacecc34</uuid>

        <key>asset</key>

        <uuid>248f7e77-de6f-497a-87af-bdc0a7453ae8</uuid>

      </map>

      <map>

        <key>point</key>

        <integer>2</integer>

        <key>item</key>

        <uuid>39c7b7bb-a994-4424-b403-853b83b87f3b</uuid>

        <key>asset</key>

        <uuid>bf672a62-82d1-4cd8-9e90-b917f9c5198e</uuid>

      </map>

      <map>

        <key>point</key>

        <integer>35</integer>

        <key>item</key>

        <uuid>5a4a6c87-9a3f-496a-8e4b-856996415f99</uuid>

        <key>asset</key>

        <uuid>b7afe70f-6ff2-4dec-ab38-c8dc264194bb</uuid>

      </map>

      <map>

        <key>point</key>

        <integer>7</integer>

        <key>item</key>

        <uuid>0cc0b5b7-d04e-46aa-81d7-8126d6ec468b</uuid>

        <key>asset</key>

        <uuid>1624218e-44b5-4b64-ac46-a967a7d240fa</uuid>

      </map>

      <map>

        <key>point</key>

        <integer>8</integer>

        <key>item</key>

        <uuid>7e618795-f5de-4969-bd32-87ef71d21e24</uuid>

        <key>asset</key>

        <uuid>665748ed-d891-48ec-9013-436924408e76</uuid>

      </map>

    </array>

  </map>

</llsd>
Reply | Threaded
Open this post in threaded view
|

Re: lost NPC attachments and editing appearance note cards

paul emery
In reply to this post by justincc
Thanks for the help justin
I was able to add some hair from my inventory to the note card to replace the missing hair
what i needed was the uuid from clicking on the item in inventory
and then i needed the proper attachment point which i was able to get from here
http://wiki.secondlife.com/wiki/LlAttachToAvatar
here again is the link justin provide to understand the apparence card format and remember he says to ignor the >item< setting
http://opensimulator.org/wiki/Appearance_Formats

Thanks again justin
Reply | Threaded
Open this post in threaded view
|

Re: lost NPC attachments and editing appearance note cards

justincc
In reply to this post by paul emery
Okay, I'd be interested in knowing if git master 170d376 makes any difference.

However, this would require one to build master dev code, of course.

On 09/01/13 00:54, paul emery wrote:

> the HG visitor was from osgrid. the world she was visiting is stand alone
> running 7.4 Post_Fixes
> The note card is as follows:
>
> <llsd>
>
>    <map>
>
>      <key>serial</key>
>
>      <integer>0</integer>
>
>      <key>height</key>
>
>      <real>1.8235428333282471</real>
>
>      <key>wearables</key>
>
>      <array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>46105c81-f8e5-45ae-bf1a-8555dc1dc8fa</uuid>
>
>            <key>asset</key>
>
>            <uuid>7d7b437d-b0fb-cb69-d43d-c75153c90183</uuid>
>
>          </map>
>
>        </array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>bbc0ca43-c84e-40e3-9caa-421d45bffa2b</uuid>
>
>            <key>asset</key>
>
>            <uuid>ff4c4bf0-3aba-5e8c-9df7-d5bf6091e1f6</uuid>
>
>          </map>
>
>        </array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>0b0b420c-b5bd-428d-b5f1-9a6ae5f69a45</uuid>
>
>            <key>asset</key>
>
>            <uuid>273f394d-dbd0-43af-8145-aa832ea8c027</uuid>
>
>          </map>
>
>        </array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>157df91a-a7a9-4abe-8d99-381d8c067ce4</uuid>
>
>            <key>asset</key>
>
>            <uuid>92e88643-08ce-4e67-b305-b68b499914b7</uuid>
>
>          </map>
>
>        </array>
>
>        <array />
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>9d193260-b219-4228-b3ca-1c28b61073d2</uuid>
>
>            <key>asset</key>
>
>            <uuid>953d0a86-6d47-44bd-8677-ed7e5a2e0c28</uuid>
>
>          </map>
>
>        </array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>0394ed16-1f57-46ca-bca3-8ddcc2768134</uuid>
>
>            <key>asset</key>
>
>            <uuid>1dc440e7-d08f-4372-addc-a6a89ee681e9</uuid>
>
>          </map>
>
>        </array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>c0955600-3789-4203-8159-a84e86a54ce1</uuid>
>
>            <key>asset</key>
>
>            <uuid>1eafd0ed-758f-6d70-3adc-b92a7755e13c</uuid>
>
>          </map>
>
>        </array>
>
>        <array>
>
>          <map>
>
>            <key>item</key>
>
>            <uuid>f3789fc1-543f-4cc1-bf27-00684d80b6c0</uuid>
>
>            <key>asset</key>
>
>            <uuid>8b988448-f4db-2c52-9406-0c0a11c93f75</uuid>
>
>          </map>
>
>        </array>
>
>        <array />
>
>        <array />
>
>        <array />
>
>        <array />
>
>        <array />
>
>        <array />
>
>      </array>
>
>      <key>textures</key>
>
>      <array>
>
>        <uuid>46697265-7374-6f72-6d00-000000000000</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>3f578ae3-cae5-42af-9e7e-82d0f36f4028</uuid>
>
>        <uuid>6bd45a1e-45f2-4e1e-b6f4-bd7c0c42c7b7</uuid>
>
>        <uuid>4c009098-600f-4bca-8b0c-b3725e45d2f4</uuid>
>
>        <uuid>cdf305a0-f44e-4282-81fe-e667975f4d13</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
>
>        <uuid>59e02b0d-7b54-443c-b624-ec7d2319f4ed</uuid>
>
>      </array>
>
>      <key>visualparams</key>
>
>      <binary
> encoding="base64">JT9aF0x/WXI/WQCkP0xxv5lMPgBMdYx/Jr91VXKMfwDL/wB/AAB/AAoMAAAA/3J/Yz9/jH9/AAAAvwCMBQAAAAAAAAAAkdiFAIQAcp4AAIeEdUn/NQBgdWTY1v////8Af0zMAIQZAIVaf2V/awB/mX9/f387M3J/f3JMT3eMpT8AAAAAf38AAAAAfwCfAADJf1tVg4Sya45yAADMPXqCANb/xgAAWx5m4v/G////HBwc////5QD/f39//////////wD//39//wB/f/8ZZP////9UAAAAM2v///8=</binary>
>
>      <key>attachments</key>
>
>      <array>
>
>        <map>
>
>          <key>point</key>
>
>          <integer>13</integer>
>
>          <key>item</key>
>
>          <uuid>12122a8f-dab4-43d0-aac9-4197a790b95e</uuid>
>
>          <key>asset</key>
>
>          <uuid>cf56f185-3b9a-420b-aaba-032f3094e8a9</uuid>
>
>        </map>
>
>        <map>
>
>          <key>point</key>
>
>          <integer>14</integer>
>
>          <key>item</key>
>
>          <uuid>56effb5e-3be6-4e01-8d4b-dd65cacecc34</uuid>
>
>          <key>asset</key>
>
>          <uuid>248f7e77-de6f-497a-87af-bdc0a7453ae8</uuid>
>
>        </map>
>
>        <map>
>
>          <key>point</key>
>
>          <integer>2</integer>
>
>          <key>item</key>
>
>          <uuid>39c7b7bb-a994-4424-b403-853b83b87f3b</uuid>
>
>          <key>asset</key>
>
>          <uuid>bf672a62-82d1-4cd8-9e90-b917f9c5198e</uuid>
>
>        </map>
>
>        <map>
>
>          <key>point</key>
>
>          <integer>35</integer>
>
>          <key>item</key>
>
>          <uuid>5a4a6c87-9a3f-496a-8e4b-856996415f99</uuid>
>
>          <key>asset</key>
>
>          <uuid>b7afe70f-6ff2-4dec-ab38-c8dc264194bb</uuid>
>
>        </map>
>
>        <map>
>
>          <key>point</key>
>
>          <integer>7</integer>
>
>          <key>item</key>
>
>          <uuid>0cc0b5b7-d04e-46aa-81d7-8126d6ec468b</uuid>
>
>          <key>asset</key>
>
>          <uuid>1624218e-44b5-4b64-ac46-a967a7d240fa</uuid>
>
>        </map>
>
>        <map>
>
>          <key>point</key>
>
>          <integer>8</integer>
>
>          <key>item</key>
>
>          <uuid>7e618795-f5de-4969-bd32-87ef71d21e24</uuid>
>
>          <key>asset</key>
>
>          <uuid>665748ed-d891-48ec-9013-436924408e76</uuid>
>
>        </map>
>
>      </array>
>
>    </map>
>
> </llsd>
>
>
>
>
> --
> View this message in context: http://opensim-users.2152040.n2.nabble.com/lost-NPC-attachments-and-editing-appearance-note-cards-tp7579268p7579287.html
> Sent from the opensim-users mailing list archive at Nabble.com.
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> 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
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users